|
[Sponsors] |
July 15, 2013, 22:59 |
How to change Iterations Output format
|
#1 |
New Member
Alessandro
Join Date: Feb 2013
Location: Italia
Posts: 15
Rep Power: 13 |
Hello,
Do you know how the iteration output format is controlled in openFOAM? for example if we take the output of simpleFoam: Code:
smoothSolver: Solving for Ux, Initial residual = 0.205736, Final residual = 0.140782, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.00808331, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0090793, No Iterations 1 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0525214, No Iterations 1 time step continuity errors : sum local = 8.60297e-16, global = 3.22238e-17, cumulative = 3.22238e-17 smoothSolver: Solving for omega, Initial residual = 0.00905611, Final residual = 0.00024144, No Iterations 1 smoothSolver: Solving for k, Initial residual = 1, Final residual = 0.0303447, No Iterations 1 ExecutionTime = 0.09 s ClockTime = 0 s Thank you in advance. |
|
July 16, 2013, 04:17 |
|
#2 |
Senior Member
Join Date: Mar 2010
Location: Germany
Posts: 154
Rep Power: 16 |
Hi,
what do you really want to achieve? Plot the residuals? There's a nice tool named pyFoamPlotWatcher to do these kind of things. A nice way to filter out the interesting values is to pipe the solver's output through the Unix grep and awk commands for example. This will keep you from changing you solvers' output formats constantly. To answer your last question: You need to read the code of your particular solver. The print statements (Info << "some string") are usually scattered throughout the solver loop and the library functions (see includes). Cutter |
|
July 16, 2013, 07:37 |
|
#3 |
New Member
Alessandro
Join Date: Feb 2013
Location: Italia
Posts: 15
Rep Power: 13 |
Thanks Cutter,
yes, my question was raised from plotting the residuals from an output with multi-regions, I had several domains with temperature residuals, Code:
Solving for solid region case GAMG: Solving for T, Initial residual = 0.0045469064, Final residual = 0.00016222444, No Iterations 1 GAMG: Solving for T, Initial residual = 0.00016208411, Final residual = 6.5429215e-06, No Iterations 7 Min/max T:279.34359 289.03605 ..... ---Solving for SOLID region: shaft --- Solving for solid region shaft GAMG: Solving for T, Initial residual = 0.0027614384, Final residual = 0.00013059475, No Iterations 14 ....ect Code:
set logscale y set title "Case" set ylabel 'Temperature Residuals' set xlabel 'Iteration' plot "< cat log | awk '/Solving for solid region case/{getline; print}'| cut -d' ' -f9 | tr -d ','" title 'T' with lines pause 1 reread Still after doing that, I was thinking: what if one day I need a variable or residual that the solver does not give on output. Can I modify the output of the solver itself? How does it work? So if I understood well your suggestion, to get an idea of how the solver collect and send the output on the screen I have to type: Code:
grep -r "info <<" /path_of_the_solver_of_interest Code:
#include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "RASModel.H" #include "simpleControl.H" #include "fvIOoptionList.H" |
|
February 7, 2014, 05:24 |
|
#4 |
Member
Tobias Adam
Join Date: Oct 2013
Location: Siegen
Posts: 55
Rep Power: 13 |
Hello,
I have a different problem with my solver output. My solver doesnīt give me any information about the Residuals. I didnīt change the options, or disabled the output manually ( as far as I know :-D ) My output is as follows Code:
Time = 1 time step continuity errors : sum local = 511.432, global = 31.4965, cumulative = 31.4965 bounding omega, min: -5403.9 max: 1.7591e+11 average: 1.91796e+07 ExecutionTime = 3542.94 s ClockTime = 3551 s best regards Tobi |
|
February 12, 2014, 10:22 |
|
#5 |
Member
Tobias Adam
Join Date: Oct 2013
Location: Siegen
Posts: 55
Rep Power: 13 |
It definitely has something to do with the openFoam-version.
Normally I use OF 2.2.0, but we already installed OF 2.2.x_131223 in our office. Does anybody know, if the missing solver output is a bug of this version? Or maybe I just have to do a little entry in a dict-file to enable the output again. I would be very happy to see some answers :-) thanks in advance and best regards Tobi |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
calculation stops after few time steps | sivakumar | OpenFOAM Running, Solving & CFD | 7 | March 17, 2013 07:37 |
Interfoam blows on parallel run | danvica | OpenFOAM Running, Solving & CFD | 16 | December 22, 2012 03:09 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |