LIBRARY
PlanarMechanics.examples.DoubleBodyPend
Usage
MultibodyComponents.PlanarMechanics.examples.DoubleBodyPend()
Behavior
Source
dyad
example component DoubleBodyPend
world = MultibodyComponents.PlanarMechanics.World() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 120, "y1": 260, "x2": 220, "y2": 360, "rot": 0}
},
"tags": []
}
}
revolute = MultibodyComponents.PlanarMechanics.Revolute(phi(initial = 0), w(initial = 0)) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 280, "y1": 260, "x2": 380, "y2": 360, "rot": 0}
},
"tags": []
}
}
fixedtranslation = MultibodyComponents.PlanarMechanics.FixedTranslation(r = [1, 1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 260, "x2": 520, "y2": 360, "rot": 0}
},
"tags": []
}
}
body = MultibodyComponents.PlanarMechanics.Body(m = 0.5, I = 0.05) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 570, "y1": 210, "x2": 670, "y2": 310, "rot": 0}
},
"tags": []
}
}
body1 = MultibodyComponents.PlanarMechanics.Body(m = 0.5, I = 0.05) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 580, "y1": 400, "x2": 680, "y2": 500, "rot": 0}
},
"tags": []
}
}
fixedtranslation1 = MultibodyComponents.PlanarMechanics.FixedTranslation() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 400, "x2": 520, "y2": 500, "rot": 0}
},
"tags": []
}
}
relations
connect(world.frame_b, revolute.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(revolute.frame_b, fixedtranslation.frame_a, fixedtranslation1.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [{"x": 400, "y": 450}], "E": -1}
],
"junctions": [{"x": 400, "y": 310}],
"renderStyle": "standard"
}
}
connect(body.frame_a, fixedtranslation.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 545, "y": 260}, {"x": 545, "y": 310}], "E": 2}],
"renderStyle": "standard"
}
}
connect(body1.frame_a, fixedtranslation1.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
endFlattened Source
dyad
example component DoubleBodyPend
world = MultibodyComponents.PlanarMechanics.World() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 120, "y1": 260, "x2": 220, "y2": 360, "rot": 0}
},
"tags": []
}
}
revolute = MultibodyComponents.PlanarMechanics.Revolute(phi(initial = 0), w(initial = 0)) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 280, "y1": 260, "x2": 380, "y2": 360, "rot": 0}
},
"tags": []
}
}
fixedtranslation = MultibodyComponents.PlanarMechanics.FixedTranslation(r = [1, 1]) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 260, "x2": 520, "y2": 360, "rot": 0}
},
"tags": []
}
}
body = MultibodyComponents.PlanarMechanics.Body(m = 0.5, I = 0.05) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 570, "y1": 210, "x2": 670, "y2": 310, "rot": 0}
},
"tags": []
}
}
body1 = MultibodyComponents.PlanarMechanics.Body(m = 0.5, I = 0.05) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 580, "y1": 400, "x2": 680, "y2": 500, "rot": 0}
},
"tags": []
}
}
fixedtranslation1 = MultibodyComponents.PlanarMechanics.FixedTranslation() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 420, "y1": 400, "x2": 520, "y2": 500, "rot": 0}
},
"tags": []
}
}
relations
connect(world.frame_b, revolute.frame_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(revolute.frame_b, fixedtranslation.frame_a, fixedtranslation1.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": 3, "M": [{"x": 400, "y": 450}], "E": -1}
],
"junctions": [{"x": 400, "y": 310}],
"renderStyle": "standard"
}
}
connect(body.frame_a, fixedtranslation.frame_b) {
"Dyad": {
"edges": [{"S": 1, "M": [{"x": 545, "y": 260}, {"x": 545, "y": 310}], "E": 2}],
"renderStyle": "standard"
}
}
connect(body1.frame_a, fixedtranslation1.frame_b) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses