Skip to content
LIBRARY
Thruster.md

Thruster

Idealized propeller thruster: applies a force along the local y-axis of frame_b proportional to the thrust input, plus a reaction torque around the same axis (sign depends on clockwise). Used as a building block for quadrotor-style aircraft. No motor or aerodynamic dynamics.

Usage

MultibodyComponents.Thruster(torque_constant=1, propeller_radius=0.05, propeller_thickness=0.005, propeller_color=[0.2, 0.2, 0.2, 1])

Parameters:

NameDescriptionUnitsDefault value
clockwiseIf true, reaction torque acts in +y; otherwise in -ytrue
torque_constantReaction torque per unit thrust1
propeller_radiusRadius of the rendered propeller disc0.05
propeller_thicknessAxial thickness of the rendered propeller disc0.005
propeller_colorRGBA color of the rendered propeller disc[0.2, 0.2, 0.2, 1]

Connectors

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

connectors that can be connected together (Frame3D)

  • thrust - This connector represents a real signal as an input to a component (RealInput)

Variables

NameDescriptionUnits
u
ut

Behavior

Source

dyad
"""
Idealized propeller thruster: applies a force along the local y-axis of
`frame_b` proportional to the `thrust` input, plus a reaction torque around
the same axis (sign depends on `clockwise`). Used as a building block for
quadrotor-style aircraft. No motor or aerodynamic dynamics.
"""
component Thruster
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  thrust = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  thrust3d = MultibodyComponents.WorldForce(resolve_in_frame = ResolveInFrame.FrameB(), scale = 0.1, radius = 0.02) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 370, "y1": 540, "x2": 470, "y2": 640, "rot": 0}
      },
      "tags": []
    }
  }
  torque3d = MultibodyComponents.WorldTorque(resolve_in_frame = ResolveInFrame.FrameB(), scale = 0.1, radius = 0.02) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 220, "y1": 530, "x2": 320, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  propeller = MultibodyComponents.CylinderVisualizer(color = propeller_color, radius = propeller_radius, length = propeller_thickness, length_direction = [0, 1, 0], r_shape = [0, -propeller_thickness / 2, 0]) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 790, "y1": 450, "x2": 890, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "If true, reaction torque acts in +y; otherwise in -y"
  structural parameter clockwise::Boolean = true
  "Reaction torque per unit thrust"
  parameter torque_constant::Real = 1
  "Radius of the rendered propeller disc"
  parameter propeller_radius::Real = 0.05
  "Axial thickness of the rendered propeller disc"
  parameter propeller_thickness::Real = 0.005
  "RGBA color of the rendered propeller disc"
  parameter propeller_color::Real[4] = [0.2, 0.2, 0.2, 1]
  variable u::Real
  variable ut::Real
relations
  u = thrust
  ut = torque_constant * u
  thrust3d.force_x = 0
  thrust3d.force_y = u
  thrust3d.force_z = 0
  torque3d.torque_x = 0
  if clockwise
    torque3d.torque_y = ut
  else
    torque3d.torque_y = -ut
  end
  torque3d.torque_z = 0
  connect(torque3d.frame_b, thrust3d.frame_b, frame_b) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 270, "y": 630}, {"x": 445, "y": 630}], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [{"x": 500, "y": 630}], "E": -1}
      ],
      "junctions": [{"x": 445, "y": 630}],
      "renderStyle": "standard"
    }
  }
  connect(propeller.frame_a, frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Thruster.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end
Flattened Source
dyad
"""
Idealized propeller thruster: applies a force along the local y-axis of
`frame_b` proportional to the `thrust` input, plus a reaction torque around
the same axis (sign depends on `clockwise`). Used as a building block for
quadrotor-style aircraft. No motor or aerodynamic dynamics.
"""
component Thruster
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 450, "x2": 550, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  thrust = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -40, "y1": 450, "x2": 60, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  thrust3d = MultibodyComponents.WorldForce(resolve_in_frame = ResolveInFrame.FrameB(), scale = 0.1, radius = 0.02) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 370, "y1": 540, "x2": 470, "y2": 640, "rot": 0}
      },
      "tags": []
    }
  }
  torque3d = MultibodyComponents.WorldTorque(resolve_in_frame = ResolveInFrame.FrameB(), scale = 0.1, radius = 0.02) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 220, "y1": 530, "x2": 320, "y2": 630, "rot": 0}
      },
      "tags": []
    }
  }
  propeller = MultibodyComponents.CylinderVisualizer(color = propeller_color, radius = propeller_radius, length = propeller_thickness, length_direction = [0, 1, 0], r_shape = [0, -propeller_thickness / 2, 0]) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 790, "y1": 450, "x2": 890, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "If true, reaction torque acts in +y; otherwise in -y"
  structural parameter clockwise::Boolean = true
  "Reaction torque per unit thrust"
  parameter torque_constant::Real = 1
  "Radius of the rendered propeller disc"
  parameter propeller_radius::Real = 0.05
  "Axial thickness of the rendered propeller disc"
  parameter propeller_thickness::Real = 0.005
  "RGBA color of the rendered propeller disc"
  parameter propeller_color::Real[4] = [0.2, 0.2, 0.2, 1]
  variable u::Real
  variable ut::Real
relations
  u = thrust
  ut = torque_constant * u
  thrust3d.force_x = 0
  thrust3d.force_y = u
  thrust3d.force_z = 0
  torque3d.torque_x = 0
  if clockwise
    torque3d.torque_y = ut
  else
    torque3d.torque_y = -ut
  end
  torque3d.torque_z = 0
  connect(torque3d.frame_b, thrust3d.frame_b, frame_b) {
    "Dyad": {
      "edges": [
        {"S": 1, "M": [{"x": 270, "y": 630}, {"x": 445, "y": 630}], "E": -1},
        {"S": -1, "M": [], "E": 2},
        {"S": 3, "M": [{"x": 500, "y": 630}], "E": -1}
      ],
      "junctions": [{"x": 445, "y": 630}],
      "renderStyle": "standard"
    }
  }
  connect(propeller.frame_a, frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/Thruster.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "160"}
      }
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses