Spring
Linear translational spring with optional mass
Library
Modelica/Mechanics/MultiBody/Forces
Description
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 signon the origin of frame_a along the line from the origin of frame_a to the originof frame_b according to the equation:
f = c*(s - s_unstretched);
where "c" and "s_unstretched" are parameters and "s" is thedistance between the origin of frame_a and the origin of frame_b.
Optionally, the mass of the spring is taken into account by apoint mass located on the line between frame_a and frame_b(default: middle of the line). If the spring mass is zero, theadditional equations to handle the mass are removed.
In the following figure a typical animation of thespring is shown. The blue sphere in the middle of thespring characterizes the location of the point mass.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_animation | animation | = true, if animation shall be enabled | Scalar | true |
mo_showMass | showMass | = true, if point mass shall be visualized as sphere if animation=true and m>0 | Scalar | true |
mo_c | c | Spring constant | Scalar | |
mo_s_unstretched | s_unstretched | Unstretched spring length | Scalar | |
mo_m | m | Spring mass located on the connection line between the origin of frame_a and the origin of frame_b | Scalar | |
mo_lengthFraction | lengthFraction | 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) | Scalar |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_width | width | Width of spring | Scalar | |
mo_coilWidth | coilWidth | Width of spring coil | Scalar | |
mo_numberOfWindings | numberOfWindings | Number of spring windings | Scalar | |
mo_color | color | Color of spring | Vector of size 3 | |
mo_specularCoefficient | specularCoefficient | Reflection of ambient light (= 0: light is completely absorbed) | Scalar | |
mo_massDiameter | massDiameter | Diameter of mass point sphere | Scalar | |
mo_massColor | massColor | Color of mass point | Vector of size 3 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_s_small | s_small | Prevent zero-division if distance between frame_a and frame_b is zero | Scalar | |
mo_fixedRotationAtFrame_a | fixedRotationAtFrame_a | =true, if rotation frame_a.R is fixed (to directly connect line forces) | Scalar | true |
mo_fixedRotationAtFrame_b | fixedRotationAtFrame_b | =true, if rotation frame_b.R is fixed (to directly connect line forces) | Scalar | true |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | 'r_rel_a' | |
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
frame_a | implicit | Coordinate system a fixed to the component with one cut-force and cut-torque | input | 1 |
frame_b | implicit | Coordinate system b fixed to the component with one cut-force and cut-torque | output | 1 |