01 PistonLab · crank-angle cycle

Reciprocating engines,
crank angle by crank angle.

A first-law cycle solver for petrol and diesel engines. Set the geometry, fuel and operating point, and read the real rounded P–V loop, the indicated-versus-brake split, and the dyno curve. Finite-rate Wiebe combustion resolved into burned and unburned zones, specific heats that follow temperature and composition, Woschni wall heat, friction, pumping, valve-limited breathing and real fuel thermochemistry — every loss is modelled and shown.

Solver parameters
49
Loss models
6
Combustion zones
2
Compression envelope
6→24

02 Console Live solver

Build an engine, watch it run.

Every control re-solves the cycle. The animation, the loops and the numbers all come from the same crank-angle integration.

CONCEPT · PETROL VS DIESEL
Both squeeze air and burn fuel in it; they differ in what starts the fire. A petrol engine premixes fuel and air, compresses modestly, and a spark lights it — so compression is capped by knock. A diesel compresses air alone, hard enough that injected fuel self-ignites — so it runs lean, at high compression, and trades peak revs for efficiency and torque.

Live engine

Spark
Intake

A four-stroke cycle in motion, on your geometry. Charge colour tracks gas temperature; the spark plug fires on your timing. Watch the marker trace the P–V and T–s loops below as the piston moves.

What you've built

—

Cycle diagrams

P–V loop
T–s loop

Indicated → brake

Where the work goes

Energy balance

Of the fuel released

Analysis

Crank-resolved

Numerics

Integration, not physics
Resolution of the march itself. A smaller step is slower and should barely move the answer — if it moves it a lot, the answer was not converged.
Re-solves this engine at six step sizes.

Dyno curve

Sweep speed to draw torque and power against rpm.

What you are looking at

These are crank-angle first-law results, not a dyno sheet. The in-cylinder gas is marched through compression, finite-rate Wiebe combustion and expansion with Woschni wall heat loss; friction (Chen–Flynn) and the pumping loop convert indicated work to brake work. Fuelling is real: the heat release comes from the fuel's chemistry and the mixture strength, and knock / smoke limits are flagged. Specific heats follow temperature and composition (fitted to Cantera), and combustion is resolved into burned and unburned zones, so the end-gas temperature that drives knock is computed rather than estimated. Composition is frozen — dissociation is not modelled, so burned-zone temperatures still read high — and brake numbers remain model estimates with stated assumptions, not measurements.