TIMGET

TIMGET returns the simulation time corresponding to the last successful simulation step.

Use

Called By

Any user-written subroutine

Calling Sequence

CALL TIMGET (time)

Output Argument

 
time
A double-precision scalar that contains the simulation time at the end of the last successful step.

Extended Definition

TIMGET is primarily useful in situations where past values of system states are to be used in defining the current values of system. In some applications, you need to determine when a specific time has been successfully passed in the simulation. The value of the time argument passed to user-written subroutines is the current simulation time, and is therefore not a reliable indicator of the last successful simulation time. Moreover, if convergence at the current time is not achieved, Adams Solver backs up to the last successful simulation step and tries a new step.
The value of simulation time returned by TIMGET represents a successful simulation time. Adams Solver never backs up over this time again.
Digital control systems are instances where the values provided by TIMGET are useful. Digital control systems are characterized by the fact that observations of system states are taken at pre-specified regular intervals named sampling periods. Based on the system states sampled and the governing control laws, forces acting on the system are defined. These forces are held constant until the next sample period, regardless of how the system state changed.
Make sure that you only sample converged values of system states when determining the current system state. TIMGET is useful in this context, because it provides to user subroutines a record of when a set of system states have converged.
 
Tip:  
SENSUB has commonly been used to identify a successful simulation step. You don't need to rely on TIMGET anymore.