Roller Coaster Physics (2D)

Side view of a train on a hill profile: energy exchange, speed, felt g-force and the effect of friction and drag.

Switch to 3D

Presets

Playback

Track

Height of the three hills, the valley floor and their spacing.

Train and losses

Mass, rolling friction and air drag.

Layers

Model checks

The science

Energy on a track

A train released from rest at height H1 trades potential for kinetic energy: v^2 / 2 + g h = g H1 without losses, so v = sqrt(2 g (H1 - h)) at any lower point, independent of the track shape. It can only reach a later hill if that hill is lower than H1 (with friction, noticeably lower).

Equation of motion along the curve

For a track y(x) with slope angle theta the speed along the rail obeys dv/dt = -g sin(theta) - mu N/m sign(v) - k v |v|. The normal force per unit mass is N/m = g cos(theta) + v^2 kappa, with curvature kappa = y'' / (1 + y'^2)^(3/2) (positive in a valley, negative on a crest). The felt vertical g-force is N/(m g): above 1 g at the bottom of a valley, below 1 g on a crest, and at or below 0 the train would leave the rail (airtime).

Simplifications

One point-mass train that always stays on the rail (a warning shows when it would not), a smooth hill profile made from cosine blends, a constant rolling-friction coefficient, quadratic drag, no lateral forces, no loops and no brakes. Real coasters add banking, clothoid loops and lift-hill chains.

What to try
  • Raise H2 above H1 with the frictionless preset: the train stops below the crest and rolls back.
  • Switch on rolling friction and drag: the speed curve falls below the ideal dashed line.
  • Make the valleys deeper and the hills sharper: the g-force graph shows spikes at the bottoms and dips below 1 g on crests.
  • Watch the speed-versus-height graph: without losses all points lie on the ideal curve.
Speed along the track
Vertical g-force along the track
Energy versus time
Speed versus height