|April 29, 2009, 10:30||
Changing deltaT of current time step
Join Date: Mar 2009
Posts: 87Rep Power: 8
I would like to implement adaptive time stepping, based on the convergence properties of the problem. I have a loop over the equations WITHIN the time step, to resolve the non-linear coupling between equations. In case this non-linear coupling does not converge, I would like to abandon and reset to the old time, set a new smaller time step, and try again.
How do I reset to the previous successful time step, and start over?
- Should I use the setTime method of the Time class? If so, must I care about the value of timeIndex? (Seems I must set both time value and timeIndex)
- Could I define a new instance Time myOldTime(runTime) before time advance, and then set runTime=myOldTime to go back?
Anything else I must do? Will this mess up the time discretization in any way?
Thanks in advance,
|April 30, 2009, 04:55||
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 105Rep Power: 9
my advice for you would be to create a tmp time folder. After each successful time step the new data would overwrite the old tmp data. In the end, if you would need to "go back in time" you would simply need to read the tmp folder. One advantage would be safety in case of sudden hardware failure (loss of power, coffee flood etc.). The problem would be the time needed to write tmp. In case of huge mesh it would cost a lot.
Other idea is to create virtual tmp. For each varying filed (ex. U, T) you would create vTmpData field. After each successful time step you store the data in those Tmps. In this case if you want to "go back in time", you just put the tmps to main data fileds.
(In the end I would use the second idea to save hardware writing time )
please let me know what do you think about it.
|class time, time stepping|
|Thread||Thread Starter||Forum||Replies||Last Post|
|DPM UDF particle position using the macro P_POS(p)[i]||dm2747||FLUENT||0||April 17, 2009 01:29|
|Computational time||sunnysun||OpenFOAM Running, Solving & CFD||5||March 16, 2009 04:32|
|Differences between serial and parallel runs||carsten||OpenFOAM Bugs||11||September 12, 2008 11:16|
|Is it to possible to change time step DeltaT during a calculation||dbxmcf||OpenFOAM Running, Solving & CFD||4||November 4, 2007 15:21|
|unsteady calcs in FLUENT||Sanjay Padhiar||Main CFD Forum||1||March 31, 1999 12:32|