WOLFRAM SYSTEMMODELER

Spring

Linear translational spring with optional mass

Diagram

Wolfram Language

In[1]:=
Click for copyable input
SystemModel["Modelica.Mechanics.MultiBody.Forces.Spring"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

Connectors (2)

frame_a

Type: Frame_a

Description: Coordinate system fixed to the component with one cut-force and cut-torque

frame_b

Type: Frame_b

Description: Coordinate system fixed to the component with one cut-force and cut-torque

Parameters (9)

animation

Value: true

Type: Boolean

Description: = true, if animation shall be enabled

showMass

Value: true

Type: Boolean

Description: = true, if point mass shall be visualized as sphere if animation=true and m>0

c

Value:

Type: TranslationalSpringConstant (N/m)

Description: Spring constant

s_unstretched

Value: 0

Type: Length (m)

Description: Unstretched spring length

m

Value: 0

Type: Mass (kg)

Description: Spring mass located on the connection line between the origin of frame_a and the origin of frame_b

lengthFraction

Value: 0.5

Type: Real

Description: Location 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)

numberOfWindings

Value: 5

Type: Integer

Description: Number of spring windings

fixedRotationAtFrame_a

Value: false

Type: Boolean

Description: =true, if rotation frame_a.R is fixed (to directly connect line forces)

fixedRotationAtFrame_b

Value: false

Type: Boolean

Description: =true, if rotation frame_b.R is fixed (to directly connect line forces)

Components (3)

world

Type: World

Description:

lineForce

Type: LineForceWithMass

Description:

spring

Type: Spring

Description:

Used in Examples (13)

FreeBody

Free flying body attached by two springs to environment

InitSpringConstant

Determine spring constant such that system is in steady state at given position

PendulumWithSpringDamper

Simple spring/damper/mass system

PointGravityWithPointMasses

Two point masses in a point gravity field (rotation of bodies is neglected)

SpringDamperSystem

Simple spring/damper/mass system

SpringMassSystem

Mass attached with a spring to the world frame

SpringWithMass

Point mass hanging on a spring

ThreeSprings

3-dim. springs in series and parallel connection

HeatLosses

Demonstrate the modeling of heat losses

PrismaticConstraint

Body attached by one spring and two prismatic joints or constrained to environment

RevoluteConstraint

Body attached by one spring and revolute joint or constrained to environment

SphericalConstraint

Body attached by one spring and spherical joint or constrained to environment

UniversalConstraint

Body attached by one spring and universal joint or constrained to environment