Forces Module#
Defines force-related components for multibody dynamics modeling.
This module provides classes for creating, configuring, validating and managing different types of forces, such as springs, dampers, actuators, external loads, and internal forces like contact forces. These elements allow for the definition of complex interactions between bodies in a multibody system.
Forces are essential components in simulating physical behavior, as they drive or influence the motion of system components.
For a complete overview of all the modeling entities and how components integrate,
refer back to the msolve.Model module.
msolve.Constraintsfor constraintsmsolve.Controlfor control modeling entitiesmsolve.ReferenceDatafor data elementsmsolve.Graphicsfor graphic entities
- class Accgrav(**kwds)#
Defines the acceleration due to gravity along the global X, Y, and Z directions.
Name
Type
Required
Default
Modifiable
Designable
Property
0.0
\(\checkmark\)
\(\checkmark\)
Property
0.0
\(\checkmark\)
\(\checkmark\)
Property
0.0
\(\checkmark\)
\(\checkmark\)
labelStr
nameStr
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
- 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
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Function
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
Marker\(\checkmark\)
idInt
Auto
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
MarkerlabelStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
nameStr
Routine
Script
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.
- 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
- classmethod getMsolveType()#
Return the ‘type’ strings that are passed to the API calls ie API_SendOffCommandDeactivateFlag, py_get_post_states
- gmodulus#
Shear modulus of elasticity.
Type=Double, Default=0.0, Modifiable, Designable
- 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
- length#
Distance from the origin of
jto the origin ofifor 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 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 jMarker. The bushing is assumed to undergo only small rotational deflections.
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Function
Reference -
Marker\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Double [3]
[0, 0, 0]
\(\checkmark\)
\(\checkmark\)
labelStr
nameStr
Routine
Script
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.
- 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
- classmethod getMsolveType()#
Return the ‘type’ strings that are passed to the API calls ie API_SendOffCommandDeactivateFlag, py_get_post_states
- j#
Markerat 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
- 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
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.001
\(\checkmark\)
\(\checkmark\)
idInt
Auto
\(\checkmark\)
labelStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
nameStr
Double
0.001
\(\checkmark\)
\(\checkmark\)
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, )
- 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
- joint#
The higher pair joint upon which this force is applied.
Type=Reference (Cvcv, Ptcv), Required
- 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 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
activeBool
True
\(\checkmark\)
Bool
False
Enum
AUTO
\(\checkmark\)
Function
Routine
Script
Enum
OFF
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Bool
True
Double
1.5
\(\checkmark\)
\(\checkmark\)
Function
Routine
Script
Double
0.001
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
FlexBodyBool
False
Reference -
Graphics[0]Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Reference -
FlexBodyBool
False
Reference -
Graphics[0]labelStr
Enum
AUTO
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
nameStr
Function
Routine
Script
Double
0.01
\(\checkmark\)
Double
0.1
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Alias
Double
0.001
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
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)
See also
For more details, see also Force: Contact.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def CFFSUB(id, time, par, npar, loci, locj, x, xdot, nforce, dflag, iflag): result = [0,0,0] # calculate the friction force components [Fx Fy Tz] return result def CNFSUB(id, time, par, npar, loci, ni, locj, nj, gap, gapdot, gapdotdot, dflag, iflag): result = [0,0,0] # calculate the normal force components [Fx Fy Fz] return result
For more information, see MotionSolve Subroutines.
- 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
- contactpost_script#
Path and name of the script that contains the contact post routine.
Type=Script
- 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_script#
Path and name of the script that contains the friction force routine.
Type=Script
- 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
- 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]
- 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_script#
Path and name of the script that contains the normal force routine.
Type=Script
- 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#
Alias to sensor_script.
Type=Alias
- 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 Dcvcvf(**kwds)#
- Creates a contact force between two instances of
DeformableCurve. The volumes in contact are determined by the curve geometries. A curve represents a deformable cable with local radius defined by the
radius_i_startandradius_i_end. A tapered curve is defined by different radii. A negative value indicates a hollow curve (cable). Start and end radii must be of the same sign. The contact force supports two formulations:Linear: with a stiffness and damping component
Poisson: based on penalty formulation
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Enum
LINEAR
\(\checkmark\)
Reference -
DeformableCurve\(\checkmark\)
idInt
Auto
Reference -
DeformableCurve\(\checkmark\)
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- damping#
Specifies the damping coefficient.
Info
This attribute can only be used when type = LINEAR.
Type=Double, Default=0.0, Modifiable, Designable
- force_model#
Specifies the force model for the contact force.
Type=Enum, Default=LINEAR, Modifiable
Permitted values are:
LINEAR
POISSON
- i_dcurve#
A reference to a
DeformableCurverepresenting the first deformable solidType=Reference (DeformableCurve), Required
- j_dcurve#
A reference to a
DeformableCurverepresenting the second deformable solidType=Reference (DeformableCurve), Required
- penalty#
Specifies the penalty parameter.
Info
This attribute can only be used when type = POISSON.
Type=Double, Default=0.0, Modifiable, Designable
- radius_i_end#
The radius of the i deformable curve at the end.
Type=Double, Default=0.0, Modifiable, Designable
- radius_i_start#
The radius of the i deformable curve at the start.
Type=Double, Default=0.0, Modifiable, Designable
- radius_j_end#
The radius of the j deformable curve at the end.
Type=Double, Default=0.0, Modifiable, Designable
- radius_j_start#
The radius of the j deformable curve at the start.
Type=Double, Default=0.0, Modifiable, Designable
- restitution_coefficient#
Specifies the restitution coefficient used in contact force.
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
- Creates a contact force between two instances of
- class Dcvsff(**kwds)#
- Creates a contact force between a
DeformableCurveand aDeformableSurface. The contact force is determined by the curve and surface geometries. A curve can be used to represent a deformable cable with local radius defined by the
radius_startandradius_end. A tapered curve is defined by different radii. A negative value indicates a hollow curve (cable). Start and end radii must be of the same sign. The contact force supports two formulations:Linear: with a stiffness and damping component
Poisson: based on penalty formulation
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
DeformableCurve\(\checkmark\)
Reference -
DeformableSurface\(\checkmark\)
Enum
LINEAR
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- damping#
Specifies the damping coefficient.
Info
This attribute can only be used when type = LINEAR.
Type=Double, Default=0.0, Modifiable, Designable
- dcurve#
A reference to a
DeformableCurverepresenting the first deformable solidType=Reference (DeformableCurve), Required
- dsurface#
A reference to a
DeformableSurfacerepresenting the second deformable solidType=Reference (DeformableSurface), Required
- force_model#
Specifies the force model for the contact force.
Type=Enum, Default=LINEAR, Modifiable
Permitted values are:
LINEAR
POISSON
- penalty#
Specifies the penalty parameter.
Info
This attribute can only be used when type = POISSON.
Type=Double, Default=0.0, Modifiable, Designable
- radius_end#
The radius of the deformable curve at the end.
Type=Double, Default=0.0, Modifiable, Designable
- radius_start#
The radius of the deformable curve at the start.
Type=Double, Default=0.0, Modifiable, Designable
- restitution_coefficient#
Specifies the restitution coefficient used in contact force.
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
- Creates a contact force between a
- class Dsfsff(**kwds)#
- Creates a contact force between two
DeformableSurface. The contact force is determined by the two surface geometries.
The contact force supports two formulations:
Linear: using stiffness and damping component
Poisson: based on penalty formulation
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Enum
LINEAR
\(\checkmark\)
Reference -
DeformableSurface\(\checkmark\)
idInt
Auto
Reference -
DeformableSurface\(\checkmark\)
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- damping#
Specifies the damping coefficient.
Info
This attribute can only be used when type = LINEAR.
Type=Double, Default=0.0, Modifiable, Designable
- force_model#
Specifies the force model for the contact force.
Type=Enum, Default=LINEAR, Modifiable
Permitted values are:
LINEAR
POISSON
- i_dsurface#
A reference to a
DeformableSurfacerepresenting the first deformable solidType=Reference (DeformableSurface), Required
- j_dsurface#
A reference to a
DeformableSurfacerepresenting the second deformable solidType=Reference (DeformableSurface), Required
- penalty#
Specifies the penalty parameter.
Info
This attribute can only be used when type = POISSON.
Type=Double, Default=0.0, Modifiable, Designable
- restitution_coefficient#
Specifies the restitution coefficient used in contact force.
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
- Creates a contact force between two
- class Fforce(**kwds)#
- Defines a force or torque in the frequency domain.
Fforce acts on the
imarker and can only be defined using a user written subroutine.
Note
This is only available during a simulation type of FREQUENCYRESPONSE. The force is calculated in a compiled user-subroutine or scripted callable function.
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Str
1
\(\checkmark\)
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
labelStr
nameStr
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
Routine
Script
Example
This user written callable python function models the complex dynamic stiffness of a spring-damper system in the frequency domain.
Create a frequency force.#def FFOSUB(id, freq, mag_u, phase_u, preload, par, npar, dflag, iflag): import math # Spring damper constants K = 100 C = 1 omega = freq * 2 * math.pi # angular frequency in [rad/s] r = K # real part of the spring stiffness i = omega * C # imaginary part of the spring stiffness kdyn = math.sqrt(r * r + i * i) # magnitude of the complex stiffness phi_loss = math.atan2(i, r) # phase angle (loss angle) return [kdyn, phi_loss] # return values
See also
For more details, see also Force: Fforce.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def FFOSUB(id, freq, mag_u, phase_u, preload, par, npar, iflag, dflag): # calculate the magnitude of the dynamic stiffness and the loss angle kdyn = 0.0 phi_loss = 0.0 return [kdyn, phi_loss]
For more information, see MotionSolve Subroutines.
- dof#
A list of digits from 1 to 6 indicating the degree of freedom in which the force is acting. Values in the 1-3 range represents a translational degree of freedom. Values in the 4-6 range represent a rotational degree of freedom.
Type=Str, Default=1, Modifiable
- function#
User-defined constants passed to the FFOSUB.
Type=Function, Modifiable
- i#
Type=Reference (Marker), Required, Modifiable
- j#
Type=Reference (Marker), Modifiable
- preload#
Type=Function, Modifiable
- rm#
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 user written script that contains the routine.
Type=Script
- 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
activeBool
True
\(\checkmark\)
Double [36]
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double [6]
[0, 0, 0, 0, 0, 0]
\(\checkmark\)
\(\checkmark\)
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
\(\checkmark\)
Double [36]
\(\checkmark\)
\(\checkmark\)
labelStr
Double [6]
[0, 0, 0, 0, 0, 0]
\(\checkmark\)
\(\checkmark\)
nameStr
Routine
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.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def FIESUB(id, time, par, npar, disp, velo, dflag, iflag): # calculate the field 6 components forces/torques # and 6 by 6 matrices representing the derivatives of the forces/torques with respect to `disp` and `vel`. dfddis=36*[0.0] dfdvel=36*[0.0] field =6*[0.0] return [dfddis, dfdvel, field]
For more information, see MotionSolve Subroutines.
- cmatrix#
6x6 damping matrix.
Type=Double [36], Modifiable, Designable
- cratio#
Damping scale factor.
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.
Type=Function, Modifiable
- i#
Marker at which the force and moment is applied.
Type=Reference (Marker), Required, Modifiable
- 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
- 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 Force#
Base class for force objects.
The objects derived from
Forceare:
- class Friction(**kwds)#
- Applies frictional forces in a joint.
Friction can be used on translational, revolute, cylindrical, hooke, universal, and spherical
~msolve.Model.Joints.
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Double
100.0
\(\checkmark\)
Double
0.316
\(\checkmark\)
Enum
ALL
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
idInt
Auto
Enum
NONE
Double
1000.0
\(\checkmark\)
\(\checkmark\)
EnumStr [0]
ALL
\(\checkmark\)
Reference -
Joint\(\checkmark\)
labelStr
Double
0.01
\(\checkmark\)
\(\checkmark\)
Double
0.2
\(\checkmark\)
\(\checkmark\)
Double
0.3
\(\checkmark\)
\(\checkmark\)
nameStr
Enum
CONSTANT
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Double
1.0
\(\checkmark\)
\(\checkmark\)
Double
0.1
\(\checkmark\)
\(\checkmark\)
Double
0.0004
\(\checkmark\)
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.
- 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
- 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
- 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 Gdcvf(**kwds)#
- Creates a contact force between a
Graphicsand aDeformableCurve. The contact force is determined by the geometry and the deformable curve. A curve can be used to represent a deformable cable with local radius defined by the
radius_startandradius_end. A tapered curve is defined by different radii. A negative value indicates a hollow curve (cable). Start and end radii must be of the same sign. The contact force supports two formulations:The Graphic entity can represent geometries such as
Cylinder,Sphereetc.. The contact force supports two formulations:Linear: with a stiffness and damping component
Poisson: based on penalty formulation
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
DeformableCurve\(\checkmark\)
Enum
LINEAR
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- damping#
Specifies the damping coefficient.
Info
This attribute can only be used when type = LINEAR.
Type=Double, Default=0.0, Modifiable, Designable
- dcurve#
A reference to a
DeformableCurverepresenting the second deformable solidType=Reference (DeformableCurve), Required
- force_model#
Specifies the force model for the contact force.
Type=Enum, Default=LINEAR, Modifiable
Permitted values are:
LINEAR
POISSON
- geom#
A reference to a
Graphicsobject representing the first solid. Supported geometries areSphere,Ellipsoid,CylinderandFrustum.Type=Reference (Sphere, Ellipsoid, Cylinder, Frustum)
- penalty#
Specifies the penalty parameter.
Info
This attribute can only be used when type = POISSON.
Type=Double, Default=0.0, Modifiable, Designable
- radius_end#
The radius of the deformable curve at the end.
Type=Double, Default=0.0, Modifiable, Designable
- radius_start#
The radius of the deformable curve at the start.
Type=Double, Default=0.0, Modifiable, Designable
- restitution_coefficient#
Specifies the restitution coefficient used in contact force.
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
- Creates a contact force between a
- class Gdsff(**kwds)#
- Creates a contact force between a
Graphicsand aDeformableSurface. The contact force is determined by the geometry and the shape of the deformable surface. The Graphic entity can represent a geometry such as
Cylinder,Sphereetc.. The contact force supports two formulations:Linear: with a stiffness and damping component
Poisson: based on penalty formulation
Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
DeformableSurface\(\checkmark\)
Enum
LINEAR
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- damping#
Specifies the damping coefficient.
Info
This attribute can only be used when type = LINEAR.
Type=Double, Default=0.0, Modifiable, Designable
- dsurface#
A reference to a
DeformableSurfacerepresenting the second deformable solidType=Reference (DeformableSurface), Required
- force_model#
Specifies the force model for the contact force.
Type=Enum, Default=LINEAR, Modifiable
Permitted values are:
LINEAR
POISSON
- geom#
A reference to a
Graphicsobject representing the first solid. Supported geometries areSphere,Ellipsoid,CylinderandFrustum.Type=Reference (Sphere, Ellipsoid, Cylinder, Frustum)
- penalty#
Specifies the penalty parameter.
Info
This attribute can only be used when type = POISSON.
Type=Double, Default=0.0, Modifiable, Designable
- restitution_coefficient#
Specifies the restitution coefficient used in contact force.
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
- Creates a contact force between a
- 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
activeBool
True
\(\checkmark\)
Str
Alias
Function
\(\checkmark\)
Function
\(\checkmark\)
Function
\(\checkmark\)
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
labelStr
nameStr
Reference -
Marker\(\checkmark\)
Routine
Script
Function
\(\checkmark\)
Function
\(\checkmark\)
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.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def GFOSUB(id, time, par, npar, dflag, iflag): # calculate the 6 components of the Gforce result = 6*[0] return result
For more information, see MotionSolve Subroutines.
- excluded_freq_dofs#
Specifies which directions of the force are skipped during frequency response analysis.
Type=Str
- freq_dependent_dofs#
Type=Alias
- function#
Parameters passed to user defined subroutine.
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
- jfloat#
Marker at which reaction force applied. Omit for Action Only.
Type=Reference (Marker), Modifiable
- 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
- class Mforce(**kwds)#
- Defines a distributed force on a
FlexBodyin 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
activeBool
True
\(\checkmark\)
Int
0
\(\checkmark\)
Reference -
FlexBody\(\checkmark\)
\(\checkmark\)
Function
\(\checkmark\)
Function
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Routine
Function
\(\checkmark\)
Script
See also
For more details, see also Force: FlexModal.
- 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
- 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 ‘::’.
Info
This attribute is deprecated and is currently unsupported.
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.
Info
This attribute is deprecated and is currently unsupported.
Type=Script
- Defines a distributed force on a
- 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
activeBool
True
\(\checkmark\)
Reference -
Matrix\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
Matrix\(\checkmark\)
idInt
Auto
Reference -
Marker[0]\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
Reference -
Matrix\(\checkmark\)
\(\checkmark\)
labelStr
Reference -
Matrix\(\checkmark\)
nameStr
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.
- 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
- 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
- length#
Length values between each pair of markers.
Type=Reference (Matrix), Modifiable
- 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
activeBool
True
\(\checkmark\)
Function
\(\checkmark\)
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Routine
Script
Double
1.0
\(\checkmark\)
\(\checkmark\)
Bool
False
\(\checkmark\)
Example
Define a Pforce.#from msolve import * model = Model(output="pforce") Units(system="MKS") Accgrav(igrav=0,jgrav=-9.81,kgrav=0) ground = Part(ground=True) global_frame = Marker(body=ground) part = Part (mass=1, ip=[1e3,1e3,1e3],cm=Marker()) bush = Bushing(i=part.cm, j=global_frame, k=[1e3,1e3,1e3]) pforce = Pforce(function = f"PSI({bush.i.id},{bush.j.id})", penalty = 10.0, penalty1 = 1.0, unilateral = False, smoothing_factor = 2.1 )
See also
For more details, see also Force: Penalty.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def PFOSUB(id, time, par, npar, dflag, iflag): # calculate the value of the generalized force representing a penalty based soft constraint [d, errflg] = py_sysfnc("DZ", [par[0], par[1]]) return d
For more information, see MotionSolve Subroutines.
- function#
Parameters passed to user defined subroutine or a legal MotionSolve expression that defines the algebraic constraint.
Type=Function, Required, Modifiable
- 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 Ptdcvf(**kwds)#
- Creates a contact force between a
Marker and a
DeformableCurve. The volumes in contact are defined by the ellipsoid located at theimarker and the curve representing a cable with local radius defined by theradius_curve_startandradius_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
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
DeformableCurve\(\checkmark\)
Enum
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
- 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
- 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.
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
- Creates a contact force between a
- class Ptdsff(**kwds)#
Creates a soft constraint (force) that attempts to maintain a
Markeron aDeformableSurface.Name
Type
Required
Default
Modifiable
Designable
activeBool
True
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Reference -
DeformableSurface\(\checkmark\)
Bool
False
\(\checkmark\)
Enum
\(\checkmark\)
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
labelStr
nameStr
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Double
0.0
\(\checkmark\)
\(\checkmark\)
Alias
Double
0.0
\(\checkmark\)
Routine
Script
Double
0.0
\(\checkmark\)
\(\checkmark\)
See also
For more details, see also Force: PTdSF.
- 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
- 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.
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 Sforce(**kwds)#
- Defines a force or torque acting between two
Marker. 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
Bool
False
\(\checkmark\)
activeBool
True
\(\checkmark\)
Function
\(\checkmark\)
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
\(\checkmark\)
labelStr
nameStr
Routine
Script
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.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def SFOSUB(id, time, par, npar, dflag, iflag): # compute the value of a single component force (Sforce) value = 0.0 return value
For more information, see MotionSolve Subroutines.
- actiononly#
True for action only force, False for action and reaction force.
Type=Bool, Default=False, 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
- j#
Marker at which the reaction force is applied.
Type=Reference (Marker), Required, 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#
Type of force.
Type=Enum, Default=TRANSLATION
Permitted values are:
ROTATION
TRANSLATION
- Defines a force or torque acting between two
- class SpringDamper(**kwds)#
- Defines a spring damper acting between two
Marker. 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
activeBool
True
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
Double
\(\checkmark\)
\(\checkmark\)
labelStr
Double
\(\checkmark\)
\(\checkmark\)
nameStr
Double
\(\checkmark\)
\(\checkmark\)
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.
- 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
- classmethod getMsolveType()#
Return the ‘type’ strings that are passed to the API calls ie API_SendOffCommandDeactivateFlag, py_get_post_states
- i#
Marker at which the force or torque is applied.
Type=Reference (Marker), Required, Modifiable
- 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
- 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
- Defines a spring damper acting between two
- 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
activeBool
True
\(\checkmark\)
Str
Alias
Function
\(\checkmark\)
Function
\(\checkmark\)
Function
\(\checkmark\)
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
labelStr
nameStr
Reference -
Marker\(\checkmark\)
Routine
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.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def VFOSUB(id, time, par, npar, dflag, iflag): # compute the value of the Vforce Fx, Fy and Fx components value = [0.0, 0.0, 0.0] return value
For more information, see MotionSolve Subroutines.
- excluded_freq_dofs#
Specifies which directions of the force are skipped during frequency response analysis.
Type=Str
- freq_dependent_dofs#
Type=Alias
- function#
Parameters passed to user defined subroutine.
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
- jfloat#
Marker at which reaction force is applied. Omit for action only.
Type=Reference (Marker), Modifiable
- 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
activeBool
True
\(\checkmark\)
Str
Alias
Function
\(\checkmark\)
Reference -
Marker\(\checkmark\)
\(\checkmark\)
idInt
Auto
Reference -
Marker\(\checkmark\)
labelStr
nameStr
Reference -
Marker\(\checkmark\)
Routine
Script
Function
\(\checkmark\)
Function
\(\checkmark\)
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.
User Subroutine
The following user subroutine template expects the function signature and return value(s) as shown. Note that this is a placeholder implementation for reference purposes only.
def VTOSUB(id, time, par, npar, dflag, iflag): # compute the value of the Vtorque Fx, Fy and Fx components value = [0.0, 0.0, 0.0] return value
For more information, see MotionSolve Subroutines.
- excluded_freq_dofs#
Specifies which directions of the force are skipped during frequency response analysis.
Type=Str
- freq_dependent_dofs#
Type=Alias
- function#
Parameters passed to user defined subroutine.
Type=Function, Modifiable
- i#
Marker at which the torque is applied.
Type=Reference (Marker), Required, Modifiable
- jfloat#
Marker at which reaction torque is applied. Omit for action only.
Type=Reference (Marker), Modifiable
- 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