Package Modelica.​Mechanics.​MultiBody.​Forces
Components that exert forces and/or torques between frames

Information

This package contains components that exert forces and torques between two frame connectors, e.g., between two parts.

Content

ModelDescription
WorldForce External force acting at the frame to which this component is connected and defined by 3 input signals, that are interpreted as one vector resolved in frame world, frame_b or frame_resolve.
WorldTorque External torque acting at the frame to which this component is connected and defined by 3 input signals, that are interpreted as one vector resolved in frame world, frame_b or frame_resolve.
WorldForceAndTorque External force and external torque acting at the frame to which this component is connected and defined by 3+3 input signals, that are interpreted as a force and as a torque vector resolved in frame world, frame_b or frame_resolve.

Force Force acting between two frames defined by 3 input signals resolved in frame world, frame_a, frame_b or in frame_resolve.
Torque Torque acting between two frames defined by 3 input signals resolved in frame world, frame_a, frame_b or in frame_resolve.
ForceAndTorque Force and torque acting between two frames defined by 3+3 input signals resolved in frame world, frame_a, frame_b or in frame_resolve.

LineForceWithMass General line force component with an optional point mass on the connection line. The force law can be defined by a component of Modelica.Mechanics.Translational
LineForceWithTwoMasses General line force component with two optional point masses on the connection line. The force law can be defined by a component of Modelica.Mechanics.Translational
Spring Linear translational spring with optional mass
Damper Linear (velocity dependent) damper
SpringDamperParallel Linear spring and damper in parallel connection
SpringDamperSeries Linear spring and damper in series connection

Extends from Modelica.​Icons.​SourcesPackage (Icon for packages containing sources).

Package Contents

NameDescription
DamperLinear (velocity dependent) damper
ForceForce acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve
ForceAndTorqueForce and torque acting between two frames, defined by 3+3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve
InternalInternal package, should not be used by user
LineForceWithMassGeneral line force component with an optional point mass on the connection line
LineForceWithTwoMassesGeneral line force component with two optional point masses on the connection line
SpringLinear translational spring with optional mass
SpringDamperParallelLinear spring and linear damper in parallel
SpringDamperSeriesLinear spring and linear damper in series connection
TorqueTorque acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve
WorldForceExternal force acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve
WorldForceAndTorqueExternal force and torque acting at frame_b, defined by 3+3 input signals and resolved in frame world, frame_b or in frame_resolve
WorldTorqueExternal torque acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve

Model Modelica.​Mechanics.​MultiBody.​Forces.​WorldForce
External force acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve

Information

The 3 signals of the force connector are interpreted as the x-, y- and z-coordinates of a force acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameB.Meaning
world Resolve input force in world frame (= default)
frame_b Resolve input force in frame_b
frame_resolve Resolve input force in frame_resolve (frame_resolve must be connected)

If resolveInFrame = Types.ResolveInFrameB.frame_resolve, the force coordinates are with respect to the frame, that is connected to frame_resolve.

If force={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a force of 100 N is acting along the positive x-axis of frame_b.

Note, the cut-torque in frame_b (frame_b.t) is always set to zero. Conceptually, a force and torque acts on the world frame in such a way that the force and torque balance between world.frame_b and frame_b is fulfilled. For efficiency reasons, this reaction torque is, however, not computed.

This force component is by default visualized as an arrow acting at the connector to which it is connected. The diameter and color of the arrow can be defined via variables diameter and color. The arrow points in the direction defined by the force signal. The length of the arrow is proportional to the length of the force vector using parameter N_to_m as scaling factor. For example, if N_to_m = 100 N/m, then a force of 350 N is displayed as an arrow of length 3.5 m.

An example how to use this model is given in the following figure:

This leads to the following animation

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialOneFrame_b (Base model for components providing one frame_b connector + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameBresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameB.​worldFrame in which input force is resolved (1: world, 2: frame_b, 3: frame_resolve)
RealN_to_mworld.​defaultN_to_mForce arrow scaling (length = force/N_to_m)

Inputs

TypeNameDefaultDescription
Diameterdiameterworld.​defaultArrowDiameterDiameter of force arrow
Colorcolor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_bframe_bCoordinate system fixed to the component with one cut-force and cut-torque
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame
input RealInputforce[3]x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame

Model Modelica.​Mechanics.​MultiBody.​Forces.​WorldTorque
External torque acting at frame_b, defined by 3 input signals and resolved in frame world, frame_b or frame_resolve

Information

The 3 signals of the torque connector are interpreted as the x-, y- and z-coordinates of a torque acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameB.Meaning
world Resolve input torque in world frame (= default)
frame_b Resolve input torque in frame_b
frame_resolve Resolve input torque in frame_resolve (frame_resolve must be connected)

If resolveInFrame = Types.ResolveInFrameB.frame_resolve, the torque coordinates are with respect to the frame, that is connected to frame_resolve.

If torque={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a torque of 100 N is acting along the positive x-axis of frame_b.

Note, the cut-force in frame_b (frame_b.f) is always set to zero. Conceptually, a force and torque acts on the world frame in such a way that the force and torque balance between world.frame_b and frame_b is fulfilled. For efficiency reasons, this reaction torque is, however, not computed.

This torque component is by default visualized as a double arrow acting at the connector to which it is connected. The diameter and color of the arrow can be defined via variables diameter and color. The double arrow points in the direction defined by the torque vector. The length of the double arrow is proportional to the length of the torque vector using parameter Nm_to_m as scaling factor. For example, if Nm_to_m = 100 Nm/m, then a torque of 350 Nm is displayed as an arrow of length 3.5 m.

An example how to use this model is given in the following figure:

This leads to the following animation

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialOneFrame_b (Base model for components providing one frame_b connector + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameBresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameB.​worldFrame in which input torque is resolved (1: world, 2: frame_b, 3: frame_resolve)
RealNm_to_mworld.​defaultNm_to_mTorque arrow scaling (length = torque/Nm_to_m)

Inputs

TypeNameDefaultDescription
Diameterdiameterworld.​defaultArrowDiameterDiameter of torque arrow
Colorcolor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_bframe_bCoordinate system fixed to the component with one cut-force and cut-torque
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame
input RealInputtorque[3]x-, y-, z-coordinates of torque resolved in frame defined by resolveInFrame

Model Modelica.​Mechanics.​MultiBody.​Forces.​WorldForceAndTorque
External force and torque acting at frame_b, defined by 3+3 input signals and resolved in frame world, frame_b or in frame_resolve

Information

The 3 signals of the force and torque connector are interpreted as the x-, y- and z-coordinates of a force and torque acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameB.Meaning
world Resolve input force and torque in world frame (= default)
frame_b Resolve input force and torque in frame_b
frame_resolve Resolve input force and torque in frame_resolve (frame_resolve must be connected)

If resolveInFrame = Types.ResolveInFrameB.frame_resolve, the force and torque coordinates are with respect to the frame, that is connected to frame_resolve.

If force={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a force of 100 N is acting along the positive x-axis of frame_b.

Conceptually, a force and torque acts on the world frame in such a way that the force and torque balance between world.frame_b and frame_b is fulfilled. For efficiency reasons, this reaction torque is, however, not computed.

The force and torque are by default visualized as an arrow (force) and as a double arrow (torque) acting at the connector to which they are connected. The diameters and colors of the arrows can be defined via variables forceDiameter, torqueDiameter, forceColor and torqueColor. The arrows point in the directions defined by the force and torque vectors. The lengths of the arrows are proportional to the length of the force and torque vectors, respectively, using parameters N_to_m and Nm_to_m as scaling factors. For example, if N_to_m = 100 N/m, then a force of 350 N is displayed as an arrow of length 3.5 m.

An example how to use this model is given in the following figure:

This leads to the following animation

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialOneFrame_b (Base model for components providing one frame_b connector + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameBresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameB.​worldFrame in which input force and torque are resolved (1: world, 2: frame_b, 3: frame_resolve)
RealN_to_mworld.​defaultN_to_mForce arrow scaling (length = force/N_to_m)
RealNm_to_mworld.​defaultNm_to_mTorque arrow scaling (length = torque/Nm_to_m)

Inputs

TypeNameDefaultDescription
DiameterforceDiameterworld.​defaultArrowDiameterDiameter of force arrow
DiametertorqueDiameterforceDiameterDiameter of torque arrow
ColorforceColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of force arrow
ColortorqueColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of torque arrow
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_bframe_bCoordinate system fixed to the component with one cut-force and cut-torque
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame
input RealInputforce[3]x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame
input RealInputtorque[3]x-, y-, z-coordinates of torque resolved in frame defined by resolveInFrame

Model Modelica.​Mechanics.​MultiBody.​Forces.​Force
Force acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

Information

The 3 signals of the force connector are interpreted as the x-, y- and z-coordinates of a force acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameAB.Meaning
world Resolve input force in world frame
frame_a Resolve input force in frame_a
frame_b Resolve input force in frame_b (= default)
frame_resolve Resolve input force in frame_resolve (frame_resolve must be connected)

If resolveInFrame = ResolveInFrameAB.frame_resolve, the force coordinates are with respect to the frame, that is connected to frame_resolve.

If force={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a force of 100 N is acting along the positive x-axis of frame_b.

Note, the cut-torque in frame_b (frame_b.t) is always set to zero. Additionally, a force and torque acts on frame_a in such a way that the force and torque balance between frame_a and frame_b is fulfilled.

An example how to use this model is given in the following figure:

This leads to the following animation (the yellow cylinder characterizes the line between frame_a and frame_b of the Force component, i.e., the force acts with negative sign also on the opposite side of this cylinder, but for clarity this is not shown in the animation):

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_bFrame in which input force is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)
RealN_to_mworld.​defaultN_to_mForce arrow scaling (length = force/N_to_m)

Inputs

TypeNameDefaultDescription
DiameterforceDiameterworld.​defaultArrowDiameterDiameter of force arrow
DiameterconnectionLineDiameterforceDiameterDiameter of line connecting frame_a and frame_b
ColorforceColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of force arrow
ColorconnectionLineColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of line connecting frame_a and frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame
input RealInputforce[3]x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame

Model Modelica.​Mechanics.​MultiBody.​Forces.​Torque
Torque acting between two frames, defined by 3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

Information

The 3 signals of the torque connector are interpreted as the x-, y- and z-coordinates of a torque acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameAB.Meaning
world Resolve input torque in world frame
frame_a Resolve input torque in frame_a
frame_b Resolve input torque in frame_b (= default)
frame_resolve Resolve input torque in frame_resolve (frame_resolve must be connected)

If resolveInFrame = ResolveInFrameAB.frame_resolve, the torque coordinates are with respect to the frame, that is connected to frame_resolve.

If torque={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a torque of 100 N.m is acting along the positive x-axis of frame_b.

Note, the cut-forces in frame_a and frame_b (frame_a.f, frame_b.f) are always set to zero and the cut-torque at frame_a (frame_a.t) is the same as the cut-torque at frame_b (frame_b.t) but with opposite sign.

An example how to use this model is given in the following figure:

This leads to the following animation (the yellow cylinder characterizes the line between frame_a and frame_b of the Torque component, i.e., the torque acts with negative sign also on the opposite side of this cylinder, but for clarity this is not shown in the animation):

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_bFrame in which input force is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)
RealNm_to_mworld.​defaultNm_to_mTorque arrow scaling (length = torque/Nm_to_m)

Inputs

TypeNameDefaultDescription
DiametertorqueDiameterworld.​defaultArrowDiameterDiameter of torque arrow
DiameterconnectionLineDiametertorqueDiameterDiameter of line connecting frame_a and frame_b
ColortorqueColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of torque arrow
ColorconnectionLineColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of line connecting frame_a and frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame
input RealInputtorque[3]x-, y-, z-coordinates of torque resolved in frame defined by resolveInFrame

Model Modelica.​Mechanics.​MultiBody.​Forces.​ForceAndTorque
Force and torque acting between two frames, defined by 3+3 input signals and resolved in frame world, frame_a, frame_b or frame_resolve

Information

The 3 signals of the force connector and the 3 signals of the torque connector are interpreted as the x-, y- and z-coordinates of a force and of a torque acting at the frame connector to which frame_b of this component is attached. Via parameter resolveInFrame it is defined, in which frame these coordinates shall be resolved:

Types.ResolveInFrameAB.Meaning
world Resolve input force/torque in world frame
frame_a Resolve input force/torque in frame_a
frame_b Resolve input force/torque in frame_b (= default)
frame_resolve Resolve input force/torque in frame_resolve (frame_resolve must be connected)

If resolveInFrame = ResolveInFrameAB.frame_resolve, the force and torque coordinates are with respect to the frame, that is connected to frame_resolve.

If force={100,0,0}, and for all parameters the default setting is used, then the interpretation is that a force of 100 N is acting along the positive x-axis of frame_b.

Note, a force and torque acts on frame_a in such a way that the force and torque balance between frame_a and frame_b is fulfilled.

An example how to use this model is given in the following figure:

This leads to the following animation (the yellow cylinder characterizes the line between frame_a and frame_b of the ForceAndTorque component, i.e., the force and torque acts with negative sign also on the opposite side of this cylinder, but for clarity this is not shown in the animation):

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
ResolveInFrameABresolveInFrameModelica.​Mechanics.​MultiBody.​Types.​ResolveInFrameAB.​frame_bFrame in which input force and torque are resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)
RealN_to_mworld.​defaultN_to_mForce arrow scaling (length = force/N_to_m)
RealNm_to_mworld.​defaultNm_to_mTorque arrow scaling (length = torque/Nm_to_m)

Inputs

TypeNameDefaultDescription
DiameterforceDiameterworld.​defaultArrowDiameterDiameter of force arrow
DiametertorqueDiameterforceDiameterDiameter of torque arrow
DiameterconnectionLineDiameterforceDiameterDiameter of line connecting frame_a and frame_b
ColorforceColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​ForceColorColor of force arrow
ColortorqueColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​TorqueColorColor of torque arrow
ColorconnectionLineColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of line connecting frame_a and frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
input RealInputforce[3]x-, y-, z-coordinates of force resolved in frame defined by resolveInFrame
input RealInputtorque[3]x-, y-, z-coordinates of torque resolved in frame defined by resolveInFrame
Frame_resolveframe_resolveThe input signals are optionally resolved in this frame

Model Modelica.​Mechanics.​MultiBody.​Forces.​LineForceWithMass
General line force component with an optional point mass on the connection line

Information

This component is used to exert a line force between the origin of frame_a and the origin of frame_b by attaching components of the 1-dimensional translational mechanical library of Modelica (Modelica.Mechanics.Translational) between the two flange connectors flange_a and flange_b. Optionally, there is a point mass on the line connecting the origin of frame_a and the origin of frame_b. This point mass approximates the mass of the force element. The distance of the point mass from frame_a as a fraction of the distance between frame_a and frame_b is defined via parameter lengthFraction (default is 0.5, i.e., the point mass is in the middle of the line).

In the translational library there is the implicit assumption that forces of components that have only one flange connector act with opposite sign on the bearings of the component. This assumption is also used in the LineForceWithMass component: If a connection is present to only one of the flange connectors, then the force in this flange connector acts implicitly with opposite sign also in the other flange connector.

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​LineForceBase (Base model for line force elements).

Parameters

TypeNameDefaultDescription
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)
BooleananimateLinetrue= true, if a line shape between frame_a and frame_b shall be visualized
BooleananimateMasstrue= true, if point mass shall be visualized as sphere provided m > 0
Massm0Mass of point mass on the connection line between the origin of frame_a and the origin of frame_b
ReallengthFraction0.5Location of point mass with respect to frame_a as a fraction of the distance from frame_a to frame_b
ShapeTypelineShapeType"cylinder"Type of shape visualizing the line from frame_a to frame_b
ShapeExtralineShapeExtra0Extra parameter for shape

Inputs

TypeNameDefaultDescription
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
LengthlineShapeWidthworld.​defaultArrowDiameterWidth of shape
LengthlineShapeHeightlineShapeWidthHeight of shape
ColorlineShapeColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SensorColorColor of line shape
RealmassDiameterworld.​defaultBodyDiameterDiameter of point mass sphere
ColormassColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​BodyColorColor of point mass

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
Flange_aflange_b1-dim. translational flange (connect force of Translational library between flange_a and flange_b)
Flange_bflange_a1-dim. translational flange (connect force of Translational library between flange_a and flange_b)

Model Modelica.​Mechanics.​MultiBody.​Forces.​LineForceWithTwoMasses
General line force component with two optional point masses on the connection line

Information

This component is used to exert a line force between the origin of frame_a and the origin of frame_b by attaching components of the 1-dimensional translational mechanical library of Modelica (Modelica.Mechanics.Translational) between the two flange connectors flange_a and flange_b. Optionally, there are two point masses on the line connecting the origin of frame_a and the origin of frame_b. These point masses approximate the masses of the force element. The locations of the two point masses are defined by their (fixed) distances of L_a relative to frame_a and of L_b relative to frame_b, respectively.

In example MultiBody.Examples.Elementary.LineForceWithTwoMasses the usage of this line force element is shown and is compared with an alternative implementation using a MultiBody.Joints.Assemblies.JointUPS component. The composition diagram of this example is displayed in the figure below.

The animation view at time = 0 is shown in the next figure. The system on the left side in the front is the animation with the LineForceWithTwoMasses component whereas the system on the right side in the back is the animation with the JointUPS component. Both implementations yield the same result. However, the implementation with the LineForceWithTwoMasses component is simpler.

In the translational library there is the implicit assumption that forces of components that have only one flange connector act with opposite sign on the bearings of the component. This assumption is also used in the LineForceWithTwoMasses component: If a connection is present to only one of the flange connectors, then the force in this flange connector acts implicitly with opposite sign also in the other flange connector.

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​LineForceBase (Base model for line force elements).

Parameters

TypeNameDefaultDescription
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)
Booleananimatetrue= true, if animation shall be enabled
BooleananimateMassestrue= true, if point masses shall be visualized provided animate=true and m_a, m_b > 0
Massm_a0Mass of point mass a on the connection line between the origin of frame_a and the origin of frame_b
Massm_b0Mass of point mass b on the connection line between the origin of frame_a and the origin of frame_b
PositionL_a0Distance between point mass a and frame_a (positive, if in direction of frame_b)
PositionL_bL_aDistance between point mass b and frame_b (positive, if in direction of frame_a)
LengthcylinderLength_a2 * L_aLength of cylinder at frame_a
LengthcylinderLength_b2 * L_bLength of cylinder at frame_b

Inputs

TypeNameDefaultDescription
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
DiametercylinderDiameter_aworld.​defaultForceWidthDiameter of cylinder at frame_a
Colorcolor_a[3]{155, 155, 155}Color of cylinder at frame_a
RealdiameterFraction0.8Diameter of cylinder at frame_b with respect to diameter of cylinder at frame_a
Colorcolor_b[3]{100, 100, 100}Color of cylinder at frame_b
RealmassDiameterFaction1.7Diameter of point mass spheres with respect to cylinderDiameter_a
ColormassColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​BodyColorColor of point masses

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
Flange_aflange_b1-dim. translational flange (connect force of Translational library between flange_a and flange_b)
Flange_bflange_a1-dim. translational flange (connect force of Translational library between flange_a and flange_b)

Model Modelica.​Mechanics.​MultiBody.​Forces.​Spring
Linear translational spring with optional mass

Information

Linear spring acting as line force between frame_a and frame_b. A force f is exerted on the origin of frame_b and with opposite sign on the origin of frame_a along the line from the origin of frame_a to the origin of frame_b according to the equation:

   f = c*(s - s_unstretched);

where "c" and "s_unstretched" are parameters and "s" is the distance between the origin of frame_a and the origin of frame_b.

Optionally, the mass of the spring is taken into account by a point mass located on the line between frame_a and frame_b (default: middle of the line). If the spring mass is zero, the additional equations to handle the mass are removed.

In the following figure a typical animation of the spring is shown. The blue sphere in the middle of the spring characterizes the location of the point mass.

model Examples.Elementary.SpringWithMass

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialTwoFrames (Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
BooleanshowMasstrue= true, if point mass shall be visualized as sphere if animation=true and m>0
TranslationalSpringConstantc Spring constant
Lengths_unstretched0Unstretched spring length
Massm0Spring mass located on the connection line between the origin of frame_a and the origin of frame_b
ReallengthFraction0.5Location of spring mass with respect to frame_a as a fraction of the distance from frame_a to frame_b (=0: at frame_a; =1: at frame_b)
IntegernumberOfWindings5Number of spring windings
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)

Inputs

TypeNameDefaultDescription
Distancewidthworld.​defaultForceWidthWidth of spring
DistancecoilWidth0.1 * widthWidth of spring coil
Colorcolor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SpringColorColor of spring
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
DiametermassDiametermax(0, (width - 2 * coilWidth) * (0.9))Diameter of mass point sphere
ColormassColor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​BodyColorColor of mass point

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque

Model Modelica.​Mechanics.​MultiBody.​Forces.​Damper
Linear (velocity dependent) damper

Information

Linear damper acting as line force between frame_a and frame_b. A force f is exerted on the origin of frame_b and with opposite sign on the origin of frame_a along the line from the origin of frame_a to the origin of frame_b according to the equation:

   f = d*der(s);

where "d" is a parameter, "s" is the distance between the origin of frame_a and the origin of frame_b and der(s) is the time derivative of "s".

In the following figure a typical animation is shown where a mass is hanging on a damper.

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialLineForce (Base model for massless line force elements) and Modelica.​Thermal.​HeatTransfer.​Interfaces.​PartialElementaryConditionalHeatPort (Partial model to include a conditional HeatPort in order to dissipate losses, used for textual modeling, i.e., for elementary models).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
TranslationalDampingConstantd Damping constant
Distancelength_aworld.​defaultForceLengthLength of cylinder at frame_a side
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)
BooleanuseHeatPortfalse=true, if heatPort is enabled
final TemperatureT293.15Fixed device temperature if useHeatPort = false

Inputs

TypeNameDefaultDescription
Diameterdiameter_aworld.​defaultForceWidthDiameter of cylinder at frame_a side
Diameterdiameter_b0.6 * diameter_aDiameter of cylinder at frame_b side
Colorcolor_a[3]{100, 100, 100}Color at frame_a
Colorcolor_b[3]{155, 155, 155}Color at frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
HeatPort_aheatPortOptional port to which dissipated losses are transported in form of heat

Model Modelica.​Mechanics.​MultiBody.​Forces.​SpringDamperParallel
Linear spring and linear damper in parallel

Information

Linear spring and linear damper in parallel acting as line force between frame_a and frame_b. A force f is exerted on the origin of frame_b and with opposite sign on the origin of frame_a along the line from the origin of frame_a to the origin of frame_b according to the equation:

   f = c*(s - s_unstretched) + d*der(s);

where "c", "s_unstretched" and "d" are parameters, "s" is the distance between the origin of frame_a and the origin of frame_b and der(s) is the time derivative of s.

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialLineForce (Base model for massless line force elements) and Modelica.​Thermal.​HeatTransfer.​Interfaces.​PartialElementaryConditionalHeatPort (Partial model to include a conditional HeatPort in order to dissipate losses, used for textual modeling, i.e., for elementary models).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
TranslationalSpringConstantc Spring constant
Lengths_unstretched0Unstretched spring length
TranslationalDampingConstantd0Damping constant
Distancelength_aworld.​defaultForceLengthLength of damper cylinder at frame_a side
IntegernumberOfWindings5Number of spring windings
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)
BooleanuseHeatPortfalse=true, if heatPort is enabled
final TemperatureT293.15Fixed device temperature if useHeatPort = false

Inputs

TypeNameDefaultDescription
Diameterdiameter_aworld.​defaultForceWidthDiameter of damper cylinder at frame_a side
Diameterdiameter_b0.6 * diameter_aDiameter of damper cylinder at frame_b side
Colorcolor_a[3]{100, 100, 100}Color of damper cylinder at frame_a
Colorcolor_b[3]{155, 155, 155}Color of damper cylinder at frame_b
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
Distancewidthworld.​defaultForceWidthWidth of spring
DistancecoilWidth0.1 * widthWidth of spring coil
Colorcolor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SpringColorColor of spring

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
HeatPort_aheatPortOptional port to which dissipated losses are transported in form of heat

Model Modelica.​Mechanics.​MultiBody.​Forces.​SpringDamperSeries
Linear spring and linear damper in series connection

Information

Linear spring and linear damper in series connection acting as line force between frame_a and frame_b:

  frame_a --> damper ----> spring --> frame_b
          |              |
          |-- s_damper --|  (s_damper is the state variable of this system)

A force f is exerted on the origin of frame_b and with opposite sign on the origin of frame_a along the line from the origin of frame_a to the origin of frame_b according to the equations:

   f = c*(s - s_unstretched - s_damper);
   f = d*der(s_damper);

where "c", "s_unstretched" and "d" are parameters, "s" is the distance between the origin of frame_a and the origin of frame_b. "s_damper" is the length of the damper (= an internal state of this force element) and der(s_damper) is the time derivative of s_damper.

Extends from Modelica.​Mechanics.​MultiBody.​Interfaces.​PartialLineForce (Base model for massless line force elements) and Modelica.​Thermal.​HeatTransfer.​Interfaces.​PartialElementaryConditionalHeatPort (Partial model to include a conditional HeatPort in order to dissipate losses, used for textual modeling, i.e., for elementary models).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
TranslationalSpringConstantc Spring constant
Lengths_unstretched0Unstretched spring length
TranslationalDampingConstantd0Damping constant
Lengths_damper_start0Initial length of damper
Distancelength_aworld.​defaultForceLengthLength of damper cylinder at frame_a side
IntegernumberOfWindings5Number of spring windings
Distances_small1e-10Prevent zero-division if distance between frame_a and frame_b is zero
BooleanfixedRotationAtFrame_afalse=true, if rotation frame_a.R is fixed (to directly connect line forces)
BooleanfixedRotationAtFrame_bfalse=true, if rotation frame_b.R is fixed (to directly connect line forces)
BooleanuseHeatPortfalse=true, if heatPort is enabled
final TemperatureT293.15Fixed device temperature if useHeatPort = false

Inputs

TypeNameDefaultDescription
Diameterdiameter_aworld.​defaultForceWidthDiameter of damper cylinder at frame_a side
Diameterdiameter_b0.6 * diameter_aDiameter of damper cylinder at damper-spring side
Colorcolor_a[3]{100, 100, 100}Color of damper cylinder at frame_a
Colorcolor_b[3]{155, 155, 155}Color of damper cylinder at damper-spring frame
SpecularCoefficientspecularCoefficientworld.​defaultSpecularCoefficientReflection of ambient light (= 0: light is completely absorbed)
Distancewidthworld.​defaultForceWidthWidth of spring
DistancecoilWidth0.1 * widthWidth of spring coil
Colorcolor[3]Modelica.​Mechanics.​MultiBody.​Types.​Defaults.​SpringColorColor of spring

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a fixed to the component with one cut-force and cut-torque
Frame_bframe_bCoordinate system b fixed to the component with one cut-force and cut-torque
HeatPort_aheatPortOptional port to which dissipated losses are transported in form of heat