How could I create an adaptive
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? |
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? |
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. |
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?
|
All times are GMT -4. The time now is 01:03. |