Author Topic: Changing the time step size during simulations  (Read 515 times)

aditya

  • Newbie
  • *
  • Posts: 17
Changing the time step size during simulations
« on: June 01, 2016, 07:13:36 PM »
Hello all

I am looking for a way to change the time step size during the simulation.
For example I want to run from time 0 till 10 with a time step 0.1 and then decrease the time step size to 0.01 from 10 till the end of the simulation time.

Is this possible ? Any one has any idea how this can be done ?

Thank you in advance.

vmataix

  • Newbie
  • *
  • Posts: 31
Re: Changing the time step size during simulations
« Reply #1 on: June 15, 2016, 12:23:34 PM »
In python with:

Code: [Select]
model_part.ProcessInfo[DELTA_TIME] = desired_delta_time

riccardo

  • Global Moderator
  • Newbie
  • *****
  • Posts: 47
Re: Changing the time step size during simulations
« Reply #2 on: September 14, 2016, 01:12:46 PM »
just to tell that this is not the reccomended way

you should do

model_part.CloneTimeStep( new_time ) //new_time = old_time + new_dt

indeed if you do

model_part.ProcessInfo[DELTA_TIME] = new_dt a posteriori you will change DELTA_TIME

however the variable model_part.ProcessInfo[TIME]  will not be corectly set

cheers
riccardo