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

Changing deltaT of current time step

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 29, 2009, 10:30
Question Changing deltaT of current time step
  #1
Member
 
Ola Widlund
Join Date: Mar 2009
Location: Sweden
Posts: 87
Rep Power: 8
olwi is on a distinguished road
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
olwi is offline   Reply With Quote

Old   April 30, 2009, 04:55
Default
  #2
Senior Member
 
Pawel Sosnowski
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 105
Rep Power: 9
psosnows is on a distinguished road
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
psosnows is offline   Reply With Quote

Reply

Tags
class time, time stepping

Thread Tools
Display Modes

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


Similar Threads
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


All times are GMT -4. The time now is 18:21.