|
[Sponsors] |
April 29, 2009, 11:30 |
Changing deltaT of current time step
|
#1 |
Member
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 17 |
Hi,
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, Ola |
|
April 30, 2009, 05:55 |
|
#2 |
Senior Member
Pawel Sosnowski
Join Date: Mar 2009
Location: Munich, Germany
Posts: 105
Rep Power: 18 |
hello Ola,
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. Pawel |
|
Tags |
class time, time stepping |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is it to possible to change time step DeltaT during a calculation | dbxmcf | OpenFOAM Running, Solving & CFD | 5 | January 26, 2018 17:03 |
DPM UDF particle position using the macro P_POS(p)[i] | dm2747 | FLUENT | 0 | April 17, 2009 02: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 12:16 |
unsteady calcs in FLUENT | Sanjay Padhiar | Main CFD Forum | 1 | March 31, 1999 13:32 |