HyperWorks Solvers

Simulate

Simulate

Previous topic Next topic Expand/collapse all hidden text  

Simulate

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  
hmtoggle_plus1greyXML Format

Command Element

Description

Performs 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 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_array_id

Defines the ID of the Reference_Array element that contains the time steps at which the output is desired.

This attribute is optional.

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

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"

/>

hmtoggle_plus1greyPython Format

Command Element

Description

Performs a single simulation.

Declaration

def SIMULATE(TYPE="", DURATION=0.0, END=0.0, DTOUT=0.0, STEPS=0, START=0.0, PRINT_INCREMENT=0.0, CONSTR_TOL=0.0, IMPLICIT_DIFF_TOL=0.0):

Attributes

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.

DURATION

Specifies the duration of the analysis.

END

Defines the end time of the simulation.

For a valid simulation, END > START

DTOUT

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, DTOUT > 0

Note that the maximum integrator step size (HMAX) is set to the DTOUT if the DTOUT is smaller than HMAX.

STEPS

Defines the number of output steps to take between START and END.

This attribute is optional.
When specified, STEPS > 0.

The DTOUT will be determined as END/STEPS.  Note that the maximum integrator step size (HMAX) is set to the DTOUT if the DTOUT is smaller than HMAX.

START

Defines the starting value of the independent variable, Time.

This attribute is optional.
Defaults to 0.0 when not specified.

PRINT_INCREMENT

Specifies the frequency at which the results are required for plotting and animation output. For PRINT_INCREMENT = n, an output is generated at every nth integration step

This attribute is optional.
When specified, PRINT_INCREMENT > 0.

CONSTR_TOL

Defines the accuracy to which the system configuration and motion constraints are to be satisfied at each step. This is used by kinematics and the transient solver in the ODE formulation, but not the DAE form, which has its own tolerance for this. This should be a small positive number.

This attribute is optional.
Defaults to 1.0e-10 when not specified.

IMPLICIT_DIFF_TOL

Defines the accuracy to which implicit differential equations, such as DIF equations with the IMPLICIT = “TRUE”, are to be satisfied.

This attribute is optional.
Defaults to 1.0e-05 when not specified.

Comments

See Simulate

Example

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

SIMULATE(TYPE="STATICS")

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

SIMULATE(TYPE="STATICS", END=9.76, STEPS=976)

SIMULATE(TYPE="STATICS", END=9.76, DTOUT=0.01)

SIMULATE(TYPE="STATICS", END=9.76, DTOUT=0.01, START=0.0)

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

SIMULATE(TYPE="TRANSIENT", END=2, STEPS=1024)

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

SIMULATE(TYPE="STATICS")

SIMULATE(TYPE="TRANSIENT", END=1.5, STEPS=150)

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

SIMULATE(TYPE="ASSEMBLY")

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

SIMULATE(TYPE="LINEAR")

See Also:

Param_Linear

Param_Static

Param_Transient

Param_Unit

Command Statements

Model Statements

Functions

Notation and Syntax