Vehicle body
automotive.vehicle_body
Longitudinal motion of a vehicle as one mass. The flange takes the traction force from the tires. Aerodynamic drag grows with the square of speed, rolling resistance is Crr times the normal force and turns sign with the direction of travel, and the grade input (road angle in rad, uphill positive) adds the downhill pull of gravity.
Ports
| Name | Domain | Direction |
|---|---|---|
grade | signal | in |
flange | translational |
Parameters
| Name | Unit | Default | Range | Description |
|---|---|---|---|---|
m | kg | 1500 | 0 to ∞ | Vehicle mass |
Cd | 1 | 0.3 | 0 to ∞ | Drag coefficient |
A | m2 | 2.2 | 0 to ∞ | Frontal area |
rho | kg/m3 | 1.2 | 0 to ∞ | Air density |
Crr | 1 | 0.01 | 0 to ∞ | Rolling resistance coefficient |
v_s | m/s | 0.1 | 0.000001 to ∞ | Speed over which rolling resistance builds up from zero, to keep it smooth at standstill |
v0 | m/s | 0 | Speed at the start |
Variables
| Name | Unit | Start | Description |
|---|---|---|---|
s | m | Distance travelled | |
v | m/s | v0 | Speed |
Fd | N | Aerodynamic drag | |
Fr | N | Rolling resistance | |
Fg | N | Gravity along the road | |
g | m/s2 | Standard gravity |
Equations
s = flange.s v = der(s) m * der(v) = flange.f - Fd - Fr - Fg Fd = 0.5 * rho * Cd * A * v * abs(v) Fr = Crr * m * g * cos(grade) * tanh(v / v_s) Fg = m * g * sin(grade) g = 9.80665