Running a simulation for a fixed number of time steps

To achieve the objective in the title, and restricting myself to the same 3D dam-break flow as the default examples, I follow this logic
  • chosen interparticle distance dp in the xml file
  • chosen coefh in the xml file
  • chosen coefsound in the xml file
  • resulting smoothing length, as h=coefh*sqrt(3)*dp
  • resulting speed of sound as max(coefsound*speedsystem,10*sqrt(g*depth))
  • resulting initial time step as smoothing length/speed of sound
where the parameters speedsystem, depth are determined automatically by gencase, as far as I can see.

Then, in the xml I can set the parameter TimeMax to the initial time step times the number of time steps I have in mind. On top of this, the time step itself might be adjusted at runtime, so in the end the effective number of time steps can change (a little).

Question: is there a more direct way to say to DualSPHysics to stop a simulation after a chosen number of time steps, without matching the simulated time and the time step size? Perhaps some 'hidden' keywords in the xml file?
Suggestions and ideas welcome. An answer to this post would help me test and predict computational workload of simulations.

Side suggestion given: since the initial time step is known before starting the simulation, wouldn't it be good to read out its value in the output of gencase (say, CaseDambreak.out)? So users can already have an idea of which orders of magnitude to expect.
Sign In or Register to comment.