Skip to content
LIBRARY
tests.MovingActuatedDriveTest.md

tests.MovingActuatedDriveTest

Moving Actuated Drive Test

The same drivetrain as ActuatedDriveTest, but the housing is mounted on a carrier that spins about the world y-axis at a constant rate. The carrier therefore has a non-zero angular velocity, which is what activates the gyroscopic term cross(w_a, nJ*w) in Rotor1D: the spinning rotor pushes sideways on its carrier.

exact selects whether the carrier's angular acceleration is allowed to influence the rotor acceleration. With a constant-speed carrier the two settings should agree closely, which is what makes this a useful check of the approximation.

Usage

MultibodyComponents.tests.MovingActuatedDriveTest()

Parameters:

NameDescriptionUnitsDefault value
exacttrue

Behavior

Source

dyad
"""
# Moving Actuated Drive Test

The same drivetrain as `ActuatedDriveTest`, but the housing is mounted on a
carrier that spins about the world y-axis at a constant rate. The carrier
therefore has a non-zero angular velocity, which is what activates the
gyroscopic term `cross(w_a, nJ*w)` in `Rotor1D`: the spinning rotor pushes
sideways on its carrier.

`exact` selects whether the carrier's angular acceleration is allowed to
influence the rotor acceleration. With a constant-speed carrier the two settings
should agree closely, which is what makes this a useful check of the
approximation.
"""
example component MovingActuatedDriveTest
  world = MultibodyComponents.World(g = 0) {
    "Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 376, "y2": 476}}}
  }
  carrier_rev = MultibodyComponents.Revolute(n = [0, 1, 0], phi(initial = 0)) {
    "Dyad": {"placement": {"diagram": {"x1": 160, "x2": 260, "y1": 276, "y2": 376}}}
  }
  carrier = MultibodyComponents.BodyCylinder(r = [0.3, 0, 0], diameter = 0.05) {
    "Dyad": {"placement": {"diagram": {"x1": 300, "x2": 400, "y1": 276, "y2": 376}}}
  }
  carrier_drive = RotationalComponents.Sources.ConstantSpeed(w_fixed = 2) {
    "Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 171, "y2": 271}}}
  }
  rotor = MultibodyComponents.Rotor1D(J = 1, n = [1, 0, 0], exact = exact, phi(initial = 0), w(initial = 10)) {
    "Dyad": {"placement": {"diagram": {"x1": 300, "x2": 400, "y1": 71, "y2": 171}}}
  }
  mount = MultibodyComponents.Mounting1D(n = [1, 0, 0]) {
    "Dyad": {"placement": {"diagram": {"x1": 425, "x2": 525, "y1": 70, "y2": 170}}}
  }
  torque = RotationalComponents.Sources.TorqueSource() {
    "Dyad": {"placement": {"diagram": {"x1": 160, "x2": 260, "y1": 171, "y2": 71}}}
  }
  structural parameter exact::Boolean = true
relations
  torque.tau = 0
  # Spin the carrier about the world y-axis at a constant rate
  connect(carrier_drive.spline, carrier_rev.axis) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 210, "y": 221}], "E": 2}], "path": {}}}
  connect(carrier_drive.support, carrier_rev.support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 70, "y": 298.5}, {"x": 175, "y": 298.5}], "E": 2}],
      "path": {}
    }
  }
  connect(world.frame_b, carrier_rev.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 135, "y": 426}, {"x": 135, "y": 326}], "E": 2}],
      "path": {}
    }
  }
  connect(carrier_rev.frame_b, carrier.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
  # Drivetrain, housed on the rotating carrier
  connect(torque.spline, rotor.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
  connect(torque.support, mount.flange_b) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [{"x": 210, "y": 20}, {"x": 540, "y": 20}, {"x": 540, "y": 120}],
          "E": 2
        }
      ],
      "path": {}
    }
  }
  connect(carrier_rev.frame_b, rotor.frame_a, mount.frame_a) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [], "E": -1},
        {"S": -1, "M": [{"x": 285, "y": 226}], "E": -2},
        {"S": -2, "M": [], "E": 2},
        {"S": -2, "M": [{"x": 475, "y": 226}], "E": 3}
      ],
      "junctions": [{"x": 285, "y": 326}, {"x": 350, "y": 226}],
      "path": {}
    }
  }
end
Flattened Source
dyad
"""
# Moving Actuated Drive Test

The same drivetrain as `ActuatedDriveTest`, but the housing is mounted on a
carrier that spins about the world y-axis at a constant rate. The carrier
therefore has a non-zero angular velocity, which is what activates the
gyroscopic term `cross(w_a, nJ*w)` in `Rotor1D`: the spinning rotor pushes
sideways on its carrier.

`exact` selects whether the carrier's angular acceleration is allowed to
influence the rotor acceleration. With a constant-speed carrier the two settings
should agree closely, which is what makes this a useful check of the
approximation.
"""
example component MovingActuatedDriveTest
  world = MultibodyComponents.World(g = 0) {
    "Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 376, "y2": 476}}}
  }
  carrier_rev = MultibodyComponents.Revolute(n = [0, 1, 0], phi(initial = 0)) {
    "Dyad": {"placement": {"diagram": {"x1": 160, "x2": 260, "y1": 276, "y2": 376}}}
  }
  carrier = MultibodyComponents.BodyCylinder(r = [0.3, 0, 0], diameter = 0.05) {
    "Dyad": {"placement": {"diagram": {"x1": 300, "x2": 400, "y1": 276, "y2": 376}}}
  }
  carrier_drive = RotationalComponents.Sources.ConstantSpeed(w_fixed = 2) {
    "Dyad": {"placement": {"diagram": {"x1": 20, "x2": 120, "y1": 171, "y2": 271}}}
  }
  rotor = MultibodyComponents.Rotor1D(J = 1, n = [1, 0, 0], exact = exact, phi(initial = 0), w(initial = 10)) {
    "Dyad": {"placement": {"diagram": {"x1": 300, "x2": 400, "y1": 71, "y2": 171}}}
  }
  mount = MultibodyComponents.Mounting1D(n = [1, 0, 0]) {
    "Dyad": {"placement": {"diagram": {"x1": 425, "x2": 525, "y1": 70, "y2": 170}}}
  }
  torque = RotationalComponents.Sources.TorqueSource() {
    "Dyad": {"placement": {"diagram": {"x1": 160, "x2": 260, "y1": 171, "y2": 71}}}
  }
  structural parameter exact::Boolean = true
relations
  torque.tau = 0
  # Spin the carrier about the world y-axis at a constant rate
  connect(carrier_drive.spline, carrier_rev.axis) {"Dyad": {"edges": [{"S": 1, "M": [{"x": 210, "y": 221}], "E": 2}], "path": {}}}
  connect(carrier_drive.support, carrier_rev.support) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 70, "y": 298.5}, {"x": 175, "y": 298.5}], "E": 2}],
      "path": {}
    }
  }
  connect(world.frame_b, carrier_rev.frame_a) {
    "Dyad": {
      "edges": [{"S": 1, "M": [{"x": 135, "y": 426}, {"x": 135, "y": 326}], "E": 2}],
      "path": {}
    }
  }
  connect(carrier_rev.frame_b, carrier.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
  # Drivetrain, housed on the rotating carrier
  connect(torque.spline, rotor.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
  connect(torque.support, mount.flange_b) {
    "Dyad": {
      "edges": [
        {
          "S": 1,
          "M": [{"x": 210, "y": 20}, {"x": 540, "y": 20}, {"x": 540, "y": 120}],
          "E": 2
        }
      ],
      "path": {}
    }
  }
  connect(carrier_rev.frame_b, rotor.frame_a, mount.frame_a) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [], "E": -1},
        {"S": -1, "M": [{"x": 285, "y": 226}], "E": -2},
        {"S": -2, "M": [], "E": 2},
        {"S": -2, "M": [{"x": 475, "y": 226}], "E": 3}
      ],
      "junctions": [{"x": 285, "y": 326}, {"x": 350, "y": 226}],
      "path": {}
    }
  }
metadata {}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses