CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Post-Processing (
-   -   Residuals : Final or 0 ? (

Gearb0x March 23, 2010 10:00

Residuals : Final or 0 ?

to check convergence in openfoam I used the foamJob & foamLog utilities which write data in text files.

In these text files, for each variable of interest I always have two files :
(example for p)

Which one should I look at for the convergence?
p_0 seems to decrease continually while pFinalRes_0 has jumps

And what are the meaning of these two residuals?

Thanks for the help

Gearb0x April 10, 2010 17:45

and what about time step continuity error local, global and cumulatice?

How should they behave? Always above 10^-3 or something? Only the last values after X iterations should be looked at?

Thanks for your help

mohsenkh599 April 14, 2010 14:56

how can I visualize the residuals? I wonder if there is a way to see the residuals like the fluent?

Gearb0x April 14, 2010 15:00

you can!

just do like this

solver > log
foamLog log
cd logs
xmgrace -log y -legend load pRes_0

example : simpleFoam log for the solver
(I'm not sure about the name in xmgrace for the variables, just check in the log directory :))

gschaider April 14, 2010 15:15


Originally Posted by mohsenkh599 (Post 254630)
how can I visualize the residuals? I wonder if there is a way to see the residuals like the fluent?

I use (but I am not neutral)

alberto April 15, 2010 01:06

Hehe, I use pyFoam tools too (and I'm neutral :D)


mohsenkh599 April 17, 2010 10:40

hi foamers
I have simulated a contraction flow. how can I plot for example velocity or the (tauxx-tauxy) across a line connecting two points in the geometry.
after the simulation at every time there are p, phi, U, tau, tau_0 and etc. files at a folder at that time.
thanks a lot

alberto April 17, 2010 13:38

You can plot over lines in paraview. For the stress tensor, you've to first compute it from the fields you stored.


mohsenkh599 April 18, 2010 01:17

thank you very much alberto
but can you possibly explain more? I cant clearly understand your directions
the best

alberto April 18, 2010 02:54

To plot over a line, open you case in paraview, show it as usual, then use the "Plot over a line" filter.

To save the stress tensor, use the stressComponents utility after you run the case.


All times are GMT -4. The time now is 16:49.