---
url: /dyad/dev/stdlib/MultibodyComponents/components/PlanarMechanics.DifferentialGear.md
description: >-
  Dyad PlanarMechanics.DifferentialGear docs.  A differential gear that
  distributes torque equally among two output flanges.
---

# `PlanarMechanics.DifferentialGear` {#PlanarMechanics.DifferentialGear}

A differential gear that distributes torque equally among two output flanges.

A variant of a planetary gear (with ratio=-2) used to distribute torque equally among the wheels on one axis.

## Usage {#Usage}

`MultibodyComponents.PlanarMechanics.DifferentialGear()`

## Connectors {#Connectors}

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

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

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

## Behavior {#Behavior}

$$ \begin{align}
0 &= \mathrm{connect}\left( ideal\_{planetary\_{+}sun}, flange\_{left} \right) \\
0 &= \mathrm{connect}\left( ideal\_{planetary\_{+}carrier}, flange\_{right} \right) \\
0 &= \mathrm{connect}\left( ideal\_{planetary\_{+}ring}, flange\_{b} \right) \\
\mathtt{ideal_planetary.carrier.phi}\left( t \right) ~ \left( 1 + \mathtt{ideal_planetary.ratio} \right) &= \mathtt{ideal_planetary.sun.phi}\left( t \right) + \mathtt{ideal_planetary.ratio} ~ \mathtt{ideal_planetary.ring.phi}\left( t \right) \\
\mathtt{ideal_planetary.ring.tau}\left( t \right) &= \mathtt{ideal_planetary.ratio} ~ \mathtt{ideal_planetary.sun.tau}\left( t \right) \\
\mathtt{ideal_planetary.carrier.tau}\left( t \right) &= \left( -1 - \mathtt{ideal_planetary.ratio} \right) ~ \mathtt{ideal_planetary.sun.tau}\left( t \right)
\end{align}
$$

## Source {#Source}

```dyad
"""
A differential gear that distributes torque equally among two output flanges.

A variant of a planetary gear (with ratio=-2) used to distribute torque equally
among the wheels on one axis.
"""
component DifferentialGear
  flange_b = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 0}
      },
      "tags": []
    }
  }
  flange_left = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  flange_right = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  ideal_planetary = IdealPlanetary(ratio = -2) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 400, "y1": 400, "x2": 600, "y2": 600, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(ideal_planetary.sun, flange_left) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
  connect(ideal_planetary.carrier, flange_right) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
  connect(ideal_planetary.ring, flange_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/DifferentialGear.svg"}}
}
end
```

```dyad
"""
A differential gear that distributes torque equally among two output flanges.

A variant of a planetary gear (with ratio=-2) used to distribute torque equally
among the wheels on one axis.
"""
component DifferentialGear
  flange_b = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 1000, "x2": 550, "y2": 1100, "rot": 0}
      },
      "tags": []
    }
  }
  flange_left = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  flange_right = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  ideal_planetary = IdealPlanetary(ratio = -2) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 400, "y1": 400, "x2": 600, "y2": 600, "rot": 0}
      },
      "tags": []
    }
  }
relations
  connect(ideal_planetary.sun, flange_left) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
  connect(ideal_planetary.carrier, flange_right) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
  connect(ideal_planetary.ring, flange_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {
  "Dyad": {"icons": {"default": "dyad://MultibodyComponents/DifferentialGear.svg"}}
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
