---
url: /dyad/stable/stdlib/RotationalComponents/components/Sources.TorqueStep.md
description: Dyad Sources.TorqueStep docs.  Constant torque, not dependent on speed.
---

# `Sources.TorqueStep` {#Sources.TorqueStep}

Constant torque, not dependent on speed.

Model of a torque step at time startTime. Positive torque accelerates in positive direction of flange rotation.

This component extends from [`RotationalComponents.Interfaces.PartialTorque`](../types/Interfaces.PartialTorque.md)

## Usage {#Usage}

`RotationalComponents.Sources.TorqueStep(stepTorque=1.0, offsetTorque=0.0, startTime=0.0)`

## Parameters: {#Parameters:}

|           Name |                                                   Description | Units | Default value |
| --------------:| -------------------------------------------------------------:| -----:| -------------:|
|   `stepTorque` | Height of torque step (if negative, torque is acting as load) |   N.m |           1.0 |
| `offsetTorque` |                                              Offset of torque |   N.m |           0.0 |
|    `startTime` |                       Torque = offset for time < startTime |     s |           0.0 |

## Connectors {#Connectors}

* `spline` - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. ([`Spline`](/stdlib/Dyad/connectors/Spline#Spline))

* `support` - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. ([`Spline`](/stdlib/Dyad/connectors/Spline#Spline))

## Variables {#Variables}

|          Name |                                          Description | Units |
| -------------:| ----------------------------------------------------:| -----:|
| `phi_support` |                 Absolute angle of the support spline |   rad |
|         `phi` |              Angle of spline with respect to support |     – |
|         `tau` | Accelerating torque acting at spline (= -spline.tau) |   N.m |

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{support.phi}\left( t \right) &= \mathtt{phi_support}\left( t \right) \\
\mathtt{support.tau}\left( t \right) &=  - \mathtt{spline.tau}\left( t \right) \\
\mathtt{phi}\left( t \right) &=  - \mathtt{phi_support}\left( t \right) + \mathtt{spline.phi}\left( t \right) \\
\mathtt{tau}\left( t \right) &=  - \mathtt{spline.tau}\left( t \right) \\
\mathtt{tau}\left( t \right) &= ifelse\left( t < \mathtt{startTime}, 0, \mathtt{stepTorque} \right) + \mathtt{offsetTorque}
\end{align}
$$

## Source {#Source}

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

Model of a torque step at time startTime.
Positive torque accelerates in positive direction of flange rotation.
"""
component TorqueStep
  extends RotationalComponents.Interfaces.PartialTorque
  "Height of torque step (if negative, torque is acting as load)"
  parameter stepTorque::Torque = 1.0
  "Offset of torque"
  parameter offsetTorque::Torque = 0.0
  "Torque = offset for time < startTime"
  parameter startTime::Time = 0.0
  "Accelerating torque acting at spline (= -spline.tau)"
  variable tau::Torque
relations
  tau = -spline.tau
  tau = offsetTorque + ifelse(time < startTime, 0.0, stepTorque)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/TorqueStep.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
```

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

Model of a torque step at time startTime.
Positive torque accelerates in positive direction of flange rotation.
"""
component TorqueStep
  "Primary rotational shaft spline connector"
  spline = Spline() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support spline connector"
  support = Spline() {
    "Dyad": {
      "placement": {"icon": {"iconName": "support", "x1": 450, "y1": 950, "x2": 550, "y2": 1050}}
    }
  }
  "Absolute angle of the support spline"
  variable phi_support::Angle
  "Angle of spline with respect to support"
  variable phi::Real
  "Height of torque step (if negative, torque is acting as load)"
  parameter stepTorque::Torque = 1.0
  "Offset of torque"
  parameter offsetTorque::Torque = 0.0
  "Torque = offset for time < startTime"
  parameter startTime::Time = 0.0
  "Accelerating torque acting at spline (= -spline.tau)"
  variable tau::Torque
relations
  support.phi = phi_support
  support.tau = -spline.tau
  phi = spline.phi - phi_support
  tau = -spline.tau
  tau = offsetTorque + ifelse(time < startTime, 0.0, stepTorque)
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/TorqueStep.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Fixed`](Sources.TorqueStep.md)

  * [`Inertia`](Sources.TorqueStep.md)

  * [`TorqueStep`](Sources.TorqueStep.md)

  * [`TorqueStep`](Sources.TorqueStep.md)
