How to use the ReduceTimeStep

From KratosWiki
Jump to: navigation, search

To reduce or increase dt within the current time t, we use ReduceTimeStep(ModelPart& rModelPart, double NewTime)

Usage

for step in range(1,nsteps):

   time = time + new_Dt
   fluid_model_part.CloneTimeStep(time)
   old_Dt = new_Dt
   new_Dt = factor * old_Dt

   time = time - old_Dt + new_Dt
   (fluid_model_part).ReduceTimeStep(fluid_model_part, time)
   fluid_solver.Solve()
Personal tools
Categories