LIBRARY
examples.suspension.DoubleSuspensionWithExcitationAndMass
Half-car model: two excited quarter-car suspensions (right mirror=false and left mirror=true) mounted on a chassis BodyShape. The chassis is attached to the world through a vertical Prismatic and a roll Revolute, so it can heave and roll.
Usage
MultibodyComponents.examples.suspension.DoubleSuspensionWithExcitationAndMass(wheel_base=1, ms=1500, rod_radius=0.02, CD=228.60 / 1000)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
wheel_base | Distance between the left and right wheels [m] | – | 1 |
ms | Mass of the car [kg] | kg | 1500 |
rod_radius | Radius of the rods | – | 0.02 |
Behavior
Source
dyad
"""
Half-car model: two excited quarter-car suspensions (right `mirror=false` and
left `mirror=true`) mounted on a chassis `BodyShape`. The chassis is attached to
the world through a vertical `Prismatic` and a roll `Revolute`, so it can heave
and roll.
"""
component DoubleSuspensionWithExcitationAndMass
world = MultibodyComponents.World()
mass = MultibodyComponents.BodyShape(m = ms, r = [0, 0, -wheel_base], radius = 0.1, color = [0.4, 0.4, 0.4, 0.3])
excited_suspension_r = SuspensionWithExcitation(mirror = false, rod_radius = rod_radius, r = [0, 0, CD + wheel_base / 2], r_0 = [0, 0.1, 0])
excited_suspension_l = SuspensionWithExcitation(mirror = true, rod_radius = rod_radius, r = [0, 0, -(CD + wheel_base / 2)], r_0 = [0, 0.1, 0])
body_upright = MultibodyComponents.Prismatic(n = [0, 1, 0], render = false, statePriority = 1000)
body_upright2 = MultibodyComponents.Revolute(n = [1, 0, 0], n_nonzero = [true, false, false], render = false, statePriority = 1000, phi(initial = 0), w(initial = 0))
"Distance between the left and right wheels [m]"
parameter wheel_base::Real = 1
"Mass of the car [kg]"
parameter ms::Mass = 1500
"Radius of the rods"
parameter rod_radius::Real = 0.02
final parameter CD::Real = 228.60 / 1000
relations
connect(world.frame_b, body_upright.frame_a)
connect(body_upright.frame_b, body_upright2.frame_a)
connect(body_upright2.frame_b, mass.frame_cm)
connect(excited_suspension_r.chassis_frame, mass.frame_a)
connect(excited_suspension_l.chassis_frame, mass.frame_b)
metadata {
"Dyad": {
"icons": {
"default": "dyad://MultibodyComponents/DoubleSuspensionWithExcitationAndMass.svg"
}
}
}
endFlattened Source
dyad
"""
Half-car model: two excited quarter-car suspensions (right `mirror=false` and
left `mirror=true`) mounted on a chassis `BodyShape`. The chassis is attached to
the world through a vertical `Prismatic` and a roll `Revolute`, so it can heave
and roll.
"""
component DoubleSuspensionWithExcitationAndMass
world = MultibodyComponents.World()
mass = MultibodyComponents.BodyShape(m = ms, r = [0, 0, -wheel_base], radius = 0.1, color = [0.4, 0.4, 0.4, 0.3])
excited_suspension_r = SuspensionWithExcitation(mirror = false, rod_radius = rod_radius, r = [0, 0, CD + wheel_base / 2], r_0 = [0, 0.1, 0])
excited_suspension_l = SuspensionWithExcitation(mirror = true, rod_radius = rod_radius, r = [0, 0, -(CD + wheel_base / 2)], r_0 = [0, 0.1, 0])
body_upright = MultibodyComponents.Prismatic(n = [0, 1, 0], render = false, statePriority = 1000)
body_upright2 = MultibodyComponents.Revolute(n = [1, 0, 0], n_nonzero = [true, false, false], render = false, statePriority = 1000, phi(initial = 0), w(initial = 0))
"Distance between the left and right wheels [m]"
parameter wheel_base::Real = 1
"Mass of the car [kg]"
parameter ms::Mass = 1500
"Radius of the rods"
parameter rod_radius::Real = 0.02
final parameter CD::Real = 228.60 / 1000
relations
connect(world.frame_b, body_upright.frame_a)
connect(body_upright.frame_b, body_upright2.frame_a)
connect(body_upright2.frame_b, mass.frame_cm)
connect(excited_suspension_r.chassis_frame, mass.frame_a)
connect(excited_suspension_l.chassis_frame, mass.frame_b)
metadata {
"Dyad": {
"icons": {
"default": "dyad://MultibodyComponents/DoubleSuspensionWithExcitationAndMass.svg"
}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses