# How does Adjustable Time stepping work?

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

 January 19, 2017, 13:12 How does Adjustable Time stepping work? #1 Member   Sheikh Ahmed Join Date: Dec 2015 Location: South Carolina, USA Posts: 88 Rep Power: 10 Dear Foamers I have a very basic question regarding the adjustable time stepping method. I can have that by turning on the adjustTimeStep and maxCo in the controlDict, which gives a mean and max courant number and time steps for each iteration. Could anyone PLEASE elaborate a little bit of how this adjusting works. The user manual doesnt have much info. Thanks in advance.

 January 19, 2017, 13:27 #2 Member   Joshua Join Date: Dec 2016 Location: St. Louis, Missouri Posts: 91 Rep Power: 9 Sahmed, By using an adjustable time step, the simulation will be able to change its delta(t). Delta(t) will be determined from the max Co you specify. This will help prevent your simulation from crashing from too large of a time step when running a transient solution. Hope this helps, Joshua

 January 19, 2017, 13:35 #3 Member   Sheikh Ahmed Join Date: Dec 2015 Location: South Carolina, USA Posts: 88 Rep Power: 10 Thanks Joshua for your prompt reply. Could you tell me how does it calculate the delt AT EACH ITERATION. I mean what value of delx and u does it take.

 January 19, 2017, 13:52 #4 Member   Joshua Join Date: Dec 2016 Location: St. Louis, Missouri Posts: 91 Rep Power: 9 Sahmed, The full calculations of how it determines the new delta(T) can be seen in the source code. I show the path to it below. OpenFOAM Instulation -> src -> postProcessing -> functionObjects -> solverControl -> adjustableTimeStep.C My C++ is a little rusty but the following appears to be how they define the new delta(t). scalar maxDeltaTFact = targetCo_/(CoNum + SMALL); scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); const_cast(obr_.time()).setDeltaT ( deltaT_ = min ( deltaTFact*obr_.time().deltaT().value(), maxDeltaT_ ) ); Joshua M.W.G., the_ichthyologist and qutadah.r like this.

 January 19, 2017, 13:55 #5 Member   Sheikh Ahmed Join Date: Dec 2015 Location: South Carolina, USA Posts: 88 Rep Power: 10 Thanks a lot