|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
OpenFoam
Join Date: Jul 2012
Posts: 24
Rep Power: 2 ![]() |
Can anyone explain how to plot real time residuals in openfoam 2.1.1. I have seen tutorials for older versions but its not working in 2.1.1
|
|
|
|
|
|
|
|
|
#2 | |
|
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,123
Rep Power: 30 ![]() ![]() |
Quote:
But maybe if you refer to the method you're using (link on this forum) and the solver you're using someone can enlighten you
__________________
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 |
||
|
|
|
||
|
|
|
#3 |
|
New Member
Alexandr
Join Date: Jul 2012
Location: Odessa, Ukraine
Posts: 1
Rep Power: 0 ![]() |
Needed: Linux, OpenFoam, gnuplot, X (X.org).
1) Run in first terminal shell solver like icoFoam as: $ icoFoam > log.icoFoam 2) Run in second terminal shell gnuplot as: $ gnuplot Courant repeat this step for other plot in third terminal etc. 3) Make additional file for plot graph on runtime OpenFoam. - If you don't need logscale: comment line "set logscale y" with # in first position as "#set logscale y" or delete line. - For plotting any other fields in log file you must editing argument grep command ex. "grep 'Courant Number'" count words in grep string number of field: "Courant Number mean: 0.000417096 max: 0.124527" 1-"Courant" 2-"Number" 3-"mean:" 5-"max:" filds No 4 and 6 is mean and max Courant number. Its using in args of cut command: "cut -d' ' -f4" - If you need draw only one graph: use command plot like: "plot "< cat log.icoFoam | grep 'Courant Number' | cut -d' ' -f4 | tr -d ','" title 'Courant Number mean' with lines" - Edit time in seconds in gnuplot command "pause 10" for redraw plot. - Other commands are trivial File: log.icoFoam (part of file for example) ------------------------------------ Time = 0.1 Courant Number mean: 0.000417096 max: 0.124527 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 3.59578e-17, No Iterations 1 DICPCG: Solving for p, Initial residual = 1, Final residual = 9.72814e-07, No Iterations 756 time step continuity errors : sum local = 2.66067e-09, global = 5.15345e-14, cumulative = 5.15345e-14 DICPCG: Solving for p, Initial residual = 1.07532e-06, Final residual = 4.96329e-07, No Iterations 1 time step continuity errors : sum local = 1.23062e-09, global = 5.01838e-13, cumulative = 5.53373e-13 ExecutionTime = 4.9 s ClockTime = 5 s ------------------------------------ File: Courant ------------------------------------ set logscale y set title "Courant" set ylabel 'Courant' set xlabel 'Iteration' plot "< cat log.icoFoam | grep 'Courant Number' | cut -d' ' -f4 | tr -d ','" title 'Courant Number mean' with lines,\ "< cat log.icoFoam | grep 'Courant Number' | cut -d' ' -f6 | tr -d ','" title 'Courant Number max' with lines pause 10 reread ------------------------------------ File: Residuals ------------------------------------ set logscale y set title "Residuals" set ylabel 'Residual' set xlabel 'Iteration' plot "< cat log.icoFoam | grep 'Solving for p' | cut -d' ' -f9 | tr -d ','" title 'p' with points pause 10 reread ------------------------------------ Last edited by chern; January 21, 2013 at 06:45. |
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial of how to plot residuals ! | wolle1982 | OpenFOAM Running, Solving & CFD | 66 | April 11, 2013 07:08 |
| plot of residuals | mahdiiowa | OpenFOAM | 5 | December 7, 2012 09:05 |
| plot residuals in multiregion solver | val46 | OpenFOAM | 3 | September 7, 2012 02:59 |
| Residuals Plot | kamalipour | FLUENT | 2 | December 15, 2011 03:44 |
| URGENT: plot residuals for complete simulation?? | Khan | FLUENT | 1 | February 1, 2007 12:35 |