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

Resolving from a previous timestep

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2008, 09:55
Default How could I create an adaptive
  #1
Member
 
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17
juho is on a distinguished road
How could I create an adaptive timestepping that would restart the calculation from the previous time step?

I'm having trouble making a satisfactory system just based on the values of the already calculated timestep (like the Courant number) and would like to adjust the time step and resolve if nonconverging/nonphysical values are met.

Time.H seems to have functions to reset the time and to create subcycles. Could these be used? How are the previous timesteps stored?
juho is offline   Reply With Quote

Old   June 1, 2010, 10:55
Default
  #2
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
I know this post is a ocuple of years old now but I'm interested in doing this too.

I want to use large time steps in my model but if I find that the model starts to diverge, I want to restart based on the last succesful time step and readjust my dt to a smaller one.

I know I can use runTime.setDeltaT() to set my time step, but how do I tell the solver to restart based on the last succesful time iteration?
benk is offline   Reply With Quote

Old   June 2, 2010, 10:34
Default
  #3
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
So I think I figured out how to do this but maybe there's a better way.

The command runTime.setTime(lastTime, lastTime); will reset the simulation to the last good time step as long as you set the argument lastTime equal to the last good time step using something like lastTime = runTime.value(); after each succesful time iteration.
benk is offline   Reply With Quote

Old   June 2, 2010, 16:50
Default
  #4
Senior Member
 
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19
benk is on a distinguished road
Actually, upon further investigation, it seems as if the method I described above will reset the time but it doesn't take the solution from that old timestep, it will continue with the previous bad solution...so now the question is: How can I use the last good solution?
benk is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resolving for one extra variable? Matt CFX 3 December 8, 2008 18:02
resolving stl structure MAB FLOW-3D 3 October 30, 2008 05:43
for the previous message Ivan Siemens 0 June 15, 2008 14:06
Resolving aerofoil tip curvature in CFX-mesh Jenny CFX 4 October 3, 2007 06:55
Accessing Variables from Previous Timestep Vinayak Barve FLUENT 1 March 10, 2004 08:40


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