my_system.SetSolverMaxIterations(70)myapplication.SetTimestep(0.001)myapplication.DoStep()Hi Dave,
Iterations relate to an underlying (linear, possibly with constrain projection) iterative solver that is used at every time step to solve for state corrections. This is for the default settings for an NSC system (EulerImplicitLinearized timestepper (integrator) and the PSOR solver (iterative). You can have other combinations, but to answer your first question: no such calls to physics items are made during the solve phase.
You should indeed put your control code in the simulation loop.
But you must be careful with using myapplication.DoStep,
especially if you set it to enforce soft real-time (which is done
in the example you linked to, see the call to
myapplication.SetTryRealtime(True) before the loop). Indeed, the
way this is implemented, it may dynamically change the step size
to a value below what you specify with myapplication.SetTimestep.
Having said that, with or without soft real-time enabled,
myapplication.DoStep will only advance the system state once per
execution of the simulation while loop.
But when coupling a control system, you may want to just disable
soft real-time and maybe even just replace the call to
myapplication.DoStep with a call
my_system.DoStepDynamics(step_size). In that case, you can still
enforce soft real-time, but with an alternate mechanism (which
does not change the step size); see my answer to Lucas's question
here: https://groups.google.com/forum/#!topic/projectchrono/6x2R4-H_NHA.
Note that you can still have the Irrlicht visualization, even if
you don't let the Irrlicht app manage your time stepping; in other
words, you can simply do:
--Radu
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/ae906f14-2f05-4ae9-990f-0e8eef1aea35%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to projec...@googlegroups.com.