Skip to content
SpringDamper.md

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:

fc=c⋅(srel−srel0)

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:

fd=dâ‹…vrel

where d is the damping constant. The total force exerted by the component is:

f=fc+fd

Power dissipated by the damper is calculated as:

lossPower=fdâ‹…vrel

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: ​

NameDescriptionUnitsDefault value
cSpring constant defining the stiffness of the spring elementN/m
dDamping constant defining the viscous friction of the damper elementN.s/m
s_rel0Unstretched spring lengthm

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 ​

NameDescriptionUnits
s_relRelative displacement between flange_b and flange_a (flange_b.s - flange_a.s).m
v_relRelative velocity between flange_b and flange_a, defined as der(s_rel).m/s
fInternal force exerted by the compliant element between the flanges.N
lossPowerPower dissipated by the damper element due to viscous frictionW
f_cForce exerted by the spring elementN
f_dForce exerted by the damper elementN

Behavior ​

s_rel(t)=flange_b.s(t)−flange_a.s(t)v_rel(t)=ds_rel(t)dtflange_b.f(t)=f(t)flange_a.f(t)=−f(t)f_c(t)=c(−s_rel0+s_rel(t))f_d(t)=dv_rel(t)f(t)=f_c(t)+f_d(t)lossPower(t)=v_rel(t)f_d(t)

Source ​

dyad
"""
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"}}
}
end
Flattened Source
dyad
"""
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"}}
}
end


Test Cases ​

No test cases defined.

  • Examples

  • Experiments

  • Analyses