CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Overwriting output time (http://www.cfd-online.com/Forums/openfoam-programming-development/122753-overwriting-output-time.html)

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.

Thanks

Tony

ngj September 1, 2013 08:00

Hi Tony,

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

Code:

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

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,

Niels


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