Model Entities#

class Accgrav(**kwds)#

Defines the acceleration due to gravity along the global X, Y, and Z directions.

Name

Type

Required

Default

Modifiable

Designable

igrav

Property

0.0

\(\checkmark\)

\(\checkmark\)

jgrav

Property

0.0

\(\checkmark\)

\(\checkmark\)

kgrav

Property

0.0

\(\checkmark\)

\(\checkmark\)

label

Str

Example

Define Gravity Acceleration vector.#
from msolve import *

model = Model(output="accgrav")
units = Units(system="MKS")
gravity = Accgrav(igrav=0,jgrav=0,kgrav=-9.81)

ground = Part(ground=True)
global_frame = Marker(part=ground)

body = Part(mass=1, ip=[1e3]*3, cm=Marker())

See also

For more details, see also Force: Gravity.

igrav#

Defines the acceleration due to gravity in the global X direction. Value can be a constant or an expression.

Type=Property, Default=0.0, Modifiable, Designable

jgrav#

Defines the acceleration due to gravity in the global Y direction. Value can be a constant or an expression.

Type=Property, Default=0.0, Modifiable, Designable

kgrav#

Defines the acceleration due to gravity in the global Z direction. Value can be a constant or an expression.

Type=Property, Default=0.0, Modifiable, Designable

label#

A string describing the object.

Type=Str

class Arc(**kwds)#

Generates an arc graphic defined by a center marker, a radius or reference marker, and an angle.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

\(\checkmark\)

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

radius

Double

0.0

\(\checkmark\)

rangle

Double

0.0

\(\checkmark\)

rm

Reference - Marker

seg

Int

100

Usage

The center of the arc is the origin of marker cm. Its radius is defined either directly with radius, or with a reference marker rm.

The arc is drawn starting from the Y axis of cm in a counter clockwise fashion. The end point of the arc is defined by rangle. The plane of the arc is normal to the Z axis of cm.

The resulting arc will be a polygonal approximation of the true arc. To get a smoother arc, you can increase seg.

Example

Define Arc geometry.#
from msolve import *
from math import pi

model = Model(output="arc_graphic")
units = Units(system="MKS")
ground = Part(ground=True)
global_frame = Marker(part=ground)

body = Part(mass=1, ip=[1e3]*3)
body.cm = Marker(qp=[1,1,1], zp=[0,0,1])

arc_rm = Arc(cm=body.cm, rm=global_frame, rangle=2*pi/3, seg=20)

arc_rad = Arc(cm=body.cm, radius=2.0, rangle=pi/2, seg=20)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (ArcFromRadius), Post: Graphic (ArcFromRm).

cm#

Marker that defines the center of the arc.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

radius#

The radius of the arc.

Info

This attribute is mutually exclusive with rm.

Type=Double, Default=0.0, Designable

rangle#

Defines the angle subtended by the Arc, measured in rad.

Type=Double, Default=0.0, Designable

rm#

Marker used to compute the radius of the Arc.

Info

This attribute is mutually exclusive with radius.

Type=Reference (Marker)

seg#

Number of line segments used to approximate the arc.

Type=Int, Default=100

class Array(**kwds)#

Specifies a list of instances of type Variable (used by other MotionSolve modeling elements) or numerical constants.

Name

Type

Required

Default

Modifiable

Designable

function

Function

id

Int

Auto

label

Str

numbers

Double [0]

0.0

\(\checkmark\)

\(\checkmark\)

routine

Routine

script

Script

size

Int

0

type

Enum

variables

Reference - Variable [0]

Usage

To specify a list of variables, choose type as:

  • X: to store state vector corresponding to the Gse and Tfsiso elements.

  • Y: to store the output vector corresponding to the Gse and Tfsiso elements.

  • U: to store the input vector corresponding to the Gse, Tfsiso and Pinput elements.

To specify a list of constants, choose type as:

  • IC: to store a set of numbers used primarily to specify initial conditions for Gse and Tfsiso elements or to define a set of numbers in the model file and access them from user-written subroutines.

Example

Define Array objects.#
from msolve import *

model = Model(output="array")

ground = Part(ground=True)
global_frame = Marker(part=ground)
Units(system="MKS")

part = Part(mass=1,ip=[1,1,2])
part.cm = Marker(qp=[0,0,0],zp=[0,0,1],xp=[1,0,0])

rev_joint = Joint(type="REVOLUTE")
rev_joint.i = Marker(part=part,qp=[0,0,1],zp=[0,0,101])
rev_joint.j = Marker(part=ground,qp=[0,0,1],zp=[0,0,101])

spring = SpringDamper(type="ROTATION",i=rev_joint.i,j=rev_joint.j,ct=0.5,kt=0)

var = Variable()
var.function = f"-WZ({part.cm.id})+VARVAL({var.id})"

x = Array(type="X",size=2)

u = Array(type="U",size=1,variables=[var])

ic = Array(type="IC",size=2,numbers=[0,1])

See also

For more details, see also Reference: Array.

function#

Parameters passed to user defined subroutine.

Info

This attribute can only be used when type = U.

Type=Function

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

numbers#

List of numerical values when type = IC.

Info

This attribute can only be used when type = IC.

Type=Double [0], Default=0.0, Modifiable, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

size#

Number of elements in Array.

Type=Int, Default=0

type#

Specifies the type of Array being created.

Type=Enum

Permitted values are:

  • IC

  • U

  • X

  • Y

variables#

List of Variable when type = U.

Info

This attribute can only be used when type = U.

Type=Reference (Variable) [0]

class Beam(**kwds)#
Defines a straight, massless beam of uniform cross-section acting between two Markers, i and j that belong to two different bodies.

The beam consist of one linear element based on the Timoshenko beam theory. The x-axis of the j Marker, which is the beam center axis, is also defined to be the neutral axis of the undeformed beam. The beam is assumed to undergo only small rotational deflections.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

area

Double

0.0

\(\checkmark\)

\(\checkmark\)

asy

Double

\(\checkmark\)

\(\checkmark\)

asz

Double

\(\checkmark\)

\(\checkmark\)

cratio

Double

0.0

\(\checkmark\)

\(\checkmark\)

emodulus

Double

0.0

\(\checkmark\)

\(\checkmark\)

force

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

function

Function

gmodulus

Double

0.0

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

ixx

Double

0.0

\(\checkmark\)

\(\checkmark\)

iyy

Double

0.0

\(\checkmark\)

\(\checkmark\)

izz

Double

0.0

\(\checkmark\)

\(\checkmark\)

j

Reference - Marker

label

Str

length

Double

0.0

\(\checkmark\)

\(\checkmark\)

routine

Routine

script

Script

torque

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

Limitations

Warning

The three angular deflections, AX(I,J), AY(I,J) and AZ(I,J) must not exceed an upper limit of 10 degrees at all times. Otherwise, the angles lose physical significance and the beam theory is no longer valid.

Example

Create a Beam element.#
from msolve import *
from math import dist

model = Model(output="beam")
units=Units(system="MKS")
ground = Part(ground=True)

part1 = Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[0,10,0]))
part2 = Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[0,0,0]))

beam = Beam (
  i        = part1.cm,
  j        = part2.cm,
  length   = dist(part1.cm.qp,part2.cm.qp),
  ixx      = 75,
  iyy      = 150,
  izz      = 75,
  area     = 10,
  asy      = 1.2,
  asz      = 1.2,
  emodulus = 2.1e5,
  gmodulus = 7.7e4,
  cratio   = 0.01
)

See also

For more details, see also Force: Beam.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

area#

Cross sectional area orthogonal to the neutral axis of the beam.

Type=Double, Default=0.0, Modifiable, Designable

asy#

Shear area ratio in the y direction.

Type=Double, Modifiable, Designable

asz#

Shear area ratio in the z direction.

Type=Double, Modifiable, Designable

cratio#

Damping ratio. The damping matrix is calculated by multiplying the beam stiffness matrix with the damping ratio.

Info

This attribute is mutually exclusive with function.

Type=Double, Default=0.0, Modifiable, Designable

emodulus#

Young’s modulus of elasticity.

Type=Double, Default=0.0, Modifiable, Designable

force#

Translational preload forces.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with cratio.

Type=Function

gmodulus#

Shear modulus of elasticity.

Type=Double, Default=0.0, Modifiable, Designable

i#

Marker at which beam forces and moments are acting.

Type=Reference (Marker), Modifiable

id#

The id of the object.

Type=Int

ixx#

Torsional stiffness shape factor for the cross section.

Type=Double, Default=0.0, Modifiable, Designable

iyy#

The second moment of inertia about y axis of j.

Type=Double, Default=0.0, Modifiable, Designable

izz#

The second moment of inertia about z axis of j.

Type=Double, Default=0.0, Modifiable, Designable

j#

Marker at which beam reaction forces and moments are acting.

Type=Reference (Marker)

label#

A string describing the object.

Type=Str

length#

Distance from the origin of j to the origin of i for the undeformed beam.

Type=Double, Default=0.0, Modifiable, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

torque#

Rotational preload moments.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

class Box(**kwds)#
Creates a rectangular box graphic.

The dimensions can be either defined from its geometric center or from one of its corners.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

color

Color

corner

Reference - Marker

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

refinement_level

Int

3

x

Double

0.0

\(\checkmark\)

y

Double

0.0

\(\checkmark\)

z

Double

0.0

\(\checkmark\)

Example

Create a Box graphic.#
from msolve import *

model = Model(output="box")
units=Units(system="MKS")
units.length = "MILLIMETER"

ground = Part(ground=True)
global_frame = Marker(part=ground)

part = Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[0,0,10]))

ground_geom = Box(corner=global_frame, x=10, y=10, z=1)

# assign the geometry entity to the ground body
ground.geometry = ground_geom

part_geom = Box(cm=part.cm, x=2, y=2, z=2, color='LightCyan', refinement_level=5)

H3dOutput(save=True)
cm#

Marker at the geometric center. Cannot be used with corner.

Info

This attribute is mutually exclusive with corner.

Type=Reference (Marker)

color#

The color of the graphic for H3D animation.

Type=Color

corner#

Marker at a geometric corner. Cannot be used with cm.

Info

This attribute is mutually exclusive with cm.

Type=Reference (Marker)

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

refinement_level#

Defines the mesh density of the graphic used for visualization and 3D body contact.

Type=Int, Default=3

x#

Width of the graphic along x axis of cm or corner.

Type=Double, Default=0.0, Designable

y#

Depth of the graphic along y axis of cm or corner.

Type=Double, Default=0.0, Designable

z#

Height of the graphic along z axis of cm or corner.

Type=Double, Default=0.0, Designable

class Bushing(**kwds)#
Defines a massless bushing between two Markers, i and j that belong to two different bodies.

The stiffness and damping forces are linearly proportional to the relative displacement and velocity between i and j Marker. They do not account for cross-coupling effects. All properties are defined in respect to j Marker. The bushing is assumed to undergo only small rotational deflections.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

c

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

ct

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

force

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

function

Function

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

k

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

kt

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

label

Str

routine

Routine

script

Script

torque

Double [3]

[0, 0, 0]

\(\checkmark\)

\(\checkmark\)

Limitations

Warning

Two of the three angular deflections, AX(I,J), AY(I,J) and AZ(I,J) must not exceed an upper limit of 10 degrees at all times. Otherwise, the angles lose physical significance and the beam theory is no longer valid.

Example

Create a Bushing.#
from msolve import *

model = Model(output="bushing")
units=Units(system="MKS")
units.length = "MILLIMETER"

ground = Part(ground=True)
global_frame = Marker(part=ground)

part = Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[1, 1, 5]))

bush = Bushing(
   i     =  part.cm,
   j     =  global_frame,
   c     =  [1,2,3],
   ct    =  [10,20,30],
   k     =  [100,200,300],
   kt    =  [0,0,0],
   force =  [100,120,200],
   torque = [0,0,0],
   )

See also

For more details, see also Force: Bushing.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

c#

Translational damping coefficient.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

ct#

Rotational damping coefficient.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

force#

Translational preload force.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

function#

Parameters passed to user defined subroutine.

Type=Function

i#

Marker at which bushing forces and moments are acting.

Type=Reference (Marker), Modifiable

id#

The id of the object.

Type=Int

j#

Marker at which bushing reaction forces and moments are acting.

Type=Reference (Marker), Modifiable

k#

Translational stiffness.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

kt#

Rotational stiffness.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

torque#

Rotational preload torque.

Type=Double [3], Default=[0, 0, 0], Modifiable, Designable

class Cforce(**kwds)#
Creates a force element which establishes linear force-displacement (stiffness) and/or force-velocity (damping) relationships between markers connected by higher-pair constraints.

The force can only be a linear function of the relative displacement and velocity of the higher pair joint upon which it is acting. Friction is supported.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

damping

Double

0.0

\(\checkmark\)

friction_transition_velocity

Double

0.001

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

joint

Reference - Cvcv, Ptcv

\(\checkmark\)

label

Str

mu_dynamic

Double

0.0

\(\checkmark\)

\(\checkmark\)

mu_static

Double

0.0

\(\checkmark\)

\(\checkmark\)

stiction_transition_velocity

Double

0.001

\(\checkmark\)

\(\checkmark\)

stiffness

Double

0.0

\(\checkmark\)

Example

Create a Cforce.#
from msolve import *

model = Model(output='cforce')

ground = Part(ground=True)
global_frame = Marker(part=ground, zp=[0, 0, 100], xp=[100, 0, 0])

units = Units(length = 'MILLIMETER')
gravity = Accgrav(kgrav = -9810)

body_0 = Part(mass=10, ip=[1e3, 1e3, 1e3])
body_0.cm = Marker(part=body_0, qp=[191.283, 0.0, 461.875], zv=[0, 0, 1], xv=[1, 0, 0])

body_1 = Part(mass=50, ip=[1e5, 1e5, 1e5])
body_1.cm = Marker(part=body_1, qp=[191.283, 0.0, 461.875], zp=[0, 0, 100], xp=[100, 0, 0])

fixed_joint = Joint(type='FIXED')
fixed_joint.i = Marker(part=ground, qp=[0, 0, -300], zp=[0, 100, -300])
fixed_joint.j = Marker(part=body_1, qp=[0, 0, -300], zp=[0, 100, -300])

curve = Curve(closed=True, function='USER(500)', routine="ms_csubdll::cursub")

ptcv = Ptcv(i=body_0.cm, curve=curve, rm=body_1.cm)

cforce = Cforce(label                        = 'paramcurve force',
                joint                        = ptcv,
                stiction_transition_velocity = 0.0,
                friction_transition_velocity = 0.0,
                stiffness                    = 0.1,
                damping                      = 0.001,
)
active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

damping#

Damping coefficient.

Type=Double, Default=0.0, Designable

friction_transition_velocity#

Slip velocity at which mu_dynamic applied.

Type=Double, Default=0.001, Modifiable, Designable

id#

The id of the object.

Type=Int

joint#

The higher pair joint upon which this force is applied.

Type=Reference (Cvcv, Ptcv), Required

label#

A string describing the object.

Type=Str

mu_dynamic#

Coefficient of dynamic friction.

Type=Double, Default=0.0, Modifiable, Designable

mu_static#

Coefficient of static friction.

Type=Double, Default=0.0, Modifiable, Designable

stiction_transition_velocity#

Slip velocity at which mu_static applied.

Type=Double, Default=0.001, Modifiable, Designable

stiffness#

Stiffness coefficient.

Type=Double, Default=0.0, Designable

class Circle(**kwds)#

Creates a circle graphic defined by a center marker and a radius.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

\(\checkmark\)

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

radius

Double

0.0

\(\checkmark\)

rm

Reference - Marker

seg

Int

100

Example

Create a Circle graphic.#
from msolve import *

model = Model(output='circle')

ground = Part(ground=True)
global_frame = Marker(part=ground, zp=[0, 0, 1])
mark_1 = Marker(part=ground, qp=[10,0,0], zp=[1, 0, 0])

units = Units(length = 'MILLIMETER')

circle_rad = Circle(cm=global_frame, radius=10.0)

circle_rm = Circle(cm=global_frame, rm=mark_1, seg=20)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (CircleFromRadius), Post: Graphic (CircleFromRm).

cm#

Center of Circle.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

radius#

Radius of Circle.

Info

This attribute is mutually exclusive with rm.

Type=Double, Default=0.0, Designable

rm#

Marker used to compute the radius of Circle.

Info

This attribute is mutually exclusive with radius.

Type=Reference (Marker)

seg#

Number of line segments used to approximate circular edge.

Type=Int, Default=100

class CoSim(**kwds)#
Performs a one-/two-way coupled Leader/Follower simulation by instantiating separate MotionSolve processes.

Assume you have two models. The leading model has to contain an instance of this class that defines the connection between both models. As soon as the leading model simulates, it spawns a Follower process that contains the second model and begins to communicate with it.

Name

Type

Required

Default

Modifiable

Designable

bonding

Enum

\(\checkmark\)

file

Str

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

label

Str

type

Enum

\(\checkmark\)

Usage

A displacement-force coupling is achieved by bonding i Marker on the leading model with j Marker on the following model. MotionSolve supports different types of bonding between both models:

  1. COOPERATIVE (two-way coupling): Binds i with j as specified by type. i provides displacement, and j returns forces.

  2. COERCIVE (two-way coupling): Binds i with j forcibly as specified by type. i provides forces, and j returns displacement.

  3. DICTATIVE (one-way coupling): Same as COOPERATIVE bonding except j does not return forces.

  4. IMITATIVE (one-way coupling): Same as COERCIVE bonding except i does not return forces.

bonding#

Type of bonding between i and j.

Type=Enum, Required, Default=COOPERATIVE

Permitted values are:

  • COERCIVE

  • COOPERATIVE

  • DICTATIVE

  • IMITATIVE

file#

Path and file name of the follower model.

Type=Str, Required

i#

Marker on the leading model bonded with j on the follower model.

Type=Reference (Marker), Required

id#

The id of the object.

Type=Int

j#

Marker on the follower model bonded with i marker on the leading model.

Type=Reference (Marker), Required

label#

A string describing the object.

Type=Str

type#

Bonded joint type between i and j.

Type=Enum, Required, Default=SPHERICAL

Permitted values are:

  • CONVEL

  • CYLINDRICAL

  • FIXED

  • PLANAR

  • REVOLUTE

  • SPHERICAL

  • TRANSLATIONAL

  • UNIVERSAL

class Contact(**kwds)#
Defines a 3-D contact force between geometries on two rigid or flexible bodies.

Each body is characterized by a set of one or more geometries. Whenever any geometry on the first body penetrates any geometry on the second body, a contact normal and frictional force are generated. The normal force tends to repulse motion along the common normal at the contact point. The frictional force tends to oppose relative sliding velocity at the contact point. The contact force vanishes when the geometries no longer intersect.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

active_contact_iteration

Bool

False

collision_engine

Enum

AUTO

\(\checkmark\)

contactpost_function

Function

contactpost_routine

Routine

coulomb_friction

Enum

OFF

damping

Double

0.0

\(\checkmark\)

\(\checkmark\)

dmax

Double

0.0

\(\checkmark\)

\(\checkmark\)

enable_analytical

Bool

True

exponent

Double

1.5

\(\checkmark\)

\(\checkmark\)

friction_function

Function

friction_routine

Routine

friction_transition_velocity

Double

0.001

\(\checkmark\)

\(\checkmark\)

i_elastic_modulus

Double

0.0

\(\checkmark\)

\(\checkmark\)

i_layer_depth

Double

1.0

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

iflex

Reference - FlexBody

iflip_flex

Bool

False

igeom

Reference - Graphics [0]

j_elastic_modulus

Double

0.0

\(\checkmark\)

\(\checkmark\)

j_layer_depth

Double

1.0

\(\checkmark\)

\(\checkmark\)

jflex

Reference - FlexBody

jflip_flex

Bool

False

jgeom

Reference - Graphics [0]

label

Str

master_surface

Enum

AUTO

\(\checkmark\)

mu_dynamic

Double

0.0

\(\checkmark\)

\(\checkmark\)

mu_static

Double

0.0

\(\checkmark\)

\(\checkmark\)

normal_function

Function

normal_routine

Routine

normal_trans_vel

Double

0.01

\(\checkmark\)

penalty

Double

0.1

\(\checkmark\)

\(\checkmark\)

restitution_coefficient

Double

0.0

\(\checkmark\)

\(\checkmark\)

script

Script

stiction_transition_velocity

Double

0.001

\(\checkmark\)

\(\checkmark\)

stiffness

Double

0.0

\(\checkmark\)

\(\checkmark\)

type

Enum

\(\checkmark\)

Example

Create a Contact between two geometries.#
from msolve import *

model = Model(output='contact')

units = Units(system="MKS")
gravity = Accgrav(igrav=0, jgrav=0, kgrav=-9.81)

ground = Part(ground=True)
global_ref = Marker(part=ground)
ground.geometry = Box(cm=global_ref, x=20, y=20, z=5)

ball = Part(mass=1, ip=[1,1,1], cm=Marker(qp=[0,0,10], zv=[0,0,1]))
ball.geometry = Sphere(cm=ball.cm, radius=1, material_inside=True)

contact = Contact(type="IMPACT",
                  igeom=ball.geometry,
                  jgeom=ground.geometry,
                  stiffness=1e6,
                  exponent=1.2,
                  damping=1e3,
                  dmax=2e-3)

sensor = ProximitySensor(igeom=ball.geometry, jgeom=ground.geometry)

sensor_output = Request(f2=f"PROXIMITY({sensor.id},2)")


H3dOutput(save=True)
output = Output(save               = True,
                req_angle_radians  = True,
                capture_max_pd     = True,
                contact_gra_output = True
                )

model.simulate(type="TRANSIENT", end=3, steps=300)
model.generateOutput(visualize=True)

See also

For more details, see also Force: Contact.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

active_contact_iteration#

Specifies if the contact residual is being updated during the corrector step of the implicit solver.

Type=Bool, Default=False

collision_engine#

Engine used for contact detection.

Type=Enum, Default=AUTO, Modifiable

Permitted values are:

  • AUTO

  • NODE

  • PCM

contactpost_function#

Parameters passed to contactpost_routine.

Type=Function

contactpost_routine#

Path and name of library containing contactpost subroutine.

Type=Routine

coulomb_friction#

Friction force model.

Type=Enum, Default=OFF

Permitted values are:

  • DYNAMICS_ONLY

  • OFF

  • ON

damping#

The maximum damping coefficient.

Info

This attribute can only be used when type = IMPACT, VOLUME.

Type=Double, Default=0.0, Modifiable, Designable

dmax#

Penetration at which full damping is applied.

Info

This attribute can only be used when type = IMPACT.

Type=Double, Default=0.0, Modifiable, Designable

enable_analytical#

Specifies if contact should be calculated analytically (True) or mesh-based (False). Applicable only to graphics that supports analytical contact.

Type=Bool, Default=True

exponent#

Exponent of the force deformation characteristic.

Info

This attribute can only be used when type = IMPACT, VOLUME.

Type=Double, Default=1.5, Modifiable, Designable

friction_function#

Parameters passed to friction_routine.

Type=Function

friction_routine#

Path and name of library containing friction force subroutine.

Type=Routine

friction_transition_velocity#

Slip velocity at which mu_dynamic applied.

Type=Double, Default=0.001, Modifiable, Designable

i_elastic_modulus#

Elastic modulus for Body i.

Info

This attribute can only be used when type = VOLUME.

Type=Double, Default=0.0, Modifiable, Designable

i_layer_depth#

Layer depth for Body i.

Info

This attribute can only be used when type = VOLUME.

Type=Double, Default=1.0, Modifiable, Designable

id#

The id of the object.

Type=Int

iflex#

Flexible body used as i part in contact.

Info

This attribute is mutually exclusive with igeom.

Type=Reference (FlexBody)

iflip_flex#

Flip the normal directions for I flex body shell elements.

Type=Bool, Default=False

igeom#

Graphics on the first body for contact.

Info

This attribute is mutually exclusive with iflex.

Type=Reference (Graphics) [0]

j_elastic_modulus#

Elastic modulus for Body j.

Info

This attribute can only be used when type = VOLUME.

Type=Double, Default=0.0, Modifiable, Designable

j_layer_depth#

Layer depth for Body j.

Info

This attribute can only be used when type = VOLUME.

Type=Double, Default=1.0, Modifiable, Designable

jflex#

Flexible body used as j part in contact.

Info

This attribute is mutually exclusive with jgeom.

Type=Reference (FlexBody)

jflip_flex#

Flip the normal directions for J flex body shell elements.

Type=Bool, Default=False

jgeom#

Graphics on the second body for contact.

Info

This attribute is mutually exclusive with jflex.

Type=Reference (Graphics) [0]

label#

A string describing the object.

Type=Str

master_surface#

Specifies the master surface.

Type=Enum, Default=AUTO, Modifiable

Permitted values are:

  • AUTO

  • I

  • IANDJ

  • J

mu_dynamic#

Coefficient of dynamic friction.

Type=Double, Default=0.0, Modifiable, Designable

mu_static#

Coefficient of static friction.

Type=Double, Default=0.0, Modifiable, Designable

normal_function#

Parameters passed to normal_routine.

Type=Function

normal_routine#

Path and name of library containing contact force subroutine.

Type=Routine

normal_trans_vel#

Velocity limit between the two bodies at which full damping is applied.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.01, Designable

penalty#

Stiffness parameter for spring force.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.1, Modifiable, Designable

restitution_coefficient#

Coefficient between the geometries in contact.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.0, Modifiable, Designable

script#

Path and name of the script that contains the routine.

Type=Script

stiction_transition_velocity#

Slip velocity at which mu_static applied.

Type=Double, Default=0.001, Modifiable, Designable

stiffness#

The stiffness parameter of the contact.

Info

This attribute can only be used when type = IMPACT.

Type=Double, Default=0.0, Modifiable, Designable

type#

Method used for calculating the contact normal force.

Type=Enum, Required

Permitted values are:

  • IMPACT

  • NONE

  • POISSON

  • USER

  • VOLUME

class Coupler(**kwds)#
Defines an algebraic relationship between the degrees of freedom of two or three joints.

This constraint element may be used to model idealized spur gears, rack and pinion gears, and differentials as simple constraints that relate the displacements in a set of joints.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

id

Int

Auto

joints

Reference - Joint [3]

\(\checkmark\)

\(\checkmark\)

label

Str

routine

Routine

scales

Double [3]

[1, 0, 0]

\(\checkmark\)

\(\checkmark\)

script

Script

type

EnumStr [3]

\(\checkmark\)

virtual

Bool

False

See also

For more details, see also Constraint: Coupler.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with scales.

Type=Function

id#

The id of the object.

Type=Int

joints#

List of joints used to define constraint relationship.

Type=Reference (Joint) [3], Required, Modifiable

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

scales#

Scale factors defining the constraint associated with a coupler.

Info

This attribute is mutually exclusive with function.

Type=Double [3], Default=[1, 0, 0], Modifiable, Designable

script#

Path and name of the script that contains the routine.

Type=Script

type#

Freedom type used for the respective joints.

Type=EnumStr [3], Modifiable

Permitted values are:

  • R

  • T

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Curve(**kwds)#
Defines a parametric curve in 3D space.

You can reference this element using Ptcv, Cvcv, Graphics, and function expressions. Curves can be defined via matrix, function or xyz points.

Name

Type

Required

Default

Modifiable

Designable

closed

Bool

False

\(\checkmark\)

curve_points

Bool

False

\(\checkmark\)

function

Function

\(\checkmark\)

id

Int

Auto

is_smooth_linear

Bool

False

label

Str

matrix

Reference - Matrix

\(\checkmark\)

maxpar

Double

1.0

minpar

Double

-1.0

routine

Routine

script

Script

smoothing_distance

Double

0.1

xyz

Nodes [0]

Example

Create a circle Curve.#
from msolve import *
import numpy as np

model = Model(output='curve')

units = Units(system="MKS")

ground = Part(ground=True)
global_ref = Marker(part=ground)

part = Part(mass=10, ip=[1]*3, cm=Marker())

seg = np.linspace(0, 1, 101)
radius = 50
curve_points = []

for i, point in enumerate(seg):
  curve_points.append([radius*np.sin(2*np.pi*point),
                       radius*np.sin(2*np.pi*point),
                       0])

curve_points[-1] = curve_points[0] # last and first point must coincide in closed curve

curve = Curve(xyz=list(curve_points), closed=True, curve_points=True)

curve.graphic = CurveGraphic(curve=curve, rm=global_ref, seg=20)

H3dOutput(save=True)

See also

For more details, see also Reference: Parametric Curve.

closed#

True if Curve closed in the U parametric space.

Type=Bool, Default=False, Modifiable

curve_points#

True if curve passes through the points.

Type=Bool, Default=False, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with xyz, matrix.

Type=Function, Modifiable

id#

The id of the object.

Type=Int

is_smooth_linear#

Type=Bool, Default=False

label#

A string describing the object.

Type=Str

matrix#

Matrix element that contains the curve data.

Info

This attribute is mutually exclusive with xyz, function.

Type=Reference (Matrix), Modifiable

maxpar#

The maximum value of U.

Type=Double, Default=1.0

minpar#

The minimum value of U.

Type=Double, Default=-1.0

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

smoothing_distance#

Type=Double, Default=0.1

xyz#

List of [x,y,z] points used by the curve.

Info

This attribute is mutually exclusive with matrix, function.

Type=Nodes [0]

class CurveGraphic(**kwds)#

Creates a curve graphic that represents a Curve.

Name

Type

Required

Default

Modifiable

Designable

cid

Alias

color

Color

crm

Alias

curve

Reference - Curve

\(\checkmark\)

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

rm

Reference - Marker

\(\checkmark\)

seg

Int

100

Example

For an example, see Curve.

See also

For more details, see also Post: Graphic (ParamCurve).

cid#

Alias to curve.

Type=Alias

color#

The color of the graphic for H3D animation.

Type=Color

crm#

Alias to rm.

Type=Alias

curve#

The represented Curve object.

Type=Reference (Curve), Required

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

rm#

Coordinate system with respect to which the curve points are defined.

Type=Reference (Marker), Required

seg#

Number of line segments used to approximate the curve.

Type=Int, Default=100

class Cvcv(**kwds)#
Defines a (Curve to Curve) higher pair constraint.

The constraint consists of a 3D Curve fixed on one body rolling and sliding on a 3D Curve fixed on a second body. The curves are required to have a unique point of contact and a common tangent at that point of contact.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

icurve

Reference - Curve

\(\checkmark\)

id

Int

Auto

idisp

Double [3]

[0, 0, 0]

\(\checkmark\)

irm

Reference - Marker

\(\checkmark\)

ivel

Double

0.0

\(\checkmark\)

jcurve

Reference - Curve

\(\checkmark\)

jdisp

Double [3]

[0, 0, 0]

\(\checkmark\)

jrm

Reference - Marker

\(\checkmark\)

jvel

Double

0.0

\(\checkmark\)

label

Str

no_slip

Bool

False

virtual

Bool

False

Example

Create a Curve to Curve constraint.#
from msolve import *

model = Model(output="cvcv")

ground = Part(ground=True)
global_ref = Marker(body=ground)
Units(length="MILLIMETER")
Accgrav(kgrav=-9810)

body0 = Part(mass=10,ip=[1e3,700,500,0,0,0])
body0.cm = Marker(qp=[229.61,0.0,554.328],zv=[0,0,1], xv=[1,0,0])

body1 = Part(mass=50,ip=[5e3,10e3,5e3])
body1.cm = Marker(qp=[0,0,0],zv=[0,0,1], xv=[1,0,0])

jrev1 = Joint(type="REVOLUTE")
jrev1.i = Marker(label="joint 1-marker i",body=ground,qp=[0,0,-300],zv=[0,1,0])
jrev1.j = Marker(label="joint 1-marker j",body=body1,qp=[0,0,-300],zv=[0,1,0])

curve_1 = Curve(closed=True,minpar=-1,maxpar=1, function="user(100)", routine = "ms_csubdll::CURSUB")
curve_2 = Curve(closed=True,minpar=-1,maxpar=1, function="user(500)", routine = "ms_csubdll::CURSUB")

cvcv = Cvcv(icurve=curve_1, irm=body0.cm, jcurve=curve_2, jrm=body1.cm)

See also

For more details, see also Constraint: CVCV.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

icurve#

Curve that contains the first curve definition.

Type=Reference (Curve), Required

id#

The id of the object.

Type=Int

idisp#

Coordinates of initial contact point on the first curve.

Type=Double [3], Default=[0, 0, 0], Designable

irm#

Coordinate system in which the icurve points are defined.

Type=Reference (Marker), Required

ivel#

Sliding velocity of the contact point observed from irm.

Type=Double, Default=0.0, Designable

jcurve#

Curve that contains the second curve definition.

Type=Reference (Curve), Required

jdisp#

Coordinates of initial contact point on the second curve.

Type=Double [3], Default=[0, 0, 0], Designable

jrm#

Coordinate system in which the jcurve points are defined.

Type=Reference (Marker), Required

jvel#

Sliding velocity of the contact point observed from jrm.

Type=Double, Default=0.0, Designable

label#

A string describing the object.

Type=Str

no_slip#

Specifies if slip or slide is allowed between the two curves.

Type=Bool, Default=False

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Cvsf(**kwds)#
Defines a (Curve to Surface) higher pair constraint.

A Curve on one body slides on a Surface that is fixed to a second body. The curve is not allowed to lift off the surface.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

curve

Reference - Curve

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

idisp

Double [3]

[0, 0, 0]

\(\checkmark\)

irm

Reference - Marker

\(\checkmark\)

\(\checkmark\)

jdisp

Double [3]

[0, 0, 0]

\(\checkmark\)

jrm

Reference - Marker

\(\checkmark\)

label

Str

no_slip

Bool

False

surface

Reference - Surface

\(\checkmark\)

\(\checkmark\)

virtual

Bool

False

Example

Create a Curve to Surface constraint.#
from msolve import *

model = Model(output="cvsf")

ground = Part(ground=True)
global_frame = Marker(part=ground)
Units(length="MILLIMETER")
Accgrav(kgrav=-9810)

part1 = Part (mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[100,0,200], zv=[0,0,1]))
part2 = Part (mass=1, ip=[1e3,1e3,1e3], cm=Marker())

cv = Curve(closed   = True,
           minpar   = -1,
           maxpar   = 1,
           function = "USER(100)",
           routine  = "ms_csubdll::CURSUB")

sf = Surface(uclosed   = True,
             vclosed   = True,
             minpar    = [-1,-1],
             maxpar    = [1,1],
             function  = "USER(2,500)",
             routine   = "ms_csubdll::SURSUB")

cvsf = Cvsf(curve=cv,irm=part2.cm,surface=sf,jrm=part1.cm)

See also

For more details, see also Constraint: CVSF.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

curve#

Reference to an existing Curve in the model.

Type=Reference (Curve), Required, Modifiable

id#

The id of the object.

Type=Int

idisp#

A guess for the initial contact point on the curve.

Type=Double [3], Default=[0, 0, 0], Designable

irm#

Coordinate system for the definition of the curve.

Type=Reference (Marker), Required, Modifiable

jdisp#

A guess for the initial contact point on the surface.

Type=Double [3], Default=[0, 0, 0], Designable

jrm#

Coordinate system for the definition of the surface.

Type=Reference (Marker), Required

label#

A string describing the object.

Type=Str

no_slip#

Specifies if slip or slide is allowed between the curve and the surface.

Type=Bool, Default=False

surface#

Reference to an existing Surface in the model.

Type=Reference (Surface), Required, Modifiable

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Cylinder(**kwds)#

Creates a geometric figure with straight parallel sides and a circular cross-section along the Z axis direction of the cm Marker.

Name

Type

Required

Default

Modifiable

Designable

auto_clearance

Double

\(\checkmark\)

cm

Reference - Marker

\(\checkmark\)

color

Color

end_caps

Enum

OPEN

ends_type

Alias

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

length

Double

0.0

\(\checkmark\)

material_inside

Bool

True

radius

Double

0.0

\(\checkmark\)

refinement_level

Int

4

Example

Create a Cylinder graphic.#
from msolve import *

model = Model(output="cylinder")

ground = Part(ground=True)
global_frame = Marker(part=ground)
Units(length="MILLIMETER")

cyl = Cylinder(cm=global_frame, radius=10, length=100, end_caps="CLOSED", material_inside=True)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Cylinder).

auto_clearance#

Automatically compute clearance when contacts are defined on cylinders.

Type=Double, Modifiable

cm#

Coordinate system of cylinder situated at the center of the base circular section.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

end_caps#

Specifies if the top and bottom are closed.

Type=Enum, Default=OPEN

Permitted values are:

  • BOTTOM_ONLY

  • CLOSED

  • OPEN

  • TOP_ONLY

ends_type#

Alias to end_caps

Type=Alias

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

length#

Length of Cylinder.

Type=Double, Default=0.0, Designable

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

radius#

Radius of Cylinder.

Type=Double, Default=0.0, Designable

refinement_level#

Mesh density of Cylinder.

Type=Int, Default=4

class Debug(**kwds)#

Outputs data that helps you debug your simulation.

Name

Type

Required

Default

Modifiable

Designable

anim

Bool

False

\(\checkmark\)

eprint

Bool

False

\(\checkmark\)

jmdump

Bool

False

jmdumpfreq

Bool

False

jmdumpgse

Bool

False

label

Str

reqdump

Bool

False

rhsdump

Bool

False

screen_output

Bool

False

\(\checkmark\)

verbose

Bool

False

\(\checkmark\)

See also

For more details, see also DebugOutput.

anim#

A flag that causes animation frames to be generated.

Type=Bool, Default=False, Modifiable

eprint#

A flag controlling the generation of debugging information.

Type=Bool, Default=False, Modifiable

jmdump#

Type=Bool, Default=False

jmdumpfreq#

Type=Bool, Default=False

jmdumpgse#

Type=Bool, Default=False

label#

A string describing the object.

Type=Str

reqdump#

Type=Bool, Default=False

rhsdump#

Type=Bool, Default=False

screen_output#

True if the debug output is to be printed to the screen.

Type=Bool, Default=False, Modifiable

verbose#

The level of verbosity of the output.

Type=Bool, Default=False, Modifiable

class DeformableCurve(**kwds)#
Specifies a deformable curve that is made to pass through the origins of a specified set of markers, using CUBIC spline interpolation.

These markers may be on separate bodies. As the markers move in space, the curve shape is recalculated using CUBIC spline interpolation, thereby allowing the curve to deform. The curve can be opened or closed.

Name

Type

Required

Default

Modifiable

Designable

end_type_left

Enum

NATURAL

end_type_right

Enum

NATURAL

id

Int

Auto

label

Str

lambda_left

Double

0.0

lambda_right

Double

0.0

markers

Reference - Marker [0]

mrk_id_vec

Alias

tension

Double

0.0

\(\checkmark\)

u_closed

Bool

False

u_span

Double

1.0

\(\checkmark\)

uclosed

Alias

Example

Create a DeformableCurve and its graphic.#
from msolve import *

model = Model(output="def_curve")

ground = Part(ground=True)
global_ref = Marker(body=ground)

body=Part(mass=1, cm=Marker(qp=[100,0,0]), ip=[1e3,1e3,1e3])

mar1 = Marker(body=body, qp=[100,0,0])
mar2 = Marker(body=body, qp=[500,100,200])
mar3 = Marker(body=body, qp=[-100,-200,0])
mar4 = Marker(body=body, qp=[0,300,100])

curve = DeformableCurve(end_type_left  = "NATURAL",
                        end_type_right = "NATURAL",
                        markers        = [mar1, mar2, mar3, mar4],
                        u_span         = 1.
                        )

graphic = DeformableCurveGraphic(dcurve=curve, seg=50)

H3dOutput(save=True)
model.simulate(type="TRANSIENT", end=1, steps=300)
model.generateOutput(visualize=True)

See also

For more details, see also Reference: Deformable Curve.

end_type_left#

Specifies the 2nd derivative condition met at the left end.

Type=Enum, Default=NATURAL

Permitted values are:

  • CANTILEVER

  • NATURAL

  • PARABOLIC

  • PERIODIC

end_type_right#

Specifies the 2nd derivative condition met at the right end.

Type=Enum, Default=NATURAL

Permitted values are:

  • CANTILEVER

  • NATURAL

  • PARABOLIC

  • PERIODIC

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

lambda_left#

Parameter that controls the left end condition for CUBIC spline interpolation.

Type=Double, Default=0.0

lambda_right#

Parameter that controls the right end condition for CUBIC spline interpolation.

Type=Double, Default=0.0

markers#

List of marker that defines this deformed curve.

Type=Reference (Marker) [0]

mrk_id_vec#

Alias of markers.

Type=Alias

tension#

Type=Double, Default=0.0, Modifiable

u_closed#

True if the Curve is unclosed.

Type=Bool, Default=False

u_span#

Specifies the parametric span of the curve.

Type=Double, Default=1.0, Modifiable

uclosed#

Alias of u_closed.

Type=Alias

class DeformableCurveGraphic(**kwds)#
Creates a curve graphic that represents a DeformableCurve.

The graphic is defined by a number of straight line segments connecting vertices on the curve defined by deformable curve. The graphic deforms along with the curve as the simulation progresses.

Name

Type

Required

Default

Modifiable

Designable

color

Color

dcurve

Reference - DeformableCurve

\(\checkmark\)

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

radius

Double

0.0

seg

Int

100

Example

For an example, see DeformableCurve.

See also

For more details, see also Post: Graphic (DeformCurve).

color#

The color of the graphic for H3D animation.

Type=Color

dcurve#

Deformable Curve.

Type=Reference (DeformableCurve), Required

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Type=Bool, Default=True

radius#

The radius of the DeformableCurveGraphic.

Type=Double, Default=0.0

seg#

Number of line segments used to approximate the curves.

Type=Int, Default=100

class DeformableSurface(**kwds)#
Specifies a deformable surface that is made to pass through the origins of a specified set of markers, using CUBIC spline interpolation.

These markers may be on separate bodies or on a flexible body. As the markers move in space, the surface is recalculated using CUBIC spline interpolation thereby allowing the surface to deform. The surface can be open or closed.

Name

Type

Required

Default

Modifiable

Designable

end_type

Enum

NATURAL

id

Int

Auto

label

Str

markers

Reference - Marker [0]

mrk_id_mtx

Alias

u_closed

Bool

False

u_span

Double

1.0

\(\checkmark\)

u_tension

Double

0.0

\(\checkmark\)

uclosed

Alias

v_closed

Bool

False

v_span

Double

1.0

\(\checkmark\)

v_tension

Double

0.0

\(\checkmark\)

vclosed

Alias

Example

Create a DeformableSurface and its graphic.#
from msolve import *

model = Model(output="def_surface")

ground = Part(ground=True)
global_ref = Marker(body=ground)
Units(length="MILLIMETER")

body=Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[100,0,0], zv=[0,0,1]))

mar1 = Marker(body=body, qp=[100,0,0])
mar2 = Marker(body=body, qp=[0,200,0])
mar3 = Marker(body=body, qp=[-100,0,0])
mar4 = Marker(body=body, qp=[0,-200,0])

mar10 = Marker(body=body, qp=[100,0,60])
mar20 = Marker(body=body, qp=[0,200,60])
mar30 = Marker(body=body, qp=[-100,0,60])
mar40 = Marker(body=body, qp=[0,-200,60])

surf = DeformableSurface(end_type  = "NATURAL",
                         markers   = [[mar1,mar2,mar3,mar4],
                                      [mar10,mar20,mar30,mar40],
                                      [mar1,mar2,mar3,mar4]],
                         u_tension = 1.0,
                         v_tension = 1.0,
                         u_closed  = True
                         )

graphic = DeformableSurfaceGraphic(dsurface=surf, u_seg=10, v_seg=50)

H3dOutput(save=True)
model.simulate(type="TRANSIENT", end=1, steps=300)
model.generateOutput(visualize=True)

See also

For more details, see also Reference: Deformable Surface.

end_type#

Define the end type of this deformed surface.

Type=Enum, Default=NATURAL

Permitted values are:

  • NATURAL

  • PARABOLIC

  • PERIODIC

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

markers#

Markers that define the deformed surface.

Type=Reference (Marker) [0]

mrk_id_mtx#

Alias of markers.

Type=Alias

u_closed#

True if the surface is closed in U direction.

Type=Bool, Default=False

u_span#

Specifies the parametric span of the surface in the U direction.

Type=Double, Default=1.0, Modifiable

u_tension#

Type=Double, Default=0.0, Modifiable

uclosed#

Alias of u_closed.

Type=Alias

v_closed#

True if the surface is closed in V direction.

Type=Bool, Default=False

v_span#

Specifies the parametric span of the surface in the V direction.

Type=Double, Default=1.0, Modifiable

v_tension#

Type=Double, Default=0.0, Modifiable

vclosed#

Alias of v_closed.

Type=Alias

class DeformableSurfaceGraphic(**kwds)#
Creates a surface graphic that represents a DeformableSurface.

The graphic is defined by a number of straight line segments connecting vertices on the surface defined by deformable surface. The graphic deforms along with the surface as the simulation progresses.

Name

Type

Required

Default

Modifiable

Designable

color

Color

dsurface

Reference - DeformableSurface

\(\checkmark\)

hidden

Bool

False

id

Int

Auto

label

Str

u_seg

Int

0

v_seg

Int

0

Example

For an example, see DeformableSurface.

See also

For more details, see also Post: Graphic (DeformSurface).

color#

The color of the graphic for H3D animation.

Type=Color

dsurface#

Deformable Curve.

Type=Reference (DeformableSurface), Required

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

u_seg#

Number of line segments used to approximate the surface.

Type=Int, Default=0

v_seg#

Number of line segments used to approximate the surface.

Type=Int, Default=0

class Diff(**kwds)#

Creates a user-defined state variable and defines a first-order differential equation that describes it.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

\(\checkmark\)

ic

Double [2]

[None, None]

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

implicit

Bool

False

label

Str

routine

Routine

script

Script

static_hold

Bool

False

Example

Create a state variable using Diff.#
from msolve import *

model = Model(output="diff")

ground = Part(ground=True)
global_ref = Marker(body=ground)
Units(length="MILLIMETER")
Accgrav(kgrav=-9810)

body=Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[0,0,100], zv=[0,0,1]))

dif = Diff(function=f"ACCZ({body.cm.id},{global_ref.id})", ic=[1.25])

See also

For more details, see also Control: Differential Equation.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the differential equation.

Type=Function, Required, Modifiable

ic#

Initial conditions of differential equation.

Type=Double [2], Default=[None, None], Modifiable, Designable

id#

The id of the object.

Type=Int

implicit#

Specifies if derivative is defined implicitly.

Type=Bool, Default=False

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

static_hold#

Specifies if dynamic state is kept fixed during static solution.

Type=Bool, Default=False

class Dv(**kwds)#
Defines a special type of solver state variable.

It is used in the evaluation and computation of design sensitivity as a design parameter. Its value is modified during the simulation in case of Design Sensitivity Analysis.

Name

Type

Required

Default

Modifiable

Designable

b

Double

\(\checkmark\)

blimit

Double [2]

[-1000000000000.0, 1000000000000.0]

id

Int

Auto

label

Str

scaleBySen

Bool

True

sensitivity

Bool

True

Example

Create a Dv variable.#
from msolve import *

model = Model(output="dv")

Units(length="MILLIMETER")
Accgrav(kgrav=-9810)
ground = Part(ground=True)
global_ref = Marker(body=ground)

body=Part(mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[0,0,100], zv=[0,0,1]))

radius = Dv(b=100, blimit=[80,135])
length = Dv(b=1e3, blimit=[850, 1100])

cyl = Cylinder(cm=body.cm, radius=radius, length=length, end_caps="CLOSED")

H3dOutput(save=True)

See also

For more details, see also Design Variables and Limits.

b#

Initial value of the design variable.

Type=Double, Required, Default=0.0

blimit#

Lower and Upper bound numerical values for the Design Variable.

Type=Double [2], Default=[-1000000000000.0, 1000000000000.0]

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

scaleBySen#

True if scale the design variable by sensitivity.

Type=Bool, Default=True

sensitivity#

When set to False, MotionSolve ignores this Dv in dsa analysis.

Type=Bool, Default=True

class Ellipsoid(**kwds)#

Creates a three-dimensional figure whose plane sections are ellipses or circles and its center is the cm Marker.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

\(\checkmark\)

color

Color

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

refinement_level

Int

3

xscale

Double

0.0

\(\checkmark\)

yscale

Double

0.0

\(\checkmark\)

zscale

Double

0.0

\(\checkmark\)

Example

Create an Ellipsoid graphic.#
from msolve import *

model = Model(output="ellipsoid")

Units(length="MILLIMETER")

ground = Part(ground=True)
global_ref = Marker(body=ground)

graphic = Ellipsoid(cm=global_ref, xscale=1, yscale=1, zscale=3, color="100:200:50")

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Ellipsoid).

cm#

Geometric center of the Ellipsoid.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

refinement_level#

Mesh density of Ellipsoid.

Type=Int, Default=3

xscale#

Diameter of the Ellipsoid graphic along the x-axis.

Type=Double, Default=0.0, Designable

yscale#

Diameter of the Ellipsoid graphic along the y-axis.

Type=Double, Default=0.0, Designable

zscale#

Diameter of the Ellipsoid graphic along the z-axis.

Type=Double, Default=0.0, Designable

class Equilibrium(**kwds)#

Specifies error tolerances and other parameters for static and quasi-static equilibrium analyses.

Name

Type

Required

Default

Modifiable

Designable

error

Double

\(\checkmark\)

imbalance

Double

\(\checkmark\)

kinetic_energy_error

Double

\(\checkmark\)

label

Str

maxit

Int

\(\checkmark\)

method

Enum

FIM_D

\(\checkmark\)

skip_mkeam

Bool

False

\(\checkmark\)

stability

Double

\(\checkmark\)

type

Enum

\(\checkmark\)

See also

For more details, see also Parameters: Static Solver.

error#

Upper limit for the FIM convergence criteria.

Type=Double, Modifiable

imbalance#

Maximum force imbalance allowed.

Type=Double, Modifiable

kinetic_energy_error#

Maximum allowed residual kinetic energy at static equilibrium.

Type=Double, Modifiable

label#

A string describing the object.

Type=Str

maxit#

Number of iterations allowed before static simulation terminates.

Type=Int, Modifiable

method#

Specifies the static solver method used.

Type=Enum, Default=FIM_D, Modifiable

Permitted values are:

  • FIM_D

  • FIM_S

  • MKEAM

skip_mkeam#

True if you want to skip MKEAM analysis following FIM failure.

Type=Bool, Default=False, Modifiable

stability#

Fraction of mass matrix added to Jacobian.

Type=Double, Modifiable

type#

The type of simulation.

Type=Enum, Modifiable

Permitted values are:

  • DYNAMIC

  • STATIC

class External(**kwds)#

Creates a graphic object defined using an external file.

Name

Type

Required

Default

Modifiable

Designable

color

Color

element

Str [0]

file

Str

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

refinement_level

Int

rm

Reference - Marker

\(\checkmark\)

Example

Import an external graphic object.#
from msolve import *

model = Model(output="external")

ground = Part(ground=True)
global_ref = Marker(body=ground)

# the provided file must exist in the specified directory
External(rm=global_ref, file="slotted_link.x_t", element = ['Link','Pin'])

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Parasolid).

color#

The color of the graphic for H3D animation.

Type=Color

element#

Component or element used from the External file.

Type=Str [0]

file#

Location and name of an External file.

Type=Str

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

refinement_level#

Mesh density of External.

Type=Int

rm#

Coordinate system for the specification of the geometry data.

Type=Reference (Marker), Required

class Field(**kwds)#
Applies a translational and rotational action-reaction force between two markers.

Both linear and non-linear relationships are supported. Stiffness and damping linear terms are expressed in 6 by 6 matrix form. Damping can also be expressed as a global stiffness ratio (cratio).

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

cmatrix

Double [36]

\(\checkmark\)

\(\checkmark\)

cratio

Double

\(\checkmark\)

\(\checkmark\)

force

Double [6]

[0, 0, 0, 0, 0, 0]

\(\checkmark\)

\(\checkmark\)

function

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

kmatrix

Double [36]

\(\checkmark\)

\(\checkmark\)

label

Str

length

Double [6]

[0, 0, 0, 0, 0, 0]

\(\checkmark\)

\(\checkmark\)

routine

Routine

script

Script

Example

Create a Field.#
from msolve import *

model = Model(output="field")

ground = Part(ground=True)
global_ref = Marker(body=ground)

body_a = Part  (mass=1, ip=[1,1,1], cm=Marker(qp=Point(0,200,100)))
body_b = Part  (mass=5, ip=[1,1,1], cm=Marker(qp=Point(0,200,150)))

field = Field(i        = body_a.cm,
              j        = body_b.cm,
              function = "USER(1,1,1,1,1)",
              routine  = "msautoutils::fiesub",
              )

See also

For more details, see also Force: Field.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

cmatrix#

6x6 damping matrix.

Info

This attribute is mutually exclusive with cratio, function.

Type=Double [36], Modifiable, Designable

cratio#

Damping scale factor.

Info

This attribute is mutually exclusive with cmatrix, function.

Type=Double, Modifiable, Designable

force#

Translational preload force and rotational preload torque.

Type=Double [6], Default=[0, 0, 0, 0, 0, 0], Modifiable, Designable

function#

Parameters passed to user subroutine.

Info

This attribute is mutually exclusive with cmatrix, cratio.

Type=Function, Modifiable

i#

Marker at which the force and moment is applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

j#

Marker at which the reaction force and moment is applied.

Type=Reference (Marker), Required, Modifiable

kmatrix#

6x6 stiffness matrix.

Type=Double [36], Modifiable, Designable

label#

A string describing the object.

Type=Str

length#

Free length of the Field element.

Type=Double [6], Default=[0, 0, 0, 0, 0, 0], Modifiable, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class FlexBody(**kwds)#
Defines a flexible body object in MotionSolve.

This entity has mass and inertia properties just like a rigid body. In addition, it has modal flexibility properties that allow it to deform under loads. The FlexBody operates in 3-D space where it can simultaneously undergo large overall motion as well as deformation.

Name

Type

Required

Default

Modifiable

Designable

cms_data

Reference - NuCMS

color

Color

cratio

Function

full_label

Str

function

Function

h3d_file

FileName

ic_array

Reference - Array

id

Int

Auto

label

Str

lset_file

Str

max_num_cnt_loadset

Int

0

mtx_file

FileName

orthogonal_loadset

Bool

True

qg

Location

0.0, 0.0, 0.0

\(\checkmark\)

reuler

Angles

\(\checkmark\)

rigidified

Bool

False

\(\checkmark\)

routine

Routine

script

Script

vm

Reference - Marker

vx

Double

\(\checkmark\)

\(\checkmark\)

vy

Double

\(\checkmark\)

\(\checkmark\)

vz

Double

\(\checkmark\)

\(\checkmark\)

wm

Reference - Marker

wx

Double

\(\checkmark\)

\(\checkmark\)

wy

Double

\(\checkmark\)

\(\checkmark\)

wz

Double

\(\checkmark\)

\(\checkmark\)

xg

Location

\(\checkmark\)

xv

Location

\(\checkmark\)

zg

Location

\(\checkmark\)

zv

Location

\(\checkmark\)

Example

For this example, a mtx file is required. The file is located in the mbd_modeling\flexbodies folder in the MotionSolve tutorials Model Files. You may copy the file to your working directory.

Create a FlexBody.#
from msolve import *

model = Model(output='flexbody')

ground = Part(ground=True)
global_ref = Marker(part=ground)
Units(system='MKS')
Accgrav(kgrav=-9.81)

flex = FlexBody(mtx_file="sla_flex_left.mtx", qg=[1,1,1], zv=[0,0,1])

See also

For more details, see also Body: Flexible.

cms_data#

NuCMS object that contains the CMS representation for the FlexBody.

Type=Reference (NuCMS)

color#

The color of the graphic for this flexible body.

Type=Color

cratio#

State-dependent expression of damping coefficient for each mode.

Type=Function

full_label#

When defined on a rigid body it indicates that aero-dynamic loads calculated during a MotionSolve-Acusolve co-simulation will be applied. It is essential for this string to correspond to the Rigid Body label defined within the Motion Ribbon of HyperWorks CFD, under External Surface.

Type=Str

function#

Parameters passed to user defined subroutine.

Type=Function

h3d_file#

H3D file containing nodes in finite element mesh.

Type=FileName

ic_array#

Type=Reference (Array)

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

lset_file#

Output filename for contact bdf file generated during simulation.

Type=Str

max_num_cnt_loadset#

Maximum number of exported contact loadsets.

Type=Int, Default=0

mtx_file#

MTX file containing CMS representation for FlexBody.

Type=FileName

orthogonal_loadset#

Boolean indicating if computed loadsets will be orthogonalized.

Type=Bool, Default=True

qg#

Coordinates of local FlexBody reference marker.

Type=Location, Default=0.0, 0.0, 0.0, Designable

reuler#

3-1-3 Euler angles of local part reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, { xv , zv }.

Type=Angles, Designable

rigidified#

Convert the flexible body to a rigid body if True.

Type=Bool, Default=False, Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

vm#

Marker used to define initial translational velocity. When not specified, it defaults to the global coordinate system.

Type=Reference (Marker)

vx#

Initial translational velocity along x-axis.

Type=Double, Modifiable, Designable

vy#

Initial translational velocity along y-axis.

Type=Double, Modifiable, Designable

vz#

Initial translational velocity along z-axis.

Type=Double, Modifiable, Designable

wm#

Marker used to define initial angular velocity. When not specified, it defaults to the FlexBody cm coordinate system.

Type=Reference (Marker)

wx#

Initial angular velocity along x-axis.

Type=Double, Modifiable, Designable

wy#

Initial angular velocity along y-axis.

Type=Double, Modifiable, Designable

wz#

Initial angular velocity along z-axis.

Type=Double, Modifiable, Designable

xg#

Point the x-axis of the LPRF marker to the specified point.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

xv#

Align the x-axis of the LPRF marker along the specified direction.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

zg#

Point the z-axis of the LPRF marker to the specified point.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

zv#

Align the z-axis of the LPRF marker along the specified direction.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

class Fmu(**kwds)#

Creates a Functional Mock-up Interface used for Model Exchange and Co-Simulation.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

comm_intvl

Alias

dll

Str

nugsefmu

dll_name

Alias

geoms

Int [0]

0

ic

Reference - Array

id

Int

Auto

interval

Double

0.0

ip_addr

Alias

ip_address

Str

PIPE

label

Str

path

Str

start_time

Double

0.0

static_hold

Bool

False

type

Enum

ME

u

Reference - Array

var_ic

Property

var_name

Str

x

Reference - Array

y

Reference - Array

See also

For more details, see also Control: FMU.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

comm_intvl#

Alias to interval.

Type=Alias

dll#

Path and name of the DLL that is used to load the FMU.

Type=Str, Default=nugsefmu

dll_name#

Alias to dll.

Type=Alias

geoms#

Type=Int [0], Default=0

ic#

Array used to store the initial conditions for the continuous states.

Type=Reference (Array)

id#

The id of the object.

Type=Int

interval#

Time interval between successive communications with the FMU.

Type=Double, Default=0.0

ip_addr#

Alias to ip_address.

Type=Alias

ip_address#

IP address for the FMU connecting to MotionSolve.

Type=Str, Default=PIPE

label#

A string describing the object.

Type=Str

path#

Path of the FMU file.

Type=Str

start_time#

The start time for the coupled co-simulation.

Type=Double, Default=0.0

static_hold#

Specifies if dynamic states x are kept fixed during static/quasi-static solution.

Type=Bool, Default=False

type#

Type of FMU.

Type=Enum, Default=ME

Permitted values are:

  • CS

  • ME

u#

Array used to store the input, u.

Type=Reference (Array)

var_ic#

The values of var_name variables that need to be set by the user.

Type=Property

var_name#

The names of the variables inside FMU that can be assigned a value.

Type=Str

x#

Array used to store the continuous states, x.

Type=Reference (Array)

y#

Array used to store the output, y.

Type=Reference (Array)

class ForceGraphic(**kwds)#
Creates an arrow representing a force acting on the specified entity.

The arrow’s direction aligns with the force, and its length corresponds to the magnitude.

Name

Type

Required

Default

Modifiable

Designable

color

Color

component

Enum

XYZ

entity

Reference - Force, Constraint

\(\checkmark\)

hidden

Bool

False

id

Int

Auto

label

Str

magnitude

Bool

False

marker

Enum

I

radius

Double

0.0

rm

Reference - Marker

scale

Double

0.05

Example

Create a ForceGraphic.#
from msolve import *

model = Model(output="force_graphic")

ground = Part(ground=True)
global_ref = Marker(body=ground)

body=Part(mass=5, cm=Marker(qp=[0,0,40], zv=[0,0,1]), ip=[1,1,1])

Units(force="NEWTON",mass="KILOGRAM",length="METER",time="SECOND")
Accgrav(igrav=0,jgrav=0,kgrav=-9.810)
H3dOutput(save=True)

spdp = SpringDamper(type='TRANSLATION', i=body.cm, j=global_ref, k=10, c=0.1, length=40)
spdp.geo = SpringDamperGraphic(i=spdp.i, j=spdp.j, da=8, db=5, dc=3, lc=25, ld=25, coils=6)

body.geo = Box(cm=body.cm, x=15,y=15,z=15)
ground.geo = Plane(rm=global_ref, xmin=-20, xmax=+20, ymin=-20, ymax=+20)

ForceGraphic(entity=spdp, radius=2, scale=1, component="Z")
color#

The color of the graphic for H3D animation.

Type=Color

component#

Specifies the components of the entity that will be visualized.

Type=Enum, Default=XYZ

Permitted values are:

  • X

  • XY

  • XYZ

  • Y

  • YZ

  • Z

  • ZX

entity#

Specifies the entity used to draw graphic forces.

Type=Reference (Force, Constraint), Required

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

magnitude#

If True, a graphic of the resultant force will be created.

Type=Bool, Default=False

marker#

Specifies if force is computed at the I or J marker.

Type=Enum, Default=I

Permitted values are:

  • I

  • J

radius#

Specifies the radius of the arrow.

Type=Double, Default=0.0

rm#

Specifies the reference marker in which the force is reported.

Type=Reference (Marker)

scale#

Specifies the scale factor affecting the arrow length.

Type=Double, Default=0.05

class Friction(**kwds)#
Applies frictional forces in a joint.

Friction can be used on translational, revolute, cylindrical, hooke, universal, and spherical Joints.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

ball_radius

Double

1.0

\(\checkmark\)

\(\checkmark\)

bending_reaction_arm

Double

1.0

\(\checkmark\)

\(\checkmark\)

bristle_stiffness

Double

100.0

\(\checkmark\)

damping_effects

Double

0.316

\(\checkmark\)

effect

Enum

ALL

\(\checkmark\)

friction_arm

Double

1.0

\(\checkmark\)

\(\checkmark\)

friction_force_preload

Double

0.0

\(\checkmark\)

\(\checkmark\)

friction_torque_preload

Double

0.0

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

inactive

Enum

NONE

initial_overlap

Double

1000.0

\(\checkmark\)

\(\checkmark\)

inputs

EnumStr [0]

ALL

\(\checkmark\)

joint

Reference - Joint

\(\checkmark\)

label

Str

max_stiction_deformation

Double

0.01

\(\checkmark\)

\(\checkmark\)

mu_dynamic

Double

0.2

\(\checkmark\)

\(\checkmark\)

mu_static

Double

0.3

\(\checkmark\)

\(\checkmark\)

overlap_delta

Enum

CONSTANT

\(\checkmark\)

pin_radius

Double

1.0

\(\checkmark\)

\(\checkmark\)

reaction_arm

Double

1.0

\(\checkmark\)

\(\checkmark\)

stiction_transition_velocity

Double

0.1

\(\checkmark\)

\(\checkmark\)

viscous_effects

Double

0.0004

\(\checkmark\)

yoke

Enum

I

Example

Add Friction on a Revolute joint.#
from msolve import *

model = Model(output="friction")

ground = Part(ground=True)
global_ref = Marker(body=ground)
Accgrav(kgrav=-9.81)

part = Part(mass=1, ip=[1,1,1], cm=Marker(qp=Point(100,0,0)))

rev_joint = Joint(type = "REVOLUTE",
                  i    = Marker(part=part,   qp=Point(), zv=[0,1,0], xv=[1,0,0]),
                  j    = Marker(part=ground, qp=Point(), zv=[0,1,0], xv=[1,0,0])
                  )

friction = Friction(joint = rev_joint, mu_static = 0.25, mu_dynamic  = 0.2)

See also

For more details, see also Force: Joint Friction.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

ball_radius#

The radius of the Spherical joint.

Type=Double, Default=1.0, Modifiable, Designable

bending_reaction_arm#

The moment arm to compute the bending moment in Revolute, Hooke and Universal joints.

Type=Double, Default=1.0, Modifiable, Designable

bristle_stiffness#

The bristle stiffness in the LuGre model.

Type=Double, Default=100.0, Designable

damping_effects#

The damping coefficient for the pre-displacement (or stiction) regime.

Type=Double, Default=0.316, Designable

effect#

Specifies the frictional effect.

Type=Enum, Default=ALL, Modifiable

Permitted values are:

  • ALL

  • SLIDING

  • STICTION

friction_arm#

The moment arm used to compute axial friction torque in Revolute and Universal joints.

Type=Double, Default=1.0, Modifiable, Designable

friction_force_preload#

Preload friction force for Translational and Cylindrical joints.

Type=Double, Default=0.0, Modifiable, Designable

friction_torque_preload#

Preload friction torque.

Type=Double, Default=0.0, Modifiable, Designable

id#

The id of the object.

Type=Int

inactive#

Select STATIC to disable joint friction during static analysis.

Type=Enum, Default=NONE

Permitted values are:

  • NONE

  • STATIC

initial_overlap#

Initial overlap of the sliding parts.

Type=Double, Default=1000.0, Modifiable, Designable

inputs#

A set of enumerated values defining the desired friction effects.

Type=EnumStr [0], Default=ALL, Modifiable

Permitted values are:

  • ALL

  • BENDING_MOMENT

  • NONE

  • PRELOAD

  • REACTION_FORCE

  • TORSIONAL_MOMENT

joint#

Joint where the friction force is applied.

Type=Reference (Joint), Required

label#

A string describing the object.

Type=Str

max_stiction_deformation#

Maximum deformation that can occur.

Type=Double, Default=0.01, Modifiable, Designable

mu_dynamic#

Dynamic friction coefficient.

Type=Double, Default=0.2, Modifiable, Designable

mu_static#

Static friction coefficient.

Type=Double, Default=0.3, Modifiable, Designable

overlap_delta#

Friction characteristics in the sliding joint.

Type=Enum, Default=CONSTANT, Modifiable

Permitted values are:

  • CONSTANT

  • DECREASE

  • INCREASE

pin_radius#

The radius of the pin for Revolute, Cylindrical, Hooke and Universal joints.

Type=Double, Default=1.0, Modifiable, Designable

reaction_arm#

Moment arm of the reaction torque.

Type=Double, Default=1.0, Modifiable, Designable

stiction_transition_velocity#

Velocity below which the friction is static.

Type=Double, Default=0.1, Modifiable, Designable

viscous_effects#

The coefficient for the viscous damping force that occurs when relative sliding actually begins.

Type=Double, Default=0.0004, Designable

yoke#

The yoke choice for Hooke and Universal joints.

Type=Enum, Default=I

Permitted values are:

  • I

  • J

class Frustum(**kwds)#
Creates a graphic of a portion of a cone.

Its base is defined by the cm Marker and its axis by the cm z-axis.

This portion is specified as the part:

  • that remains after its upper part has been cut off by a plane parallel to its base, or,

  • that is intercepted between two such planes.

Name

Type

Required

Default

Modifiable

Designable

bottom

Double

0.0

\(\checkmark\)

cm

Reference - Marker

\(\checkmark\)

color

Color

end_caps

Enum

OPEN

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

length

Double

0.0

\(\checkmark\)

material_inside

Bool

True

refinement_level

Int

4

top

Double

0.0

\(\checkmark\)

Example

Create a Frustum graphic.#
from msolve import *

model = Model(output="frustum")

Units(length="MILLIMETER")

ground = Part(ground=True)
global_ref = Marker(body=ground)

graphic = Frustum(cm=global_ref, top=10, bottom=50, length=100, end_caps="CLOSED")

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Frustum).

bottom#

Radius of the bottom circle of the Frustum.

Type=Double, Default=0.0, Designable

cm#

Center of the bottom circular face of the Frustum.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

end_caps#

Specifies if the top and bottom is closed.

Type=Enum, Default=OPEN

Permitted values are:

  • BOTTOM_ONLY

  • CLOSED

  • OPEN

  • TOP_ONLY

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

length#

Length of Frustum.

Type=Double, Default=0.0, Designable

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

refinement_level#

Mesh density of Frustum.

Type=Int, Default=4

top#

Radius of the top circle of the Frustum.

Type=Double, Default=0.0, Designable

class Gcon(**kwds)#
Specifies a user defined general constraint.

Your constraint equations may involve position as well as velocity measures of the system. Although MotionSolve provides a large set of constraints to choose from (see Joint), there are situations that require non-standard constraints. For example, the constraint that a wheel rolls without slipping is a non-holonomic constraint that can be modeled using the GCON element.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

id

Int

Auto

label

Str

routine

Routine

script

Script

virtual

Bool

False

Example

Create a general constraint.#
from msolve import *

model = Model(output="gcon")

Units(length="MILLIMETER")

ground = Part(ground=True)
global_ref = Marker(body=ground)

wheel = Part(mass=1.5, ip=[2.5e3, 2.5e3, 5e3])
wheel.radius = 80
wheel.cm = Marker(qp=[0, wheel.radius, 0], zv=[0,0,1], xv=[1,0,0])

gcon = Gcon(function=f"VX({wheel.cm.id})+{wheel.radius}*WZ({wheel.cm.id})")

See also

For more details, see also Constraint: General.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the general constraint.

Type=Function, Required

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Gear(**kwds)#
Defines a gear constraint between two bodies.

The gear is modeled as an algebraic relationship between input and output displacements between Joints. The inputs and outputs may be either rotational or translational. This allows spur, helical, bevel, and rack-and-pinion gear sets to be modeled.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

cv

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

joints

Reference - Joint [2]

\(\checkmark\)

\(\checkmark\)

label

Str

virtual

Bool

False

See also

For more details, see also Constraint: Gear.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

cv#

Marker whose origin defines the contact point.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

joints#

Two joints coupled by the gear constraint.

Type=Reference (Joint) [2], Required, Modifiable

label#

A string describing the object.

Type=Str

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Gforce(**kwds)#
Defines a general force and torque acting between two markers.

The force and torque vectors are defined by their three components with respect to a third marker. The components may be defined using MotionSolve expressions or a user-defined subroutine. They may be a function of any system state and time.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

fx

Function

\(\checkmark\)

fy

Function

\(\checkmark\)

fz

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

jfloat

Reference - Marker

\(\checkmark\)

label

Str

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

tx

Function

\(\checkmark\)

ty

Function

\(\checkmark\)

tz

Function

\(\checkmark\)

Example

Create a general force.#
from msolve import *

model = Model(output="gforce")

Units(length="MILLIMETER")

ground = Part(ground=True)
global_ref = Marker(body=ground)

body = Part(mass=5.0, ip=[2e3]*3, cm=Marker(qp=[0, 100, 0], zv=[0,0,1]))

gforce = Gforce(i   = body.cm,
                rm  = global_ref,
                fx  = "5 + 0.1*SIN(3*TIME)",
                tz  = "100"
                )

See also

For more details, see also Force: Two Body Vector.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with { tz , fy , tx , fx , fz , ty }.

Type=Function, Modifiable

fx#

Specifies the fx component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

fy#

Specifies the fy component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

fz#

Specifies the fz component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

i#

Marker at which the force applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

jfloat#

Marker at which reaction force applied. Omit for Action Only.

Type=Reference (Marker), Modifiable

label#

A string describing the object.

Type=Str

rm#

Reference Marker. When not specified, it defaults to the global coordinate system.

Type=Reference (Marker), Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

tx#

Specifies the tx component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

ty#

Specifies the ty component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

tz#

Specifies the tz component of the force vector as function expression.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

class Grid(**kwds)#
Defines a set of nodal coordinates in 3D space.

This entity is a fully parameterized entity used in conjunction with Absolute Nodal Coordinate Formulation elements.

Name

Type

Required

Default

Modifiable

Designable

id

Int

Auto

label

Str

r

Double [3]

[0, 0, 0]

r0

Double [3]

0.0

rd

Double [3]

0.0

rx

Double [3]

0.0

rx0

Double [3]

0.0

rxd

Double [3]

0.0

ry

Double [3]

0.0

ry0

Double [3]

0.0

ryd

Double [3]

0.0

rz

Double [3]

0.0

rz0

Double [3]

0.0

rzd

Double [3]

0.0

See also

For more details, see also Grid.

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

r#

Current x, y, z coordinates of the Grid.

Type=Double [3], Default=[0, 0, 0]

r0#

The relaxed position x, y, z coordinates for the Grid.

Type=Double [3], Default=0.0

rd#

The x, y, z velocities of the Grid.

Type=Double [3], Default=0.0

rx#

The x gradient vectors for the Grid.

Type=Double [3], Default=0.0

rx0#

The x relaxed position gradient vector.

Type=Double [3], Default=0.0

rxd#

The time derivative of the x gradient vector.

Type=Double [3], Default=0.0

ry#

The y gradient vectors for the Grid.

Type=Double [3], Default=0.0

ry0#

The y relaxed position gradient vector.

Type=Double [3], Default=0.0

ryd#

The time derivative of the y gradient vector.

Type=Double [3], Default=0.0

rz#

The z gradient vectors for the Grid.

Type=Double [3], Default=0.0

rz0#

The z relaxed position gradient vector.

Type=Double [3], Default=0.0

rzd#

The time derivative of the z gradient vector.

Type=Double [3], Default=0.0

class Gse(**kwds)#
Defines a generic dynamic system.

The dynamic system is characterized by an array of inputs u, an array of dynamic states x, and an array of outputs y. See Array. The state array x is defined by a set of differential equations. The output vector y is defined by a set of algebraic equations.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

fmu_comm_intvl

Alias

function

Function

\(\checkmark\)

\(\checkmark\)

ic

Reference - Array

\(\checkmark\)

id

Int

Auto

interval

Double

0.0

ip_addr

Alias

ip_address

Str

label

Str

no

Int

0

ns

Int

0

routine

Routine

script

Script

static_hold

Bool

False

\(\checkmark\)

u

Reference - Array

\(\checkmark\)

x

Reference - Array

\(\checkmark\)

y

Reference - Array

\(\checkmark\)

See also

For more details, see also Control: State Equation.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

fmu_comm_intvl#

Alias to interval.

Type=Alias

function#

Parameters passed to user defined subroutine.

Type=Function, Required, Modifiable

ic#

Array used to store the initial values of the states.

Type=Reference (Array), Modifiable

id#

The id of the object.

Type=Int

interval#

Time interval between successive communications with the FMU, defaults to h_max

Type=Double, Default=0.0

ip_addr#

Alias to ip_address.

Type=Alias

ip_address#

IP address for the server FMU connecting to MotionSolve.

Type=Str

label#

A string describing the object.

Type=Str

no#

Specifies the number of outputs in the Gse.

Type=Int, Default=0

ns#

Specifies the number of states in the Gse.

Type=Int, Default=0

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

static_hold#

Specifies if dynamic states are kept constant during static solution.

Type=Bool, Default=False, Modifiable

u#

Array used to store the inputs, u.

Type=Reference (Array), Modifiable

x#

Array used to store the states, x.

Type=Reference (Array), Modifiable

y#

Array used to store the outputs, y.

Type=Reference (Array), Modifiable

class H3dOutput(**kwds)#

Defines the parameters for the animation output file.

Name

Type

Required

Default

Modifiable

Designable

capture_max_pd

Bool

False

end

Double

9999999.0

format

Alias

format_type

Enum

AUTO

gpstress_format

Enum

TENSOR

grasave

Alias

inc

Alias

increment

Int

1

label

Str

linear_anim

Bool

False

save

Bool

False

start

Double

0.0

strain

Alias

strain_format

Enum

NONE

stress

Alias

stress_format

Enum

NONE

See also

For more details, see also H3D Output.

capture_max_pd#

Determines whether MotionSolve should monitor the maximumpenetration between colliding bodies across consecutive output steps.

Type=Bool, Default=False

end#

Specifies the end time for writing the H3D.

Type=Double, Default=9999999.0

format#

Alias to format_type.

Type=Alias

format_type#

Specifies the format for Flexible Body result.

Type=Enum, Default=AUTO

Permitted values are:

  • AUTO

  • MODAL

  • NODAL

  • NODALG

gpstress_format#

Specifies the format for grid point stress output. TENSOR enables grid point stress modeshapes if present in FlexBody H3D file.

Type=Enum, Default=TENSOR

Permitted values are:

  • NONE

  • TENSOR

grasave#

Alias to save.

Type=Alias

inc#

Alias to increment.

Type=Alias

increment#

Controls how often data is written to the H3D file as a multiple of the output step.

Type=Int, Default=1

label#

A string describing the object.

Type=Str

linear_anim#

Specifies whether linear analysis mode shapes are to be included in H3D file.

Type=Bool, Default=False

save#

Specifies if animation h3d file is to be generated.

Type=Bool, Default=False

start#

Specifies the start time for writing the H3D.

Type=Double, Default=0.0

strain#

Alias to strain_format.

Type=Alias

strain_format#

Specifies the format for Flexible Body strain result.

Type=Enum, Default=NONE

Permitted values are:

  • NONE

  • TENSOR

stress#

Alias to stress_format.

Type=Alias

stress_format#

Specifies the format for Flexible Body stress result.

Type=Enum, Default=NONE

Permitted values are:

  • NONE

  • TENSOR

class Integrator(**kwds)#

Specifies parameters that control the dynamic analysis integrator.

Name

Type

Required

Default

Modifiable

Designable

dae_constr_tol

Double

\(\checkmark\)

dae_eval_expiry

Int

\(\checkmark\)

dae_index

Int

\(\checkmark\)

dae_jacob_init

Int

0

\(\checkmark\)

dae_vc_tol_factor

Double

1000

\(\checkmark\)

dae_vel_ctrl

Bool

False

\(\checkmark\)

error

Double

\(\checkmark\)

hinit

Double

\(\checkmark\)

hmax

Double

\(\checkmark\)

hmin

Double

\(\checkmark\)

interpolate

Bool

True

\(\checkmark\)

kmax

Int

\(\checkmark\)

label

Str

maxit

Int

\(\checkmark\)

minit

Int

\(\checkmark\)

pattern

Pattern

\(\checkmark\)

rel_abs_tol_ratio

Double

0.01

\(\checkmark\)

type

Enum

DSTIFF

vel_tol_factor

Double

\(\checkmark\)

See also

For more details, see also Parameters: Transient Solver.

dae_constr_tol#

Tolerance that the corrector must satisfy at convergence.

Type=Double, Modifiable

dae_eval_expiry#

Number of integration steps after which the evaluation pattern defined by dae_jacob_eval is ignored, and the default evaluation pattern is to be used.

Type=Int, Modifiable

dae_index#

The index of the DAE formulation.

Type=Int, Modifiable

dae_jacob_init#

Number of initial Jacobian matrix evaluations.

Type=Int, Default=0, Modifiable

dae_vc_tol_factor#

A factor that multiplies error to yield the error tolerance.

Type=Double, Default=1000, Modifiable

dae_vel_ctrl#

True if the integrator is to include velocity states in its check.

Type=Bool, Default=False, Modifiable

error#

Maximum absolute error allowed.

Type=Double, Modifiable

hinit#

Maximum initial step size.

Type=Double, Modifiable

hmax#

Maximum step size the integrator is allowed to take.

Type=Double, Modifiable

hmin#

Minimum step size the integrator is allowed to take.

Type=Double, Modifiable

interpolate#

Specifies whether the integrator uses interpolation for the results at the output steps.

Type=Bool, Default=True, Modifiable

kmax#

Maximum order that the integrator is to take.

Type=Int, Modifiable

label#

A string describing the object.

Type=Str

maxit#

Maximum number of iterations the corrector is allowed to take to achieve convergence.

Type=Int, Modifiable

minit#

Minimum number of iterations for the corrector.

Type=Int, Modifiable

pattern#

Frequency of evaluation of the Jacobian matrix.

Type=Pattern, Modifiable

rel_abs_tol_ratio#

Specifies the ratio of relative error to absolute error used by the integrator.

Type=Double, Default=0.01, Modifiable

type#

Defines the integrator to be used.

Type=Enum, Default=DSTIFF

Permitted values are:

  • ABAM

  • CSTIFF

  • DSTIFF

  • MSTIFF

  • VSTIFF

vel_tol_factor#

A factor that multiplies error to yield the error tolerance for velocity states.

Type=Double, Modifiable

class Joint(**kwds)#
Creates an idealized connector between two bodies.

Joint defines a set of lower pair constraints. Physically, the joint consists of two mating surfaces that allow relative translational and/or rotational movement in certain specific directions only. The surfaces are abstracted away, and the relationships are always expressed as a set of algebraic constraint equations between points and directions on two bodies.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

ic

Double [2]

\(\checkmark\)

icrot

Double [2]

\(\checkmark\)

ictran

Double [2]

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

label

Str

pd

Double

0.0

\(\checkmark\)

\(\checkmark\)

pitch

Double

0.0

\(\checkmark\)

\(\checkmark\)

type

Enum

\(\checkmark\)

virtual

Bool

False

Example

Create a Joint.#
from msolve import *

model = Model(output="joint")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

body = Part(mass=5.0, ip=[1]*3, cm=Marker(qp=[0,0,0]))

sph_joint = Joint(type="SPHERICAL", i=body.cm, j=global_ref)

See also

For more details, see also Constraint: Joint.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

i#

Reference Marker that defines the connection on the first body.

Type=Reference (Marker), Required, Modifiable

ic#

Initial velocity and displacement.

Info

This attribute can only be used when type = TRANSLATIONAL, REVOLUTE.

Type=Double [2], Designable

icrot#

Initial rotational velocity and displacement.

Info

This attribute can only be used when type = CYLINDRICAL.

Type=Double [2], Designable

ictran#

Initial translational velocity and displacement.

Info

This attribute can only be used when type = CYLINDRICAL.

Type=Double [2], Designable

id#

The id of the object.

Type=Int

j#

Reference Marker that defines the connection on the second body.

Type=Reference (Marker), Required, Modifiable

label#

A string describing the object.

Type=Str

pd#

Pitch diameter of the pinion gear of a rack and pinion gear Joint.

Info

This attribute can only be used when type = RACKPIN.

Type=Double, Default=0.0, Modifiable, Designable

pitch#

Pitch of a screw Joint.

Info

This attribute can only be used when type = SCREW.

Type=Double, Default=0.0, Modifiable, Designable

type#

Type of constraint connection between marker i and j.

Type=Enum, Required, Default=SPHERICAL

Permitted values are:

  • CONVEL

  • CYLINDRICAL

  • FIXED

  • FREE

  • HOOKE

  • PLANAR

  • RACKPIN

  • REVOLUTE

  • SCREW

  • SPHERICAL

  • TRANSLATIONAL

  • UNIVERSAL

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Jprim(**kwds)#
Removes degrees of freedom between two bodies by specifying conditions in which the relative translational or rotational motion can occur.

Jprim differs from Joint in that the former specifies mathematical constraints, which may not have concrete physical realizations like the latter.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

label

Str

type

Enum

\(\checkmark\)

virtual

Bool

False

Example

Create a primitive Joint.#
from msolve import *

model = Model(output="jprim")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

body = Part(mass=5.0, ip=[1]*3, cm=Marker(qp=[0,0,0]))

jprim = Jprim(type="ATPOINT", i=body.cm, j=global_ref)

See also

For more details, see also Constraint: Primitive.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

i#

Reference Marker that defines the connection on the first body.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

j#

Reference Marker that defines the connection on the second body.

Type=Reference (Marker), Required, Modifiable

label#

A string describing the object.

Type=Str

type#

Type of constraint connection between marker i and j.

Type=Enum, Required, Default=ATPOINT

Permitted values are:

  • ATPOINT

  • INLINE

  • INPLANE

  • ORIENTATION

  • PARALLEL_AXES

  • PERPENDICULAR

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class LineMesh(**kwds)#

Creates a graphic that connects a number of vertices with straight lines.

Name

Type

Required

Default

Modifiable

Designable

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

rm

Reference - Marker

\(\checkmark\)

vertex

Double [0]

\(\checkmark\)

Example

Create a square LineMesh graphic.#
from msolve import *

model = Model(output="lmesh")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

body = Part(cm=Marker())

vertex1 = [0,0,0]
vertex2 = [1,0,0]
vertex3 = [1,1,0]
vertex4 = [0,1,0]

line1 = vertex1 + vertex2
line2 = vertex2 + vertex3
line3 = vertex3 + vertex4
line4 = vertex4 + vertex1

lmesh = LineMesh(rm=global_ref, vertex=line1+line2+line3+line4)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (LineMesh).

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

rm#

Marker with respect to which all the vertex coordinates are defined.

Type=Reference (Marker), Required

vertex#

The X,Y,Z coordinates of the vertices, with two vertices specified per line.

Type=Double [0], Designable

class Linear(**kwds)#

Specifies the solver parameters that control the linear analysis.

Name

Type

Required

Default

Modifiable

Designable

animation_scale

Double

1.0

cutoff_frequency

Double

-1

eigensol

Bool

False

\(\checkmark\)

kinetic

Bool

False

label

Str

matlab

Bool

False

\(\checkmark\)

nodamping

Bool

False

oml

Bool

True

pinput

Reference - Pinput

\(\checkmark\)

poutput

Reference - Poutput

\(\checkmark\)

pstate

Reference - Pstate

simulink_mdl

Bool

False

\(\checkmark\)

statemat

Bool

False

Example

For an example, see PointMass.

animation_scale#

Specifies a scale factor for magnifying the mode shapes during animation.

Type=Double, Default=1.0

cutoff_frequency#

Specifies the upper bound of the eigenvalues of the system.

Type=Double, Default=-1

eigensol#

If True, the eigenvalue and eigenvector data are written to an .eig file.

Type=Bool, Default=False, Modifiable

kinetic#

Specifies whether modal kinetic energy distribution is to be written out to the solver log file and the linz.mrf output file.

Type=Bool, Default=False

label#

A string describing the object.

Type=Str

matlab#

If True, the A,B,C, D matrices are written out into a file compatible with MATLAB.

Type=Bool, Default=False, Modifiable

nodamping#

If True, damping is disabled in linear solver.

Type=Bool, Default=False

oml#

If True, the A, B, C, D matrices will be written out in an OML format file.

Type=Bool, Default=True

pinput#

Specifies the plant input used for the B and D state matrices.

Type=Reference (Pinput), Modifiable

poutput#

Specifies the plant output used for the C and D state matrices.

Type=Reference (Poutput), Modifiable

pstate#

Specifies a PlantState to be used in the state space representation of the system. A PlantState defines a list of variables used in generating a linear representation of the model about an operating point. The linear representation is used for both eigenvalue analysis and state matrix generation..

Type=Reference (Pstate)

If True, the A, B, C, D matrices are written out in Simulink MDL format.

Type=Bool, Default=False, Modifiable

statemat#

If True, the A, B, C, D matrices will be written out in a file.

Type=Bool, Default=False

class Lse(**kwds)#
Defines a linear dynamic system.

The form of the dynamic system is:

\[ \begin{align}\begin{aligned}\dot x = Ax + Bu\\y = Cx + Du\end{aligned}\end{align} \]

The state variables x, the inputs, u, and the outputs, y, are specified with Arrays. Use Matrix to define the coefficient matrices a, b, c and d.

Name

Type

Required

Default

Modifiable

Designable

a

Reference - Matrix

\(\checkmark\)

\(\checkmark\)

active

Bool

True

\(\checkmark\)

b

Reference - Matrix

\(\checkmark\)

c

Reference - Matrix

\(\checkmark\)

d

Reference - Matrix

\(\checkmark\)

ic

Reference - Array

\(\checkmark\)

id

Int

Auto

label

Str

static_hold

Bool

False

\(\checkmark\)

u

Reference - Array

\(\checkmark\)

x

Reference - Array

\(\checkmark\)

\(\checkmark\)

y

Reference - Array

\(\checkmark\)

Example

Create a Linear State Equation (Lse).#
from msolve import *

model = Model(output="lse")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

a = Matrix(full="CORDER", rows=2, columns=2, values=[0,1,2,0.2])
b = Matrix(full="CORDER", rows=2, columns=1, values=[10,2])
c = Matrix(full="CORDER", rows=1, columns=2, values=[0,1])
d = Matrix(full="CORDER", rows=1, columns=2, values=[0.5,0.1])

ic = Array(type="IC", numbers=[1,1])
x  = Array(type="X")
y  = Array(type="Y")
u  = Array(type="u",size=1)
u.variables = Variable(function="-STEP(TIME, 0, 0, 0.1, 1)")

lse = Lse(u=u, x=x, y=y, a=a, b=b, c=c, d=d, ic=ic)

See also

For more details, see also Control: State Equation.

a#

State matrix for this Lse.

Type=Reference (Matrix), Required, Modifiable

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

b#

Input matrix for this Lse.

Type=Reference (Matrix), Modifiable

c#

Output matrix for this Lse.

Type=Reference (Matrix), Modifiable

d#

Feed-thru matrix for this Lse.

Type=Reference (Matrix), Modifiable

ic#

Array used to store the initial values of the states.

Type=Reference (Array), Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

static_hold#

Specifies if dynamic states x are kept fixed during static/quasi-static solution.

Type=Bool, Default=False, Modifiable

u#

Array used to store the inputs, u, of this Lse.

Type=Reference (Array), Modifiable

x#

Array used to store the states, x, of this Lse.

Type=Reference (Array), Required, Modifiable

y#

Array used to store the output, y, of this Lse.

Type=Reference (Array), Modifiable

class Marker(**kwds)#
Defines an orthonormal, right-handed coordinate system and reference frame in MotionSolve.

A Marker must belong to a Part, a PointMass or a FlexBody.

Name

Type

Required

Default

Modifiable

Designable

body

Reference - Body

flex_body

Reference - FlexBody

floating

Bool

False

full_label

Str

function

Function

grid

Reference - Grid

id

Int

Auto

label

Str

node

Int

0

node_id

Alias

part

Reference - Part

point_mass

Reference - PointMass

qp

Location

\(\checkmark\)

\(\checkmark\)

\(\checkmark\)

reuler

Angles

\(\checkmark\)

\(\checkmark\)

rm

Reference - Marker

routine

Routine

script

Script

usexp

Bool

False

usexv

Alias

xp

Location

\(\checkmark\)

\(\checkmark\)

xv

Location

\(\checkmark\)

\(\checkmark\)

zp

Location

\(\checkmark\)

\(\checkmark\)

zv

Location

\(\checkmark\)

\(\checkmark\)

Example

Create Markers.#
from msolve import *

model = Model(output="marker")

Units(system="MKS")
ground = Part(ground=True)
part = Part(mass=1, ip=[1]*3)

m1 = Marker(part=ground, zp=[0,0,100])

m2 = part.cm = Marker(part=part, qp=Point(10,5,0), xv=[1,0,0], zv=[0,0,1], usexv=True)

m3 = Marker(part=part, qp=m1.qp, floating=True, reuler=[0,90,0])

See also

For more details, see also Reference: Marker.

body#

Specifies the body to which Marker belongs.

Info

This attribute is mutually exclusive with point_mass, flex_body, part.

Type=Reference (Body)

dc()#

Returns three vectors parallel to the x, y, z axes of a Marker in the global reference frame.

flex_body#

Specifies the FlexBody to which Marker belongs.

Info

This attribute is mutually exclusive with point_mass, part, body.

Type=Reference (FlexBody)

floating#

Specifies whether the marker is floating.

Type=Bool, Default=False

full_label#

Label used during MotionSolve - Acusolve co-simulation.

Type=Str

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with { xp , zp }, { xv , zv }, reuler.

Type=Function

grid#

Define the Marker location using a Grid object.

Type=Reference (Grid)

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

node#

Node on flexible body to which Marker is attached.

Type=Int, Default=0

node_id#

Alias to node.

Type=Alias

part#

Specifies the Part to which Marker belongs.

Info

This attribute is mutually exclusive with point_mass, flex_body, body.

Type=Reference (Part)

point_mass#

Specifies the PointMass to which Marker belongs.

Info

This attribute is mutually exclusive with part, flex_body, body.

Type=Reference (PointMass)

qp#

Specifies the coordinates of Marker with respect to body or rm.

Type=Location, Required, Default=0.0, 0.0, 0.0, Modifiable, Designable

reuler#

Specifies body-fixed 3-1-3 Euler angles, in radians, of the Marker with respect to the rm Marker

Info

This attribute is mutually exclusive with { xp , zp }, { xv , zv }, function.

Type=Angles, Modifiable, Designable

rm#

Specifies the reference marker in which the location and orientation of the marker are described. When not specified, the position of the Marker is assumed to be with respect to the LPRF of the hosting body.

Type=Reference (Marker)

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

usexp#

Use x-point-z-point method of orientation if True.

Type=Bool, Default=False

usexv#

Alias to usexp.

Type=Alias

xaxis()#

Returns a vector parallel to the x-axis of a Marker in the global reference frame.

xp#

Specifies the coordinates of a point on the x-axis of the Marker expressed in the rm Marker coordinate system.

Info

This attribute is mutually exclusive with { xv , zv }, reuler, function.

Type=Location, Modifiable, Designable

xv#

Vector parallel to the x-axis direction of the Marker in the rm Marker coordinate system.

Info

This attribute is mutually exclusive with { xp , zp }, reuler, function.

Type=Location, Modifiable, Designable

yaxis()#

Returns a vector parallel to the y-axis of a Marker in the global reference frame.

zaxis()#

Returns a vector parallel to the z-axis of a Marker in the global reference frame.

zp#

Specifies the coordinates of a point on the z-axis of the Marker expressed in the rm Marker coordinate system.

Info

This attribute is mutually exclusive with { xv , zv }, reuler, function.

Type=Location, Modifiable, Designable

zv#

Vector parallel to the z-axis direction of the Marker in the rm Marker coordinate system.

Info

This attribute is mutually exclusive with { xp , zp }, reuler, function.

Type=Location, Modifiable, Designable

class Mate(**kwds)#
Specifies general mating constraints between geometric primitives based on

distance, tangency, and coincidence relations. The geometric primitives can be point, line, plane, sphere, cylinder or cone.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

dist

Double

0.0

\(\checkmark\)

\(\checkmark\)

height

Double

0.0

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

iradius

Double

0.0

\(\checkmark\)

\(\checkmark\)

j

Reference - Marker

\(\checkmark\)

jradius

Double

0.0

\(\checkmark\)

\(\checkmark\)

label

Str

radius

Double

0.0

\(\checkmark\)

\(\checkmark\)

type

Enum

virtual

Bool

False

See also

For more details, see also Constraint: Mate.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

dist#

Distance between the two parts constrained.

Type=Double, Default=0.0, Modifiable, Designable

height#

Height of the geometric primitive.

Type=Double, Default=0.0, Modifiable, Designable

i#

Marker that defines the connection on the first body.

Type=Reference (Marker), Modifiable

id#

The id of the object.

Type=Int

iradius#

Radius of the i geometric primitive.

Type=Double, Default=0.0, Modifiable, Designable

j#

Marker that defines the connection on the second body.

Type=Reference (Marker), Modifiable

jradius#

Radius of the j geometric primitive.

Type=Double, Default=0.0, Modifiable, Designable

label#

A string describing the object.

Type=Str

radius#

Radius of the circle/sphere/cone.

Type=Double, Default=0.0, Modifiable, Designable

type#

Type of mate between i and j markers.

Type=Enum

Permitted values are:

  • COI_LIN_CYL

  • COI_LIN_LIN

  • COI_LIN_PLA

  • COI_POI_CON

  • COI_POI_CYL

  • COI_POI_LIN

  • COI_POI_POI

  • COI_POI_SPH

  • DIS_CYL_CYL

  • DIS_LIN_CYL

  • DIS_LIN_LIN

  • DIS_LIN_PLA

  • DIS_PLA_CON

  • DIS_PLA_CYL

  • DIS_POI_CYL

  • DIS_POI_LIN

  • DIS_POI_POI

  • DIS_POI_SPH

  • DIS_SPH_CON

  • DIS_SPH_CYL

  • DIS_SPH_LIN

  • DIS_SPH_PLA

  • DIS_SPH_SPH

  • TAN_CYL_CYL

  • TAN_LIN_CYL

  • TAN_PLA_CON

  • TAN_PLA_CYL

  • TAN_SPH_CON

  • TAN_SPH_CYL

  • TAN_SPH_LIN

  • TAN_SPH_PLA

  • TAN_SPH_SPH

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Matrix(**kwds)#

Defines a general, real-valued, M x N matrix for use in MotionSolve.

Name

Type

Required

Default

Modifiable

Designable

columns

Int

0

\(\checkmark\)

full

Enum

\(\checkmark\)

function

Function

\(\checkmark\)

i

Int [0]

id

Int

Auto

j

Int [0]

label

Str

routine

Routine

rows

Int

0

\(\checkmark\)

script

Script

sparse

Bool

False

\(\checkmark\)

values

Double [0]

\(\checkmark\)

Example

For an example, see Lse.

See also

For more details, see also Reference: Matrix.

columns#

The number of columns in the matrix.

Type=Int, Default=0, Modifiable

full#

Set to ‘RORDER’ if the matrix is specified in row order.

Info

This attribute is mutually exclusive with sparse, function.

Type=Enum, Modifiable

Permitted values are:

  • CORDER

  • RORDER

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with full, sparse.

Type=Function, Modifiable

i#

Row position of each element.

Type=Int [0]

id#

The id of the object.

Type=Int

j#

Column position of each element.

Type=Int [0]

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

rows#

The number of rows in the matrix.

Type=Int, Default=0, Modifiable

script#

Path and name of the script that contains the routine.

Type=Script

sparse#

Set to True for sparse matrices.

Info

This attribute is mutually exclusive with full, function.

Type=Bool, Default=False, Modifiable

values#

Specifies the elements of the matrix.

Type=Double [0], Designable

class Mforce(**kwds)#
Defines a distributed force on a FlexBody in MotionSolve.

It is available in three implementation flavors:

  • The force shape is scaled by a function expression.

  • The force shape is scaled in a compiled user-subroutine.

  • The force shape is scaled in a scripted user-subroutine.

Mforce is used to model distributed forces such as aerodynamic load, liquid pressure, thermal loads or any force generating mechanism that is spread out over the flexible body.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

case_index

Int

0

\(\checkmark\)

flex_body

Reference - FlexBody

\(\checkmark\)

\(\checkmark\)

force

Function

\(\checkmark\)

function

Function

\(\checkmark\)

id

Int

Auto

label

Str

routine

Routine

scale

Function

\(\checkmark\)

script

Script

See also

For more details, see also Force: FlexModal.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

case_index#

Modal load case number used to define the shape of the distributed load.

Type=Int, Default=0, Modifiable

flex_body#

Flex body on which the modal load is applied.

Type=Reference (FlexBody), Required, Modifiable

force#

User-defined constants passed to the MFOSUB. If specified, Mforce will return modal forces on the flex body.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

function#

User-defined constants passed to the MFOSUB. If specified, Mforce will return a shape that is to be scaled.

Info

This attribute is mutually exclusive with force.

Type=Function, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

scale#

Scale factor applied to the load case referenced by case_index.

Type=Function, Modifiable

script#

Path and name of the user written script that contains the routine.

Type=Script

class Motion(**kwds)#
Specifies a system degree of freedom as an explicit function of time.

The degree of freedom is specified as either:

  • A Joint and a type of motion (translational or rotational)

  • A relative translation or rotation component between two markers

When the input is specified on a joint, only three types of joints are valid:

  • Revolute joints (rotational motion only)

  • Translational joints (translational motion only)

  • Cylindrical joints (either rotational or translational motion)

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

direction

Enum

\(\checkmark\)

dtype

Enum

DISPLACEMENT

\(\checkmark\)

function

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

icdisp

Double

\(\checkmark\)

\(\checkmark\)

icvel

Double

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

index

Int

1

j

Reference - Marker

\(\checkmark\)

joint

Reference - Joint

\(\checkmark\)

jtype

Enum

TRANSLATION

\(\checkmark\)

label

Str

pinput

Reference - Pinput

ptcv

Reference - Ptcv

ptcv_joint

Alias

routine

Routine

script

Script

virtual

Bool

False

Example

Impose Motion on a Joint and between Markers.#
from msolve import *

model = Model(output="motion")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(part=ground)

part_1 = Part(mass=1, ip=[1]*3, cm=Marker())
part_2 = Part(mass=1, ip=[1]*3, cm=Marker())

cyl_joint = Joint(type="CYLINDRICAL", i=part_1.cm, j=global_ref)

joint_motion = Motion(label    = "Joint Motion",
                      jtype    = "TRANSLATION",
                      joint    = cyl_joint,
                      dtype    = "VELOCITY",
                      icdisp   = 0.0,
                      function = "10*SIN(20*TIME)"
                      )

marker_motion = Motion(label     = "Marker Motion",
                       i         = part_2.cm,
                       j         = global_ref,
                       direction = "X",
                       function  = "10*SIN(20*TIME)"
                      )

See also

For more details, see also Motion: Joint Based, Motion: Marker Based.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

direction#

Direction of marker-marker motion.

Type=Enum, Modifiable

Permitted values are:

  • B1

  • B2

  • B3

  • X

  • Y

  • Z

dtype#

Motion function type.

Type=Enum, Default=DISPLACEMENT, Modifiable

Permitted values are:

  • ACCELERATION

  • DISPLACEMENT

  • PLANT_INPUT

  • VELOCITY

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the motion value.

Info

This attribute is mutually exclusive with pinput.

Type=Function, Modifiable

i#

Marker at which motion is applied, required for marker motion.

Info

This attribute is mutually exclusive with joint, ptcv.

Type=Reference (Marker), Modifiable

icdisp#

Displacement initial condition.

Type=Double, Modifiable, Designable

icvel#

Velocity initial condition for ACCELERATION motion.

Type=Double, Modifiable, Designable

id#

The id of the object.

Type=Int

index#

Index that defines the simultaneous enforcement of constraints at the position, velocity, and acceleration levels when pinput is specified.

Type=Int, Default=1

j#

Marker at which motion is applied, required for marker motion.

Info

This attribute is mutually exclusive with joint, ptcv.

Type=Reference (Marker), Modifiable

joint#

Joint at which motion is applied.

Info

This attribute is mutually exclusive with { j , i }, ptcv.

Type=Reference (Joint), Modifiable

jtype#

Select the motion type for cylindrical joint.

Type=Enum, Default=TRANSLATION, Modifiable

Permitted values are:

  • ROTATION

  • TRANSLATION

label#

A string describing the object.

Type=Str

pinput#

Plant Input at which motion is applied.

Info

This attribute is mutually exclusive with function.

Type=Reference (Pinput)

ptcv#

Ptcv joint at which motion is applied.

Info

This attribute is mutually exclusive with { j , i }, joint.

Type=Reference (Ptcv)

ptcv_joint#

Alias to ptcv.

Type=Alias

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Nforce(**kwds)#
Creates a multi-point force element which establishes linear force-displacement (stiffness) and/or force-velocity (damping) relationships between many markers.

The force and the torque can only be linear functions of the relative displacement and velocity of the various Markers.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

cmatrix

Reference - Matrix

\(\checkmark\)

cratio

Double

0.0

\(\checkmark\)

\(\checkmark\)

force

Reference - Matrix

\(\checkmark\)

id

Int

Auto

imarkers

Reference - Marker [0]

\(\checkmark\)

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

kmatrix

Reference - Matrix

\(\checkmark\)

\(\checkmark\)

label

Str

length

Reference - Matrix

\(\checkmark\)

Example

Create a multi-point Force.#
from msolve import *

model = Model(output="nforce")

Units(length="MILLIMETER")
ground = Part(ground=True)
global_ref = Marker(part=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3], cm=Marker())

part.m1 = Marker (part=part, qp=[5,0,0])

k_mat = Matrix(sparse  = True,
               rows    = 12,
               columns = 12,
               i       = [1,1,1,1,2,2,2,2,7,7,7,7,7,8,8,8,8,8],
               j       = [1,2,7,8,1,2,7,8,1,2,7,11,12,1,2,8,11,12],
               values  = [150,-50,-50,50,-50,50,50,-50,-50,50,100,-50,50,50,-50,200,50,-50]
               )

force = Matrix(full    = "CORDER",
               rows    = 12,
               columns = 1,
               values  = [1e3,1e3,1e3,1e3,0,0,0,0,2e3,2e3,2e3,2e3]
               )

nforce = Nforce(j        = part.cm,
                imarkers = [part.cm, part.m1],
                kmatrix  = k_mat,
                cratio   = 0.02
                )

See also

For more details, see also Force: Multi-Point.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

cmatrix#

Damping matrix.

Info

This attribute is mutually exclusive with cratio.

Type=Reference (Matrix), Modifiable

cratio#

Damping scale factor.

Info

This attribute is mutually exclusive with cmatrix.

Type=Double, Default=0.0, Modifiable, Designable

force#

Preload force between each pair of markers.

Type=Reference (Matrix), Modifiable

id#

The id of the object.

Type=Int

imarkers#

List of markers between which the Nforce is applied.

Type=Reference (Marker) [0], Required

j#

Marker which serves as the reference frame.

Type=Reference (Marker), Required, Modifiable

kmatrix#

Stiffness matrix.

Type=Reference (Matrix), Required, Modifiable

label#

A string describing the object.

Type=Str

length#

Length values between each pair of markers.

Type=Reference (Matrix), Modifiable

class NuCMS(**kwds)#

Creates a set of flexible body properties with the goal to more accurately capture the mode shapes based on Predictive Component Mode Synthesis theory.

Name

Type

Required

Default

Modifiable

Designable

alimit

Double

0.1

cutoff_frequency

Double

ext_only

Bool

False

fem_file

FileName

\(\checkmark\)

fem_only

Bool

False

id

Int

Auto

increments

Int

1

ka

Double

100000.0

label

Str

lset_file

Str

mu

Double

0.001

ncov

Int

0

nmode

Int

output

Str

overwrite

Bool

True

preload_file

Str

ptol

Double

0.001

rtol

Double

1e-06

tlimit

Double

1

zset

Int [0]

0

See also

For more details, see also Reference: Flexible Body Data.

alimit#

Rotational mode shape limit.

Type=Double, Default=0.1

cutoff_frequency#

Additional cut-off frequency.

Type=Double

ext_only#

If set to True, internal CGPA are ignored.

Type=Bool, Default=False

fem_file#

Input FEM deck.

Type=FileName, Required

fem_only#

If set to True CMS will only generate the fem file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

increments#

Number of increments.

Type=Int, Default=1

ka#

Stiffness of contact elements used in joints.

Type=Double, Default=100000.0

label#

A string describing the object.

Type=Str

lset_file#

Loadset bdf file generated during precursory flex analysis.

Type=Str

mu#

Friction coefficient of contact elements in joints.

Type=Double, Default=0.001

ncov#

Number of convoluted modes.

Type=Int, Default=0

nmode#

Additional requested normal modes.

Type=Int

output#

Output file name.

Type=Str

overwrite#

If set to True a new CMS calculation will be performed every time.

Type=Bool, Default=True

preload_file#

Type=Str

ptol#

Pivot tolerance.

Type=Double, Default=0.001

rtol#

Tolerance for orthogonalization procedure.

Type=Double, Default=1e-06

tlimit#

Translational mode shape limit.

Type=Double, Default=1

zset#

Subset of ASET1 nodes eliminated by the NuCMS process.

Type=Int [0], Default=0

class Outline(**kwds)#

Creates line segments between the various cm Markers.

Name

Type

Required

Default

Modifiable

Designable

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

markers

Reference - Marker [0]

outline

Alias

Example

Create an outline graphic.#
from msolve import *

model = Model(output="outline")

Units(length="MILLIMETER")
ground = Part(ground=True)
global_ref = Marker(part=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3], cm=Marker())

outline = Outline(markers = [global_ref,
                             Marker(part=ground, qp=[10,0,0]),
                             Marker(part=ground, qp=[10,10,0]),
                             Marker(part=ground, qp=[0,10,0]),
                             part.cm]
                  )

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Outline).

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

markers#

List of markers whose origins shape the polyline.

Type=Reference (Marker) [0]

outline#

Alias of markers.

Type=Alias

class Output(**kwds)#
Specifies if the plt, abf, mrf files are to be generated during the solver run.

Attributes can be used to control the output files preferences.

Name

Type

Required

Default

Modifiable

Designable

abf_unique_time

Enum

ALL

abfsave

Bool

False

azero

Double

1e-07

capture_max_pd

Bool

False

contact_gra_output

Bool

True

dzero

Double

1e-07

fzero

Double

1e-07

label

Str

mrfsave

Bool

True

plt_unique_time

Enum

ALL

pltsave

Alias

req_angle_radians

Bool

False

req_comment_only

Bool

False

reqsave

Alias

save

Bool

False

vzero

Double

1e-07

ypr

Bool

False

Example

For an example, see Contact.

See also

For more details, see also Output: Results.

abf_unique_time#

Controls which result is written to the abf file when there are more than one result data at a single time step.

Type=Enum, Default=ALL

Permitted values are:

  • ALL

  • FIRST

  • LAST

abfsave#

Specifies if abf file is to be created.

Type=Bool, Default=False

azero#

Output accelerations less than the specified value are set to be equal to zero.

Type=Double, Default=1e-07

capture_max_pd#

MotionSolve monitors and reports the maximum penetration for colliding bodies in between two output steps.

Type=Bool, Default=False

contact_gra_output#

Used to enable or disable contact force vector animation in the h3d file.

Type=Bool, Default=True

dzero#

Output displacements less than the specified value are set to be equal to zero.

Type=Double, Default=1e-07

fzero#

Output forces less than the specified value are set to be equal to zero.

Type=Double, Default=1e-07

label#

A string describing the object.

Type=Str

mrfsave#

Specifies if mrf file is to be created.

Type=Bool, Default=True

plt_unique_time#

Controls which result is written to the plt file when there are more than one result data at a single time step.

Type=Enum, Default=ALL

Permitted values are:

  • ALL

  • FIRST

  • LAST

pltsave#

Alias to save.

Type=Alias

req_angle_radians#

If True output request will return angular quantities in rad.

Type=Bool, Default=False

req_comment_only#

Specifies whether a Request id prefix is to be added to requests in mrf and abf files.

Type=Bool, Default=False

reqsave#

Alias to save.

Type=Alias

save#

Specifies if plt file is to be created.

Type=Bool, Default=False

vzero#

Output velocities less than the specified value are set to be equal to zero.

Type=Double, Default=1e-07

ypr#

Specifies whether YPR angles are requested.

Type=Bool, Default=False

class Part(**kwds)#
Defines a rigid body object in MotionSolve.

This entity has mass, inertia properties and initial position, orientation and velocity.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

full_label

Str

function

Function

ground

Bool

False

id

Int

Auto

im

Reference - Marker

ip

Ips

[0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

\(\checkmark\)

\(\checkmark\)

label

Str

mass

Double

0.0

\(\checkmark\)

\(\checkmark\)

planar

Enum

qg

Location

0.0, 0.0, 0.0

\(\checkmark\)

reuler

Angles

\(\checkmark\)

routine

Routine

script

Script

virtual

Bool

False

vm

Reference - Marker

vx

Double

\(\checkmark\)

\(\checkmark\)

vy

Double

\(\checkmark\)

\(\checkmark\)

vz

Double

\(\checkmark\)

\(\checkmark\)

wet

Bool

False

\(\checkmark\)

wm

Reference - Marker

wx

Double

\(\checkmark\)

\(\checkmark\)

wy

Double

\(\checkmark\)

\(\checkmark\)

wz

Double

\(\checkmark\)

\(\checkmark\)

xg

Location

\(\checkmark\)

xv

Location

\(\checkmark\)

zg

Location

\(\checkmark\)

zv

Location

\(\checkmark\)

Example

Create a Part.#
from msolve import *

model = Model(output="part")

Units(length="MILLIMETER")

ground = Part(ground=True)

global_ref = Marker(part=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3], cm=Marker(qp=[10,0,0]), planar="XY")

See also

For more details, see also Body: Rigid.

cm#

Marker locating at center-of-mass.

Type=Reference (Marker)

full_label#

When defined on a rigid body it indicates that aero-dynamic loads calculated during a MotionSolve-Acusolve co-simulation will be applied. It is essential for this string to correspond to the Rigid Body label defined within the Motion Ribbon of HyperWorks CFD, under External Surface.

Type=Str

function#

Parameters passed to user defined subroutine.

Type=Function

ground#

Specifies if the part is ground or not.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

im#

Marker where the inertia matrix is computed. When not specified, it defaults to the cm marker.

Type=Reference (Marker)

ip#

Mass moments of inertia matrix.

Type=Ips, Default=[0.0, 0.0, 0.0, 0.0, 0.0, 0.0], Modifiable, Designable

label#

A string describing the object.

Type=Str

mass#

Mass of the part.

Type=Double, Default=0.0, Modifiable, Designable

planar#

Specifies the plane that the part is constrained to.

Type=Enum

Permitted values are:

  • XY

  • XZ

  • YX

  • YZ

  • ZX

  • ZY

qg#

Coordinates of local part reference Marker.

Type=Location, Default=0.0, 0.0, 0.0, Designable

reuler#

3-1-3 Euler angles of local part reference Marker.

Info

This attribute is mutually exclusive with { xv , zv }, { zg , xg }.

Type=Angles, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

virtual#

Specifies if the part is virtual.

Type=Bool, Default=False

vm#

Marker used to define initial translational velocity. When not specified, it defaults to the global coordinate system.

Type=Reference (Marker)

vx#

Initial translational velocity along x-axis.

Type=Double, Modifiable, Designable

vy#

Initial translational velocity along y-axis.

Type=Double, Modifiable, Designable

vz#

Initial translational velocity along z-axis.

Type=Double, Modifiable, Designable

wet#

Determine whether fluid loads from the corresponding AcuSolve model will be applied.

Type=Bool, Default=False, Modifiable

wm#

Marker used to define initial angular velocity. When not specified, it defaults to the cm marker.

Type=Reference (Marker)

wx#

Initial angular velocity about x-axis.

Type=Double, Modifiable, Designable

wy#

Initial angular velocity about y-axis.

Type=Double, Modifiable, Designable

wz#

Initial angular velocity about z-axis.

Type=Double, Modifiable, Designable

xg#

Point on the x-axis of local reference marker.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

xv#

Vector parallel to the x-axis of local reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

zg#

Point on the z-axis of local reference marker.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

zv#

Vector parallel to the z-axis of local reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

class Pforce(**kwds)#
Defines a penalty force whose purpose is to maintain a soft constraint in the system.

This means that when the constraint is satisfied, there is no penalty force. However, if the constraint is violated, a penalty force that tries to reduce the violation is generated. The generalized force acts on all the coordinates involved in the definition of the constraint.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

penalty

Double

0.0

\(\checkmark\)

\(\checkmark\)

penalty1

Double

0.0

\(\checkmark\)

\(\checkmark\)

routine

Routine

script

Script

smoothing_factor

Double

1.0

\(\checkmark\)

\(\checkmark\)

unilateral

Bool

False

\(\checkmark\)

See also

For more details, see also Force: Penalty.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the algebraic constraint.

Type=Function, Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

penalty#

Penalty factor enforcing zero algebraic constraint.

Type=Double, Default=0.0, Modifiable, Designable

penalty1#

Penalty factor enforcing time derivative of algebraic constraint.

Type=Double, Default=0.0, Modifiable, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

smoothing_factor#

Factor used to smooth penalty force.

Type=Double, Default=1.0, Modifiable, Designable

unilateral#

True indicates an inequality constraint.

Type=Bool, Default=False, Modifiable

class Pinput(**kwds)#

Defines the inputs (type Variable) to a mechanical system or plant.

Name

Type

Required

Default

Modifiable

Designable

function

Function

\(\checkmark\)

hold_order

Int

1

\(\checkmark\)

id

Int

Auto

ip_addr

Str

label

Str

offset_time

Double

\(\checkmark\)

routine

Routine

sampling_period

Double

\(\checkmark\)

script

Script

variables

Reference - Variable [0]

Example

Define a Plant Input.#
from msolve import *

model = Model(output="pinput")

Units(system="MKS")
ground = Part(ground=True)
global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3]*3,cm=Marker())

var_lin = Variable(function = "100*TIME")
var_sin = Variable(function = "SIN(2*PI*TIME)")

pin = Pinput(variables = [var_lin], sampling_period = 0, offset_time = 0)

pout = Poutput(variables = [var_sin], sampling_period  = 0, offset_time = 0)

See also

For more details, see also Control: Plant Input.

function#

Parameters passed to user defined subroutine.

Type=Function, Modifiable

hold_order#

Order of interpolation applied to the control signal(s).

Type=Int, Default=1, Modifiable

id#

The id of the object.

Type=Int

ip_addr#

Type=Str

label#

A string describing the object.

Type=Str

offset_time#

Sample time offset for each input port.

Type=Double, Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

sampling_period#

Sample time of an input port.

Type=Double, Modifiable

script#

Path and name of the script that contains the routine.

Type=Script

variables#

Input variables to the plant.

Type=Reference (Variable) [0]

class Plane(**kwds)#

Creates a plane graphic expressed in the reference frame of the rm Marker.

Name

Type

Required

Default

Modifiable

Designable

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

refinement_level

Int

3

rm

Reference - Marker

\(\checkmark\)

xmax

Double

0.0

\(\checkmark\)

xmin

Double

0.0

\(\checkmark\)

ymax

Double

0.0

\(\checkmark\)

ymin

Double

0.0

\(\checkmark\)

Example

Create a Plane graphic.#
from msolve import *

model = Model(output="plane")

Units(length="MILLIMETER")

ground = Part(ground=True)
global_ref = Marker(body=ground)

graphic = Plane(rm=global_ref, xmin=-50, ymin=-100, xmax=+50, ymax=+100)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Plane).

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

refinement_level#

Mesh density of Plane.

Type=Int, Default=3

rm#

Coordinate system for the specification of the geometry data.

Type=Reference (Marker), Required

xmax#

End of the spatial extent of Plane in x direction, defined in the rm coordinate system.

Type=Double, Default=0.0, Designable

xmin#

Start of the spatial extent of Plane in x direction, defined in the rm coordinate system.

Type=Double, Default=0.0, Designable

ymax#

End of the spatial extent of Plane in y direction, defined in the rm coordinate system.

Type=Double, Default=0.0, Designable

ymin#

Start of the spatial extent of Plane in y direction, defined in the rm coordinate system.

Type=Double, Default=0.0, Designable

class PointGraphic(**kwds)#

Creates a graphic point located at the origin of the reference Marker.

Name

Type

Required

Default

Modifiable

Designable

color

Color

hidden

Bool

False

id

Int

Auto

label

Str

rm

Reference - Marker

\(\checkmark\)

See also

For more details, see also Post: Graphic (Point).

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

rm#

Coordinate system defining the location of this graphic entity.

Type=Reference (Marker), Required

class PointMass(**kwds)#
Defines an entity that has mass but no inertia properties.

Three translational coordinates characterize the position of the PointMass. By default, the orientation of the PointMass is set to be the same as the global coordinate system. It never changes during simulation. Markers on PointMass may have location and orientation coordinates. The orientation of these Markers does not change during the simulation.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

full_label

Str

function

Function

id

Int

Auto

label

Str

mass

Double

0.0

\(\checkmark\)

\(\checkmark\)

qg

Location

0.0, 0.0, 0.0

\(\checkmark\)

reuler

Angles

\(\checkmark\)

routine

Routine

script

Script

virtual

Bool

False

vx

Double

\(\checkmark\)

\(\checkmark\)

vy

Double

\(\checkmark\)

\(\checkmark\)

vz

Double

\(\checkmark\)

\(\checkmark\)

xg

Location

\(\checkmark\)

xv

Location

\(\checkmark\)

zg

Location

\(\checkmark\)

zv

Location

\(\checkmark\)

Example

Create a PointMass body.#
from msolve import *

model = Model(output="pointmass")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

pmass = PointMass(mass=1, cm=Marker(qp=[5,0,0]))

sd1 = SpringDamper(type   = "TRANSLATION",
                   i      = Marker(body=pmass,  qp=[5,0,0], zp=[6,0,0]),
                   j      = Marker(body=ground, qp=[0,0,0], zp=[1,0,0]),
                   length = 5,
                   k      = 100,
                   c      = 1
                   )

sd2 = SpringDamper(type   = "TRANSLATION",
                   i      = sd1.i,
                   j      = Marker(body=ground, qp=[10,0,0], zp=[11,0,0]),
                   length = 5,
                   k      = 50
                   )

Linear(eigensol=True, nodamping=True)

model.simulate(type="LINEAR")

See also

For more details, see also Point Mass.

cm#

Marker locating the center-of-mass.

Type=Reference (Marker)

full_label#

When defined on a rigid body it indicates that aero-dynamic loads calculated during a MotionSolve-Acusolve co-simulation will be applied. It is essential for this string to correspond to the Rigid Body label defined within the Motion Ribbon of HyperWorks CFD, under External Surface.

Type=Str

function#

Parameters passed to user defined subroutine.

Type=Function

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

mass#

Mass of the PointMass.

Type=Double, Default=0.0, Modifiable, Designable

qg#

Coordinates of local PointMass reference marker.

Type=Location, Default=0.0, 0.0, 0.0, Designable

reuler#

3-1-3 Euler angles of local part reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, { xv , zv }.

Type=Angles, Designable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

virtual#

Specifies if the point mass is virtual.

Type=Bool, Default=False

vx#

Initial translational velocity along x-axis.

Type=Double, Modifiable, Designable

vy#

Initial translational velocity along y-axis.

Type=Double, Modifiable, Designable

vz#

Initial translational velocity along z-axis.

Type=Double, Modifiable, Designable

xg#

Point on the x-axis of local reference marker.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

xv#

Vector parallel to the z-axis of local reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

zg#

Point on the z-axis of local reference marker.

Info

This attribute is mutually exclusive with { xv , zv }, reuler.

Type=Location, Designable

zv#

Vector parallel to the z-axis of local reference marker.

Info

This attribute is mutually exclusive with { zg , xg }, reuler.

Type=Location, Designable

class Poutput(**kwds)#

Defines a list of outputs (type Variable) to a mechanical system or plant.

Name

Type

Required

Default

Modifiable

Designable

function

Function

\(\checkmark\)

hold_order

Int

1

\(\checkmark\)

id

Int

Auto

ip_addr

Str

label

Str

offset_time

Double

\(\checkmark\)

routine

Routine

sampling_period

Double

\(\checkmark\)

script

Script

variables

Reference - Variable [0]

Example

For an example, see Pinput.

See also

For more details, see also Control: Plant Output.

function#

Parameters passed to user defined subroutine.

Type=Function, Modifiable

hold_order#

Order of extrapolations, default is ‘1’.

Type=Int, Default=1, Modifiable

id#

The id of the object.

Type=Int

ip_addr#

Type=Str

label#

A string describing the object.

Type=Str

offset_time#

The sample time offset for each output port. The sample time offset must be strictly less than the sampling_period if the latter is non-zero. If the sampling_period is 0.0 (continuous), then offset_time defaults to 0.0 as well.

Type=Double, Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

sampling_period#

The sample time for the output plant. A value of zero signifies continuous sampling. Any non zero value signifies discrete sampling.

Type=Double, Modifiable

script#

Path and name of the script that contains the routine.

Type=Script

variables#

Define a list of variables that define the plant output.

Type=Reference (Variable) [0]

class ProximitySensor(**kwds)#
Defines a sensor between two bodies which monitors their minimum separation.

The results of ProximitySensor can be accessed using the PROXIMITY function for use in defining expressions or for plotting. A line representing the closest distance between geometries is created in the animation h3d file.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

id

Int

Auto

iflex

Reference - FlexBody

igeom

Reference - Graphics [0]

jflex

Reference - FlexBody

jgeom

Reference - Graphics [0]

label

Str

Example

For an example, see Contact.

See also

For more details, see also Sensor: Proximity.

active#

Defines the state of this object.

Type=Bool, Default=True

id#

The id of the object.

Type=Int

iflex#

Flexible body used as first body in proximity sensor.

Info

This attribute is mutually exclusive with igeom.

Type=Reference (FlexBody)

igeom#

Graphics on the first body for proximity sensor.

Info

This attribute is mutually exclusive with iflex.

Type=Reference (Graphics) [0]

jflex#

Flexible body used as second body in proximity sensor.

Info

This attribute is mutually exclusive with jgeom.

Type=Reference (FlexBody)

jgeom#

Graphics on the second body for proximity sensor.

Info

This attribute is mutually exclusive with jflex.

Type=Reference (Graphics) [0]

label#

A string describing the object.

Type=Str

class Pstate(**kwds)#

Creates a container for Solver Variables that are used in generating a linear representation of a model about an operating point.

Name

Type

Required

Default

Modifiable

Designable

id

Int

Auto

label

Str

variables

Reference - Variable [0]

See also

For more details, see also Reference: PlantState.

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

variables#

A list of state Variables

Type=Reference (Variable) [0]

class Ptcv(**kwds)#
Defines a (Point to Curve) higher pair constraint.

A fixed point on one body slides on a Curve that is fixed on a second body. The point is not allowed to lift off the curve.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

curve

Reference - Curve

\(\checkmark\)

\(\checkmark\)

disp

Double [3]

[0, 0, 0]

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

rm

Reference - Marker

\(\checkmark\)

\(\checkmark\)

vel

Double

0.0

\(\checkmark\)

virtual

Bool

False

zaxis

Enum

UNCONSTRAINED

See also

For more details, see also Constraint: PTCV.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

curve#

Curve that is fixed to the second body.

Type=Reference (Curve), Required, Modifiable

disp#

A guess for the initial contact point on the curve.

Type=Double [3], Default=[0, 0, 0], Designable

i#

Fixed marker that defines the connection on the first body.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

rm#

Coordinate system in which the curve points are defined.

Type=Reference (Marker), Required, Modifiable

vel#

Initial sliding velocity of i relative to the curve.

Type=Double, Default=0.0, Designable

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

zaxis#

Directional constraint imposed on the Z axis of the i marker.

Type=Enum, Default=UNCONSTRAINED

Permitted values are:

  • PARALLEL

  • PERPENDICULAR

  • UNCONSTRAINED

class Ptdcv(**kwds)#
Defines a (Point to Deformable Curve) higher pair constraint.

A point is constrained to only move by sliding along a DeformableCurve. The curve can deform. As the markers move in space, the curve is calculated at every time step using CUBIC spline interpolation through the marker origins. This constraint is useful for simulating connection between a point on a body and a slender, flexible element such as a cable.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

dcurve

Reference - DeformableCurve

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

virtual

Bool

False

See also

For more details, see also Constraint: PTdCV.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

dcurve#

Reference to a DeformableCurve that defines the constraint.

Type=Reference (DeformableCurve), Required, Modifiable

i#

Reference to a Marker constrained to lie on the curve.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Ptdcvf(**kwds)#
Creates a contact force between a Marker

and a DeformableCurve. The volumes in contact are defined by the ellipsoid located at the i marker and the curve representing a cable with local radius defined by the radius_curve_start and radius_curve_end. A tapered curve is defined by different radii. A negative value indicates a hollow curve (cable). The contact force supports two formulations:

  • Linear: with a stiffness and damping component

  • Poisson: based on penalty formulation

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

damping

Double

0.0

\(\checkmark\)

\(\checkmark\)

dcurve

Reference - DeformableCurve

\(\checkmark\)

force_model

Enum

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

penalty

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_curve_end

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_curve_start

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_x

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_y

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_z

Double

0.0

\(\checkmark\)

\(\checkmark\)

restitution_coefficient

Double

0.0

\(\checkmark\)

stiffness

Double

0.0

\(\checkmark\)

\(\checkmark\)

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

damping#

Specifies the damping coefficient.

Info

This attribute can only be used when type = LINEAR.

Type=Double, Default=0.0, Modifiable, Designable

dcurve#

Type=Reference (DeformableCurve), Required

force_model#

Specifies the force model for the contact force.

Type=Enum, Modifiable

Permitted values are:

  • LINEAR

  • POISSON

i#

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

penalty#

Specifies the penalty parameter.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.0, Modifiable, Designable

radius#

Radius of the sphere geometry centered at the origin of the I marker.The contact force start acting when there is contact between the ellipsoid volume and the deformable curve.

Info

This attribute is mutually exclusive with { radius_y , radius_x , radius_z }.

Type=Double, Default=0.0, Modifiable, Designable

radius_curve_end#

The radius of the deformable curve at the last marker location.

Type=Double, Default=0.0, Modifiable, Designable

radius_curve_start#

The radius of the deformable curve at the first marker location.

Type=Double, Default=0.0, Modifiable, Designable

radius_x#

x radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

radius_y#

y radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

radius_z#

z radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

restitution_coefficient#

Specifies the restitution coefficient.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.0, Modifiable

stiffness#

Specifies the stiffness coefficient.

Info

This attribute can only be used when type = LINEAR.

Type=Double, Default=0.0, Modifiable, Designable

class Ptdsf(**kwds)#
Defines a (Point to Deformable Surface) higher pair constraint.

This element constrains a fixed point on a body to slide along a DeformableSurface that passes through the origins of a specified set of markers. These markers may belong to different bodies. As the markers move in space, the surface is calculated at every time step using CUBIC spline interpolation through the marker origins. Hence, the surface deforms as the markers move about.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

dsurface

Reference - DeformableSurface

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

virtual

Bool

False

See also

For more details, see also Constraint: PTdSF.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

dsurface#

Reference to a DeformableSurface that defines the constraint.

Type=Reference (DeformableSurface), Required, Modifiable

i#

Reference to a Marker defining the point constrained to the deformable surface.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class Ptdsff(**kwds)#

Creates a soft constraint (force) that attempts to maintain a Marker on a DeformableSurface.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

damping

Double

0.0

\(\checkmark\)

\(\checkmark\)

dsurface

Reference - DeformableSurface

\(\checkmark\)

flip_normal

Bool

False

\(\checkmark\)

force_model

Enum

\(\checkmark\)

function

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

penalty

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_x

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_y

Double

0.0

\(\checkmark\)

\(\checkmark\)

radius_z

Double

0.0

\(\checkmark\)

\(\checkmark\)

restitution_coef

Alias

restitution_coefficient

Double

0.0

\(\checkmark\)

routine

Routine

script

Script

stiffness

Double

0.0

\(\checkmark\)

\(\checkmark\)

See also

For more details, see also Force: PTdSF.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

damping#

Specifies the damping coefficient.

Info

This attribute can only be used when type = LINEAR.

Type=Double, Default=0.0, Modifiable, Designable

dsurface#

Reference to an existing DeformableSurface in the model.

Type=Reference (DeformableSurface), Required

flip_normal#

True if surface normal should be flipped.

Type=Bool, Default=False, Modifiable

force_model#

Specifies the force model.

Type=Enum, Modifiable

Permitted values are:

  • HERTZIAN

  • LINEAR

  • POISSON

  • UNDEFINED

  • USERSUB

function#

Parameters passed to user defined subroutine.

Info

This attribute can only be used when type = USERSUB.

Type=Function, Modifiable

i#

Reference to an existing Marker in the model constrained to the surface.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

penalty#

Specifies the penalty parameter.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.0, Modifiable, Designable

radius#

Radius of the sphere geometry centered at the origin of the I marker.

Info

This attribute is mutually exclusive with { radius_y , radius_x , radius_z }.

Type=Double, Default=0.0, Modifiable, Designable

radius_x#

x radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

radius_y#

y radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

radius_z#

z radius of the ellipsoid geometry.

Info

This attribute is mutually exclusive with radius.

Type=Double, Default=0.0, Modifiable, Designable

restitution_coef#

Alias to restitution_coefficient.

Type=Alias

restitution_coefficient#

Specifies the restitution coefficient.

Info

This attribute can only be used when type = POISSON.

Type=Double, Default=0.0, Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

stiffness#

Specifies the stiffness coefficient.

Info

This attribute can only be used when type = LINEAR.

Type=Double, Default=0.0, Modifiable, Designable

class Ptsf(**kwds)#
Defines a (Point to Surface) higher pair constraint.

A fixed point on one body slides on a Surface that is fixed on a second body. The point is not allowed to lift off the surface.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

disp

Double [3]

[0, 0, 0]

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

rm

Reference - Marker

\(\checkmark\)

\(\checkmark\)

surface

Reference - Surface

\(\checkmark\)

\(\checkmark\)

virtual

Bool

False

zaxis_perpendicular

Bool

False

See also

For more details, see also Constraint: PTSF.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

disp#

A guess for the initial contact point on the surface.

Type=Double [3], Default=[0, 0, 0], Designable

i#

Fixed marker that defines the connection on the first body.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

rm#

Coordinate system in which the surface points are defined.

Type=Reference (Marker), Required, Modifiable

surface#

Surface that is fixed to the second body.

Type=Reference (Surface), Required, Modifiable

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

zaxis_perpendicular#

Imposes perpendicularity between marker I zaxis and tangent plane.

Type=Bool, Default=False

class Request(**kwds)#
Defines an output request entity in MotionSolve.

Requests are written to MotionSolve output files so that they may be used for plotting and signal processing by HyperGraph, HyperGraph 3D, or python.

Requests can be defined using:

  • runtime expressions,

  • built-in functions (MOTION, FORCE, FIELD etc.. ) or,

  • user written functions.

Name

Type

Required

Default

Modifiable

Designable

clabels

Str [8]

cnames

Str

comment

Str

cunits

Str

f1

Function

\(\checkmark\)

f2

Function

\(\checkmark\)

f3

Function

\(\checkmark\)

f4

Function

\(\checkmark\)

f5

Function

\(\checkmark\)

f6

Function

\(\checkmark\)

f7

Function

\(\checkmark\)

f8

Function

\(\checkmark\)

function

Function

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

impose_angle_limit

Bool

False

\(\checkmark\)

j

Reference - Marker

\(\checkmark\)

label

Str

results_name

Str

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

type

Enum

EXPRESSION

Example

For an example, see RequestResult.

See also

For more details, see also Post: Output Request.

clabels#

List of strings defining component labels.

Type=Str [8]

cnames#

List of strings defining component names.

Type=Str

comment#

String defining a comment associated with request.

Type=Str

cunits#

List of strings defining component units.

Type=Str

f1#

String defining the request expression for f1.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f2#

String defining the request expression for f2.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f3#

String defining the request expression for f3.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f4#

String defining the request expression for f4.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f5#

String defining the request expression for f5.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f6#

String defining the request expression for f6.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f7#

String defining the request expression for f7.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

f8#

String defining the request expression for f8.

Info

This attribute can only be used when type = EXPRESSION.

Type=Function, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute can only be used when type = USER.

Type=Function

i#

Reference to existing i marker.

Info

This attribute can only be used when type = DISPLACEMENT, VELOCITY, ACCELERATION, FORCE.

Type=Reference (Marker), Modifiable

id#

The id of the object.

Type=Int

impose_angle_limit#

When True it bound the angle computed between +-180 deg.

Type=Bool, Default=False, Modifiable

j#

Reference to existing j marker. When not specified, it defaults to the global coordinate system.

Info

This attribute can only be used when type = DISPLACEMENT, VELOCITY, ACCELERATION, FORCE.

Type=Reference (Marker), Modifiable

label#

A string describing the object.

Type=Str

results_name#

Type=Str

rm#

Reference to existing rm marker. When not specified, it defaults to the global coordinate system.

Info

This attribute can only be used when type = DISPLACEMENT, VELOCITY, ACCELERATION, FORCE.

Type=Reference (Marker), Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

type#

Defines the type of request.

Type=Enum, Default=EXPRESSION

Permitted values are:

  • ACCELERATION

  • DISPLACEMENT

  • EXPRESSION

  • FORCE

  • USER

  • VELOCITY

class Rv(**kwds)#
Defines a special type of solver state variable.

It is used in the evaluation and computation of design sensitivity as a response variable.

The Response module is a library of classes currently available for creating commonly used responses.

Name

Type

Required

Default

Modifiable

Designable

function

Function

ic

Double

0.0

id

Int

Auto

label

Str

routine

Routine

script

Script

sensitivity

Bool

True

Example

Create a Response variable (Rv).#
from msolve import *
model = Model(output='rv')

ground = Part(ground=True)
global_ref = Marker(part=ground)
Units(system='mmks')
Accgrav(kgrav=-9810)

part = Part(mass=10, ip=[1e3]*3)
part.cm = Marker()

rv = Rv(function=f'5*VZ({part.cm.id},{global_ref.id})')

See also

For more details, see also Response Variables.

function#

MotionSolve expression that defines the variable used as response for DSA.

Type=Function

ic#

Specifies the initial condition of the Rv object.

Type=Double, Default=0.0

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

sensitivity#

When set to False, MotionSolve ignores this Rv in dsa analysis.

Type=Bool, Default=True

class Sensor(**kwds)#
Defines an event sensor in the model.

Once an event of interest occurs, you can take action to respond to the event. For example, you can modify the simulation settings when a user-defined event occurs during the MBD solver run.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

dt

Double

0.0

error

Double

0.001

evaluate

Alias

evaluate_function

Function

evaluate_routine

Routine

evaluate_script

Script

function

Alias

halt

Bool

False

hmax

Double

0.0

id

Int

Auto

label

Str

operator

Enum

EQ

print_

Bool

False

restart

Bool

False

return_

Bool

False

routine

Alias

script

Alias

sensor_function

Function

sensor_routine

Routine

sensor_script

Script

stepsize

Double

0.0

value

Double

0.0

verbose

Bool

False

zero_crossing

Double

0.0

See also

For more details, see also Sensor: Event, Sensor: Evaluate.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

dt#

Print interval after the event has occurred.

Type=Double, Default=0.0

error#

The error tolerance for detecting an event.

Type=Double, Default=0.001

evaluate#

Alias to evaluate_function.

Type=Alias

evaluate_function#

Expression that defines the sensor event.

Type=Function

evaluate_routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

evaluate_script#

Path and name of the script that contains the routine for the sensor event.

Type=Script

function#

Alias to sensor_function.

Type=Alias

halt#

If True the simulation will stop after the event has occurred.

Type=Bool, Default=False

hmax#

Maximum step size after the event has occurred.

Type=Double, Default=0.0

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

operator#

The comparison operator (<=>).

Type=Enum, Default=EQ

Permitted values are:

  • EQ

  • GE

  • LE

print_#

If True the simulation will print output after the event has occurred.

Type=Bool, Default=False

restart#

If True the simulation will restart after the event has occurred.

Type=Bool, Default=False

return_#

If True the simulation will return and execute the next command after the event has occurred.

Type=Bool, Default=False

routine#

Alias to sensor_routine.

Type=Alias

script#

Alias to sensor_script.

Type=Alias

sensor_function#

Expression that defines the sensor function.

Type=Function

sensor_routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

sensor_script#

Path and name of the script that contains the routine for sensor.

Type=Script

stepsize#

Maximum step size allowed after the event has occurred.

Type=Double, Default=0.0

value#

The sensor event threshold.

Type=Double, Default=0.0

verbose#

Boolean attribute that controls the verbosity of the sensor event.

Type=Bool, Default=False

zero_crossing#

Tolerance for the zero crossing search.

Type=Double, Default=0.0

class Sforce(**kwds)#
Defines a force or torque acting between two Markers.

The force or torque is characterized by a magnitude and a direction. The direction is predefined and dependent on type and action only. The magnitude may be defined using a function expression, a user-defined subroutine, or a Python script. The magnitude can be a function of any system state and time.

Name

Type

Required

Default

Modifiable

Designable

actiononly

Bool

False

\(\checkmark\)

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

label

Str

routine

Routine

script

Script

type

Enum

TRANSLATION

Example

Impose force between two markers (Sforce).#
from msolve import *

model = Model(output="sforce")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

body_1 = Part(mass=50, ip=[1e3]*3, cm=Marker(zv=[0,0,1]))
body_2 = Part(mass=10, ip=[5e2]*3, cm=Marker(qp=[5,0,0], zv=[0,0,1]))

sforce = Sforce(i          = body_1.cm,
                j          = body_2.cm,
                type       = "TRANSLATION",
                actiononly = False,
                function   = "100*SIN(2*PI*TIME)")

See also

For more details, see also Force: Two Body Scalar.

actiononly#

True for action only force, False for action and reaction force.

Type=Bool, Default=False, Modifiable

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that specifies the force.

Type=Function, Required, Modifiable

i#

Marker at which the force is applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

j#

Marker at which the reaction force is applied.

Type=Reference (Marker), Required, Modifiable

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

type#

Type of force.

Type=Enum, Default=TRANSLATION

Permitted values are:

  • ROTATION

  • TRANSLATION

class Sfsf(**kwds)#
Defines a (Surface to Surface) higher pair constraint.

The constraint consists of a Surface on one body rolling and sliding on a surface on a second body. The surfaces are required to have a unique contact point.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

id

Int

Auto

idisp

Double [3]

[0, 0, 0]

\(\checkmark\)

irm

Reference - Marker

\(\checkmark\)

\(\checkmark\)

isurface

Reference - Surface

\(\checkmark\)

\(\checkmark\)

jdisp

Double [3]

[0, 0, 0]

\(\checkmark\)

jrm

Reference - Marker

\(\checkmark\)

\(\checkmark\)

jsurface

Reference - Surface

\(\checkmark\)

\(\checkmark\)

label

Str

no_slip

Bool

False

virtual

Bool

False

See also

For more details, see also Constraint: SFSF.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

id#

The id of the object.

Type=Int

idisp#

Location of the contact point on i Surface.

Type=Double [3], Default=[0, 0, 0], Designable

irm#

Coordinate system in which the i Surface is defined.

Type=Reference (Marker), Required, Modifiable

isurface#

Reference to an existing Surface in the model.

Type=Reference (Surface), Required, Modifiable

jdisp#

Location of the contact point on j Surface.

Type=Double [3], Default=[0, 0, 0], Designable

jrm#

Coordinate system in which the j Surface is defined.

Type=Reference (Marker), Required, Modifiable

jsurface#

Reference to an existing Surface in the model.

Type=Reference (Surface), Required, Modifiable

label#

A string describing the object.

Type=Str

no_slip#

Specifies if slip or slide is allowed between the two surfaces.

Type=Bool, Default=False

virtual#

Defines whether the constraint is virtual or regular.

Type=Bool, Default=False

class SimulationEvent(**kwds)#
Defines an event in MotionSolve and adds it to a list.

Each event can be executed using the run() method. It’s also possible to execute all the events in the event queue by calling runAllSimulationEvents() method on the model class. SimulationEvent can be defined using:

  1. keywords

  2. consub

  3. script

Examples:

  1. Keywords:

event = SimulationEvent(type="TRANSIENT", start=1, end=2, steps=10)
  1. Consub (can be callable python function or compiled MotionSolve consub):

event = SimulationEvent(
  function = "USER(5000,0,-9.81,0, 0.01)",
  routine  = control
  )
  1. Script:

event = SimulationEvent(
  script_file = "/home/user/events.py",
  function    = "simulationScript",
  args        = [10, 20, 30],      # use list for homogeneous types
  #args        = (1, "string"),    # use tuple for mixed types
  kwargs      = {'kwarg_1': 100,   # use dict for any keyword, value pair
                 'kwarg_2': 200 }
)

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

active_contact_iteration

Bool

False

acusolve_cosim

Bool

False

args

Property

constraint_tol

Double

0.0

dsa

Enum

NONE

dtout

Double

0.0

duration

Double

0.0

end

Double

0.0

function

Function

implicit_diff_tol

Double

0.0

kwargs

Property

label

Str

numThread

Int

0

output

Enum

ON

print_increment

Int

0

returnResults

Bool

False

routine

Routine

script

Script

script_file

FileName

start

Double

0.0

steps

Int

0

type

Enum

TRANSIENT

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

active_contact_iteration#

Specifies whether the contact residual is being updated during the corrector step of the implicit solver.

Type=Bool, Default=False

acusolve_cosim#

Specifies if this simulation is a ACUSOLVE MS co-simulation.

Type=Bool, Default=False

args#

Arguments passed as non keywords to the script function.

Type=Property

constraint_tol#

The tolerance on all algebraic constraint equations that the corrector must satisfy at convergence.

Type=Double, Default=0.0

dsa#

The type of design sensitivity analysis.

Type=Enum, Default=NONE

Permitted values are:

  • ADJOINT

  • AUTO

  • DIRECT

  • FD

  • FD_SERIAL

  • NONE

dtout#

The print interval.

Type=Double, Default=0.0

duration#

The duration of the analysis.

Type=Double, Default=0.0

end#

The end time of the analysis.

Type=Double, Default=0.0

function#

The name of the callable function or the string passed to the consub.

Type=Function

implicit_diff_tol#

Modifies the accuracy to which implicit differential equations are to be satisfied.

Type=Double, Default=0.0

kwargs#

Keyword Arguments passed to the script function.

Type=Property

label#

A string describing the object.

Type=Str

numThread#

Specifies the number of threads for Open MP multi-threaded contact simulation.

Type=Int, Default=0

output#

Specifies protocol of standard output.

Type=Enum, Default=ON

Permitted values are:

  • FILEONLY

  • OFF

  • ON

print_increment#

The frequency of output in terms of the integrator steps that have been taken.

Type=Int, Default=0

returnResults#

Specifies if run data will be returned to the caller.

Type=Bool, Default=False

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

The fully specified path and name of the script executed in run method.

Type=Script

script_file#

The fully specified path and name of the file containing the simulation script.

Type=FileName

start#

The start time of the analysis.

Type=Double, Default=0.0

steps#

The number of output steps to take between start and end.

Type=Int, Default=0

type#

The type of simulation.

Type=Enum, Default=TRANSIENT

Permitted values are:

  • ASSEMBLY

  • DYNAMICS

  • KINEMATICS

  • LINEAR

  • STATICS

  • TRANSIENT

  • VERIFY

class Sphere(**kwds)#

Creates a three-dimensional figure whose plane sections are circles and its center is the cm Marker.

Name

Type

Required

Default

Modifiable

Designable

cm

Reference - Marker

\(\checkmark\)

color

Color

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

radius

Double

0.0

\(\checkmark\)

refinement_level

Int

3

Example

Create a Sphere graphic.#
from msolve import *

model = Model(output="sphere")

Units(system="MKS")
ground = Part(ground=True)
global_ref = Marker(body=ground)

body_1 = Part(mass=10, ip=[1e3]*3, cm=Marker(zv=[0,0,1]))

body_1.geo = sphere = Sphere(cm=body_1.cm, radius=2, refinement_level=4)

H3dOutput(save=True)

See also

For more details, see also Post: Graphic (Sphere).

cm#

Marker used as the coordinate system for the center of the geometry.

Type=Reference (Marker), Required

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

radius#

Radius of Sphere

Type=Double, Default=0.0, Designable

refinement_level#

Mesh density of Sphere

Type=Int, Default=3

class Spline(**kwds)#
Defines spline with two or three independent variables.

Splines have many varied applications in MotionSolve, for example they can be used to define non-linear characteristics of a Force or a Motion.

Name

Type

Required

Default

Modifiable

Designable

block

Str

\(\checkmark\)

file

FileName

\(\checkmark\)

id

Int

Auto

label

Str

linear_extrapolate

Bool

False

\(\checkmark\)

routine

Routine

script

Script

x

Double [0]

0.0

\(\checkmark\)

\(\checkmark\)

y

Double [0]

0.0

\(\checkmark\)

\(\checkmark\)

Example

Create a Spline.#
from msolve import *

model = Model(output="spline")

ground = Part(ground=True)
Units(system="MKS")
Accgrav(jgrav=-9.81)

global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker())

spline = Spline(x        = [-10,-8,-6,-4,-2,0,2,4,6,8,10],
                y        = [-400,-320,-240,-160,-80,0,80,160,240,320,400],
                linear_extrapolate = True
                )

See also

For more details, see also Reference: Spline.

block#

The optional block string in the file.

Type=Str, Modifiable

file#

CSV file containing the data for the spline.

Type=FileName, Modifiable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

linear_extrapolate#

Specifies if MotionSolve is to linearly extrapolate the spline.

Type=Bool, Default=False, Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

x#

A list of x values.

Type=Double [0], Default=0.0, Modifiable, Designable

y#

A list of y values.

Type=Double [0], Default=0.0, Modifiable, Designable

class SpringDamper(**kwds)#
Defines a spring damper acting between two Markers.

The element can be translational (applies a force) or rotational (applies a torque). In both cases, the force is characterized by a stiffness coefficient, a damping coefficient, a free-length (or angle), and a preload.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

angle

Double

\(\checkmark\)

\(\checkmark\)

c

Double

\(\checkmark\)

\(\checkmark\)

ct

Double

\(\checkmark\)

\(\checkmark\)

force

Double

\(\checkmark\)

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

\(\checkmark\)

k

Double

\(\checkmark\)

\(\checkmark\)

kt

Double

\(\checkmark\)

\(\checkmark\)

label

Str

length

Double

\(\checkmark\)

\(\checkmark\)

torque

Double

\(\checkmark\)

\(\checkmark\)

type

Enum

Example

Create a SpringDamper element.#
from msolve import *

model = Model(output="springdamper")

ground = Part(ground=True)
Units(system="MKS")
Accgrav(jgrav=-9.81)
H3dOutput(save=True)

global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker(qp=[0,10,0], zp=[0,0,0]))
part.geometry = Box(cm=part.cm, x=30, y=20, z=2)

sd = SpringDamper(type   = "TRANSLATION",
                  i      = part.cm,
                  j      = Marker(body=ground, qp=[0,0,0], zp=[0,1,0]),
                  length = 10,
                  k      = 50,
                  force  = 50
                  )

sd.geo = SpringDamperGraphic(i=sd.i, j=sd.j, da=10.0, db=5.0, dc=3.0, lc=7.0, ld=5.0, coils=8)

See also

For more details, see also Force: Spring Damper.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

angle#

Free angle of the spring.

Info

This attribute can only be used when type = ROTATION.

Type=Double, Modifiable, Designable

c#

Translational damping coefficient.

Info

This attribute can only be used when type = TRANSLATION.

Type=Double, Modifiable, Designable

ct#

Rotational damping coefficient.

Info

This attribute can only be used when type = ROTATION.

Type=Double, Modifiable, Designable

force#

Preload force in the spring-damper.

Info

This attribute can only be used when type = TRANSLATION.

Type=Double, Modifiable, Designable

i#

Marker at which the force or torque is applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

j#

Marker at which the reaction force or torque is applied.

Type=Reference (Marker), Required, Modifiable

k#

Translational spring stiffness.

Info

This attribute can only be used when type = TRANSLATION.

Type=Double, Modifiable, Designable

kt#

Rotational spring stiffness.

Info

This attribute can only be used when type = ROTATION.

Type=Double, Modifiable, Designable

label#

A string describing the object.

Type=Str

length#

Free length of the spring.

Info

This attribute can only be used when type = TRANSLATION.

Type=Double, Modifiable, Designable

torque#

Preload torque in the spring-damper.

Info

This attribute can only be used when type = ROTATION.

Type=Double, Modifiable, Designable

type#

Type of the spring-damper.

Type=Enum

Permitted values are:

  • ROTATION

  • TRANSLATION

class SpringDamperGraphic(**kwds)#

Creates a spring damper geometry.

Name

Type

Required

Default

Modifiable

Designable

coils

Int

0

color

Color

da

Double

0.0

\(\checkmark\)

db

Double

0.0

\(\checkmark\)

dc

Double

0.0

\(\checkmark\)

hidden

Bool

False

i

Reference - Marker

\(\checkmark\)

id

Int

Auto

j

Reference - Marker

\(\checkmark\)

la

Double

0.0

\(\checkmark\)

label

Str

lb

Double

0.0

\(\checkmark\)

lc

Double

0.0

\(\checkmark\)

ld

Double

0.0

\(\checkmark\)

Example

For an example, see SpringDamper.

See also

For more details, see also Post: Graphic (SPDP).

coils#

Number of coils of the spring graphic.

Type=Int, Default=0

color#

The color of the graphic for H3D animation.

Type=Color

da#

Diameter of the spring graphic.

Type=Double, Default=0.0, Designable

db#

Diameter of the damper graphic at the i marker.

Type=Double, Default=0.0, Designable

dc#

Diameter of the damper graphic at the j marker.

Type=Double, Default=0.0, Designable

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

i#

Start connection Marker for the SpringDamperGraphic.

Type=Reference (Marker), Required

id#

The id of the object.

Type=Int

j#

End connection Marker for the SpringDamperGraphic.

Type=Reference (Marker), Required

la#

Distance between i marker and the end of the closest damper graphic.

Type=Double, Default=0.0, Designable

label#

A string describing the object.

Type=Str

lb#

Distance between j marker and the end of the closest damper graphic.

Type=Double, Default=0.0, Designable

lc#

Height of the damper graphic at the i marker.

Type=Double, Default=0.0, Designable

ld#

Height of the damper graphic at the j marker.

Type=Double, Default=0.0, Designable

class String(**kwds)#
Defines a user defined text string in MotionSolve.

The string may be of any length. It must contain only printable ASCII characters. String is primarily used within user defined subroutines. They are commonly used to pass filenames, messages, block names and DLL names to user defined subroutines.

Name

Type

Required

Default

Modifiable

Designable

function

Function

id

Int

Auto

label

Str

routine

Routine

script

Script

string

Str

\(\checkmark\)

See also

For more details, see also Reference: String.

function#

Parameters passed to user defined subroutine.

Type=Function

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

string#

Specifies the character string to be stored.

Type=Str, Modifiable

class Surface(**kwds)#
Defines a parametric surface element in 3D space.

A parametric surface is defined in terms of two free parameters: u and v. This means that the 3 coordinates (x,y,z) of any point P on the surface is a function of the two free parameters u and v.

Name

Type

Required

Default

Modifiable

Designable

function

Function

id

Int

Auto

label

Str

maxpar

Double [2]

[1, 1]

\(\checkmark\)

minpar

Double [2]

[-1, -1]

\(\checkmark\)

routine

Routine

script

Script

uclosed

Bool

False

\(\checkmark\)

vclosed

Bool

False

\(\checkmark\)

Example

Create a Surface.#
from msolve import *

model = Model(output="surface")

Units(system="MKS")

ground = Part(ground=True)
global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker())

sf = Surface(uclosed   = True,
             vclosed   = True,
             minpar    = [-1,-1],
             maxpar    = [1,1],
             function  = "USER(2,100)",
             routine   = "ms_csubdll::SURSUB")

sf.geometry = SurfaceGraphic(surface=sf, rm=global_frame, u_seg=20, v_seg=20)

H3dOutput(save=True)

See also

For more details, see also Reference: Parametric Surface.

function#

Parameters passed to user defined subroutine.

Type=Function

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

maxpar#

Specifies the list of maximum value of u and v.

Type=Double [2], Default=[1, 1], Modifiable

minpar#

Specifies the list of minimum value of u and v.

Type=Double [2], Default=[-1, -1], Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

uclosed#

True if the surface is closed in the u parametric space.

Type=Bool, Default=False, Modifiable

vclosed#

True if the surface is closed in the v parametric space.

Type=Bool, Default=False, Modifiable

class SurfaceGraphic(**kwds)#

Creates a surface graphic that represents a Surface.

Name

Type

Required

Default

Modifiable

Designable

color

Color

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

rm

Reference - Marker

\(\checkmark\)

surface

Reference - Surface

\(\checkmark\)

u_seg

Int

10

v_seg

Int

10

Example

For an example, see Surface.

See also

For more details, see also Post: Graphic (ParamSurface).

color#

The color of the graphic for H3D animation.

Type=Color

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

rm#

Coordinate system with respect to which the surface is defined.

Type=Reference (Marker), Required

surface#

The represented Surface object.

Type=Reference (Surface), Required

u_seg#

Number of line segments used to approximate the surface.

Type=Int, Default=10

v_seg#

Number of line segments used to approximate the surface.

Type=Int, Default=10

class Tfsiso(**kwds)#
Defines a transfer function as a ratio of two polynomials in the Laplace domain.

Modeling applications of this element include actuators (electrical, hydraulic, and pneumatic), vibration isolators (bushings and shock absorbers), and controllers (PID).

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

denominator

Double [0]

\(\checkmark\)

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

label

Str

numerator

Double [0]

\(\checkmark\)

\(\checkmark\)

\(\checkmark\)

static_hold

Bool

False

\(\checkmark\)

u

Reference - Array

\(\checkmark\)

\(\checkmark\)

x

Reference - Array

\(\checkmark\)

\(\checkmark\)

y

Reference - Array

\(\checkmark\)

\(\checkmark\)

Example

Create a SISO Transfer Function.#
from msolve import *

model = Model(output="tfsiso")

ground = Part(ground=True)
Units(system="MKS")

x = Array(type="x")
y = Array(type="y")
u = Array(type="u", size=1, variables=[Variable(function="20*SIN(2*PI*TIME)")])

tf = Tfsiso(numerator=[1, 0.5], denominator=[1, 2, 3], u=u, x=x, y=y)

See also

For more details, see also Control: SISO.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

denominator#

List of coefficients, of the denominator polynomial of the transfer function.

Type=Double [0], Required, Default=0.0, Modifiable, Designable

id#

The id of the object.

Type=Int

label#

A string describing the object.

Type=Str

numerator#

List of coefficients, of the numerator polynomial of the transfer function.

Type=Double [0], Required, Default=0.0, Modifiable, Designable

static_hold#

Specifies if dynamic states x are kept fixed during static/quasi-static solution.

Type=Bool, Default=False, Modifiable

u#

Array used to store the inputs ‘u’ of this Gse.

Type=Reference (Array), Required, Modifiable

x#

Array used to store the states ‘x’ of this Gse.

Type=Reference (Array), Required, Modifiable

y#

Array used to store the states ‘y’ of this Gse.

Type=Reference (Array), Required, Modifiable

class Transient(**kwds)#

Specifies parameters that control the time-domain-based nonlinear dynamic analysis.

Name

Type

Required

Default

Modifiable

Designable

error

Double

\(\checkmark\)

hinit

Double

\(\checkmark\)

hmax

Double

\(\checkmark\)

hmin

Double

\(\checkmark\)

kmax

Int

\(\checkmark\)

label

Str

maxit

Int

\(\checkmark\)

type

Enum

DSTIFF

See also

For more details, see also Parameters: Transient Solver.

error#

Maximum absolute error allowed.

Type=Double, Modifiable

hinit#

The maximum initial step size.

Type=Double, Modifiable

hmax#

Maximum step size the integrator is allowed to take.

Type=Double, Modifiable

hmin#

Minimum step size the integrator is allowed to take.

Type=Double, Modifiable

kmax#

Maximum order that the integrator is to take.

Type=Int, Modifiable

label#

A string describing the object.

Type=Str

maxit#

Maximum number of iterations for the corrector.

Type=Int, Modifiable

type#

Define the integrator to be used.

Type=Enum, Default=DSTIFF

Permitted values are:

  • ABAM

  • CSTIFF

  • DSTIFF

  • MSTIFF

  • VSTIFF

class Triamesh(**kwds)#
Creates a graphic object defined using ‘Nodes’ and ‘Faces’.

Alternatively, you can use a graphic_read callable function to populate the nodes and faces.

Name

Type

Required

Default

Modifiable

Designable

auto_clearance

Double

\(\checkmark\)

centerline_marker

Reference - Marker

\(\checkmark\)

color

Color

faces

Faces

0

function

Function

hidden

Bool

False

id

Int

Auto

is_material_inside

Alias

label

Str

material_inside

Bool

True

nodes

Nodes

0.0

refinement_level

Int

0

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

See also

For more details, see also Post: Graphic (Triamesh).

auto_clearance#

Automatically compute clearance when contacts are present.

Type=Double, Modifiable

centerline_marker#

If auto_clearance is specified, centerline_marker is used to calculate a correction factor to the tessellated geometry.

Type=Reference (Marker), Modifiable

color#

The color of the graphic for H3D animation.

Type=Color

faces#

List of node ids that define the face for the triamesh.

Type=Faces, Default=0

function#

Parameters passed to user defined subroutine.

Type=Function

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

is_material_inside#

Alias to material_inside.

Type=Alias

label#

A string describing the object.

Type=Str

material_inside#

Specifies if the graphic has material inside or outside.

Type=Bool, Default=True

nodes#

List of node coordinates that define the triamesh.

Type=Nodes, Default=0.0

refinement_level#

Mesh density.

Type=Int, Default=0

rm#

Coordinate system for the specification of the geometry data.

Type=Reference (Marker), Required

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class Units(**kwds)#
Defines the units for the model.

You can specify four types of units: Mass, Length, Time, and Force. Alternatively, you can use a predefined set of units with the system property.

Name

Type

Required

Default

Modifiable

Designable

force

Enum

NEWTON

label

Str

length

Enum

METER

mass

Enum

KILOGRAM

system

Enum

time

Enum

SECOND

Example

Specify the model units.#
from msolve import *

model = Model(output="units")

# specify units explicitly
Units(force="KNEWTON", length="MILLIMETER", mass="KILOGRAM", time="SECOND")

# specify units using a pre-defined system
Units(system='MMKS')

See also

For more details, see also Parameters: Units.

force#

Defines the units for force.

Type=Enum, Default=NEWTON

Permitted values are:

  • CENTINEWTON

  • DYNE

  • KILOGRAM_FORCE

  • KNEWTON

  • KPOUND_FORCE

  • MEGANEWTON

  • MICRONEWTON

  • MILLINEWTON

  • NANONEWTON

  • NEWTON

  • OUNCE_FORCE

  • POUNDAL

  • POUND_FORCE

label#

A string describing the object.

Type=Str

length#

Defines the units for length.

Type=Enum, Default=METER

Permitted values are:

  • ANGSTROM

  • CENTIMETER

  • FOOT

  • INCH

  • KILOMETER

  • METER

  • MICROINCH

  • MICROMETER

  • MILE

  • MILLIINCH

  • MILLIMETER

  • MILLS

  • NANOMETER

  • YARD

mass#

Defines the units for mass.

Type=Enum, Default=KILOGRAM

Permitted values are:

  • GRAM

  • KILOGRAM

  • KPOUND_MASS

  • MEGAGRAM

  • MICROGRAM

  • MILLIGRAM

  • NANOGRAM

  • OUNCE_MASS

  • POUND_MASS

  • SLINCH

  • SLUG

  • TONNE

  • US_TON

system#

Specifies a predefined set of units.

Type=Enum

Permitted values are:

  • CGS

  • FPS

  • IPS

  • MKS

  • MMKS

  • NONE

time#

Defines the units for time.

Type=Enum, Default=SECOND

Permitted values are:

  • DAY

  • HOUR

  • MICROSECOND

  • MILLISECOND

  • MINUTE

  • NANOSECOND

  • SECOND

class Upost(**kwds)#
Defines a user-written Post-Subroutine.

It is called at every output step. It can be used to extract MotionSolve results, process the results programmatically for real-time animation or plotting or to write results to an external file.

Name

Type

Required

Default

Modifiable

Designable

function

Function

\(\checkmark\)

label

Str

routine

Routine

script

Script

See also

For more details, see also Post: User Output Request.

function#

Parameters passed to user defined subroutine.

Type=Function, Required

label#

A string describing the object.

Type=Str

routine#

An alternative name for the user subroutine.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class UserGraphic(**kwds)#

Creates a user-defined (Grasub) geometry.

Name

Type

Required

Default

Modifiable

Designable

color

Color

function

Function

hidden

Bool

False

id

Int

Auto

increment

Int

4

label

Str

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

See also

For more details, see also Post: Graphic (UserGra).

color#

The color of the graphic for H3D animation.

Type=Color

function#

Parameters passed to user defined subroutine.

Type=Function

hidden#

Specifies whether the graphic will be visible in the H3D file.

Type=Bool, Default=False

id#

The id of the object.

Type=Int

increment#

The increment in which the GRASUB will be called.

Type=Int, Default=4

label#

A string describing the object.

Type=Str

rm#

Marker used as coordinate system.

Type=Reference (Marker), Required

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class UserMsg(**kwds)#

Defines a user-written Message-Subroutine.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

label

Str

routine

Routine

script

Script

See also

For more details, see also Messaging.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine.

Type=Function

label#

A string describing the object.

Type=Str

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class Variable(**kwds)#
Defines a variable in terms of a scalar algebraic equation in MotionSolve.

The variable may be defined in four different ways:

  • Directly as an explicit function of system state and time.

  • Directly as an implicit function of system state and time.

  • Indirectly through an algebraic equation applied as a constraint or a penalty.

  • As the integral of an expression.

Name

Type

Required

Default

Modifiable

Designable

auto_balance

Enum

DEFAULT

function

Function

\(\checkmark\)

\(\checkmark\)

ic

Double

0.0

\(\checkmark\)

id

Int

Auto

implicit

Bool

False

label

Str

penalty

Double

\(\checkmark\)

\(\checkmark\)

penalty1

Double

\(\checkmark\)

\(\checkmark\)

pstate

Bool

False

routine

Routine

script

Script

See also

For more details, see also Reference: Solver Variable.

auto_balance#

Type of soft constraint method.

Type=Enum, Default=DEFAULT

Permitted values are:

  • DEFAULT

  • DISABLED

  • PENALTY

  • UNCONDITIONAL

function#

Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the variable.

Type=Function, Required, Modifiable

ic#

Initial value.

Type=Double, Default=0.0, Modifiable

id#

The id of the object.

Type=Int

implicit#

The variable is defined implicitly.

Type=Bool, Default=False

label#

A string describing the object.

Type=Str

penalty#

Stiffness factor used in soft constraint.

Type=Double, Modifiable, Designable

penalty1#

Damping factor used in soft constraint.

Type=Double, Modifiable, Designable

pstate#

Specifies if this variable is to be used in eigenvalue analysis and state-space matrix system representation.

Type=Bool, Default=False

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class Vforce(**kwds)#
Defines a vector force that consists of three orthogonal components.

You define the VForce statement through user-specified function expressions or user-written subroutines.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

fx

Function

\(\checkmark\)

fy

Function

\(\checkmark\)

fz

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

jfloat

Reference - Marker

\(\checkmark\)

label

Str

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

Example

Create a Vforce.#
from msolve import *

model = Model(output="vforce")

Units(system="MKS")
Accgrav(kgrav=-9.81)

ground = Part(ground=True)
global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker(qp=[0,1,0]))

vf = Vforce(i       = part.cm ,
            jfloat  = Marker(body=ground, floating=True) ,
            rm      = global_frame,
            fx      = "10*SIN(2*PI*TIME)",
            fy      = "20*SIN(2*PI*TIME)",
            fz      = "30*SIN(2*PI*TIME)",
            )

See also

For more details, see also Force: Two Body Vector.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with { fy , fz , fx }.

Type=Function, Modifiable

fx#

Specifies x-component force vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

fy#

Specifies y-component force vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

fz#

Specifies z-component force vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

i#

Marker at which the force is applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

jfloat#

Marker at which reaction force is applied. Omit for action only.

Type=Reference (Marker), Modifiable

label#

A string describing the object.

Type=Str

rm#

Reference marker for defining force components. When not specified, it defaults to the global coordinate system.

Type=Reference (Marker), Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

class Vtorque(**kwds)#
Defines a vector torque that consists of three orthogonal components.

You can define the Vtorque statement through user-specified expressions or user-written subroutines.

Name

Type

Required

Default

Modifiable

Designable

active

Bool

True

\(\checkmark\)

function

Function

\(\checkmark\)

i

Reference - Marker

\(\checkmark\)

\(\checkmark\)

id

Int

Auto

jfloat

Reference - Marker

\(\checkmark\)

label

Str

rm

Reference - Marker

\(\checkmark\)

routine

Routine

script

Script

tx

Function

\(\checkmark\)

ty

Function

\(\checkmark\)

tz

Function

\(\checkmark\)

Example

Create a Vtorque.#
from msolve import *

model = Model(output="vtorque")

Units(system="MKS")

ground = Part(ground=True)
global_frame = Marker(body=ground)

part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker())

vt = Vtorque(i       = part.cm ,
            jfloat  = Marker(body=ground, floating=True) ,
            rm      = global_frame,
            tx      = "10+0.5*SIN(2*PI*TIME)",
            tz      = "STEP5(TIME, 0, 0, 0.5, 10)",
            )

See also

For more details, see also Force: Two Body Vector.

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

function#

Parameters passed to user defined subroutine.

Info

This attribute is mutually exclusive with { tz , tx , ty }.

Type=Function, Modifiable

i#

Marker at which the torque is applied.

Type=Reference (Marker), Required, Modifiable

id#

The id of the object.

Type=Int

jfloat#

Marker at which reaction torque is applied. Omit for action only.

Type=Reference (Marker), Modifiable

label#

A string describing the object.

Type=Str

rm#

Reference marker for defining the torque components. When not specified, it defaults to the global coordinate system.

Type=Reference (Marker), Modifiable

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

tx#

Specifies x-component torque vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

ty#

Specifies y-component torque vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

tz#

Specifies z-component torque vector.

Info

This attribute is mutually exclusive with function.

Type=Function, Modifiable

class Yforce(**kwds)#
Creates a Force State Equation.

This element combines Gse and Gforce modeling elements.

Name

Type

Required

Default

Modifiable

Designable

a

Reference - Matrix

active

Bool

True

\(\checkmark\)

b

Reference - Matrix

c

Reference - Matrix

d

Reference - Matrix

function

Function

i

Reference - Marker

\(\checkmark\)

ic

Reference - Array

id

Int

Auto

jfloat

Reference - Marker

\(\checkmark\)

label

Str

ns

Int

0

rm

Reference - Marker

routine

Routine

script

Script

static_hold

Bool

False

type

Enum

u

Reference - Array

x

Reference - Array

\(\checkmark\)

See also

For more details, see also Force: State Equation.

a#

State Matrix for a linear Yforce.

Info

This attribute can only be used when type = LINEAR.

Type=Reference (Matrix)

active#

Defines the state of the object.

Type=Bool, Default=True, Modifiable

b#

Input Matrix for a linear Yforce.

Info

This attribute can only be used when type = LINEAR.

Type=Reference (Matrix)

c#

Output Matrix for a linear Yforce.

Info

This attribute can only be used when type = LINEAR.

Type=Reference (Matrix)

d#

Feed-thru Matrix for a linear Yforce.

Info

This attribute can only be used when type = LINEAR.

Type=Reference (Matrix)

function#

Parameters passed to user defined subroutine.

Info

This attribute can only be used when type = USERSUB.

Type=Function

i#

Marker at which the force is applied.

Type=Reference (Marker), Required

ic#

Array containing the initial values of the dynamic system.

Type=Reference (Array)

id#

The id of the object.

Type=Int

jfloat#

Marker at which reaction force is applied.

Type=Reference (Marker), Required

label#

A string describing the object.

Type=Str

ns#

The number of states in the dynamic system.

Info

This attribute can only be used when type = USERSUB.

Type=Int, Default=0

rm#

Reference marker used for defining the components of the force vector.

Type=Reference (Marker)

routine#

The value can be a callable Python function, a Matlab/OML script, or a string that includes the name of a DLL/SO file and the corresponding function name, separated by ‘::’.

Type=Routine

script#

Path and name of the script that contains the routine.

Type=Script

static_hold#

Specifies if dynamic states x are kept fixed during static/quasi-static solution.

Type=Bool, Default=False

type#

Type of the dynamic system.

Type=Enum

Permitted values are:

  • LINEAR

  • USERSUB

u#

Array containing the inputs u of the dynamic system.

Type=Reference (Array)

x#

Array containing the states x of the dynamic system.

Type=Reference (Array), Required