Simulate

Command ElementPerforms a single simulation.

Format

<Simulate
    analysis_type     = "string"

  [ start_time        = "real" ]         
  [ end_time          = "real" ]   
  [ duration          = "real" ] 
  [ restart_array_id  = "integer" ]
[{  
    num_step          = "integer"
    print_increment   = "integer"
    print_interval    = "real"
    print_array_id    = "integer"
}]      
/>

Attributes

analysis_type
Specifies the analysis that is to be performed. Options include:
  • "Static"
  • "Transient"
  • "Linear"
  • "Assembly"
Only one of the above choices may be made per Simulate command, but you may include multiple Simulate commands to request a sequence of analyses.
start_time
Defines the starting value of the independent variable, Time.
  • This attribute is optional.
  • Defaults to 0.0 when not specified.
end_time
Defines the end time of the simulation.
For a valid simulation, end_time > start_time.
duration
Defines the duration of the simulation. Use this when you do not know the end_time of your simulation beforehand.
duration > 0
restart_array_id
Specifies the ID of the Reference_Array element that contains the time steps at which the integrator is to be restarted. Restarting the integrator results in the integrator history being discarded.
  • This attribute is optional.
  • This is particularly useful when the model configuration has changed.

The parameters listed below control the print (output) rate and are mutually exclusive.

num_steps
Defines the number of output steps to take between start_time and end_time.
  • This attribute is optional.
  • When specified, num_steps > 0.

The print interval will be determined as end_time/num_steps. Note that the maximum integrator step size (Param_Transient::h_max) is set to the print_interval if the print_interval is smaller than h_max.

print_increment
Specifies the frequency of output in terms of the integrator steps that have been taken. An output is performed when the function MOD (integration_step_number, print_increment) = 0.
  • This attribute is optional.
  • When specified, print_increment > 0
  • print_increment = 1 generates outputs at every integration step.
  • print_increment = n generates outputs at every nth integration step.
print_interval
Defines the time interval between consecutive output steps for plotting and animation output.
  • This attribute is optional
  • Defaults to 0.01 when not specified
  • When specified, print_interval > 0
Note: The maximum integrator step size (Param_Transient::h_max) is set to the print_interval if the print_interval is smaller than h_max.
print_array_id (optional)
Defines the ID of the Reference_Array element that contains the time steps at which the output is desired.

Example

The example below demonstrates a Simulate command being used to perform a static equilibrium.

<Simulate
   analysis_type = "static"
/>

The three examples below demonstrate a Simulate command being used to perform a quasi static simulation. They are all equivalent.

<Simulate
   analysis_type   = "static"
   end_time        = "9.76"
   num_steps       = "976" 
/>
<Simulate
   analysis_type  = "static"
   end_time       = "9.76"
   print_interval = "0.01"
/>
<Simulate
   analysis_type  = "static"
   start_time     = "0.0"
   end_time       = "9.76"
   print_interval = "0.01"
/>

The example below demonstrates the use of print_array_id to generate unequally spaced outputs. For this simulation, output is generated at Time = 0.0, 0.1, 0.21, 0.33, 0.46, 0.60, 0.75, 0.91, 0.935, 0.95 and 1.0.

<Simulate
   analysis_type   = "static"
   end_time        = "1.0"
   print_array_id  = "21"
/>
<Reference_Array
   id              = "21"
   type            = "PRINT"
   num_element     = "11" >
   0.0000000E+00    0.1000000E+00    0.2100000E+00    0.3300000E+00    0.4600000E+00
   0.6000000E+00    0.7500000E+00    0.9100000E+02    0.9350000E+02    0.9500000E+00
   1.0000000E+00
</Reference_Array>

The example below shows the Simulate command being used for a typical transient simulation.

<Simulate
   analysis_type   = "transient"
   end_time        = "2.0"
   num_steps       = "1024"
/>

The example below shows the Simulate command being used in conjunction with the restart_array_id to perform a simulation, but perform restarts at the mentioned times. The integrator is requested to perform a restart at Time = 0.16, 0.25, 0.43, 0.67 and 1.46 seconds.

<Simulate
   analysis_type     = "transient"
   end_time          = "2.0"
   restart_array_id  = "17"
/>
<Reference_Array
    id               = "17"
    type             = "RESTART"
    num_element      = "5" >
    0.1600000E+00     0.2500000E+00     0.4300000E+00     0.6700000E+00  1.4600000E+00
</Reference_Array>

The example below demonstrates two equivalent ways to perform a static analysis followed by a dynamic analysis.

<Simulate                           <Simulate
   analysis_type    = "static"          analysis_type    = "static"
/>                                  />    
<Simulate                           <Simulate   
   analysis_type    = "transient"       analysis_type    = "transient
   end_time         = "1.5"             end_time         = "1.5"  
   num_steps        = "150"             print_increment  = "100"
/>                                  />

The example below demonstrates a Simulate command being used to perform an assembly analysis.

<Simulate
   analysis_type  = "assembly"
/>

Comments

  1. MotionSolve allows you to perform several different analyses in a single run. Different Simulate commands may be interspersed with other commands to modify the model or reset the simulation parameters and perform subsequent analyses. This provides a very powerful capability to perform complex simulations.
  2. For systems that have a static equilibrium position, it is always a good idea to perform a static analysis followed by a dynamic or transient analysis. The static analysis equilibrates the system and removes unbalanced forces. The dynamic analysis, consequentially, does not have much initial transience and simulations can be much faster.
  3. Complex simulation scenarios may be authored in the user-written subroutine, CONSUB. MotionSolve provides a complete API for interrogating the model, obtaining the current state of the model and performing analysis. CONSUB may be authored in a scripting language such as Python or in a programming language such as C++/C or Fortran.
  4. For controlling the output frequency, you may use print_increment, num_steps, print_array_id or print_interval. If the model contains more than one of these attributes, the following precedence rules will be honored by the solver:

    Decreasing order of precedence:

    print_increment > num_steps > print_array_id > print_interval