LIBRARY
tests.BevelGear1DTest
Bevel Gear 1D Test
Two rotors coupled by a BevelGear1D whose shaft axes are perpendicular, with the drive's support grounded through Mounting1D. Everything is mounted on the world frame, so the only 3D effect is the bearing reaction.
The point of the model is the bearing torque. The scalar gear balance 0 = ratio*flange_a.tau + flange_b.tau holds, yet because n_a and n_b point in different directions the vector sum of the two shaft reactions does not vanish – and that residual is exactly what frame_a has to carry. total_power is the net power flowing into the drivetrain and must stay at zero for an ideal gear.
Usage
MultibodyComponents.tests.BevelGear1DTest(n_a=[1, 0, 0], n_b=[0, 1, 0], ratio=10, J_a=1.1, J_b=18.2)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
n_a | – | [1, 0, 0] | |
n_b | – | [0, 1, 0] | |
ratio | – | 10 | |
J_a | kg.m2 | 1.1 | |
J_b | kg.m2 | 18.2 |
Variables
| Name | Description | Units |
|---|---|---|
total_power | Net power into the drivetrain; zero for an ideal, lossless gear | – |
Behavior
Source
dyad
"""
# Bevel Gear 1D Test
Two rotors coupled by a `BevelGear1D` whose shaft axes are perpendicular, with
the drive's support grounded through `Mounting1D`. Everything is mounted on the
world frame, so the only 3D effect is the bearing reaction.
The point of the model is the bearing torque. The scalar gear balance
`0 = ratio*flange_a.tau + flange_b.tau` holds, yet because `n_a` and `n_b` point
in different directions the vector sum of the two shaft reactions does not vanish
-- and that residual is exactly what `frame_a` has to carry. `total_power` is the
net power flowing into the drivetrain and must stay at zero for an ideal gear.
"""
example component BevelGear1DTest
world = MultibodyComponents.World(g = 0) {
"Dyad": {"placement": {"diagram": {"x1": 25, "x2": 125, "y1": 330, "y2": 430}}}
}
torque = RotationalComponents.Sources.TorqueSource() {
"Dyad": {"placement": {"diagram": {"x1": 140, "x2": 240, "y1": 20, "y2": 120}}}
}
rotor_a = MultibodyComponents.Rotor1D(J = J_a, n = n_a, phi(initial = 0), w(initial = 0)) {
"Dyad": {"placement": {"diagram": {"x1": 280, "x2": 380, "y1": 20, "y2": 120}}}
}
gear = MultibodyComponents.BevelGear1D(ratio = ratio, n_a = n_a, n_b = n_b) {
"Dyad": {"placement": {"diagram": {"x1": 410, "x2": 510, "y1": 20, "y2": 120}}}
}
rotor_b = MultibodyComponents.Rotor1D(J = J_b, n = n_b) {
"Dyad": {"placement": {"diagram": {"x1": 540, "x2": 640, "y1": 20, "y2": 120}}}
}
mount = MultibodyComponents.Mounting1D(n = n_a) {
"Dyad": {"placement": {"diagram": {"x1": 150, "x2": 250, "y1": 225, "y2": 325}}}
}
parameter n_a::Real[3] = [1, 0, 0]
parameter n_b::Real[3] = [0, 1, 0]
parameter ratio::Real = 10
parameter J_a::Inertia = 1.1
parameter J_b::Inertia = 18.2
"Net power into the drivetrain; zero for an ideal, lossless gear"
variable total_power::Real
relations
torque.tau = 10 * sin(2 * pi * time)
connect(torque.spline, rotor_a.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(rotor_a.flange_b, gear.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(gear.flange_b, rotor_b.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(torque.support, mount.flange_b) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 190, "y": 175}, {"x": 265, "y": 175}, {"x": 265, "y": 275}],
"E": 2
}
],
"path": {}
}
}
connect(world.frame_b, mount.frame_a, rotor_a.frame_a, gear.frame_a, rotor_b.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": -1, "M": [], "E": -2},
{"S": -2, "M": [], "E": 3},
{"S": -2, "M": [], "E": -3},
{"S": -3, "M": [], "E": 4},
{"S": -3, "M": [{"x": 590, "y": 380}], "E": 5}
],
"junctions": [{"x": 200, "y": 380}, {"x": 330, "y": 380}, {"x": 460, "y": 380}],
"path": {}
}
}
total_power = torque.tau * rotor_a.w - (J_a * rotor_a.w * rotor_a.a + J_b * rotor_b.w * rotor_b.a)
endFlattened Source
dyad
"""
# Bevel Gear 1D Test
Two rotors coupled by a `BevelGear1D` whose shaft axes are perpendicular, with
the drive's support grounded through `Mounting1D`. Everything is mounted on the
world frame, so the only 3D effect is the bearing reaction.
The point of the model is the bearing torque. The scalar gear balance
`0 = ratio*flange_a.tau + flange_b.tau` holds, yet because `n_a` and `n_b` point
in different directions the vector sum of the two shaft reactions does not vanish
-- and that residual is exactly what `frame_a` has to carry. `total_power` is the
net power flowing into the drivetrain and must stay at zero for an ideal gear.
"""
example component BevelGear1DTest
world = MultibodyComponents.World(g = 0) {
"Dyad": {"placement": {"diagram": {"x1": 25, "x2": 125, "y1": 330, "y2": 430}}}
}
torque = RotationalComponents.Sources.TorqueSource() {
"Dyad": {"placement": {"diagram": {"x1": 140, "x2": 240, "y1": 20, "y2": 120}}}
}
rotor_a = MultibodyComponents.Rotor1D(J = J_a, n = n_a, phi(initial = 0), w(initial = 0)) {
"Dyad": {"placement": {"diagram": {"x1": 280, "x2": 380, "y1": 20, "y2": 120}}}
}
gear = MultibodyComponents.BevelGear1D(ratio = ratio, n_a = n_a, n_b = n_b) {
"Dyad": {"placement": {"diagram": {"x1": 410, "x2": 510, "y1": 20, "y2": 120}}}
}
rotor_b = MultibodyComponents.Rotor1D(J = J_b, n = n_b) {
"Dyad": {"placement": {"diagram": {"x1": 540, "x2": 640, "y1": 20, "y2": 120}}}
}
mount = MultibodyComponents.Mounting1D(n = n_a) {
"Dyad": {"placement": {"diagram": {"x1": 150, "x2": 250, "y1": 225, "y2": 325}}}
}
parameter n_a::Real[3] = [1, 0, 0]
parameter n_b::Real[3] = [0, 1, 0]
parameter ratio::Real = 10
parameter J_a::Inertia = 1.1
parameter J_b::Inertia = 18.2
"Net power into the drivetrain; zero for an ideal, lossless gear"
variable total_power::Real
relations
torque.tau = 10 * sin(2 * pi * time)
connect(torque.spline, rotor_a.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(rotor_a.flange_b, gear.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(gear.flange_b, rotor_b.flange_a) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "path": {}}}
connect(torque.support, mount.flange_b) {
"Dyad": {
"edges": [
{
"S": 1,
"M": [{"x": 190, "y": 175}, {"x": 265, "y": 175}, {"x": 265, "y": 275}],
"E": 2
}
],
"path": {}
}
}
connect(world.frame_b, mount.frame_a, rotor_a.frame_a, gear.frame_a, rotor_b.frame_a) {
"Dyad": {
"edges": [
{"S": 1, "M": [], "E": -1},
{"S": -1, "M": [], "E": 2},
{"S": -1, "M": [], "E": -2},
{"S": -2, "M": [], "E": 3},
{"S": -2, "M": [], "E": -3},
{"S": -3, "M": [], "E": 4},
{"S": -3, "M": [{"x": 590, "y": 380}], "E": 5}
],
"junctions": [{"x": 200, "y": 380}, {"x": 330, "y": 380}, {"x": 460, "y": 380}],
"path": {}
}
}
total_power = torque.tau * rotor_a.w - (J_a * rotor_a.w * rotor_a.a + J_b * rotor_b.w * rotor_b.a)
metadata {}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses