Start a new topic
Answered

Step time setting not respected ?

Hello, 


I edited the step time in the setup options of Vortex months ago and I just realized that the modification is not taken into account in my simulation. 

Is it normal ? Is there something else to do so it is taken into account ? 


Thank you in advance for your answers.

PrintTime.JPG
(18.2 KB)
setup.JPG
(84 KB)

Best Answer

Hi Ornella,


The reason why you had less instabilities is because the portion of the simulation which caused the instabilities at a too low framerate (the solver) is actually stepped at a higher framerate (defined by your desired substep framerate which is 100 Hz, as opposed to the overall application framerate which is 60Hz). So, the rest of the simulation is stepped at the application framerate (in your case 60Hz). This includes the graphics updates, the connection graph data flow, the python script stepping, etc. The dynamics on the other hand is stepped at a higher rate (in your cas 100Hz). This leads to the issue that you were having to be resolved, while the rest of the application is processing at the lower rate (60Hz) as before.

The advantage of this is that the components that are unconditionally stable when it comes to the selection of the timestep, such as graphics, data flow etc., will not be affected by the substepping selection, and thus will not be stepped more per second of simulation and therefore will not use up more computational time.


Note that if you select the "uniform substeps", and not the "fixed substeps" option, the substep framerate you provide via the "Desired Uniform Substep Framerate" parameter (which is 100Hz in your case) will be used as a "desired" substep framerate, not as a "guaranteed" one. That means, that the dynamics engine will choose as the actual substep framerate a framerate that is close to the one you provide. In practice, the engine chooses the closest multiplier of the application framerate, which, in your case, leads to an actual dynamics substep framerate of 120 Hz, meaning two physics steps at 120Hz for each application update at 60Hz.


I hope this clarifies things.


Cheers,

Daniel


The simulation frame rate is not set in the dynamics Engine, but at the top level of the Setup file.

The option you used was for sub-stepping. 

 


1 person likes this

Ho, okay thank you ! 

Could you explain what's the difference between the Simulation Frame Rate and the Uniform Substeb Frame Rate ? 

Thank you in advance.

Hi Ornella,


The substepping option in the dynamics module allows you to configure the system in a way that there will be multiple sub-steps done in the dynamics only (physics engine with collision detection and solve) for every application update phase (application step).


The fields have tooltips. If you hover over them in the application setup document, you will see the description.


Here are the tooltips from the implementation for your convenience.

  

      pSteppingMode.setDescription("Dynamics Stepping Mode\n"
                                      "Single Step: single dynamics step per application update\n"
                                      "Uniform Substeps: application step is uniformly subdivided according to the desired frame rate\n"
                                      "Fixed Substeps: application step is subdivided into fixed number of substeps");
  
  
      pDesiredUniformSubstepFrameRate.setDescription("Desired frame rate of dynamics substeps in Uniform Substeps stepping mode");
      pFixedSubstepCount.setDescription("Number of dynamics substeps in Fixed Substeps stepping mode");

Cheers,

Daniel


1 person likes this

Hi Daniel, 


Thanks for your answer. 


Yeah I already saw the field tooltips but I was still confused as both the Desired Uniform Substep Frame Rate in the Dynamics Engine and SimulationFrameRate in the Setup refer to the frame rate. 


I asked in a former ticket (#10019) how to set the step time of the simulation in order to reduce solver issues and you answered explaining how to change the simulation substep of the Dynamics Engine.

I Indeed had less simulation issues by increasing the substep frame rate. But should not those two values be linked together ? I guess it's not good if my script is running at 60 fps and the dynamics engine is running at 100 fps ? 

Thanks again for you answer. 

Answer

Hi Ornella,


The reason why you had less instabilities is because the portion of the simulation which caused the instabilities at a too low framerate (the solver) is actually stepped at a higher framerate (defined by your desired substep framerate which is 100 Hz, as opposed to the overall application framerate which is 60Hz). So, the rest of the simulation is stepped at the application framerate (in your case 60Hz). This includes the graphics updates, the connection graph data flow, the python script stepping, etc. The dynamics on the other hand is stepped at a higher rate (in your cas 100Hz). This leads to the issue that you were having to be resolved, while the rest of the application is processing at the lower rate (60Hz) as before.

The advantage of this is that the components that are unconditionally stable when it comes to the selection of the timestep, such as graphics, data flow etc., will not be affected by the substepping selection, and thus will not be stepped more per second of simulation and therefore will not use up more computational time.


Note that if you select the "uniform substeps", and not the "fixed substeps" option, the substep framerate you provide via the "Desired Uniform Substep Framerate" parameter (which is 100Hz in your case) will be used as a "desired" substep framerate, not as a "guaranteed" one. That means, that the dynamics engine will choose as the actual substep framerate a framerate that is close to the one you provide. In practice, the engine chooses the closest multiplier of the application framerate, which, in your case, leads to an actual dynamics substep framerate of 120 Hz, meaning two physics steps at 120Hz for each application update at 60Hz.


I hope this clarifies things.


Cheers,

Daniel


1 person likes this

Thanks for your clear answer ! 


Yeah, this is actually what was bothering me (that 100 was not a multiplier of 60 so I guessed it couldn't work properly). I tried to set both at 100 but it was clearly slower and not necessary as the substep at 100 alone seemed to be enough to gain stability as you stated. 

Cheers, 
Ornella


1 person likes this

My pleasure!


Substep framerate: I see what you mean. With your settings (100Hz for substep) it was actually doing 2 substeps per 60Hz application update, which then solved your issue. I am glad that this is all understood now. If you want absolute certainty here, you can always go in and use the "Fixed Substep" option and set the fixed substep count to 2. This way you can be sure about what is happening.


Cheers,

Daniel

Login to post a comment