MotionAnalysisSettings (hwx.inspire.motion.AnalysisSettings)#

class MotionAnalysisSettings(self, **kwds)#

Bases: MotionObject

Controls how long the motion simulation will run.

Some of the settings that can be controlled are:

  • The number of frames in the results output.

  • The type of analysis.

  • Includes gravity.

Attribute Table#

Name

Type

KeepContactForceResults

tuple

activeContactIteration

Bool

addAllSensors

property

addFreeJoints

Bool

addGravity

Bool

addJointSensors

property

addMotionContacts

Bool

addRequests

Enum

addSensors

Enum

analysisDescription

String

analysisName

String

analysisType

Enum

angularSensorValue

Double

animate

Enum

animationFile

Enum

bushingC

Double

bushingCT

Double

bushingK

Double

bushingKT

Double

bushing_calculateRates

Bool

combineGround

Bool

contactType

Enum

cutoffFrequency

Bool

cutoffFrequencyValue

Double

debugPrint

Bool

disableDamping

Bool

domain

Enum

eigenSolution

Bool

endTime

Double

flexibleContacts

property

flexibleFasteners

property

flexibleImplicits

property

flexibleJoints

property

flexibleSupports

property

implicitType

Enum

inbrowser

bool

inputs

Any

integratorDaeIndex

Enum

integratorError

Double

integratorHmax

Double

integratorKmax

Int

jointType

Enum

keepContactForceResults

Enum

linearEquilibrium

Bool

logFiles

Enum

outputInterval

property

outputRate

Double

outputs

Any

preciseFlexContact

Bool

requestFrame

Enum

sensorError

Double

sensorValue

Double

singleton

bool

stateSpaceMatrix

Bool

storeResults

Bool

supportType

Enum

timeEquilibrium

Bool

virtualContacts

property

virtualImplicits

property

virtualJoints

property

virtualSupports

property

writeEnergyDistrib

Bool

Method Table#

Name

Description

addRequestsFor (self, obj)

Validates if the specified object request are added.

Example

from hwx import inspire
from hwx.inspire import motion

model = inspire.openTutorialFile("Motion/M01_FourBar.stmod")
settings = model.motionAnalysisSettings

# Start at equilibrium before simulating
settings.analysisType = 'STATICS+TRANSIENT'

# 10 seconds with 30 output / per second
settings.endTime = 10
settings.outputRate = 30

# Make joints rigid
settings.jointType = 'rigid'

# See the MotionAnalysisDialog for more options
from hwx import gui
gui.getAction('motion.analysis.settings').ison = True

print('Gravity is on?', settings.addGravity)

analysis = motion.MbdAnalysis()
analysis.analyze()
property analysisType#

Specifies what type of motion analysis to perform.

A motion analysis can be either be Assembly, Transient, Static, or Statics+Transient.

  • Transient analysis is used to include dynamic effects in a time-dependent motion simulation. Enable *Start at equilibrium* to begin from an equilibrium solution first.

  • Statics analysis is used to determine the static equilibrium position of your mechanism. For this analysis type, all velocity and damping terms are ignored. This helps you analyze the loading without including dynamic effects.

property domain#

Specifies what domain does the motion analysis should follow.

They can be of type

  • Time Domain

  • Linear

property endTime#

The end time indicates how long the motion simulation should run.

property outputRate#

The output rate controls the number of frames in the results output.

Larger numbers give smoother, continuous results, but will animate more slowly.

property integratorHmax#

The maximum step size the integrator is allowed to take.

property integratorKmax#

This is the maximum order that the integrator can take.

The default value is 5, higher orders lead to higher accuracy, but lower stability.

property integratorError#

This tolerance represents the maximum absolute error per integrator step.

property integratorDaeIndex#

Specifies the DAE formulation to use within the solver.

They can be of type ‘I3’ and ‘SI1’.

  • ‘I3’ is faster but can be slightly inaccurate

  • ‘SI1’ is very accurate, but can be somewhat slower.

property animate#

Specifies when to animate the model.

The options to animate are “While Solving”, “When Finished”.

property addRequests#

Specifies options to create analysis results used for plotting.

The options can be “All”, “Exclude for parts”, “Measures only” or “None”.

property requestFrame#

Specifies options for what reference frame to use.

Used for plotting. The options can be “Global”, “Local to 1st part”, “Local to 2nd part”.

property logFiles#

Specifies what options to choose to log the Motion analysis related files after a run.

The options could be “Keep” and “Discard”.

  • Select ‘Keep’ to retain motion-related solver files from runs.

  • Select ‘Discard’ to automatically delete the files after a run.

property storeResults#

Allows to store the motion analysis results in the model stmod file.

Turning this option off will reduce the size of the model file.

property animationFile#

Specifies the options to generate H3D files containing all motion analysis data.

The options can be “Auto”, “Include all data”, “Exclude contact data” or “None”.

property addSensors#

Provides options for what modeling checking sensors are in effect.

The options can be “All”, “Exclude joint deformation”, “None”.

property sensorValue#

Specifies the sensor value. Defaults to ‘1e-3’.

property angularSensorValue#

Specifies the sensor value. Defaults to ‘1’.

property sensorError#

Specifies the sensor error offset value. Defaults to ‘1e-5’.

property jointType#

Used to override the default behavior of the joint, during motion analysis.

The behaviors can be “Rigid”, “Flexible” or “Virtual”. Defaults to Flexible.

  • Flexible, joints behave as a linear bushing model.

  • Rigid, joints are idealized and do not deform.

  • Virtual, it is very similar to a rigid joint, but with “soft constraint” behavior.

property contactType#

Used to override the default behavior of the contact based joint, during motion analysis.

The behaviors can be “Rigid”, “Flexible” or “Virtual”. Defaults to Flexible.

property supportType#

Used to override the default behavior of the supports, during motion analysis.

The behaviors can be “Rigid”, “Flexible” or “Virtual”. Defaults to Rigid.

property implicitType#

Used to override the default behavior of the implicit joint, during motion analysis.

The behaviors can be “Rigid”, “Flexible” or “Virtual”. Defaults to Rigid.

property bushingK#

Specifies the stiffness rate.

property bushingC#

Specifies the damping rate.

property bushingKT#

Specifies the torsional stiffness rate.

property bushingCT#

Specifies the torsional damping rate.

property bushing_calculateRates#

By default, the global rates (below) are determined automatically. Disable this option to enter your own rates.

property keepContactForceResults#

Specifies what contact force data to be saved in the model.

property eigenSolution#

Specifies whether to use Eigen solution.

property disableDamping#

Disables damping if set to True, defaults to False.

property cutoffFrequency#

Specifies whether to use cut off frequency.

property cutoffFrequencyValue#

Specifies the value of cut off frquency.

property writeEnergyDistrib#

Specifies whether to write energy distribution.

property stateSpaceMatrix#

Specifies whether to use state space matrix.

property addGravity#

Specifies whether to include gravity from the motion analysis.

property addMotionContacts#

Specifies whether to include motion contacts from the motion analysis.

property activeContactIteration#

Controls the contact force evaluation during corrector iterations.

property preciseFlexContact#

Performs preliminary analysis to accurately predict contacts on flexible bodies.

property addFreeJoints#

Specifies whether to include free joints from the motion analysis.

property combineGround#

Specifies whether to combine ground parts.

property virtualJoints#

Specifies if the joint type is set to Virtual.

property virtualContacts#

Specifies if the contact type is set to Virtual.

property virtualSupports#

Specifies if the support type is set to Virtual.

property flexibleJoints#

Specifies if the joint type is set to Flexible.

property flexibleContacts#

Specifies if the contact type is set to Flexible.

property flexibleFasteners#

Specifies if the fasteners type is set to Flexible.

property flexibleSupports#

Specifies if the support type is set to Flexible.

property flexibleImplicits#

Specifies if the joint type is set to Flexible.

property virtualImplicits#

Specifies if the implicit joint type is set to Virtual.

property addAllSensors#

Specifies if the add sensors are not set to None.

property addJointSensors#

Specifies if the add sensors are set to All.

property outputInterval#

Returns the fraction of the output rate.

addRequestsFor(obj)#

Validates if the specified object request are added.

Parameters:

obj (Named) – Object for which the validation requests are added.

Returns:

True if the validation is successful, False otherwise.

Return type:

bool