A linear spring in 3 degrees of freedom.
This is a SimObject representing a linear spring in three degrees of freedom. The tension in the spring is found from the following relations:
\begin{eqnarray*}
\vec{f^A} &=& T \frac{\vec{l}}{L} \\
\vec{f^B} &=& -\vec{f^A} \\
T &=& k(L_0-L) \\
\vec{l} &=& p^B-p^A \\
L &=& ||\vec{l}||
\end{eqnarray*}
,
where
- \(T\) is the spring tension
- \(k\) is the spring stiffness
- \(L_0\) is the unstretched length of the spring
- \(L\) is the current length of the spring
- \(\vec{f^A}\) is the force from the spring on the end point A
- \(\vec{f^B}\) is the force from the spring on the end point B
- \(\vec{p^A}\) is the position of the end point A
- \(\vec{p^B}\) is the position of the end point B
- \(\vec{l}\) is the vector from the end A to the end B.
This spring also takes compression forces.
- Author
- Karl-Johan Reite
- Date
- 01.01.2006 KJR: Initial version.
Example configuration excerpt
<Lib
LibName = "fhsim_base"
SimObject = "Cable/LinearSpring"
Name = "M"
Stiffness = "10"
RelaxedLength = "10"
/>
...
<Connection
M.PosA="0,0,0"
M.PosB="0,0,5"
/>
Input Ports
Name | Width | Description |
PosA | 3 | The position of end A. |
PosB | 3 | The position of end B. |
Output Ports
Name | Width | Description |
ForceA | 3 | The spring force from end A. |
ForceB | 3 | The spring force from end B. |
PosA | 3 | The position of end A. |
PosB | 3 | The position of end B. |
Configuration parameters
Name | Width | Description |
Stiffness | 1 | The stiffness of the spring. |
RelaxedLength | 1 | The length of the spring when its tension is zero. |
Initial conditions
This SimObject contains no initial conditions.
Full example file
<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Cable/LinearSpring"
Name="M"
Stiffness="10"
RelaxedLength="10"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
M.PosA="0,0,0"
M.PosB="0,0,5"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 1, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>
This SimObject is referred to as Cable/LinearSpring