---
url: /dyad/dev/stdlib/MultibodyComponents/components/Mounting1D.md
description: >-
  Dyad Mounting1D docs.  Grounds a 1D rotational flange and, optionally, feeds
  the flange's reaction torque into a 3D frame.
---

# `Mounting1D` {#Mounting1D}

Grounds a 1D rotational flange and, optionally, feeds the flange's reaction torque into a 3D frame.

`flange_b` is held at the fixed angle `phi0`, so any 1D component whose support is connected here is grounded. When `drive_train_mechanics_3d = true` the support reaction `-n * flange_b.tau` is applied to `frame_a`, i.e. the housing that carries the drivetrain feels the drive reaction. Set it to `false` to model the drivetrain as if mounted in an inertial housing: `frame_a` and the reaction equations are then not emitted at all.

`n` is used as given and is deliberately *not* normalized, so its magnitude scales the applied torque. This matches Modelica's `Parts.Mounting1D`.

This corresponds to Modelica's `world.driveTrainMechanics3D`, which is a global World flag there. Here it is a per-component structural parameter, because the flag has to be known when the model is elaborated in order to gate a conditional connector, which a value carried on the `World` instance cannot be.

## Usage {#Usage}

`MultibodyComponents.Mounting1D(phi0=0, n=[1, 0, 0])`

## Parameters: {#Parameters:}

|                       Name |                                                                                                                                     Description | Units | Default value |
| --------------------------:| -----------------------------------------------------------------------------------------------------------------------------------------------:| -----:| -------------:|
| `drive_train_mechanics_3d` | Expose `frame_a` and apply the 1D support reaction to it. Structural: when false, neither the connector nor the reaction equations are emitted. |     – |          true |
|                     `phi0` |                                                                                                                   Fixed offset angle of housing |   rad |             0 |
|                        `n` |                                                                                 Axis of rotation = axis of support torque (resolved in frame_a) |     – |     \[1, 0, 0] |

## Connectors {#Connectors}

* `frame_a` - Frame3D is the fundamental 3D connector used for 6DOF motion. Most components have one or several `Frame`

connectors that can be connected together ([`Frame3D`](/stdlib/Dyad/connectors/Frame3D#Frame3D))

* `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))

## Behavior {#Behavior}

$$ \begin{align}
\mathtt{flange_b.phi}\left( t \right) &= \mathtt{phi0} \\
\mathtt{frame_a.f}\_{1}\left( t \right) &= 0 \\
\mathtt{frame_a.f}\_{2}\left( t \right) &= 0 \\
\mathtt{frame_a.f}\_{3}\left( t \right) &= 0 \\
\mathtt{frame_a.tau}\_{1}\left( t \right) &=  - \mathtt{flange_b.tau}\left( t \right) ~ n\_{1} \\
\mathtt{frame_a.tau}\_{2}\left( t \right) &=  - \mathtt{flange_b.tau}\left( t \right) ~ n\_{2} \\
\mathtt{frame_a.tau}\_{3}\left( t \right) &=  - \mathtt{flange_b.tau}\left( t \right) ~ n\_{3}
\end{align}
$$

## Source {#Source}

```dyad
"""
Grounds a 1D rotational flange and, optionally, feeds the flange's reaction
torque into a 3D frame.

`flange_b` is held at the fixed angle `phi0`, so any 1D component whose support
is connected here is grounded. When `drive_train_mechanics_3d = true` the
support reaction `-n * flange_b.tau` is applied to `frame_a`, i.e. the housing
that carries the drivetrain feels the drive reaction. Set it to `false` to model
the drivetrain as if mounted in an inertial housing: `frame_a` and the reaction
equations are then not emitted at all.

`n` is used as given and is deliberately *not* normalized, so its magnitude
scales the applied torque. This matches Modelica's `Parts.Mounting1D`.

This corresponds to Modelica's `world.driveTrainMechanics3D`, which is a global
World flag there. Here it is a per-component structural parameter, because the
flag has to be known when the model is elaborated in order to gate a conditional
connector, which a value carried on the `World` instance cannot be.
"""
component Mounting1D
  frame_a = Frame3D() if drive_train_mechanics_3d {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}
      },
      "tags": []
    }
  }
  flange_b = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Expose `frame_a` and apply the 1D support reaction to it. Structural: when false, neither the connector nor the reaction equations are emitted."
  structural parameter drive_train_mechanics_3d::Boolean = true
  "Fixed offset angle of housing"
  parameter phi0::Angle = 0
  "Axis of rotation = axis of support torque (resolved in frame_a)"
  parameter n::Real[3] = [1, 0, 0]
relations
  flange_b.phi = phi0
  if drive_train_mechanics_3d
    frame_a.f = [0, 0, 0]
    frame_a.tau = -n * flange_b.tau
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Mounting1D.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
```

```dyad
"""
Grounds a 1D rotational flange and, optionally, feeds the flange's reaction
torque into a 3D frame.

`flange_b` is held at the fixed angle `phi0`, so any 1D component whose support
is connected here is grounded. When `drive_train_mechanics_3d = true` the
support reaction `-n * flange_b.tau` is applied to `frame_a`, i.e. the housing
that carries the drivetrain feels the drive reaction. Set it to `false` to model
the drivetrain as if mounted in an inertial housing: `frame_a` and the reaction
equations are then not emitted at all.

`n` is used as given and is deliberately *not* normalized, so its magnitude
scales the applied torque. This matches Modelica's `Parts.Mounting1D`.

This corresponds to Modelica's `world.driveTrainMechanics3D`, which is a global
World flag there. Here it is a per-component structural parameter, because the
flag has to be known when the model is elaborated in order to gate a conditional
connector, which a value carried on the `World` instance cannot be.
"""
component Mounting1D
  frame_a = Frame3D() if drive_train_mechanics_3d {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}
      },
      "tags": []
    }
  }
  flange_b = Spline() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Expose `frame_a` and apply the 1D support reaction to it. Structural: when false, neither the connector nor the reaction equations are emitted."
  structural parameter drive_train_mechanics_3d::Boolean = true
  "Fixed offset angle of housing"
  parameter phi0::Angle = 0
  "Axis of rotation = axis of support torque (resolved in frame_a)"
  parameter n::Real[3] = [1, 0, 0]
relations
  flange_b.phi = phi0
  if drive_train_mechanics_3d
    frame_a.f = [0, 0, 0]
    frame_a.tau = -n * flange_b.tau
  end
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Mounting1D.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
