Printing Mass Properties to the MotionSolve .log File


Overview

Description

This script will print the mass properties of all the rigid and flexible bodies then run a transient, static, or quasi-static simulation.

Usage

Please see the example MotionView model "compression only spring w prox mass prop.mdl" For the simulation control subroutine that will print the mass properties before a dynamic, static, or quasi-static simulation: 1) In the main run panel select "User Control" as the simulation type. 2) In the "User Control" run panel enter USER(, , ) for the "User expr". The Simulation Type is 4, 5, or 6 for transient, static, and quasi-static respectively. In a static simulation, the end time and output time step are "dummy variables". Also, please note in the example model that these inputs are "parameterized" to values in the data set "Simulation Data". 3) Create a check mark next to "Use local file and function name". 4) Set the "Function Type" to "Python" from the drop down menu. 5) Select the python file "mass prop sub.py" for the "Local File" text box by pressing on the folder icon and selecting the python script. 6) In the "Function Name" text box enter "mass_prop_trans" Set the simulation parameters and run the model. The mass properties of the rigid and flexible bodies are written to the .log file. To output aggregate center of mass properties to a subroutine: 1) Create an output request in MotionView 2) Set the type of output to "User Defined" in the drop down menu in the upper left hand side of the output panel. 3) Leave user expression as "USER()" -- no parameters are passed to the script. 4) Select "Use local file and function name" in the check mark box. 5) Select "Python" as the function type. 6) Select the file "mass prop sub .py" as the "local file name". 7) Set the function name to "aggregate_cm_loc"

Functionality

Multi-Body Dynamics

Subfunctionality

XML format

Interface

XML Format