---
url: /dyad/stable/stdlib/RotationalComponents/components/Components.IdealGear.md
description: >-
  Dyad Components.IdealGear docs.  An ideal mechanical gear unit with a fixed
  housing, connecting two rotational shafts.
---

# `Components.IdealGear` {#Components.IdealGear}

An ideal mechanical gear unit with a fixed housing, connecting two rotational shafts.

This component models a lossless gearbox with a user-defined gear ratio, connecting two mechanical rotational splines, `spline_a` and `spline_b`. The housing of the gear is assumed to be rigidly connected to a support. The kinematic relationship between the relative angle of shaft 'a' and shaft 'b' with respect to the support is given by:

$$\phi_a = ratio \cdot \phi_b$$

The corresponding torque relationship, assuming an ideal (lossless) transmission, is:

$$\text{ratio} \cdot \tau_a + \tau_b = 0$$

where $\tau*a$ and $\tau*b$ are the torques at `spline_a` and `spline_b` respectively. The relative angles are defined as:

$$\phi_a = \text{spline\\*a}.\phi - \phi\\*\text{support}$$

$$\phi_b = \text{spline}\\*b.\phi - \phi\\*\text{support}$$

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

## Usage {#Usage}

`RotationalComponents.Components.IdealGear(ratio)`

## Parameters: {#Parameters:}

|    Name |                                                                  Description | Units | Default value |
| -------:| ----------------------------------------------------------------------------:| -----:| -------------:|
| `ratio` | The fixed transmission ratio between shaft 'a' and shaft 'b' (phi_a / phi_b) |     – |               |

## Connectors {#Connectors}

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

* `spline_b` - 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` |   Variable for the absolute angle of the support spline |   rad |
|       `phi_a` | Relative angle of shaft 'a' with respect to the support |   rad |
|       `phi_b` | Relative angle of shaft 'b' with respect to the support |   rad |

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{support.phi}\left( t \right) &= \mathtt{phi_support}\left( t \right) \\
\mathtt{support.tau}\left( t \right) &=  - \mathtt{spline_a.tau}\left( t \right) - \mathtt{spline_b.tau}\left( t \right) \\
\mathtt{phi_a}\left( t \right) &=  - \mathtt{phi_support}\left( t \right) + \mathtt{spline_a.phi}\left( t \right) \\
\mathtt{phi_b}\left( t \right) &=  - \mathtt{phi_support}\left( t \right) + \mathtt{spline_b.phi}\left( t \right) \\
\mathtt{phi_a}\left( t \right) &= \mathtt{phi_b}\left( t \right) ~ \mathtt{ratio} \\
0 &= \mathtt{spline_b.tau}\left( t \right) + \mathtt{ratio} ~ \mathtt{spline_a.tau}\left( t \right)
\end{align}
$$

## Source {#Source}

````dyad
"""
An ideal mechanical gear unit with a fixed housing, connecting two rotational shafts.

This component models a lossless gearbox with a user-defined gear ratio,
connecting two mechanical rotational splines, `spline_a` and `spline_b`.
The housing of the gear is assumed to be rigidly connected to a support.
The kinematic relationship between the relative angle of shaft 'a' and shaft 'b'
with respect to the support is given by:
```math
\\phi_a = ratio \\cdot \\phi_b
```
The corresponding torque relationship, assuming an ideal (lossless) transmission, is:
```math
\text{ratio} \\cdot \\tau_a + \\tau_b = 0
```
where \$\tau_a\$ and \$\tau_b\$ are the torques at `spline_a` and `spline_b` respectively.
The relative angles are defined as:
```math
\\phi_a = \text{spline\\_a}.\\phi - \\phi\\_\text{support}
```
```math
\\phi_b = \text{spline}\\_b.\\phi - \\phi\\_\text{support}
```
"""
component IdealGear
  extends RotationalComponents.Interfaces.PartialElementaryTwoSplinesAndSupport
  "The fixed transmission ratio between shaft 'a' and shaft 'b' (phi_a / phi_b)"
  parameter ratio::Real
  "Relative angle of shaft 'a' with respect to the support"
  variable phi_a::Angle
  "Relative angle of shaft 'b' with respect to the support"
  variable phi_b::Angle
relations
  phi_a = spline_a.phi - phi_support
  phi_b = spline_b.phi - phi_support
  phi_a = ratio * phi_b
  0 = ratio * spline_a.tau + spline_b.tau
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/IdealGear.svg"},
    "labels": [{"label": "$(instance)", "layer": "icon", "x": 500, "y": 1203, "rot": 0}]
  }
}
end
````

````dyad
"""
An ideal mechanical gear unit with a fixed housing, connecting two rotational shafts.

This component models a lossless gearbox with a user-defined gear ratio,
connecting two mechanical rotational splines, `spline_a` and `spline_b`.
The housing of the gear is assumed to be rigidly connected to a support.
The kinematic relationship between the relative angle of shaft 'a' and shaft 'b'
with respect to the support is given by:
```math
\\phi_a = ratio \\cdot \\phi_b
```
The corresponding torque relationship, assuming an ideal (lossless) transmission, is:
```math
\text{ratio} \\cdot \\tau_a + \\tau_b = 0
```
where \$\tau_a\$ and \$\tau_b\$ are the torques at `spline_a` and `spline_b` respectively.
The relative angles are defined as:
```math
\\phi_a = \text{spline\\_a}.\\phi - \\phi\\_\text{support}
```
```math
\\phi_b = \text{spline}\\_b.\\phi - \\phi\\_\text{support}
```
"""
component IdealGear
  "First rotational 1-dimensional shaft spline connector (flange_a)"
  spline_a = Spline() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Second rotational 1-dimensional shaft spline connector (flange_b)"
  spline_b = Spline() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Support spline connector, typically for housing or reaction torques"
  support = Spline() {
    "Dyad": {
      "placement": {"icon": {"iconName": "support", "x1": 450, "y1": 950, "x2": 550, "y2": 1050}}
    }
  }
  "Variable for the absolute angle of the support spline"
  variable phi_support::Angle
  "The fixed transmission ratio between shaft 'a' and shaft 'b' (phi_a / phi_b)"
  parameter ratio::Real
  "Relative angle of shaft 'a' with respect to the support"
  variable phi_a::Angle
  "Relative angle of shaft 'b' with respect to the support"
  variable phi_b::Angle
relations
  support.phi = phi_support
  support.tau = -spline_a.tau - spline_b.tau
  phi_a = spline_a.phi - phi_support
  phi_b = spline_b.phi - phi_support
  phi_a = ratio * phi_b
  0 = ratio * spline_a.tau + spline_b.tau
metadata {
  "Dyad": {
    "icons": {"default": "dyad://RotationalComponents/IdealGear.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
