TRIGAINS

The Physics of Marginal Gains

Definitions and derivations behind the CdA / CWPS / CWPP / CWPM / Caps model.

0. The BASE rider — what every "savings" number is measured against

Every savings figure in this app is a delta from a baseline athlete using stock, non-aero equipment. Each item stores a physics primitive — bike items carry a drag-area reduction ΔCdA (m²), a rolling-resistance reduction ΔCrr, or a constant drivetrain saving ΔWatts; swim and run items carry a fractional speed gain Δtime%. CWPS, CWPP and CWPM are all derived downstream from those primitives.

The reference equipment configuration

  • Bike: stock road bike, round-tube frame, no aero handlebar extensions. CdA ≈ 0.32 m² in a relaxed hoods position.
  • Tires & tubes: stock training clinchers + butyl inner tubes. Crr ≈ 0.005 each.
  • Drivetrain: factory-greased chain, stock derailleur pulleys, sealed steel bottom-bracket bearings (~6 W loss at 250 W).
  • Helmet & kit: standard road helmet, club-issue jersey + bib (no skinsuit).
  • Swim: jammers / standard race brief, no wetsuit or swimskin.
  • Run: a mid-stack neutral trainer (~250 g, no carbon plate).

The reference athlete

The model uses two reference power points, calibrated independently:

  • Race-duration reference (150 W): sets Tbase via \( T_{\text{base}} = 6.33 \times (150/P)^{1/3} \times (D/180) \). A 150 W rider covers 180 km in 6.33 h (≈ 28.4 km/h average), the de-facto endurance-amateur benchmark.
  • Upgrade-scaling reference (225 W): the point where the empirical aero bump κ equals 1.0. A 300 W rider on a direct-aero item gets \( (300/225)^{0.15} \approx 1.045\times \) that bump — about 4.5% more.
  • Swim reference (1.05 m/s ≈ 1:35/100m): κ = 1.0; faster swimmers scale as \( (v/1.05)^{0.4} \).
  • Run reference (3.33 m/s ≈ 5:00/km): κ = 1.0; faster runners scale as \( (v/3.33)^{0.25} \).

Reference parameters

All constants live in one place (REF in math.js) and several are derived from each other:

  • \( \rho = 1.204\ \text{kg/m}^3 \) (air), \( g = 9.81\ \text{m/s}^2 \), system mass \( m = 80\ \text{kg} \).
  • \( p_{\text{ref}} = 225\ \text{W} \) (empirical κ anchor), \( p_{\text{base}} = 150\ \text{W} \) (Tbase anchor), \( CdA_{\text{base}} = 0.32 \), \( C_{\text{rr,base}} = 0.005 \), \( \mathcal{L}_{\text{dt}} = 6\ \text{W} \).
  • Derived: \( v_{\text{ref}} \) solves the full power balance \( P = \tfrac12\rho\,CdA\,v^3 + C_{\text{rr}} m g v + \mathcal{L}_{\text{dt}} \) at \( p_{\text{ref}} \)\( \approx 9.79\ \text{m/s} \approx 35.2\ \text{km/h} \) (numeric Newton solve, not the drag-only inversion).
  • Swim/run velocity refs: \( v_{\text{swim,ref}} = 1.05\ \text{m/s} \), \( v_{\text{run,ref}} = 3.33\ \text{m/s} \).

225 W is an empirical convention, not a physical constant — it's a typical serious-AG-triathlete power that sits well above the 150 W Tbase anchor. And \( v_{\text{ref}} \) is only a default: the live CWPS/CWPM numbers solve for your own equilibrium speed and evaluate every regime's watts saved there — one self-consistent operating point, no fixed reference and no dual-speed mixing.

How a "time saved" number is built

  1. Solve the power balance for your equilibrium flat-road speed \( v^* \) at your power \( P \) (numeric).
  2. Bike: compute watts saved at \( v^* \)\( \Delta P = \tfrac12\rho {v^*}^3\,\Delta CdA \) (aero), \( \Delta Crr\, m g v^* \) (rolling), or a constant \( \Delta W \) (drivetrain) — then convert with the component-aware multiplier from the same solve, \( \Delta M_{\text{hr}} = 60\,\Delta P / (3 P_{\text{aero}} + P_{\text{roll}}) \) (\( \approx 23\,\Delta P/P \) at 225 W). Swim/run: \( \Delta M_{\text{hr}} = 60 \times \Delta\text{time\%} \).
  3. Multiply by the empirical curve bump κ(profile) (aero/reynolds/swim/run only).
  4. Multiply by the baseline leg duration: \( \Delta t = \Delta M_{\text{hr}} \times \kappa \times T_{\text{base}} \).

Owned-gear rebaselining

Marking bike gear owned re-prices everything else at two levels:

  1. Operating point. Owned aero gear lowers your $CdA$, owned tyres/tubes lower $C_{\text{rr}}$, owned drivetrain parts lower \( \mathcal{L}_{\text{dt}} \). The full power balance is re-solved for a new equilibrium speed $v^*$, and every remaining bike upgrade — grouped or not — has its watts saved and CWPS/CWPM re-computed at that speed. Faster riders who already own aero gear see remaining aero items convert slightly more efficiently and drivetrain items slightly less.
  2. Mutually-exclusive groups. Equipment that comes in tiers — TT frames, inner-tube types, race wetsuits — forms a group. Own one and its group-mates additionally rebaseline to the marginal minutes-per-hour over what you own (evaluated at the same $v^*$), not the full gap from stock. Marking a new group-mate owned replaces the old one.

What this means in practice: the "Mark as owned" toggle makes the remaining catalog show what each upgrade is worth to you, on the gear you already ride — your true current configuration — rather than against the bare BASE rider. CWPS is part of this: it is no longer a fixed basis but moves with your owned setup.

1. Baseline Velocity Profile (The Cubic Curve)

Race duration follows a normalized non-linear endurance decay curve:

\[ T_{\text{base}} = 6.33 \times \left(\frac{150}{P_{\text{athlete}}}\right)^{\frac{1}{3}} \times \left(\frac{D_{\text{target}}}{180}\right) \]
  • $P_{\text{athlete}}$ — sustained target bike power output (Watts).
  • $D_{\text{target}}$ — target race distance (km).
Your status: at 225W over 180km, baseline split ≈ 5.53 h.

2. CdA — Coefficient of Aerodynamic Drag

CdA combines the drag coefficient $C_d$ (shape / surface separation) and frontal area $A$ (m$^2$). A lower CdA means fewer watts are needed to hold a given speed.

Drag force

\[ F_d = \tfrac{1}{2} \, \rho \, v^2 \, CdA \]

Power required to overcome air resistance

\[ P_d = \tfrac{1}{2} \, \rho \, v^3 \, CdA \]
  • $\rho$ — air density (≈ $1.204\ \text{kg/m}^3$ at sea level, 20°C).
  • $v$ — velocity relative to wind ($\text{m/s}$).

Takeaway: doubling speed requires ~8× the power unless you reduce CdA.

Solving for your CdA

Rearranging the cubic for the all-drag scenario:

\[ CdA \approx \frac{2 \, P}{\rho \, v^3} \]
Your status: at 225W averaging ≈ 32.6 km/h over 180km, your implied CdA ≈ 0.506 m² (drag-dominated approximation).

3. CWPS — Cost per Watt Saved

CWPS is the bike ranking metric: dollars per watt of drag removed. Because watts saved depends on speed, it is evaluated at your equilibrium flat-road speed $v^*$ — the speed your power produces against the full resistance budget (aero + rolling + drivetrain), solved numerically — not a fixed reference and not a drag-only idealization.

\[ \text{CWPS} = \frac{\text{Cost}\ (\$)}{\tfrac{1}{2}\,\rho\, {v^*}^3\, \Delta CdA} \]

For rolling items \( \Delta P = \Delta C_{\text{rr}}\, m g v^* \); for drivetrain items the watts are a constant. CWPS only exists for bike gear — swim/run carry no measurable propulsive watts.

Your status: at 225W your equilibrium speed is ≈ 35.2 km/h, so every 0.01 m² of CdA you remove is worth ≈ 5.6 W. A $400 frame saving that much would cost ≈ $71/W.

4. CWPP — Cost per Percentage-Point of Speed Gain

CWPP is the swim/run sibling to CWPS. Manufacturers quote swim and run gear as fractional speed or efficiency gains, not in watts — there's no measurable propulsive power for a wetsuit or a running shoe — so the race-independent ranking metric is dollars per percentage-point of speed gain.

\[ \text{CWPP} = \frac{\text{Cost}\ (\$)}{\Delta\text{time\%} \times 100} \qquad [\$/\%] \]

How to read it — lower is better

  • Wetsuit: $500 at 4% → CWPP = $125/%
  • Swimskin: $250 at 1.5% → CWPP = $166.67/%
  • Carbon-plate racing shoe: $280 at 2.5% → CWPP = $112/%

CWPS ($/W) and CWPP ($/%) live in different units and are not directly comparable across disciplines. Both feed into CWPM (minutes saved at a given race), which is comparable across swim, bike and run.

5. CWPM — Cost per Minute Saved

CWPM is the most actionable metric and the dashboard's default sort: dollars per minute shaved off your race split. It is profile- and distance-dependent.

Step 1 — minutes saved per hour at your operating point

\[ \Delta M_{\text{hr}} = \frac{60\,\Delta P}{3 P_{\text{aero}} + P_{\text{roll}}}\ \text{(bike)} \quad\text{or}\quad 60 \times \Delta\text{time\%}\ \text{(swim/run)} \]

The bike denominator is \( dP/dv \cdot v^* = 3 P_{\text{aero}} + P_{\text{roll}} \) from the same power balance — it turns watts saved into the fraction of leg time removed. At the 225 W anchor it works out to \( \approx 23\,\Delta P / P \), replacing the old drag-only constant of 20.

Your status: at 225W your effective multiplier is ≈ 23.3 · ΔP/P min/h.

Step 2 — total time saved over the leg

\[ M_{\text{saved}} = \Delta M_{\text{hr}} \times \kappa(\text{profile}) \times T_{\text{base}} \]
  • Direct aero: empirical bump $\kappa = (P/225)^{0.15}$.
  • Reynolds (deep wheels, helmets, skinsuits): $\kappa = (P/225)^{0.35}$.
  • Rolling / drivetrain: no $\kappa$ — the power-scaling already lives in $\Delta P$ (see §7).

Step 3 — the CWPM formula

\[ \text{CWPM} = \frac{\text{Cost}\ (\$)}{M_{\text{saved}}\ (\text{min})} \]

6. Caps — Power Balance & Diminishing Marginal Gains

A "Cap" is the ceiling of practical aero optimization: human anatomy needs a minimum structural footprint to make power, so CdA cannot fall indefinitely without collapsing the hip angle.

Power balance equilibrium

\[ P_{\text{total}} = P_{\text{aero}} + P_{\text{rolling}} + P_{\text{gravity}} + P_{\text{drivetrain}} \]
\[ P_{\text{total}} = \left(\tfrac{1}{2} \rho v^3 \, CdA\right) + \left(C_{\text{rr}} \, m \, g \, v\right) + \left(m \, g \, v \, \sin\theta\right) + \mathcal{L}_{\text{dt}} \]
  • $C_{\text{rr}}$ — coefficient of rolling resistance.
  • $m$ — total system mass (rider + bike, kg).
  • $g$ — gravitational acceleration ($9.81\ \text{m/s}^2$).
  • $\sin\theta$ — road gradient / slope.
  • $\mathcal{L}_{\text{dt}}$ — drivetrain power loss.

As you invest in more expensive gear, returns follow an asymptotic decay curve. A bike fit takes CdA from ~0.320 → ~0.240 for $300; an ultra-premium cockpit may only reach 0.222 → 0.220 for $2,500. The cap inflates all three cost metrics — CWPS, CWPP and CWPM — near the ceiling: it's a property of the whole cost-efficiency stack, not any single metric.

7. Three regimes of resistance

Bike resistance splits into three physically distinct regimes. The old "linear vs Reynolds" framing lumped rolling and drivetrain together — but they scale with speed differently, so a stronger rider gets a different share of the benefit from each.

MetricAero (Reynolds)RollingDrivetrain (Static)
Force scaling$F \propto v^2$$F \approx$ constant$F \propto v^{-1}$
Power scaling$P \propto v^3$$P \propto v^1$$P \approx$ constant
Watts saved by upgradeScales with $v^3$Scales with $v$Constant
Time benefit vs power≈ flat ($P^{0}$)$P^{-2/3}$$P^{-1}$
κ exponent+0.15 / +0.35 (empirical)none — physics supplies itnone — physics supplies it
Example upgradesHelmets, wheels, positionTires, tubesChain wax, bearings

Why rolling is ≈ $P^{-2/3}$ and drivetrain is ≈ $P^{-1}$

Because watts saved are computed at the rider's equilibrium speed $v^*$, the power-scaling of each regime falls out of the physics — no hand-tuned exponent needed. In the drag-dominated limit $v^* \propto P^{1/3}$ and the multiplier \( 60/(3P_{\text{aero}}+P_{\text{roll}}) \to 20/P \), so:

\[ \text{Rolling:}\quad \Delta P_{\text{roll}} = \Delta C_{\text{rr}}\, m g v^* \propto P^{1/3} \;\Rightarrow\; \Delta M_{\text{hr}} \propto P^{-2/3} \]
\[ \text{Drivetrain:}\quad \Delta P_{\text{dt}} = \text{const} \;\Rightarrow\; \Delta M_{\text{hr}} \propto P^{-1} \]

The full solve keeps the \( C_{\text{rr}} \) and \( \mathcal{L}_{\text{dt}} \) terms, so these exponents are approximate — the real curves bend a few percent from the clean powers above, in the direction the physics dictates rather than a tuned constant.

This matches well-known intuition: chain wax matters most to weaker riders, because a 4 W saving is a larger fraction of their total power. Aero is the opposite case — its watts saved rise with $v^3$, roughly cancelling the $1/P$ in the identity to leave a flat-in-power benefit, on top of which the empirical +0.15 / +0.35 bumps reward the small second-order gains (position changes, Reynolds sensitivity) that faster riders unlock.

8. Course pacing — the steady-state model & the optimiser

The pacing simulator plans a real bike course, segment by segment, and optimises total race time rather than the bike split. It rests on the same power balance as the rest of this page, evaluated locally on every ~50 m of the route.

Per-segment steady state

For each segment at gradient $\theta = \arctan(\text{grade})$, power and speed satisfy:

\[ \eta\,P = m g\,(C_{\text{rr}}\cos\theta + \sin\theta)\,v + \tfrac12 \rho\, CdA\, v^3 \]

Given your power the cubic is solved for $v$ (Newton's method); inverted, it gives the power to hold a target speed. Summing $d_i / v_i$ over all segments yields the leg time. This is the classical road-cycling power model (Martin et al. 1998).

Why variable pacing wins

At a fixed average power, time is minimised by spending watts where they buy the most speed — climbs and headwinds — and easing where they buy least — descents and tailwinds (Swain 1997). Formally we minimise total time at fixed time-weighted average power via a Lagrange multiplier $\mu$; each segment independently picks the power that minimises a per-segment cost, cached by gradient:

\[ \min_{P_i \in [P_{\text{floor}},\, P_{\text{ceil}}]} \sum_i \frac{d_i}{v_i(P_i,\theta_i)} \quad\text{s.t.}\quad \overline{P} = \text{const} \;\Longrightarrow\; \min_{P}\ \frac{1 + \mu P}{v(P,\theta)} \]

Takeaway: putting the multiplier on energy ($1+\mu P$) keeps the objective unimodal, so a stable ternary search finds each segment's optimal power. The simulator's "variable vs constant power" panel is exactly this saving — what smart pacing buys at equal effort.

9. Power metrics — NP, IF, VI

The planner reports the three standard power-meter metrics (Allen & Coggan 2019):

\[ \text{NP} = \left( \overline{ \big(\overline{P}_{30\text{s}}\big)^{4} } \right)^{1/4} \qquad \text{IF} = \frac{\text{NP}}{\text{FTP}} \qquad \text{VI} = \frac{\text{NP}}{\overline{P}} \]
  • NP (Normalized Power) — the 4th-power mean of 30 s-rolling-average power. It weights surges, approximating the physiological cost of a variable ride better than a plain average.
  • IF (Intensity Factor) — NP relative to your hour power. Ironman bike legs live in the 0.68–0.78 band; pushing higher trades bike minutes for a slower run.
  • VI (Variability Index) — how surgey the ride is. 1.00 is perfectly even; the planner caps it (≈1.05) so the ride doesn't shred the legs.
Your status: at FTP 310 W, an Ironman NP at IF 0.72 would be ≈ 223 W.

10. Durability — Critical Power & the W′ reserve

Holding an average is not the whole story: repeated surges above a sustainable ceiling deplete a finite anaerobic reserve, and once it's empty you're forced to ease (or you crack on the run). The simulator models this with the critical-power framework (Monod & Scherrer 1965; Jones et al. 2010): a sustainable power $\text{CP}$ (we take $\text{CP} \approx 0.95\,\text{FTP}$) plus a work reserve $W′$ (J) available above it.

The W′-balance model

The reserve depletes above CP and reconstitutes below it (Skiba et al. 2012):

\[ \frac{dW'\!_{\text{bal}}}{dt} = \begin{cases} -(P - \text{CP}) & P > \text{CP} \\[4pt] \big(W'\!_{\max} - W'\!_{\text{bal}}\big)\big(1 - e^{-\Delta t/\tau}\big) & P \le \text{CP} \end{cases} \]

with recovery time constant $\tau \approx 300\,\text{s}$. Integrated over the plan, this gives the lowest reserve reached (the W′ reserve stat). The planner then applies a durability ceiling: any surge that would drive $W′\!_{\text{bal}}$ below zero is trimmed to the most the remaining reserve can fund — so over-cooking the target shows up as an achievable NP below what you asked for, not a fantasy plan.

Your status: Critical Power ≈ 295 W ($0.95 \times$ 310 W); default tank $W′$ = 20 kJ. Surges above 295 W draw it down; easy riding refills it.

11. The objective — total race time

Because the bike is the setup for the marathon, the planner scores swim + bike + run + transitions. A baseline run time (from your flat run speed) is degraded by four over-biking drivers, each adding a percentage to marathon time:

\[ t_{\text{run}} = t_{\text{run,base}} \times \big(1 + \min(0.6,\; p_{\text{IF}} + p_{\text{VI}} + p_{W'} + p_{\text{fuel}})\big) \]
  • Intensity — convex above a durable knee: $p_{\text{IF}} = 9\,(\text{IF} - 0.72)^2$ for $\text{IF} > 0.72$.
  • Surginess — a gentle cost for VI above ≈1.08.
  • Durability — dipping deep into $W′$ (or cracking it) costs progressively.
  • Fuel — convex in the glycogen deficit vs a ~450 g usable store.

Fuelling

Carbohydrate burn comes from the mechanical work and intensity (gross efficiency ≈ 0.24; carb fraction rising with IF), weighed against your hourly intake. The gut absorbs roughly 90 g/h of mixed glucose+fructose (Jeukendrup 2014), so a sustained deficit flags a late-race fade.

These coefficients are reasoned anchors, not data-fitted — the shape (convex, knee'd, capped) is deliberate, but every output is a planning estimate. Full citations sit on the pacing simulator page.