|
[Sponsors] |
August 6, 2008, 09:55 |
How could I create an adaptive
|
#1 |
Member
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 89
Rep Power: 17 |
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? |
|
June 1, 2010, 10:55 |
|
#2 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
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? |
|
June 2, 2010, 10:34 |
|
#3 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
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. |
|
June 2, 2010, 16:50 |
|
#4 |
Senior Member
Ben K
Join Date: Feb 2010
Location: Ottawa, Canada
Posts: 140
Rep Power: 19 |
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?
|
|
|
|
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 |