CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Overwriting output time (

tladd August 27, 2013 09:44

Overwriting output time
I am new to OpenFoam and am using SIMPLE to solve the Stokes equations - grad p = nu grad^2 U. Since they are a time independent component of a multistage solver I want to prevent the time value from incrementing during the SIMPLE iteration (simple.loop). Any suggestions? I looked at SimpleControl.C but I could not figure out where the runtime.timeName() is being incremented. This program is very useful but its way too clever for me.



ngj September 1, 2013 08:00

Hi Tony,

If I understand you correctly, then you are developing something with this type of structure:


while OuterTimeLoop
O1. Some operations
while InnerTimeLoop
I1. Produce steady state solution
O2. Some more operations based on steady state solution.

From the top of my head, I would probably try to work with two Time objects (e.g. runTime and runTimeInner). one, which is constructed before the OuterTimeLoop and then one, which you construct each and every time before the InnerTimeLoop. In this way, you will have a time increment for the outer (transient?) time loop, which is independent of the steady state solution, which might even work with a different time stepping, Courant criterion, etc. This can then be control by given the InnerTimeLoop a second controlDict, say controlDictInner.

The only thing you will need to be aware of, is that there might be the need of a duplicate of variables and some corresponding mapper, such that they carry the correct time information depending on the use of the variables, but I do not have an answer for that.

Kind regards,


All times are GMT -4. The time now is 00:59.