---
url: /dyad/dev/stdlib/TranslationalComponents/components/Components.Damper.md
description: >-
  Dyad Components.Damper docs.  Linear translational damper relating force to
  relative velocity.
---

# `Components.Damper` {#Components.Damper}

Linear translational damper relating force to relative velocity.

This component represents an ideal linear translational mechanical damper. The force `f` generated by the damper is proportional to the relative velocity `v_{rel}` between its two mechanical flanges. The constant of proportionality is the translational damping coefficient `d`. The force always acts to oppose the relative motion between the flanges. The component also calculates the instantaneous power `lossPower` dissipated by the damping action. The defining equations are:

$$f = d \cdot v\_{rel}$$

$$lossPower = f \cdot v\_{rel} = d \cdot v\_{rel}^2$$

This component extends from [`TranslationalComponents.Interfaces.PartialCompliantWithRelativeStates`](../types/Interfaces.PartialCompliantWithRelativeStates.md)

## Usage {#Usage}

`TranslationalComponents.Components.Damper(d)`

## Parameters: {#Parameters:}

| Name |                                                           Description | Units | Default value |
| ----:| ---------------------------------------------------------------------:| -----:| -------------:|
|  `d` | Translational damping coefficient relating force to relative velocity | N.s/m |               |

## Connectors {#Connectors}

* `flange_a` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

* `flange_b` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

## Variables {#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` |                                   Instantaneous power dissipated by the damper |     W |

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{s_rel}\left( t \right) &=  - \mathtt{flange_a.s}\left( t \right) + \mathtt{flange_b.s}\left( t \right) \\
\mathtt{v_rel}\left( t \right) &= \frac{\mathrm{d}\mathtt{s_rel}\left( t \right)}{\mathrm{d}t} \\
\mathtt{flange_b.f}\left( t \right) &= f\left( t \right) \\
\mathtt{flange_a.f}\left( t \right) &=  - f\left( t \right) \\
f\left( t \right) &= d ~ \mathtt{v_rel}\left( t \right) \\
\mathtt{lossPower}\left( t \right) &= f\left( t \right) ~ \mathtt{v_rel}\left( t \right)
\end{align}
$$

## Source {#Source}

````dyad
"""
Linear translational damper relating force to relative velocity.

This component represents an ideal linear translational mechanical damper.
The force `f` generated by the damper is proportional to the relative velocity `v_{rel}` between its two mechanical flanges.
The constant of proportionality is the translational damping coefficient `d`.
The force always acts to oppose the relative motion between the flanges.
The component also calculates the instantaneous power `lossPower` dissipated by the damping action.
The defining equations are:
```math
f = d \cdot v_{rel}
```
```math
lossPower = f \cdot v_{rel} = d \cdot v_{rel}^2
```
"""
component Damper
  extends TranslationalComponents.Interfaces.PartialCompliantWithRelativeStates
  "Translational damping coefficient relating force to relative velocity"
  parameter d::TranslationalDampingConstant(min = 0)
  "Instantaneous power dissipated by the damper"
  variable lossPower::Power
relations
  f = d * v_rel
  lossPower = f * v_rel
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/Damper.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 907, "rot": 0}]
  }
}
end
````

````dyad
"""
Linear translational damper relating force to relative velocity.

This component represents an ideal linear translational mechanical damper.
The force `f` generated by the damper is proportional to the relative velocity `v_{rel}` between its two mechanical flanges.
The constant of proportionality is the translational damping coefficient `d`.
The force always acts to oppose the relative motion between the flanges.
The component also calculates the instantaneous power `lossPower` dissipated by the damping action.
The defining equations are:
```math
f = d \cdot v_{rel}
```
```math
lossPower = f \cdot v_{rel} = d \cdot v_{rel}^2
```
"""
component Damper
  "Left mechanical translational flange (connector)"
  flange_a = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Right mechanical translational flange (connector)"
  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(statePriority = 50)
  "Relative velocity between flange_b and flange_a, defined as der(s_rel)."
  variable v_rel::Velocity(statePriority = 50)
  "Internal force exerted by the compliant element between the flanges."
  variable f::Dyad.Force
  "Translational damping coefficient relating force to relative velocity"
  parameter d::TranslationalDampingConstant(min = 0)
  "Instantaneous power dissipated by the damper"
  variable lossPower::Power
relations
  s_rel = flange_b.s - flange_a.s
  v_rel = der(s_rel)
  flange_b.f = f
  flange_a.f = -f
  f = d * v_rel
  lossPower = f * v_rel
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/Damper.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 907, "rot": 0}]
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`AllComponents`](Components.Damper.md)

  * [`MassDamperSpringFixed`](Components.Damper.md)
