|
[Sponsors] |
February 11, 2014, 06:03 |
|
#81 |
Member
|
It does not matter. Script uses standard unix-commands to work with txt log-file.
__________________
practice makes perfect |
|
February 12, 2014, 04:51 |
|
#82 | |
New Member
Join Date: Oct 2013
Posts: 15
Rep Power: 13 |
Quote:
I think the problem is, that the cut utility cuts out the wrong part. you should have a look at the "-f9" part of the script. In your case you maybe need to cut out the 3. or 7. word and not the 9., just try it |
||
February 12, 2014, 18:00 |
|
#83 |
New Member
Stephan
Join Date: Feb 2014
Posts: 2
Rep Power: 0 |
Thank you for the idea, but if i use "-f3" i get the message "line 8: Bad data on line 1" with "-f7" i get same error than with -"f9"
|
|
February 13, 2014, 11:17 |
|
#84 | |
New Member
Join Date: Oct 2013
Posts: 15
Rep Power: 13 |
Quote:
2. 3 or 5 where just ideas. seems like you cut out words. you have to look into your log file, to get the right position in the line, where you got a search hit by your grep. maybe you should have a look at, what this script reallys does. it's a nice exercise to get known to the grep and cut utilities. |
||
March 15, 2014, 08:50 |
pressure iterations -- final iteration final residual
|
#85 |
New Member
Kai
Join Date: Mar 2014
Posts: 5
Rep Power: 12 |
Hello all
First of all, Openfoam is PITA. Second of all, thanks for this very useful script. Now I am having an issue: so my log file output looks like this: Code:
smoothSolver: Solving for Ux, Initial residual = 0.000427706, Final residual = 4.58245e-06, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.00102392, Final residual = 1.18461e-05, No Iterations 2 GAMG: Solving for p, Initial residual = 0.00490348, Final residual = 0.000327938, No Iterations 2 GAMG: Solving for p, Initial residual = 0.000625867, Final residual = 4.67654e-05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.000200362, Final residual = 1.50974e-05, No Iterations 3 time step continuity errors : sum local = 1.33872e-07, global = -2.67987e-18, cumulative = 1.0102e-14 smoothSolver: Solving for nuTilda, Initial residual = 0.000758284, Final residual = 7.80812e-06, No Iterations 2 Uncorrected Ubar = 0.886833 Ubar = 1.06 pressure gradient correction = 8749.53 pressure gradient = 13 ExecutionTime = 1062.22 s ClockTime = 1551 s Code:
set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Time' plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f13 | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f13 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for p' | cut -d' ' -f13 | sed -n 'p;N;N' | tr -d ','" title 'p' with lines,\ "< cat log | grep 'Solving for nuTilda' | cut -d' ' -f13 | tr -d ','" title 'nuTilda' with lines reread Can anyone tell me if there is something wrong with my code? If not how should I go about plotting final residual of last pressure iteration? Thank you very very much. |
|
April 26, 2014, 10:06 |
|
#86 |
New Member
wubin
Join Date: Mar 2013
Posts: 9
Rep Power: 13 |
nice ,thks for sharing
|
|
May 7, 2014, 00:45 |
|
#87 |
New Member
Mohammed Ameenuddin
Join Date: Feb 2014
Posts: 15
Rep Power: 12 |
Hello everyone,
I have used pyfoam to plot residuals but when I use parallel, I am not able to get the plots. Can anyone tell how can I make pyfoam to plot residuals when running in parallel. Thank you |
|
May 7, 2014, 06:08 |
|
#88 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 7, 2014, 07:14 |
|
#89 |
New Member
Mohammed Ameenuddin
Join Date: Feb 2014
Posts: 15
Rep Power: 12 |
I am using scotch method to decompose my problem into two processors.
I used mpirun -np 2 simpleFoam -parallel > log& command to start my simulations. Later I used pyFoamPlotWatcher.py log in order to plot my residuals but I get gnuplot > plot line 0: function to plot expected but I don't find the output being generated. Thank you |
|
May 7, 2014, 10:01 |
|
#90 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 8, 2014, 01:27 |
|
#91 | |
New Member
Mohammed Ameenuddin
Join Date: Feb 2014
Posts: 15
Rep Power: 12 |
I have looked into the log file and it seems to be as it should be.
After using command for Watcher this is I get Quote:
pyfoamFiles.tar.gz log.tar.gz |
||
May 8, 2014, 09:29 |
|
#92 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Anyway: the problem is that your gnuplot is missing the default terminal type x11? Two possibilities: it is Windows or similar. The other: the environment variable DISPLAY is not set (probably because you connected to a remote machine via ssh without the -X-option) and gnuplot decided (No DISPLAY: no X11). Any way it seems that there is vital information that you're withholding from us
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 9, 2014, 03:05 |
|
#93 |
New Member
Mohammed Ameenuddin
Join Date: Feb 2014
Posts: 15
Rep Power: 12 |
The terminal x11 was the issue. I re-installed gnuplot and it is working fine now. Thank you for the help.
|
|
June 6, 2014, 10:07 |
|
#94 |
New Member
Thomas
Join Date: May 2014
Posts: 14
Rep Power: 12 |
Hi Foamers,
it is also possible to use cat to separate the data before using gnuplot. It is very much flexible in that way. I know it has also disadvantages but maybe it helps someone. I used it to plot the residuals vs Time: Code:
cat log | grep -w 'Time =' | cut -d' ' -f3 | tr -d ',' > time_tmp.dat Code:
cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ',' > Uy_tmp.dat Code:
paste time_tmp.dat Ux_tmp.dat Uy_tmp.dat Uz_tmp.dat > residuals.dat Code:
plot "residuals.dat" using 1:2 title 'Ux' with lines,"residuals.dat" using 1:3 title 'Uy' with lines,"residuals.dat" using 1:4 title 'Uz' with lines Thomas |
|
July 22, 2014, 12:45 |
Plot U and T residuals on reactingFoam
|
#95 |
New Member
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12 |
Hi everyone!
I am trying to plot the U (Ux, Uy, Uz) and T residuals from reactingFoam. I am only able to plot the variables that are discriminated in my log file, not these. Anyone knows how to plot these other variables? Or how to make them appear in my log file? Thanks in advance |
|
July 22, 2014, 18:32 |
|
#96 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Missing U in the log-file is strange, but missing T is probably OK: usually OF solves for the enthalpy h. T is then calculated from that
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
July 23, 2014, 12:04 |
|
#97 |
New Member
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12 |
Thank you for your reply Bernhard.
Yes, indeed I also found it strange to be missing U. I have also run a reactingFoam tutorial, and again, U was not present in the log file. Is this a characteristic of the solver? Does not make much sense since it solves the momentum equation, U should be there, as the enthalpy and the species are. |
|
July 23, 2014, 17:50 |
|
#98 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
July 24, 2014, 04:39 |
|
#99 |
New Member
Duarte Magalhães
Join Date: Apr 2014
Location: Lisbon, Portugal
Posts: 24
Rep Power: 12 |
Thank you so much Bernhard!
|
|
September 30, 2014, 15:17 |
|
#100 |
Member
sampath
Join Date: Sep 2014
Posts: 37
Rep Power: 12 |
This is very useful. Thank you
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
plot residuals in multiregion solver | val46 | OpenFOAM | 4 | December 12, 2016 07:06 |
To Plot Residuals on the fly. | neeraj | OpenFOAM Running, Solving & CFD | 5 | October 2, 2013 07:23 |
[PyFoam] why pyFoamPlotRunner doesn't plot continuity residuals? | immortality | OpenFOAM Community Contributions | 10 | May 5, 2013 07:13 |
plot of residuals | hawkeye321 | OpenFOAM | 5 | December 7, 2012 10:05 |
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread | wyldckat | OpenFOAM Installation | 2 | July 11, 2012 17:01 |