---
url: /dyad/stable/stdlib/TranslationalComponents/components/Sources.ConstantForce.md
description: Dyad Sources.ConstantForce docs.  Constant force, not dependent on speed.
---

# `Sources.ConstantForce` {#Sources.ConstantForce}

Constant force, not dependent on speed.

Model of constant force, not dependent on velocity of flange. Positive force accelerates in positive direction of movement, but brakes in reverse direction of movement. Negative force brakes in positive direction of movement, but accelerates in reverse direction of movement.

The equation is:

$$f = -f\_{constant}$$

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

## Usage {#Usage}

`TranslationalComponents.Sources.ConstantForce(f_constant)`

## Parameters: {#Parameters:}

|         Name |                                                                          Description | Units | Default value |
| ------------:| ------------------------------------------------------------------------------------:| -----:| -------------:|
| `f_constant` | Nominal force (if negative, force is acting as load in positive direction of motion) |     N |               |

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

## 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) \\
f\left( t \right) &=  - \mathtt{f_constant}
\end{align}
$$

## Source {#Source}

````dyad
"""
Constant force, not dependent on speed.

Model of constant force, not dependent on velocity of flange.
Positive force accelerates in positive direction of movement, but brakes in
reverse direction of movement. Negative force brakes in positive direction
of movement, but accelerates in reverse direction of movement.

The equation is:
```math
f = -f_{constant}
```
"""
component ConstantForce
  extends TranslationalComponents.Interfaces.PartialForce
  "Nominal force (if negative, force is acting as load in positive direction of motion)"
  parameter f_constant::Dyad.Force
relations
  f = -f_constant
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/ConstantForce.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1204, "rot": 0}]
  }
}
end
````

````dyad
"""
Constant force, not dependent on speed.

Model of constant force, not dependent on velocity of flange.
Positive force accelerates in positive direction of movement, but brakes in
reverse direction of movement. Negative force brakes in positive direction
of movement, but accelerates in reverse direction of movement.

The equation is:
```math
f = -f_{constant}
```
"""
component ConstantForce
  "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_constant::Dyad.Force
relations
  s = flange.s - support.s
  support.f = -flange.f
  f = flange.f
  f = -f_constant
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/ConstantForce.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.ConstantForce.md)
