LIBRARY
examples.suspension.FullCar
Full four-wheel car model: four ExcitedWheelAssembly corner suspensions (front/back × left/right) mounted on a three-body chassis structure (front_axle, back_front main body, back_axle). The back_front body is the free-floating orientation root (Euler-angle state).
Usage
MultibodyComponents.examples.suspension.FullCar(wheel_base=1, ms=1500, rod_radius=0.02, gray=[0.4, 0.4, 0.4, 0.3])
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
wheel_elastic_contact | Use compliant (elastic) tire contact on all four corners. Default false keeps the rigid no-penetration contact (larger but determinate inline-linear block). Setting true makes f_n an explicit spring-damper, decoupling the wheel-ground contact so f_n and the contact accelerations leave the coupled block. | – | false |
chassis_bushings | Mount each suspension corner to the chassis through a compliant 6-DOF Bushing, decoupling the four corners so the single coupled inline-linear block fragments into per-corner blocks (much smaller, at the cost of added compliant states). | – | false |
wheel_base | Wheelbase / track distance [m] | – | 1 |
ms | Mass of the car [kg] | kg | 1500 |
rod_radius | Radius of the rods | – | 0.02 |
Behavior
Source
dyad
"""
Full four-wheel car model: four `ExcitedWheelAssembly` corner suspensions
(front/back × left/right) mounted on a three-body chassis structure
(`front_axle`, `back_front` main body, `back_axle`). The `back_front` body is the
free-floating orientation root (Euler-angle state).
"""
component FullCar
world = MultibodyComponents.World() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
},
"tags": []
}
}
front_axle = MultibodyComponents.BodyShape(m = ms / 4, r = [0, 0, -wheel_base], radius = 0.1, color = gray) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 100, "x2": 450, "y2": 200, "rot": 0}
},
"tags": []
}
}
back_front = MultibodyComponents.BodyShape(m = ms / 2, r = [-2, 0, 0], radius = 0.2, color = gray, orientation_state = MultibodyComponents.OrientationState.Euler(), statePriority = 1000, linearStatePriority = 1000) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 290, "x2": 550, "y2": 390, "rot": 90}
},
"tags": []
}
}
back_axle = MultibodyComponents.BodyShape(m = ms / 4, r = [0, 0, -wheel_base], radius = 0.1, color = gray) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 560, "x2": 450, "y2": 660, "rot": 0}
},
"tags": []
}
}
excited_suspension_fr = ExcitedWheelAssembly(mirror = false, rod_radius = rod_radius, amplitude = 0.015, freq = 2.9, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 700, "y1": 100, "x2": 800, "y2": 200, "rot": 0}
},
"tags": []
}
}
excited_suspension_fl = ExcitedWheelAssembly(mirror = true, rod_radius = rod_radius, amplitude = 0.015, freq = 2.8, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 320, "y1": 100, "x2": 220, "y2": 200, "rot": 0}
},
"tags": []
}
}
excited_suspension_br = ExcitedWheelAssembly(mirror = false, rod_radius = rod_radius, amplitude = 0.015, freq = 3.1, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 690, "y1": 560, "x2": 790, "y2": 660, "rot": 0}
},
"tags": []
}
}
excited_suspension_bl = ExcitedWheelAssembly(mirror = true, rod_radius = rod_radius, amplitude = 0.015, freq = 3.2, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 310, "y1": 560, "x2": 210, "y2": 660, "rot": 0}
},
"tags": []
}
}
"Wheelbase / track distance [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
"""
Use compliant (elastic) tire contact on all four corners. Default false keeps
the rigid no-penetration contact (larger but determinate inline-linear block).
Setting true makes f_n an explicit spring-damper, decoupling the wheel-ground
contact so f_n and the contact accelerations leave the coupled block.
"""
structural parameter wheel_elastic_contact::Boolean = false
"""
Mount each suspension corner to the chassis through a compliant 6-DOF Bushing,
decoupling the four corners so the single coupled inline-linear block fragments
into per-corner blocks (much smaller, at the cost of added compliant states).
"""
structural parameter chassis_bushings::Boolean = false
final parameter gray::Real[4] = [0.4, 0.4, 0.4, 0.3]
relations
connect(back_front.frame_a, front_axle.frame_cm) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(back_front.frame_b, back_axle.frame_cm) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(front_axle.frame_a, excited_suspension_fr.chassis_frame) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(excited_suspension_fl.chassis_frame, front_axle.frame_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(excited_suspension_br.chassis_frame, back_axle.frame_a) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(excited_suspension_bl.chassis_frame, back_axle.frame_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {"Dyad": {"icons": {"default": "dyad://MultibodyComponents/FullCar.svg"}}}
endFlattened Source
dyad
"""
Full four-wheel car model: four `ExcitedWheelAssembly` corner suspensions
(front/back × left/right) mounted on a three-body chassis structure
(`front_axle`, `back_front` main body, `back_axle`). The `back_front` body is the
free-floating orientation root (Euler-angle state).
"""
component FullCar
world = MultibodyComponents.World() {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 20, "y1": 20, "x2": 120, "y2": 120, "rot": 0}
},
"tags": []
}
}
front_axle = MultibodyComponents.BodyShape(m = ms / 4, r = [0, 0, -wheel_base], radius = 0.1, color = gray) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 100, "x2": 450, "y2": 200, "rot": 0}
},
"tags": []
}
}
back_front = MultibodyComponents.BodyShape(m = ms / 2, r = [-2, 0, 0], radius = 0.2, color = gray, orientation_state = MultibodyComponents.OrientationState.Euler(), statePriority = 1000, linearStatePriority = 1000) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 450, "y1": 290, "x2": 550, "y2": 390, "rot": 90}
},
"tags": []
}
}
back_axle = MultibodyComponents.BodyShape(m = ms / 4, r = [0, 0, -wheel_base], radius = 0.1, color = gray) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 550, "y1": 560, "x2": 450, "y2": 660, "rot": 0}
},
"tags": []
}
}
excited_suspension_fr = ExcitedWheelAssembly(mirror = false, rod_radius = rod_radius, amplitude = 0.015, freq = 2.9, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 700, "y1": 100, "x2": 800, "y2": 200, "rot": 0}
},
"tags": []
}
}
excited_suspension_fl = ExcitedWheelAssembly(mirror = true, rod_radius = rod_radius, amplitude = 0.015, freq = 2.8, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 320, "y1": 100, "x2": 220, "y2": 200, "rot": 0}
},
"tags": []
}
}
excited_suspension_br = ExcitedWheelAssembly(mirror = false, rod_radius = rod_radius, amplitude = 0.015, freq = 3.1, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 690, "y1": 560, "x2": 790, "y2": 660, "rot": 0}
},
"tags": []
}
}
excited_suspension_bl = ExcitedWheelAssembly(mirror = true, rod_radius = rod_radius, amplitude = 0.015, freq = 3.2, angular_state = false, iscut = false, elastic_contact = wheel_elastic_contact, elastic_mount = chassis_bushings) {
"Dyad": {
"placement": {
"diagram": {"iconName": "default", "x1": 310, "y1": 560, "x2": 210, "y2": 660, "rot": 0}
},
"tags": []
}
}
"Wheelbase / track distance [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
"""
Use compliant (elastic) tire contact on all four corners. Default false keeps
the rigid no-penetration contact (larger but determinate inline-linear block).
Setting true makes f_n an explicit spring-damper, decoupling the wheel-ground
contact so f_n and the contact accelerations leave the coupled block.
"""
structural parameter wheel_elastic_contact::Boolean = false
"""
Mount each suspension corner to the chassis through a compliant 6-DOF Bushing,
decoupling the four corners so the single coupled inline-linear block fragments
into per-corner blocks (much smaller, at the cost of added compliant states).
"""
structural parameter chassis_bushings::Boolean = false
final parameter gray::Real[4] = [0.4, 0.4, 0.4, 0.3]
relations
connect(back_front.frame_a, front_axle.frame_cm) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(back_front.frame_b, back_axle.frame_cm) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(front_axle.frame_a, excited_suspension_fr.chassis_frame) {"Dyad": {"edges": [{"S": 1, "M": [], "E": 2}], "renderStyle": "standard"}}
connect(excited_suspension_fl.chassis_frame, front_axle.frame_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(excited_suspension_br.chassis_frame, back_axle.frame_a) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
connect(excited_suspension_bl.chassis_frame, back_axle.frame_b) {"Dyad": {"renderStyle": "standard", "edges": [{"S": 1, "E": 2, "M": []}]}}
metadata {"Dyad": {"icons": {"default": "dyad://MultibodyComponents/FullCar.svg"}}}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses