|
[Sponsors] |
How to visualize the difference of fields btween two simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 16, 2013, 07:43 |
How to visualize the difference of fields btween two simulation
|
#1 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hi Foamers,
Could you please tell me how to visualize the difference of fields (T, U etc.) between two OF simulations using Paraview? Same mesh used for both. Thanks in advance. |
|
August 16, 2013, 07:52 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
I would just copy some files for the cases you want to compare and then use foamCalc.
You can subtract two fields by Code:
foamCalcEx addSubtract field1 subtract -field field2 |
|
August 16, 2013, 07:58 |
|
#3 | |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Quote:
Thanks a lot for your quick reply. Could you please tell me in little details. Suppose I have two cases (case1 & case2) and I want to compare T and U between case 1 & case2. How do I proceed? |
||
August 16, 2013, 08:03 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Well, easiest is to copy T en U from case 1 to case 2 (but with a different name), especially if you want to do this only once, it is a quick and dirty solution.
|
|
August 16, 2013, 08:34 |
|
#5 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Thanks Bernhard, I will try this.
|
|
August 16, 2013, 09:01 |
|
#6 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hi Bernhard,
I did the followings and got error. Please let me know what I am missing. My cases are multi region case. I copied latest T from case2 to case1 in corresponding regions with name T_reg1, T_reg2 and T_reg3 in the latest time directory. The tried the following commands and every time getting error. foamCalc addSubtract T subtract -T T_reg1 -region reg1 -latestTime foamCalc addSubtract T subtract T_reg1 -region reg1 -latestTime foamCalc -region reg1 -latestTime addSubtract T subtract -T T_reg1 foamCalc addSubtract -region reg1 -latestTime T subtract -T T_reg1 |
|
August 16, 2013, 09:03 |
|
#7 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Instead of -T and -region use always -field. I'm sorry if this was unclear.
|
|
August 19, 2013, 09:19 |
|
#8 |
Member
MSarkar
Join Date: Dec 2009
Posts: 99
Rep Power: 16 |
Hi Bernhard,
Thanks a lot for your help. Finally it worked. |
|
August 21, 2013, 06:21 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi all
I want to compare p fields between two similar time's of two successive cycles in my case to see if the solution has converged well or not yet,how to do what has told here only for one case in different times?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 30, 2013, 08:06 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
this error occurred when I wanted to have access to help:
Code:
ehsan@Ehsan-com:~$ foamCalcEx -help foamCalcEx: command not found ehsan@Ehsan-com:~$ foamCalcEx --help foamCalcEx: command not found ehsan@Ehsan-com:~$ foamCalcEX --help foamCalcEX: command not found ehsan@Ehsan-com:~$ foamCalcEX addSubtract --help foamCalcEX: command not found ehsan@Ehsan-com:~$
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 31, 2013, 13:46 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
foamCalc is one of the few applications in OpenFOAM that do not respond directly to help requests This is due to how it was designed to work, namely it first must strictly receive the name of the operation name for the calculation. For example, these two commands should work for getting help: Code:
foamCalc -help foamCalc addSubtract -help For additional help reference on how to use these kinds of applications:
In particular to your problem about foamCalcEx, I believe there is a thread where building it is discussed... well, not exactly dedicated to it, but here it is: http://www.cfd-online.com/Forums/ope...l-mag-u-2.html Best regards, Bruno
__________________
|
|
August 31, 2013, 16:35 |
|
#12 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi Bruno
thanks,but whats foamCalcEx? Quote:
Code:
ehsan@Ehsan-com:~$ foamCalcEx addSubtract -help foamCalcEx: command not found ehsan@Ehsan-com:~$ foamCalcEx -help foamCalcEx: command not found
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||
August 31, 2013, 17:02 |
|
#13 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
the link for download is banned!
http://openfoamwiki.net/index.php/Co...amCalcEx#Usage Code:
ehsan@Ehsan-com:~$ hg clone https://code.google.com/p/foamcalcex/ abort: HTTP Error 403: Forbidden
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 31, 2013, 17:12 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Doesn't work for the same reason has you mentioned here: http://www.cfd-online.com/Forums/ope...tml#post443306 - post #59
But this is a good opportunity to see if you can download from the correct location. Try these two possibilities:
__________________
|
|
August 31, 2013, 17:28 |
|
#15 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks,the second way answered well:
Code:
ehsan@Ehsan-com:~$ hg clone http://code.google.com/p/foamcalcex/ abort: HTTP Error 403: Forbidden ehsan@Ehsan-com:~$ wget http://foamcalcex.googlecode.com/archive/tip.zip --2013-09-01 00:56:36-- http://foamcalcex.googlecode.com/archive/tip.zip Resolving foamcalcex.googlecode.com... 173.194.70.82, 2a00:1450:4001:c02::52 Connecting to foamcalcex.googlecode.com|173.194.70.82|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/x-compressed] Saving to: `tip.zip' [ <=> ] 95,283 4.46K/s in 22s 2013-09-01 00:57:02 (4.26 KB/s) - `tip.zip' saved [95283]
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 31, 2013, 17:54 |
|
#16 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
I've updated the wiki page. Check the updated build instructions: http://openfoamwiki.net/index.php/Co...alcEx#Download
__________________
|
|
August 31, 2013, 18:05 |
|
#17 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks a lot, I wonder how code.google worked altough that's good!
I have to use sudo? Code:
ehsan@Ehsan-com:~/foamcalcex-2c7dd0c903db$ ./Allwmake ~/foamcalcex-2c7dd0c903db/postProcessing ~/foamcalcex-2c7dd0c903db ./Allwmake: line 5: ./Allwmake: Permission denied
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 31, 2013, 18:14 |
|
#18 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Ooops, I forgot to test the commands myself... there was a file missing from the chmod command line... the fixed one is:
Code:
chmod +x Allwmake postProcessing/Allwmake As for googlecode.com vs code.google.com: if I'm not mistaken, the problem is that "code.google.com" switches to HTTPS by default, and HTTPS apparently is banned in your country. But "googlecode.com" does not rely on HTTPS to work, so you can download files from the Google Code repositories from that server.
__________________
|
|
August 31, 2013, 18:45 |
|
#19 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks,it compiled well,but I don't know how to use it for my purpose yet!
Quote:
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||
August 31, 2013, 20:06 |
|
#20 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Quote:
Bernhard had already explained this in post #4: Quote:
Code:
cp 0.1/p 0.2/p_0.1 foamCalc addSubtract p subtract -field p_0.1 -time 0.2 If you want to do this for all time instances, then... er... then some scripting is required... let's see if I can do this half-asleep : Code:
fieldToCopy="p" a=0 for b in $(foamListTimes); do cp $a/${fieldToCopy} $b/${fieldToCopy}_prev a=$b done foamCalc addSubtract ${fieldToCopy} subtract -field ${fieldToCopy}_prev What you know... I did it half-asleep Best regards, Bruno
__________________
|
|||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Overflow problem in steady simulation | ReeKo | CFX | 11 | October 8, 2008 18:57 |
Difference of temporally and spatially simulation? | leaf | Main CFD Forum | 0 | May 14, 2006 22:35 |
Unsteady vs Steady simulation - any difference? | Sally | Main CFD Forum | 16 | December 16, 2005 10:15 |
Fire simulation using FDS from NIST | Jens | Main CFD Forum | 1 | January 22, 2004 02:53 |
3-D Contaminant Dispersal Simulation | Apple L S Chan | Main CFD Forum | 1 | December 23, 1998 11:06 |