CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   plot residuals (https://www.cfd-online.com/Forums/openfoam-solving/146122-plot-residuals.html)

pigna December 18, 2014 17:55

plot residuals
 
Hi, I'm a new user of openfam. I'm running a laminar stady-state case with simpleFoam. I have found on this forum a usefull way to plot the residuals using gnuplot during the simulation and it works. My question is maybe quite stupid.I run a simulation for a certain number of iteration (for instance 400):

simpleFoam >log

monitoring the residuals. Now if i have to run again for other iterations ( with the latestTime entry in controlDict ) because my residuals aren't already converged or i have changed something in fvShemes directory if i write again

simpleFoam >log

my file log at the end of the iterations will contain only informations about iterations from 400 to the final one and also the residuals i plot are referred to those iteration.

I wanna know if there is a way to write the new residuals in the same log file i have already in my directory leaving unalterated in it the previuos informations abuot the residuals of the previous run. In this way my gnuplot will show the residuals from the first step. I know i could use a different name (>log1) and then copy it in the previous one but I suspect that a smartest way may exist.

thanks

wouter December 18, 2014 19:57

hello pigna,

use >> instead of > so :
simpleFoam >>log

then the output will be appended.

Hope this helps
Wouter

pigna December 19, 2014 02:32

Thank you, it is exactly the tip i needed .


All times are GMT -4. The time now is 12:06.