LIBRARY
PlanarMechanics.Power
Measures the mechanical power transmitted between two rigidly connected frames.
Power is computed as the sum of translational power (force · velocity) and rotational power (torque · angular velocity): power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
This is a sensor component: it constrains frame_a and frame_b to be identical and does not alter the dynamics of the system.
This component extends from PartialTwoFrameSensor
Usage
MultibodyComponents.PlanarMechanics.Power()
Connectors
frame_a- Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.
All variables are resolved in the planar world frame. (Frame2D)
frame_b- Coordinate system (2-dim.) fixed to the component with one cut-force and cut-torque.
All variables are resolved in the planar world frame. (Frame2D)
power- This connector represents a real signal as an output from a component (RealOutput)
Behavior
Source
dyad
"""
Measures the mechanical power transmitted between two rigidly connected frames.
Power is computed as the sum of translational power (force · velocity) and
rotational power (torque · angular velocity):
power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
This is a sensor component: it constrains frame_a and frame_b to be identical
and does not alter the dynamics of the system.
"""
component Power
extends PartialTwoFrameSensor
"Mechanical power output"
power = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
},
"tags": []
}
}
relations
# Rigid connection: identical position and orientation
frame_a.x = frame_b.x
frame_a.y = frame_b.y
frame_a.phi = frame_b.phi
# Force balance
frame_a.fx + frame_b.fx = 0
frame_a.fy + frame_b.fy = 0
# Torque balance
frame_a.tau + frame_b.tau = 0
# Power = force · velocity + torque · angular velocity
power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
"labels": [{"label": "power", "x": 500, "y": 680, "rot": 0}]
}
}
endFlattened Source
dyad
"""
Measures the mechanical power transmitted between two rigidly connected frames.
Power is computed as the sum of translational power (force · velocity) and
rotational power (torque · angular velocity):
power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
This is a sensor component: it constrains frame_a and frame_b to be identical
and does not alter the dynamics of the system.
"""
component Power
frame_a = Frame2D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 50, "y1": 450, "x2": 150, "y2": 550, "rot": 0}
},
"tags": []
}
}
frame_b = Frame2D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 850, "y1": 450, "x2": 950, "y2": 550, "rot": 0}
},
"tags": []
}
}
"Mechanical power output"
power = RealOutput() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 960, "x2": 550, "y2": 1060, "rot": 90}
},
"tags": []
}
}
relations
# Rigid connection: identical position and orientation
frame_a.x = frame_b.x
frame_a.y = frame_b.y
frame_a.phi = frame_b.phi
# Force balance
frame_a.fx + frame_b.fx = 0
frame_a.fy + frame_b.fy = 0
# Torque balance
frame_a.tau + frame_b.tau = 0
# Power = force · velocity + torque · angular velocity
power = frame_a.fx * der(frame_a.x) + frame_a.fy * der(frame_a.y) + frame_a.tau * der(frame_a.phi)
metadata {
"Dyad": {
"icons": {"default": "dyad://MultibodyComponents/TwoFrameSensor.svg"},
"labels": [{"label": "power", "x": 500, "y": 680, "rot": 0}]
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses