---
url: /dyad/stable/stdlib/TranslationalComponents/components/Sources.Force.md
description: >-
  Dyad Sources.Force docs.  An ideal force source that applies equal and
  opposite forces to two translational mechanical flanges, controlled by an
  external signal.
---

# `Sources.Force` {#Sources.Force}

An ideal force source that applies equal and opposite forces to two translational mechanical flanges, controlled by an external signal.

This component models an ideal source of force acting between its two translational mechanical flanges, `flange_a` and `flange_b` (inherited from `PartialTwoFlanges`). The magnitude and direction of the force are determined by the external input signal `f`. The input `f` directly defines the force exerted by `flange_a` on the connected component. The core behavior is defined by the equations relating the flange forces to the input signal $f$ :

$$flange_a.f = f \\
flange_b.f = -f$$

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

## Usage {#Usage}

`TranslationalComponents.Sources.Force()`

## 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))

* `f` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{flange_a.f}\left( t \right) &= f\left( t \right) \\
\mathtt{flange_b.f}\left( t \right) &=  - f\left( t \right)
\end{align}
$$

## Source {#Source}

````dyad
"""
An ideal force source that applies equal and opposite forces to two translational mechanical flanges, controlled by an external signal.

This component models an ideal source of force acting between its two translational mechanical flanges, `flange_a` and `flange_b` (inherited from `PartialTwoFlanges`).
The magnitude and direction of the force are determined by the external input signal `f`. The input `f` directly defines the force exerted by `flange_a` on the connected component.
The core behavior is defined by the equations relating the flange forces to the input signal $f$ :
```math
flange\_a.f = f \\
flange\_b.f = -f
```
"""
component Force
  extends TranslationalComponents.Interfaces.PartialTwoFlanges
  "The external input signal defining the force magnitude and direction applied by flange_a; flange_b applies -f."
  f = RealInput(units = "N") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": 177, "x2": 550, "y2": 277, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
relations
  flange_a.f = f
  flange_b.f = -f
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/Force.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 774, "rot": 0}]
  }
}
end
````

````dyad
"""
An ideal force source that applies equal and opposite forces to two translational mechanical flanges, controlled by an external signal.

This component models an ideal source of force acting between its two translational mechanical flanges, `flange_a` and `flange_b` (inherited from `PartialTwoFlanges`).
The magnitude and direction of the force are determined by the external input signal `f`. The input `f` directly defines the force exerted by `flange_a` on the connected component.
The core behavior is defined by the equations relating the flange forces to the input signal $f$ :
```math
flange\_a.f = f \\
flange\_b.f = -f
```
"""
component Force
  "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}}}}
  "The external input signal defining the force magnitude and direction applied by flange_a; flange_b applies -f."
  f = RealInput(units = "N") {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": 177, "x2": 550, "y2": 277, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
relations
  flange_a.f = f
  flange_b.f = -f
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/Force.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 774, "rot": 0}]
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`AllComponents`](Sources.Force.md)

  * [`RelativeSensors`](Sources.Force.md)

  * [`Sensors`](Sources.Force.md)
