---
url: /dyad/stable/stdlib/TranslationalComponents/components/Sources.LinearSpeedDependentForce.md
description: >-
  Dyad Sources.LinearSpeedDependentForce docs.  Linear dependency of force
  versus speed.
---

# `Sources.LinearSpeedDependentForce` {#Sources.LinearSpeedDependentForce}

Linear dependency of force versus speed.

Model of force, linearly dependent on velocity of flange. Parameter `ForceDirection` chooses whether the direction of force is the same in both directions of movement or not.

When `ForceDirection = true`:

$$f = -f\_{nominal} \cdot \left|\frac{v}{v\_{nominal}}\right|$$

When `ForceDirection = false`:

$$f = -f\_{nominal} \cdot \frac{v}{v\_{nominal}}$$

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

## Usage {#Usage}

`TranslationalComponents.Sources.LinearSpeedDependentForce(f_nominal, v_nominal)`

## Parameters: {#Parameters:}

|             Name |                                                                          Description | Units | Default value |
| ----------------:| ------------------------------------------------------------------------------------:| -----:| -------------:|
| `ForceDirection` |                                 Same direction of force in both directions of motion |     – |          true |
|      `f_nominal` | Nominal force (if negative, force is acting as load in positive direction of motion) |     N |               |
|      `v_nominal` |                                                                        Nominal speed |   m/s |               |

## Connectors {#Connectors}

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

* `support` - 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` | Distance between flange and support (= flange.s - support.s) |     m |
|  `f` |             Accelerating force acting at flange (= flange.f) |     N |
|  `v` |        Velocity of flange with respect to support (= der(s)) |   m/s |

## Behavior {#Behavior}

$$ \begin{align}
s\left( t \right) &= \mathtt{flange.s}\left( t \right) - \mathtt{support.s}\left( t \right) \\
\mathtt{support.f}\left( t \right) &=  - \mathtt{flange.f}\left( t \right) \\
f\left( t \right) &= \mathtt{flange.f}\left( t \right) \\
v\left( t \right) &= \frac{\mathrm{d}s\left( t \right)}{\mathrm{d}t} \\
f\left( t \right) &=  - \left|\frac{v\left( t \right)}{\mathtt{v_nominal}}\right| ~ \mathtt{f_nominal}
\end{align}
$$

## Source {#Source}

````dyad
"""
Linear dependency of force versus speed.

Model of force, linearly dependent on velocity of flange. Parameter `ForceDirection`
chooses whether the direction of force is the same in both directions of movement or not.

When `ForceDirection = true`:
```math
f = -f_{nominal} \\cdot \\left|\\frac{v}{v_{nominal}}\\right|
```
When `ForceDirection = false`:
```math
f = -f_{nominal} \\cdot \\frac{v}{v_{nominal}}
```
"""
component LinearSpeedDependentForce
  extends TranslationalComponents.Interfaces.PartialForce
  "Nominal force (if negative, force is acting as load in positive direction of motion)"
  parameter f_nominal::Dyad.Force
  "Same direction of force in both directions of motion"
  structural parameter ForceDirection::Boolean = true
  "Nominal speed"
  parameter v_nominal::Velocity(min = eps(Float64))
  "Velocity of flange with respect to support (= der(s))"
  variable v::Velocity
relations
  v = der(s)
  if ForceDirection
    f = -f_nominal * abs(v / v_nominal)
  else
    f = -f_nominal * (v / v_nominal)
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/LinearSpeedDependentForce.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1204, "rot": 0}]
  }
}
end
````

````dyad
"""
Linear dependency of force versus speed.

Model of force, linearly dependent on velocity of flange. Parameter `ForceDirection`
chooses whether the direction of force is the same in both directions of movement or not.

When `ForceDirection = true`:
```math
f = -f_{nominal} \\cdot \\left|\\frac{v}{v_{nominal}}\\right|
```
When `ForceDirection = false`:
```math
f = -f_{nominal} \\cdot \\frac{v}{v_{nominal}}
```
"""
component LinearSpeedDependentForce
  "Flange of component"
  flange = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support/housing of component"
  support = Flange() {"Dyad": {"placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050}}}}
  "Distance between flange and support (= flange.s - support.s)"
  variable s::Length
  "Accelerating force acting at flange (= flange.f)"
  variable f::Dyad.Force
  "Nominal force (if negative, force is acting as load in positive direction of motion)"
  parameter f_nominal::Dyad.Force
  "Same direction of force in both directions of motion"
  structural parameter ForceDirection::Boolean = true
  "Nominal speed"
  parameter v_nominal::Velocity(min = eps(Float64))
  "Velocity of flange with respect to support (= der(s))"
  variable v::Velocity
relations
  s = flange.s - support.s
  support.f = -flange.f
  f = flange.f
  v = der(s)
  if ForceDirection
    f = -f_nominal * abs(v / v_nominal)
  else
    f = -f_nominal * (v / v_nominal)
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/LinearSpeedDependentForce.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1204, "rot": 0}]
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`TestBraking`](Sources.LinearSpeedDependentForce.md)
