Spring
IconSpring
Ideal linear rotational spring.
This component models an ideal linear rotational spring. The torque tau
generated by the spring is proportional to the difference between the relative angle of rotation phi_rel
across its flanges and its unstretched angle phi_rel0
. The constant of proportionality is the spring constant c
. The relationship is defined by Hooke's law for rotational systems:
\[\tau = c (\\phi_{rel} - \\phi_{rel0})\]
Usage
Spring(c, phi_rel0=0.0)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
c | Spring constant | N.m/rad | |
phi_rel0 | Unstretched spring angle | rad | 0 |
Connectors
spline_a
- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline
)spline_b
- This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline
)
Variables
Name | Description | Units |
---|---|---|
phi_rel | Relative rotation angle between splineb and splinea | rad |
tau | Torque transmitted between the splines | N.m |
Behavior
\[ \begin{align} \mathtt{phi\_rel}\left( t \right) &= \mathtt{spline\_b.phi}\left( t \right) - \mathtt{spline\_a.phi}\left( t \right) \\ \mathtt{spline\_b.tau}\left( t \right) &= \mathtt{tau}\left( t \right) \\ \mathtt{spline\_a.tau}\left( t \right) &= - \mathtt{tau}\left( t \right) \\ \mathtt{tau}\left( t \right) &= c \left( - \mathtt{phi\_rel0} + \mathtt{phi\_rel}\left( t \right) \right) \end{align} \]
Source
# Ideal linear rotational spring.
#
# This component models an ideal linear rotational spring.
# The torque `tau` generated by the spring is proportional to the
# difference between the relative angle of rotation `phi_rel`
# across its flanges and its unstretched angle `phi_rel0`.
# The constant of proportionality is the spring constant `c`.
# The relationship is defined by Hooke's law for rotational systems:
# ```math
# \tau = c (\\phi_{rel} - \\phi_{rel0})
# ```
component Spring
extends PartialCompliant
# Spring constant
parameter c::RotationalSpringConstant
# Unstretched spring angle
parameter phi_rel0::Angle = 0.0
relations
tau = c*(phi_rel-phi_rel0)
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/Spring.svg"}}}
end
Flattened Source
# Ideal linear rotational spring.
#
# This component models an ideal linear rotational spring.
# The torque `tau` generated by the spring is proportional to the
# difference between the relative angle of rotation `phi_rel`
# across its flanges and its unstretched angle `phi_rel0`.
# The constant of proportionality is the spring constant `c`.
# The relationship is defined by Hooke's law for rotational systems:
# ```math
# \tau = c (\\phi_{rel} - \\phi_{rel0})
# ```
component Spring
# First rotational spline interface
spline_a = Spline() [{"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}]
# Second rotational spline interface
spline_b = Spline() [{"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}]
# Relative rotation angle between spline_b and spline_a
variable phi_rel::Angle
# Torque transmitted between the splines
variable tau::Torque
# Spring constant
parameter c::RotationalSpringConstant
# Unstretched spring angle
parameter phi_rel0::Angle = 0.0
relations
phi_rel = spline_b.phi-spline_a.phi
spline_b.tau = tau
spline_a.tau = -tau
tau = c*(phi_rel-phi_rel0)
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/Spring.svg"}}}
end
Test Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests