Skip to content
LIBRARY
Sources.Torque2.md

Sources.Torque2

Input signal acting as torque on two splines.

The input signal tau defines an external torque in [Nm] which acts at both spline connectors, i.e., the components connected to these splines are driven by torque tau. A positive value accelerates spline_a and decelerates spline_b.

The equations are:

spline_a.τ=τspline_b.τ=τ

This component extends from RotationalComponents.Interfaces.PartialTwoSplines

Usage

RotationalComponents.Sources.Torque2()

Connectors

  • spline_a - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • spline_b - This connector represents a rotational spline with angle and torque as the potential and flow variables, respectively. (Spline)

  • tau - This connector represents a real signal as an input to a component (RealInput)

Behavior

julia
using RotationalComponents #hide
using ModelingToolkit #hide
@named sys = RotationalComponents.Sources.Torque2() #hide
full_equations(sys) #hide
<< @example-block not executed in draft mode >>

Source

dyad
"""
Input signal acting as torque on two splines.

The input signal `tau` defines an external torque in [Nm] which acts at both spline connectors,
i.e., the components connected to these splines are driven by torque `tau`.
A positive value accelerates `spline_a` and decelerates `spline_b`.

The equations are:
```math
spline\_a.\tau = \tau
```
```math
spline\_b.\tau = -\tau
```
"""
component Torque2
  extends RotationalComponents.Interfaces.PartialTwoSplines
  "Torque driving the two splines (a positive value accelerates spline_a)"
  tau = RealInput() {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
relations
  spline_a.tau = tau
  spline_b.tau = -tau
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/Torque.svg"}}}
end
Flattened Source
dyad
"""
Input signal acting as torque on two splines.

The input signal `tau` defines an external torque in [Nm] which acts at both spline connectors,
i.e., the components connected to these splines are driven by torque `tau`.
A positive value accelerates `spline_a` and decelerates `spline_b`.

The equations are:
```math
spline\_a.\tau = \tau
```
```math
spline\_b.\tau = -\tau
```
"""
component Torque2
  "First spline"
  spline_a = Spline() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Second spline"
  spline_b = Spline() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Torque driving the two splines (a positive value accelerates spline_a)"
  tau = RealInput() {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90},
        "diagram": {"iconName": "default", "x1": 450, "y1": -100, "x2": 550, "y2": 0, "rot": 90}
      },
      "tags": []
    }
  }
relations
  spline_a.tau = tau
  spline_b.tau = -tau
metadata {"Dyad": {"icons": {"default": "dyad://RotationalComponents/Torque.svg"}}}
end


Test Cases

No test cases defined.