LIBRARY
PlanarMechanics.World
The root component for all 2D planar mechanics models.
Every planar model must include exactly one PlanarMechanics.World component. The frame_b is fixed at the origin with zero orientation.
Global gravity parameters (n, g) are set here and referenced by Body components via gravity_acceleration_2d.
Usage
MultibodyComponents.PlanarMechanics.World(render=true, n=[0, -1], g=9.80665)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
render | – | true | |
n | gravity direction (unit vector in 2D plane) | – | [0, -1] |
g | gravitational acceleration magnitude | m/s2 | 9.80665 |
Connectors
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)
Behavior
julia
using MultibodyComponents #hide
using ModelingToolkit #hide
@variables render #hide
@variables n #hide
@variables g #hide
@named sys = MultibodyComponents.PlanarMechanics.World(render=render, n=n, g=g) #hide
full_equations(sys) #hide<< @example-block not executed in draft mode >>Source
dyad
"""
The root component for all 2D planar mechanics models.
Every planar model must include exactly one PlanarMechanics.World component.
The `frame_b` is fixed at the origin with zero orientation.
Global gravity parameters (`n`, `g`) are set here and referenced by
Body components via `gravity_acceleration_2d`.
"""
external component World
frame_b = Frame2D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
},
"tags": []
}
}
parameter render::Boolean = true
"gravity direction (unit vector in 2D plane)"
parameter n::Real[2] = [0, -1]
"gravitational acceleration magnitude"
parameter g::Acceleration = 9.80665
relations
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{
"label": "g = $(g)",
"x": 70,
"y": 970,
"rot": 0,
"layer": "all",
"attrs": {
"fill": "black",
"font-size": "12",
"dominant-baseline": "central",
"text-anchor": "left"
}
},
{
"label": "n = $(n)",
"x": 930,
"y": 970,
"rot": 0,
"layer": "all",
"attrs": {
"fill": "black",
"font-size": "12",
"dominant-baseline": "central",
"text-anchor": "left"
}
}
],
"icons": {"default": "dyad://MultibodyComponents/World.svg"},
"path": {},
"doc": {"behavior": true}
}
}
endFlattened Source
dyad
"""
The root component for all 2D planar mechanics models.
Every planar model must include exactly one PlanarMechanics.World component.
The `frame_b` is fixed at the origin with zero orientation.
Global gravity parameters (`n`, `g`) are set here and referenced by
Body components via `gravity_acceleration_2d`.
"""
external component World
frame_b = Frame2D() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
},
"tags": []
}
}
parameter render::Boolean = true
"gravity direction (unit vector in 2D plane)"
parameter n::Real[2] = [0, -1]
"gravitational acceleration magnitude"
parameter g::Acceleration = 9.80665
relations
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{
"label": "g = $(g)",
"x": 70,
"y": 970,
"rot": 0,
"layer": "all",
"attrs": {
"fill": "black",
"font-size": "12",
"dominant-baseline": "central",
"text-anchor": "left"
}
},
{
"label": "n = $(n)",
"x": 930,
"y": 970,
"rot": 0,
"layer": "all",
"attrs": {
"fill": "black",
"font-size": "12",
"dominant-baseline": "central",
"text-anchor": "left"
}
}
],
"icons": {"default": "dyad://MultibodyComponents/World.svg"},
"path": {},
"doc": {"behavior": true}
}
}
endTest Cases
No test cases defined.