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

Value of old time step

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 16, 2007, 09:57
Default Hi In OpenFoam is it possible
  #1
litonx
Guest
 
Posts: n/a
Hi
In OpenFoam is it possible to know the old time step value of any variable. I know it is pobbile to write the value in the disk in each time-step. My question is, how to handle with those?

-Liton
  Reply With Quote

Old   February 16, 2007, 10:12
Default You can store old time field u
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You can store old time field using:

fieldName.storeOldTime();

and recover it using:

fieldName.oldTime();

Look here for further information:

http://foam.sourceforge.net/doc/Doxygen/html/de/d5c/classFoam_1_1GeometricField. html#a25

Regards,
A.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 16, 2007, 10:54
Default Thanks Alberto. The fieldName
  #3
litonx
Guest
 
Posts: n/a
Thanks Alberto.
The fieldName.oldTime() returns only the value of previous time step. Is it possible to return any specific old time step value like time step 5, 11 .. etc.

-Regards Liton
  Reply With Quote

Old   February 16, 2007, 19:59
Default Why do you need them? The o
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Why do you need them?

The old time fields are removed from memory and lost if not written to disk.

If you need them the only way I could think to, is to store them on the disk and to recover them from there

Regards,
A.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   February 6, 2015, 16:18
Default
  #5
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Alberto,

Do you know when the current density (from the current time step) is stored using the "storeOldTime" function in fireFOAM.C from OF2.1.x. The codes are given below. This action means that the density from the previous time step is removed from the memory while the Field which is used for the current step is vacated for the next time step. Thank you.

[\code]
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "solidRegionDiffusionNo.H"
#include "setMultiRegionDeltaT.H"
#include "setDeltaT.H"

runTime++;

Info<< "Time = " << runTime.timeName() << nl << endl;

parcels.evolve();

surfaceFilm.evolve();

pyrolysis.evolve();

if (solvePrimaryRegion)
{
#include "rhoEqn.H"

// --- PIMPLE loop
while (pimple.loop())
{
#include "UEqn.H"
#include "YhsEqn.H"

// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}

if (pimple.turbCorr())
{
turbulence->correct();
}
}

rho = thermo.rho();
}

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}

Info<< "End" << endl;

return(0);
[\code]

Quote:
Originally Posted by alberto View Post
You can store old time field using:

fieldName.storeOldTime();

and recover it using:

fieldName.oldTime();

Look here for further information:

http://foam.sourceforge.net/doc/Doxygen/html/de/d5c/classFoam_1_1GeometricField. html#a25

Regards,
A.
openfoammaofnepo is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time step size and max iterations per time step pUl| FLUENT 33 October 23, 2020 22:50
SELECTING TIME STEP SIZE, NUMBER OF TIME STEP NITUL KALITA FLUENT 2 November 22, 2012 08:28
Time step in time explicit solver Simon FLUENT 1 August 5, 2009 10:32
Long time CHT transient simulation time step.... JP CFX 0 May 9, 2008 03:36
Relation of computational time step with real time Salman Main CFD Forum 2 August 3, 2005 14:13


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