LIBRARY
examples.FourBar3
Four-bar linkage closed with the UniversalSpherical joint assembly.
Same mechanism as FourBar2, but five revolute joints and one body-shape are replaced by a single UniversalSpherical. Because the rotational kinematics of the assembly are solved symbolically, the resulting ODE has fewer nonlinear residuals and simulates substantially faster than FourBar2. The rod itself carries no mass; attach a Body or BodyShape to joint_us.frame_ia to add rod mass.
j1 is driven by its initial angular velocity (5π/3 rad/s).
Usage
MultibodyComponents.examples.FourBar3()
Behavior
Source
dyad
"""
Four-bar linkage closed with the `UniversalSpherical` joint assembly.
Same mechanism as `FourBar2`, but five revolute joints and one body-shape
are replaced by a single `UniversalSpherical`. Because the rotational
kinematics of the assembly are solved symbolically, the resulting ODE has
fewer nonlinear residuals and simulates substantially faster than
`FourBar2`. The rod itself carries no mass; attach a `Body` or `BodyShape`
to `joint_us.frame_ia` to add rod mass.
`j1` is driven by its initial angular velocity (5π/3 rad/s).
"""
example component FourBar3
world = MultibodyComponents.World(default_body_diameter = 0.06, axis_radius = 0.01) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 25, "x2": 120, "y2": 125, "rot": 0}
},
"tags": []
}
}
j1 = MultibodyComponents.Revolute(n = [1, 0, 0], w(initial = 5.235987755982989), radius = 0.1, statePriority = 12) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 330, "x2": 250, "y2": 430, "rot": 0}
},
"tags": []
}
}
j2 = MultibodyComponents.Prismatic(n = [1, 0, 0], s(initial = -0.2)) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 400, "y1": 25, "x2": 500, "y2": 125, "rot": 0}
},
"tags": []
}
}
b1 = MultibodyComponents.BodyShape(r = [0, 0.5, 0.1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 275, "y1": 330, "x2": 375, "y2": 430, "rot": 0}
},
"tags": []
}
}
b2 = MultibodyComponents.BodyShape(r = [0, 0.2, 0]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 525, "y1": 25, "x2": 625, "y2": 125, "rot": 0}
},
"tags": []
}
}
b3 = MultibodyComponents.FixedTranslation(r = [1.2, 0, 0]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 275, "y1": 25, "x2": 375, "y2": 125, "rot": 0}
},
"tags": []
}
}
joint_us = MultibodyComponents.UniversalSpherical(n1_a = [0, 1, 0], rRod_ia = [-1, 0.3, 0.1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 590, "y1": 240, "x2": 690, "y2": 340, "rot": 90}
},
"tags": []
}
}
relations
connect(j2.frame_b, b2.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(j1.frame_b, b1.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(j1.frame_a, world.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 135, "y": 380}], "E": -1}, {"S": -1, "M": [], "E": 2}],
"junctions": [{"x": 135, "y": 75}],
"renderStyle": "standard"
}
}
connect(b1.frame_b, joint_us.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 640, "y": 380}], "E": 2}],
"renderStyle": "standard"
}
}
connect(joint_us.frame_a, b2.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 640, "y": 75}], "E": 2}],
"renderStyle": "standard"
}
}
connect(b3.frame_a, world.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(b3.frame_b, j2.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
endFlattened Source
dyad
"""
Four-bar linkage closed with the `UniversalSpherical` joint assembly.
Same mechanism as `FourBar2`, but five revolute joints and one body-shape
are replaced by a single `UniversalSpherical`. Because the rotational
kinematics of the assembly are solved symbolically, the resulting ODE has
fewer nonlinear residuals and simulates substantially faster than
`FourBar2`. The rod itself carries no mass; attach a `Body` or `BodyShape`
to `joint_us.frame_ia` to add rod mass.
`j1` is driven by its initial angular velocity (5π/3 rad/s).
"""
example component FourBar3
world = MultibodyComponents.World(default_body_diameter = 0.06, axis_radius = 0.01) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 25, "x2": 120, "y2": 125, "rot": 0}
},
"tags": []
}
}
j1 = MultibodyComponents.Revolute(n = [1, 0, 0], w(initial = 5.235987755982989), radius = 0.1, statePriority = 12) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 150, "y1": 330, "x2": 250, "y2": 430, "rot": 0}
},
"tags": []
}
}
j2 = MultibodyComponents.Prismatic(n = [1, 0, 0], s(initial = -0.2)) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 400, "y1": 25, "x2": 500, "y2": 125, "rot": 0}
},
"tags": []
}
}
b1 = MultibodyComponents.BodyShape(r = [0, 0.5, 0.1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 275, "y1": 330, "x2": 375, "y2": 430, "rot": 0}
},
"tags": []
}
}
b2 = MultibodyComponents.BodyShape(r = [0, 0.2, 0]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 525, "y1": 25, "x2": 625, "y2": 125, "rot": 0}
},
"tags": []
}
}
b3 = MultibodyComponents.FixedTranslation(r = [1.2, 0, 0]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 275, "y1": 25, "x2": 375, "y2": 125, "rot": 0}
},
"tags": []
}
}
joint_us = MultibodyComponents.UniversalSpherical(n1_a = [0, 1, 0], rRod_ia = [-1, 0.3, 0.1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 590, "y1": 240, "x2": 690, "y2": 340, "rot": 90}
},
"tags": []
}
}
relations
connect(j2.frame_b, b2.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(j1.frame_b, b1.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(j1.frame_a, world.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 135, "y": 380}], "E": -1}, {"S": -1, "M": [], "E": 2}],
"junctions": [{"x": 135, "y": 75}],
"renderStyle": "standard"
}
}
connect(b1.frame_b, joint_us.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 640, "y": 380}], "E": 2}],
"renderStyle": "standard"
}
}
connect(joint_us.frame_a, b2.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 640, "y": 75}], "E": 2}],
"renderStyle": "standard"
}
}
connect(b3.frame_a, world.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(b3.frame_b, j2.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses