Aero · Rolling · Drivetrain power breakdown along a segment
The simulator computes the instantaneous mechanical power a cyclist must produce at every point along a segment, then splits it into four components: aerodynamic drag, rolling resistance, gravitational resistance, and drivetrain losses.
The simulation proceeds in the time domain with a fixed timestep of dt = 0.2 s (Euler integration). Distance is accumulated from velocity; results are then re-sampled on a uniform distance axis for display.
The road gradient is given as a percentage G (rise over run × 100). The actual slope angle θ satisfies:
For small gradients (|G| < 10 %) the difference between sin(θ) and tan(θ) is negligible (< 0.5 %), but the simulator uses the exact expressions.
Drag force depends on the apparent wind speed, i.e. the speed of air relative to the rider. Wind is defined as positive for headwind, negative for tailwind.
| Symbol | Name | Typical values |
|---|---|---|
| ρ | Air density | 1.225 kg/m³ at sea level, 15 °C |
| CdA | Drag area (Cd × frontal area) | 0.20 m² (TT) · 0.30 m² (drops) · 0.35 m² (relax) |
| v_wind | Wind speed (+ = headwind) | 0 km/h (calm) to ±40 km/h |
Rolling resistance is modelled as a force proportional to the normal load. On a slope, the normal force is the component of gravity perpendicular to the road surface:
| Symbol | Name | Typical values |
|---|---|---|
| Crr | Rolling resistance coefficient | 0.003–0.005 (road) · 0.006–0.012 (gravel) |
| m | Total mass (rider + bike) | 70–90 kg for a typical road setup |
| g | Gravitational acceleration | 9.81 m/s² |
On a slope, the rider must overcome (or is assisted by) the component of gravity along the road:
On flat terrain (G = 0) this term is zero. Downhill, P_grav is negative — it represents energy recovered from potential energy (no regenerative braking modelled; the simulator simply shows the theoretical power balance).
Real drivetrains (chain, derailleurs, bearings) are not perfectly efficient. The efficiency η (0 < η ≤ 1) relates power at the crank to power delivered at the rear wheel:
| η | Condition |
|---|---|
| 0.98 | Clean, well-lubricated chain — default |
| 0.95–0.97 | Dirty chain or cross-chaining |
| 0.90–0.94 | Old/worn drivetrain or internal gear hub |
The rider speed v(t) is prescribed as a function of time. Three profiles are available, all parametrised by a mean speed v̄, an amplitude A, and a period T:
Speed is clamped to a minimum of 0.5 m/s to avoid numerical singularities (e.g. the triangle wave dipping to zero).
Time advances in steps of dt = 0.2 s (Euler forward method). At each step:
The 0.2 s timestep introduces a relative distance error < 0.01 % for the profiles tested (the dominant error comes from profile discretisation, not the integration step itself).
The resulting time-series (potentially tens of thousands of points) is downsampled to 500 points for rendering, preserving visual accuracy while keeping the browser responsive.
The percentage split shown in the stats cards is computed relative to the total average crank power P̄_crank.