---
url: /dyad/stable/stdlib/TranslationalComponents/components/Sources.ForceStep.md
description: Dyad Sources.ForceStep docs.  Force step at a given time.
---

# `Sources.ForceStep` {#Sources.ForceStep}

Force step at a given time.

Model of a force step at time `startTime`. Positive force accelerates in positive direction of flange translation. The force is:

$$f = -offsetForce - \begin{cases} 0 & \text{if } t < startTime \\\ stepForce & \text{otherwise} \end{cases}$$

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

## Usage {#Usage}

`TranslationalComponents.Sources.ForceStep(stepForce=1.0, offsetForce=0.0, startTime=0.0)`

## Parameters: {#Parameters:}

|          Name |                                                 Description | Units | Default value |
| -------------:| -----------------------------------------------------------:| -----:| -------------:|
|   `stepForce` | Height of force step (if negative, force is acting as load) |     N |           1.0 |
| `offsetForce` |                                             Offset of force |     N |           0.0 |
|   `startTime` |                      Force = offset for time < startTime |     s |           0.0 |

## 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) &=  - ifelse\left( t < \mathtt{startTime}, 0, \mathtt{stepForce} \right) - \mathtt{offsetForce}
\end{align}
$$

## Source {#Source}

````dyad
"""
Force step at a given time.

Model of a force step at time `startTime`. Positive force accelerates in positive
direction of flange translation. The force is:
```math
f = -offsetForce - \\begin{cases} 0 & \\text{if } t < startTime \\\\ stepForce & \\text{otherwise} \\end{cases}
```
"""
component ForceStep
  extends TranslationalComponents.Interfaces.PartialForce
  "Height of force step (if negative, force is acting as load)"
  parameter stepForce::Dyad.Force = 1.0
  "Offset of force"
  parameter offsetForce::Dyad.Force = 0.0
  "Force = offset for time < startTime"
  parameter startTime::Time = 0.0
relations
  f = -offsetForce - ifelse(time < startTime, 0.0, stepForce)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/ForceStep.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1204, "rot": 0}]
  }
}
end
````

````dyad
"""
Force step at a given time.

Model of a force step at time `startTime`. Positive force accelerates in positive
direction of flange translation. The force is:
```math
f = -offsetForce - \\begin{cases} 0 & \\text{if } t < startTime \\\\ stepForce & \\text{otherwise} \\end{cases}
```
"""
component ForceStep
  "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
  "Height of force step (if negative, force is acting as load)"
  parameter stepForce::Dyad.Force = 1.0
  "Offset of force"
  parameter offsetForce::Dyad.Force = 0.0
  "Force = offset for time < startTime"
  parameter startTime::Time = 0.0
relations
  s = flange.s - support.s
  support.f = -flange.f
  f = flange.f
  f = -offsetForce - ifelse(time < startTime, 0.0, stepForce)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://TranslationalComponents/ForceStep.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
