CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Reduce "log" file dimensions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2012, 07:08
Default Reduce "log" file dimensions
  #1
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 78
Rep Power: 6
francesco_capuano is on a distinguished road
Hi,

I was wondering if there is a way to reduce the log file dimension, for instance by setting the output to be written every, let's say, 10 time steps rather than every time step.

The file can reach enormous dimensions!

Any ideas?

Thanks in advance,
Francesco
francesco_capuano is offline   Reply With Quote

Old   February 9, 2012, 11:47
Default
  #2
Member
 
Bernhard Grieser
Join Date: Mar 2010
Location: Zurich, Switzerland
Posts: 30
Rep Power: 6
BernhardGrieser is on a distinguished road
Hi Francesco,

in case you really want to do that, you might try the following:

Open your solver source file (e.g. icoFoam.C) and wrap an if-clause around each piece of code containing "Info<<..."

Code:
// add before the time loop
double timeGap = 0.01; // that's the black-out time for the log file
double lastOutput = runTime.time().value();

// add within the time loop (wrap all the output)
if (runTime.time().value()-lastOutput>timeGap)
{

      Info<< ...

      lastOutput = runTime.time().value();
}
Don't forget to wrap #include CourantNo.H etc. as well.

Hope that helped.
Bernhard
BernhardGrieser is offline   Reply With Quote

Old   February 9, 2012, 12:23
Default
  #3
Member
 
Francesco Capuano
Join Date: May 2010
Posts: 78
Rep Power: 6
francesco_capuano is on a distinguished road
Hi Bernhard,

thanks for your reply, that's a nice idea. Unfortunately, some Info statements are included into the solvers' classes, and should be also included within an if-clause.

One remedy could be to turn to zero the corresponding values inside the DebugSwitches subdictionary within the main controlDict file, inside the /etc directory. But then any information about the residuals would be lost.

Or, is there any member function for controlling the output infos of the solvers?
francesco_capuano is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48
Compiling gmshFoam with OpenFOAM-1.5 BlGene Open Source Meshers: Gmsh, Netgen, CGNS, ... 10 August 6, 2009 05:26
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
Paraview command not found hardy OpenFOAM Paraview & paraFoam 7 September 18, 2008 05:59
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


All times are GMT -4. The time now is 22:24.