F_drag = ½·ρ·Cd·A·v²
F_gravity = m·g·sin(θ)
P = (F_drag+F_roll+F_gravity)·v
At equilibrium, the rider's power output balances aerodynamic drag, rolling resistance, and gravity along the gradient. This sim numerically integrates that force balance each frame to find the resulting speed, then computes cadence from wheel speed and gear ratio.
- Rider power — sustained power output; higher power increases equilibrium speed.
- Road gradient — uphill (+) adds a gravity force component opposing motion; downhill (−) assists it.
- Gear ratio — sets the relationship between wheel speed and pedal cadence, as on a real derailleur drivetrain.
- Aero / drafting mode — halves the drag coefficient to simulate riding in a peloton draft, a real racing tactic.
Real-world application: pro cycling teams use exactly this power/drag/gradient model (see Cycling analytics tools) to pace climbs and time-trials.