CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   running without a terminal output and saving time step information instead (http://www.cfd-online.com/Forums/openfoam-pre-processing/109860-running-without-terminal-output-saving-time-step-information-instead.html)

Sören Sander November 28, 2012 09:48

running without a terminal output and saving time step information instead
 
Hi,

I read that without a terminal output c programs are working a lot faster. E.g. counting from 1 to 10.000 with a for loop takes 10 times longer with an output order. Is there any option to do this in OpenFOAM, e.g. running icoFoam but without the output lines.
Even though this can make the solver a lot faster, the user looses the convergence control. So I am also looking for a possibility to write the important time step informations into a file. The standard output of openFOAM is way too large for me (writing "Solving for...", etc. is very hard drive intensive). Therefore I am looking for an option to write the values in a compressed form at a defined timestep. For instance "20 0.00012 0.123 0.002254" would mean "TimeStep UResidual alphaResidual cumulativeTimestep" error. Then, I could read the file into excel after or during processing and review the convergence.

michielm November 30, 2012 08:46

I think you will need to take out the Info << .... << endl; statements from the solver (and maybe underlying parts) and recompile to be able to do this.

Is the issue really in writing to the terminal or is it in general? If it is only for the terminal then you can of course use icoFoam &> log & to start the solver in the background and have it write to a logfile

Bernhard November 30, 2012 10:03

Quote:

Originally Posted by Sören Sander (Post 394648)
Hi,

I read that without a terminal output c programs are working a lot faster. E.g. counting from 1 to 10.000 with a for loop takes 10 times longer with an output order. Is there any option to do this in OpenFOAM, e.g. running icoFoam but without the output lines.

Well, this is only true if outputing is the only thing the for-loop does. The amount of output information for OpenFOAM solver is pretty small within each loop compared to the amount of operations within a loop. Writing to a file instead of writing to the terminal will certainly not improve performance. This is not the method for reaching speed-up and I would highly discourage putting any time or effort in it.

As an intermediate test, you could compare
Code:

icoFoam
icoFoam > myOutputFile
icoFoam > /dev/null



All times are GMT -4. The time now is 08:21.