BikeTrailer.Components.Vehicle

# .BikeTrailer.Components.Vehicle

Simple vehicle model

## Information

This is a simple model of a ground vehicle, comprising the mass, the aerodynamic drag, the rolling resistance and the inclination resistance (caused by the road grade). For all particular resistances, significant variables can be either given by a parameter or input by a time-variable signal.

The vehicle can be driven at the rotational flange `flangeR`, e.g. by an electric motor and a gearbox. It is possible to use the vehicle as a passive trailer, leaving the rotational flange `flangeR` unconnected.

At the translational flange `flangeT` the vehicle can be coupled with another vehicle, e.g. as a trailer or to pull a trailer. It is possible to leave the translational flange `flangeT` unconnected.

The velocity `v` and the driven distance `s` of the vehicle are provided as variables; the vehicle can be initialized using these variables.

#### Mass and inertia

Both the translational vehicle mass and the rotational inertias (e.g. the wheels) are accelerated when the vehicle is accelerated. This nature is usually put into account for fundamental vehicle analyses done either in the rotational or translational domain, e.g. when analysing vehicle's driveline. Then, the vehicle mass `m` can be expressed as an additional equivalent inertia `J_eq = m * R2` or vice versa rotational inertia `J` as an additional equivalent mass `m_eq = J/R2`, where `R` is the wheel radius. Since this model introduces rolling resistance and inclination resistance as well where just the vehicle mass plays a role, the approach of equivalent mass/inertia would lead to incorrect simulation results and shall therefore not be applied here.

#### Drag resistance

>     fDrag = Cd*rho*A*(v - vWind)^2/2

Wind velocity is measured in the same direction as velocity of `flangeT`. Wind velocity is either constant or prescribed by the input `vWind`.

#### Rolling resistance

>     fRoll = Cr*m*g*cos(alpha)

Rolling resistance coefficient Cr is either constant or prescribed by the input `cr`. Rolling resistance has a crossover from positive to negative velocity within `[-vReg, vReg]`.

The inclination angle α is either constant or prescribed by the input `inclination` = tan(α). This corresponds to the road rise over running distance of 100 m which, in general, is written as a percentage. For example for a road rising by 10 m over 100 m the grade = 10 % and, thus, the parameter `inclinationConstant = 0.1`. Positive inclination means driving uphill, negative inclination means driving downhill, in case of positive vehicle velocity.

#### Inclination resistance

>     fGrav = m*g*sin(alpha)

With the inclination angle α described above.

Generated at 2026-05-09T18:18:56Z by OpenModelicaOpenModelica 1.26.7 using GenerateDoc.mos