Skip to content
LIBRARY
Mounting1D.md

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

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

Parameters:

NameDescriptionUnitsDefault value
drive_train_mechanics_3dExpose frame_a and apply the 1D support reaction to it. Structural: when false, neither the connector nor the reaction equations are emitted.true
phi0Fixed offset angle of housingrad0
nAxis of rotation = axis of support torque (resolved in frame_a)[1, 0, 0]

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)

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

Behavior

julia
using MultibodyComponents #hide
using ModelingToolkit #hide
@variables phi0 #hide
@variables n #hide
@named sys = MultibodyComponents.Mounting1D(phi0=phi0, n=n) #hide
let eqs = full_equations(sys); Base.length(eqs) > 25 ? nothing : eqs end #hide
<< @example-block not executed in draft mode >>

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
Flattened 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


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses