SpringDamper ​
Models a linear translational spring and a linear translational damper connected in parallel.
This component describes the behavior of an ideal translational spring and an ideal translational viscous damper that are arranged in parallel. The total force f generated by the component is the sum of the force from the spring f_c and the force from the damper f_d. The relative displacement across the component is s_rel and the relative velocity is v_rel. The spring force is determined by Hooke's Law:
where c is the spring constant and s_rel0 is the value of s_rel at which the spring is relaxed (exerts no force). The damper force is proportional to the relative velocity:
where d is the damping constant. The total force exerted by the component is:
Power dissipated by the damper is calculated as:
The component typically inherits s_rel, v_rel, and f from a base class like PartialCompliantWithRelativeStates.
This component extends from PartialCompliantWithRelativeStates
Usage ​
TranslationalComponents.SpringDamper(c, d, s_rel0)
Parameters: ​
| Name | Description | Units | Default value |
|---|---|---|---|
c | Spring constant defining the stiffness of the spring element | N/m | |
d | Damping constant defining the viscous friction of the damper element | N.s/m | |
s_rel0 | Unstretched spring length | m |
Connectors ​
flange_a- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)flange_b- This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. (Flange)
Variables ​
| Name | Description | Units |
|---|---|---|
s_rel | Relative displacement between flange_b and flange_a (flange_b.s - flange_a.s). | m |
v_rel | Relative velocity between flange_b and flange_a, defined as der(s_rel). | m/s |
f | Internal force exerted by the compliant element between the flanges. | N |
lossPower | Power dissipated by the damper element due to viscous friction | W |
f_c | Force exerted by the spring element | N |
f_d | Force exerted by the damper element | N |
Behavior ​
Source ​
"""
Models a linear translational spring and a linear translational damper connected in parallel.
This component describes the behavior of an ideal translational spring and an ideal translational viscous damper
that are arranged in parallel. The total force `f` generated by the component is the sum of the force from the
spring `f_c` and the force from the damper `f_d`. The relative displacement across the component is `s_rel`
and the relative velocity is `v_rel`.
The spring force is determined by Hooke's Law:math f_c = c \cdot (s_{rel} - s_{rel0})
where `c` is the spring constant and `s_rel0` is the value of `s_rel` at which the spring is relaxed (exerts no force).
The damper force is proportional to the relative velocity:math f_d = d \cdot v_
where `d` is the damping constant.
The total force exerted by the component is:math f = f_c + f_d
Power dissipated by the damper is calculated as:math lossPower = f_d \cdot v_
The component typically inherits `s_rel`, `v_rel`, and `f` from a base class like `PartialCompliantWithRelativeStates`.
"""
component SpringDamper
extends PartialCompliantWithRelativeStates
"Spring constant defining the stiffness of the spring element"
parameter c::TranslationalSpringConstant
"Damping constant defining the viscous friction of the damper element"
parameter d::TranslationalDampingConstant
"Unstretched spring length"
parameter s_rel0::Length
"Power dissipated by the damper element due to viscous friction"
variable lossPower::Power
"Force exerted by the spring element"
variable f_c::Dyad.Force
"Force exerted by the damper element"
variable f_d::Dyad.Force
relations
f_c = c * (s_rel - s_rel0)
f_d = d * v_rel
f = f_c + f_d
lossPower = f_d * v_rel
metadata {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/SpringDamper.svg"}}
}
endFlattened Source
"""
Models a linear translational spring and a linear translational damper connected in parallel.
This component describes the behavior of an ideal translational spring and an ideal translational viscous damper
that are arranged in parallel. The total force `f` generated by the component is the sum of the force from the
spring `f_c` and the force from the damper `f_d`. The relative displacement across the component is `s_rel`
and the relative velocity is `v_rel`.
The spring force is determined by Hooke's Law:math f_c = c \cdot (s_{rel} - s_{rel0})
where `c` is the spring constant and `s_rel0` is the value of `s_rel` at which the spring is relaxed (exerts no force).
The damper force is proportional to the relative velocity:math f_d = d \cdot v_
where `d` is the damping constant.
The total force exerted by the component is:math f = f_c + f_d
Power dissipated by the damper is calculated as:math lossPower = f_d \cdot v_
The component typically inherits `s_rel`, `v_rel`, and `f` from a base class like `PartialCompliantWithRelativeStates`.
"""
component SpringDamper
"Port for the first mechanical translational flange."
flange_a = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
"Port for the second mechanical translational flange."
flange_b = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
"Relative displacement between flange_b and flange_a (flange_b.s - flange_a.s)."
variable s_rel::Distance
"Relative velocity between flange_b and flange_a, defined as der(s_rel)."
variable v_rel::Velocity
"Internal force exerted by the compliant element between the flanges."
variable f::Dyad.Force
"Spring constant defining the stiffness of the spring element"
parameter c::TranslationalSpringConstant
"Damping constant defining the viscous friction of the damper element"
parameter d::TranslationalDampingConstant
"Unstretched spring length"
parameter s_rel0::Length
"Power dissipated by the damper element due to viscous friction"
variable lossPower::Power
"Force exerted by the spring element"
variable f_c::Dyad.Force
"Force exerted by the damper element"
variable f_d::Dyad.Force
relations
s_rel = flange_b.s - flange_a.s
v_rel = der(s_rel)
flange_b.f = f
flange_a.f = -f
f_c = c * (s_rel - s_rel0)
f_d = d * v_rel
f = f_c + f_d
lossPower = f_d * v_rel
metadata {
"Dyad": {"icons": {"default": "dyad://TranslationalComponents/SpringDamper.svg"}}
}
endTest Cases ​
No test cases defined.
Related ​
Examples
Experiments
Analyses