HyperWorks Solvers

ANALYS

ANALYS

Previous topic Next topic No expanding text in this topic  

ANALYS

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

Subroutine Type

Utility/Data Access

Definition

ANALYS is a utility subroutine that is capable of performing a specific type of analysis.  The analysis type is specified as an argument. ANALYS may only be called from CONSUB.  It is an error to call it from any other user-written subroutine.

Calling Syntax

Fortran

CALL ANALYS (ANALYSIS, NAME, TBEGIN, TEND, IFLAG, ISTAT)

 

C/C++

c_analys (char* analysis, char* name, double* tbegin, double* tend, int* iflag, int* istat);

 

Python

istat = py_analys (analysis, name, tbegin, tend, iflag)

 

MATLAB

istat = m_analys (analysis, name, tbegin, tend, iflag)

Input

analysis

character array

Specifies the type of analysis that is to be performed. Valid options are:

DYNAMICS – perform a dynamic simulation
STATICS – perform a static or quasi-static simulation
KINEMATICS – perform a kinematic simulation
TRANSIENT – perform either a DYNAMIC or KINEMATIC simulation based on the number of degrees of freedom in the system.
ASSEMBLY – perform an assembly analysis.

Any other value for ANALYSIS will result in an error.

 

name

character array

A brief description of the analysis. This string is associated with the requested analysis in when certain output files are generated.

 

tbegin

double precision

This specifies the start time of the simulation. When multiple analysis are being performed in CONSUB, TBEGIN is required to be set to the simulation time when ANALYS is invoked.

 

tend

double precision

This specifies the end time of the simulation.

TEND > TBEGIN, otherwise MotionSolve will issue an error.

 

init

integer

This attribute is ignored by MotionSolve; it is present in the function signature for compatibility reasons only.

Output

istat

integer

A flag that return the status of the call to ANALYS. ISTAT can have the following values:

0 = Success

-1 = Failure: ANALYSIS was provided an invalid value.

-9 = Failure: TBEGIN is not the same as the current simulation time

-10 = Failure: TBEGIN > TEND

Remarks

1.ANALYS provides you with ability to invoke a simulation from a CONSUB. When coupled with other functions that allow you to modify the model and look at system responses, this is an extremely powerful capability to create higher level analysis functions.
2.In order to perform an analysis, MotionSolve must first formulate the equations and generate matrices and other data required for the solution of the equations of motion. So the first call to ANALYS in a CONSUB must always have IFLAG=1.
3.If you do want to reset the simulation time back to zero, you must do it through calls to MODIFY or MODSET. Then you can invoke ANALYS again with TBEGIN=0.
4.MotionSolve does not automatically generate output when ANALYS is called. You have to request for output by calling DATOUT before ANALYS is called.

Example

def consub (par, npar):

 

   #Purpose of the CONSUB

   #This CONSUB performs 2 simulations:

   #   1. gravity = 1g     (surface of Earth)

   #   2. gravity = 0.38g  (surface of Mars)

 

 

  # Behavior on Earth

   istat = py_datout()

   status = py_analys (“TRANSIENT”, "Simulation on Earth", 0.0, 1.0, 1)

 

 

  # Behavior on Mars

   command = "ACCGRAV/IGRAV=0, JGRAV=0, KGRAV=-3.72742"

   istat = py_modify (command)

   istat = py_datout()

   status = py_analys (“TRANSIENT”, "Simulation on Mars", 1.0, 2.0, 1)

 

 

  return status

See Also:

Analysis Control Subroutines