Part

Model ElementPart defines a rigid body object in MotionSolve. This entity has mass and inertia properties.

Class Name

Part

Attribute Summary

Name Property Modifiable by command? Designable?
id Int ()    
label Str () Yes  
ground Bool ()    
planar Enum ("XY YZ ZX YX ZY XZ")    
qg Location (Point ())   Yes
zg Location ()   Yes
xg Location ()   Yes
zv Location ()   Yes
xv Location ()   Yes
reuler Angles ()   Yes
mass Double () Yes Yes
cm Reference ("Marker")   Yes
im Reference ("Marker")   Yes
ip Ips () Yes Yes
material String ("Steel")    
vx Double (None) Yes FD Only
vy Double (None) Yes FD Only
vz Double (None) Yes FD Only
wx Double (None) Yes FD Only
wy Double (None) Yes FD Only
wz Double (None) Yes FD Only
vm Reference ("Marker")   FD Only
wm Reference ("Marker")   FD Only
exact Exact ()    
function Function ("MASS_READ()")    
routine Routine    

Usage

Part (optional_attributes) # All attributes are optional

Attributes

id
Integer
Specifies the element identification number. This number must be unique among all the Part objects in the model.
This attribute is optional. MotionSolve will automatically create an ID when one is not specified.
Range of values: id > 0.
label
String
Specifies the name of the Part object.
This attribute is optional. When not specified, MotionSolve will create a label for you.
ground
Boolean
Specifies whether the Part being defined is the Ground PART or not.
The value True indicates that the PART being defined is the Ground PART. The value False indicates that the Part is not the Ground Part.
This attribute is optional. When not specified, it defaults to False.
Valid range of values: True, False.
mass
Double
Specifies the mass of the PART object.
The attribute mass is optional. If a Part is fully constrained and you are not interested in the constraint forces, then mass needs not to be specified. When not specified, mass is set to zero.
Valid range of values: mass ≥ 0.0
cm
Reference to a Marker
Specifies the Marker that is located at the center-of-mass of the PART.
The attribute cm is optional. If a Part is fully constrained and you are not interested in the constraint forces, then mass and inertia need not to be specified. When these are not specified, you must not specify cm.
Note: In order to remove circular references, the body is created in two steps. First, the body is defined without a CM marker. Then, the CM attribute is explicitly defined. See examples 3-5.
im
Reference to a Marker
Specifies the Marker in whose coordinate system the inertia matrix for the PART is computed.
The attribute im is optional. When not specified, im defaults to the CM marker.
Note: The IM attribute is defined in two steps. First the body is defined without an IM marker. Then the IM attribute is explicitly defined. See examples 5.
ip
List of three doubles or a list of six doubles.
Specifies the mass moments of inertia matrix for the PART about the x, y, z-axes of the IM marker.
The ip attribute is optional. When not specified, it is assumed to be the zero matrix. If a Part is fully constrained and you are not interested in the constraint forces, then ip need not be specified.
You may choose to specify only the diagonal entries [Ixx, Iyy, Izz] or the full matrix [Ixx, Iyy, Izz, Ixy, Ixz, Iyz] in the order shown.
qg
A Location object or a list of three doubles.
Specifies the coordinates of local part reference Marker. This Marker is used as the reference coordinate system for all Markers defined on this PART.
The qg attribute is optional. When not specified, it is assumed to be coincident with the global origin, i.e. (0, 0, 0).
zg
A Location object or a list of three doubles.
Specifies the coordinates of a point on the z-axis of the local part reference Marker. This Marker is used as the reference coordinate system for all Markers defined on this Part.
The zg attribute is optional. When not specified, the point is assumed to be on the global z-axis.
The zg/xg attribute is exclusive to zv/xv, reuler, and function. Only one of them may be specified.
xg
A Location object or a list of three doubles.
Specifies the coordinates of a point on the x-axis of the local part reference Marker. This Marker is used as the coordinate system for all Markers defined on this Part.
The xg attribute is optional. When not specified, the point is assumed to be on the global x-axis.
The zg/xg attribute is exclusive to zv/xv, reuler, and function. Only one of them may be specified.
zv
A Location object or a list of three doubles.
Specifies the z-axis of the local part reference Marker. This Marker is used as the reference coordinate system for all Markers defined on this Part.

The zv attribute is optional. When not specified, the z-axis is assumed to be the global z-axis.

The zv/xv attribute is exclusive to zg/xg, reuler, and function. Only one of them may be specified.

xv
A Location object or a list of three doubles.
Specifies the x-axis of the local part reference Marker. This Marker is used as the coordinate system for all Markers defined on this Part.
The xv attribute is optional. When not specified, the x-axis is assumed to be the global x-axis.
The zv/xv attribute is exclusive to zg/xg, reuler, and function. Only one of them may be specified.
reuler
A list of three doubles.
Specifies the body-fixed 3-1-3 Euler angles of the local part reference Marker with respect to the global coordinate system. This Marker is used as the reference coordinate system for all Markers defined on this Part.
The reuler attribute is optional. When not specified, it is assumed to be (0,0,0), i.e. the local part reference Marker has the same orientation as the global coordinate system.
The reuler attribute is exclusive to function, zg/xg, and zv/xv. Only one of them may be specified.
vm
Reference to a Marker.
Specifies the Marker whose axes system would be used to define the initial translational velocities of the PART (vx, vy, vz).
When not specified, vm defaults to Global coordinate system.
vx
Double
Specifies the initial translational velocity of the PART along the x-axis of the VM marker.
The vx attribute is optional.
  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
vy
Double
Specifies the initial translational velocity of the PART along the y-axis of the VM marker.
The vy attribute is optional.
  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
vz
Double
Specifies the initial translational velocity of the PART along the z-axis of the VM marker.

The vz attribute is optional.

  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
wm
Reference to a Marker
Specifies the Marker whose axes system would be used to define the initial angular velocities of the PART (wx, wy, wz).
When not specified it defaults to PART CM coordinate system.
wx
Double
Specifies the initial angular velocity of the PART about the x-axis of the WM marker.
The wx attribute is optional.
  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
wy
Double
Specifies the initial angular velocity of the PART about the y-axis of the WM marker.
The wy attribute is optional.
  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
wz
Double
Specifies the initial angular velocity of the PART about the z-axis of the WM marker.
The wz attribute is optional.
  • When not specified, MotionSolve will perform an internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
  • When specified, MotionSolve will try to maintain the value specified as it perform the internal computation to ensure that all Part velocities are consistent with the first time derivative of the constraints.
planar
One of the following strings : "XY" "YZ" "ZX" "YX" "ZY" "XZ"
Specifies that this body is constrained to move in a plane and the plane in which it moves.
The attribute planar is optional.
Legal values: "XY" or "YZ" or "ZX" or "YX" or "ZY" or "XZ"
function
String
Specifies the list of parameters that are passed from the data file to the user-written defined.
The attribute function is optional.
The function attribute is exclusive to reuler and zg/xg. Only one of them may be specified.
routine
String or a pointer to a function
Specifies an alternative name for the user subroutine.
The attribute routine is optional. The default name of the user subroutine is MASS_READ.

Examples

  1. Create a Ground PART.
    ground = Part (ground=True)
  2. Create a dummy PART with zero mass & inertia at the global origin.
    dummyBody = Part ()
  3. Create a PART with mass but no inertia.
    body1    = Part (mass=1)
    body1.cm = Marker (body=body1, qp=[12, -13, 14], zp=[14, -13, 14])
    Note: In order to remove circular references, the body is created in two steps. First the body is defined without a CM marker. Then the CM attribute is explicitly defined.
  4. Create a PART with local part reference marker.
    body2    = Part (mass=1, qg=[10, 0, 0], zg=[10, 1, 0], xg=[10, 0, 1])
    body2.cm = Marker (body=body2, qp=[12, -13, 14], zp=[14, -13, 14])
  5. Create a PART that has mass, inertia & initial translational and rotational velocities.
    body0 = Part (label="body 0", mass=1, ip=[0.0004892316,0.0004892316,0.0004892316,0,0,0], vx=1, vy=0, vz=0, wx=2, wy=3, wz=4)
    body0.cm = Marker (body=body0, qp= qp=[12, -13, 14], zp=[14, -13, 14])
    body0.im = body0.cm
  6. Using the "dot" operator to "get" the attributes of a PART.
    Assume that a rigid body object has been created using the fifth example. The dot operator may be used as shown below to get the attributes for a part:
    cm      = body0.cm      # The CM marker for the part body0
    mass    = body0.mass    # The mass of the part body0
    ip      = body0.ip      # The inertia matrix for part body0


    Figure 1.

Comments

  1. See Properties for an explanation about what properties are, why they are used, and how you can extend these.
  2. For a more detailed explanation about rigid bodies, see Body: Rigid.