Skip to content
LIBRARY
Power.md

Power

Inline sensor measuring mechanical power transmitted from frame_a to frame_b.

Rigidly connects the two frames and computes power as the sum of translational power (f · v) and rotational power (τ · ω), both resolved in frame_a.

Usage

MultibodyComponents.Power()

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)

  • 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)

  • power - This connector represents a real signal as an output from a component (RealOutput)

Behavior

Dict{MIME{Symbol("text/plain")}, String} with 1 entry: MIME type text/plain => "Error displaying result"

Source

dyad
"""
Inline sensor measuring mechanical power transmitted from `frame_a` to `frame_b`.

Rigidly connects the two frames and computes power as the sum of
translational power (`f · v`) and rotational power (`τ · ω`),
both resolved in `frame_a`.
"""
component Power
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  power = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
relations
  # Rigid connection
  frame_a.r_0 = frame_b.r_0
  frame_b.R = frame_a.R
  # Force and torque pass through
  frame_a.f + frame_b.f = [0, 0, 0]
  frame_a.tau + frame_b.tau = [0, 0, 0]
  # Power = translational + rotational
  power = dot(frame_a.f, resolve2(frame_a.R, der(frame_a.r_0))) + dot(frame_a.tau, angular_velocity2(frame_a.R))
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "power", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end
Flattened Source
dyad
"""
Inline sensor measuring mechanical power transmitted from `frame_a` to `frame_b`.

Rigidly connects the two frames and computes power as the sum of
translational power (`f · v`) and rotational power (`τ · ω`),
both resolved in `frame_a`.
"""
component Power
  frame_a = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  frame_b = Frame3D() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  power = RealOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
      },
      "tags": []
    }
  }
relations
  # Rigid connection
  frame_a.r_0 = frame_b.r_0
  frame_b.R = frame_a.R
  # Force and torque pass through
  frame_a.f + frame_b.f = [0, 0, 0]
  frame_a.tau + frame_b.tau = [0, 0, 0]
  # Power = translational + rotational
  power = dot(frame_a.f, resolve2(frame_a.R, der(frame_a.r_0))) + dot(frame_a.tau, angular_velocity2(frame_a.R))
metadata {
  "Dyad": {
    "icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 150,
        "rot": 0,
        "attrs": {"font-size": "140"}
      },
      {"label": "power", "x": 500, "y": 680, "rot": 0}
    ]
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses