Mechanical · engine cycle

Engine Cycle Simulator

Five engines, one page — petrol, diesel, two-stroke, Atkinson and rotary, each with its own timing and its own indicator diagram.
crank-slider kinematics
4-stroke · 2400 rpm

Engine

2400
3.5
20°
86
86
4
450
10.5
10

Presets

Cylinder cross-section

Intake θ = 0°

sim speed

Real-world timing at this RPM
What that does to the engine

What to look for: the velocity peaks before mid-stroke, not at it, and the acceleration curve is taller at the top than at the bottom. Both are the rod angle at work — shorten the rod and the asymmetry grows.

Indicator diagram

—

How it works

Every stroke is the same slider-crank, timed differently

One slider-crank

Piston motion is computed live from the exact equation x(θ) = r·cos θ + √(L² − r²sin²θ) for the rod ratio you set. Velocity and acceleration are closed-form derivatives.

Four-stroke: 720°

Four strokes take two revolutions, so the camshaft, opening each valve once per cycle, turns at exactly half crank speed.

Two-stroke: ports

The piston itself uncovers ports cut in the wall, timed purely by height. Exhaust and transfer ports open together near the bottom, and scavenging pushes the spent gas out.

The Otto ceiling

Ideal air-standard efficiency at γ = 1.4: an upper bound no real engine reaches. Power uses BMEP, an empirical input you choose.

Worked example. At 2,400 rpm a 4-stroke engine completes one full 720° cycle in 50 ms, but the power stroke that actually drives the crank lasts only a quarter of that, around 12.5 ms: which is why multi-cylinder engines exist, to overlap those short power pulses into smoother output.
Field notes

Reading the cycle

20 m/s

Mean piston speed is the real limit

2 × stroke × rpm decides ring wear, oil film survival and inertial load, and barely varies across engines whose rev counters differ by a hundredfold. Production engines are held near 20 m/s; past about 25, cast pistons stop surviving.

≈ 75°after TDC

Peak piston speed is not at 90 degrees

The rod swings as well as the crank, so the fastest point comes earlier than half way: around 75° for a typical 3.5:1 rod, earlier still for a shorter one. Only an infinitely long rod would peak at 90°.

The top of the stroke is the harder end

Acceleration at TDC is rω²(1 + λ) against rω²(1 − λ) at BDC, so TDC always wins, and it scales with rpm squared: why a redline is a structural limit rather than a breathing one.

TDC and BDC

Top and Bottom Dead Centre: the two points where the piston reverses and instantaneous speed is zero, even though the crank keeps turning at a steady rate.

Valve overlap and scavenging

Valve overlap is a brief window near TDC when both valves are open, letting fresh charge help push out the last exhaust gas (the two lanes briefly overlapping near 0°/720° in the timing diagram). Scavenging is the 2-stroke equivalent: incoming fresh mixture pushes spent gas out through a separate port while the piston is near the bottom.

Spark advance

Combustion takes a small but real time to spread, so firing a set number of degrees before TDC puts peak pressure just after TDC, when the crank is most effective at turning it into torque. Too little leaves power on the table; too much and the engine fights itself.

Is the 2-stroke timing exact?

No: it models a typical piston-ported, crankcase-scavenged design (the classic chainsaw or small outboard) where port height alone decides timing. Reed-valve and rotary-valve two-strokes intake differently and exact port heights vary, but the sequence and phase relationships are representative.

Questions

What people ask

Why does a 4-stroke engine need two crankshaft revolutions per cycle?

Four distinct strokes — intake, compression, power, exhaust — each need one piston pass (one half-revolution) to complete, and four halves make two full revolutions, which is also why a 4-stroke camshaft (which opens the valves once per cycle, not once per revolution) always turns at exactly half crankshaft speed.

How does a 2-stroke engine fit intake, compression, power and exhaust into one revolution?

It overlaps them: the exhaust and transfer ports open together near the bottom of the power stroke so fresh mixture entering low in the cylinder helps push spent gas out (scavenging) at the same time, while compression happens on the way back up and the next charge is simultaneously drawn into the crankcase beneath the piston.

Why does the spark fire before the piston reaches top dead centre?

Combustion takes a small but real amount of time to spread through the cylinder, not an instant. Firing a few degrees early (spark advance) times peak cylinder pressure to land just after TDC, when the crank angle is most effective at converting that pressure into rotating torque, instead of wasting it while the piston is still travelling upward against it.

Is the port timing shown here exact for every 2-stroke engine?

No — this models a typical piston-ported, crankcase-scavenged design (the classic chainsaw or small outboard layout) where port height alone, not a camshaft, decides timing. Reed-valve and rotary-valve 2-strokes intake differently, and exact port heights vary by engine, but the sequence and phase relationships shown are representative.

An idealised model, and a teaching one. The kinematics are exact — position, velocity and acceleration all come from the slider-crank equation for the rod ratio you set, and mean piston speed is a definition. Power comes from BMEP, which is an empirical figure you are choosing rather than something derived: it stands in for everything about breathing and combustion this page does not simulate. Nothing here models gas dynamics, heat transfer, or any specific engine’s real timing.
Five engines

What actually separates them

Four of the five on this page are the same slider-crank. What makes them different engines is when things open and what puts the heat in — and both of those are visible as a moved line on the timing diagram or a changed corner on the indicator loop. The fifth has no crank at all.

Petrol against diesel, which is not the argument people think it is

A petrol engine makes its mixture outside the cylinder and lights it with a spark. That is exactly what caps its compression ratio: squeeze a fuel-air charge hard enough and it lights itself, at the wrong moment, which is knock. A diesel compresses air alone. There is nothing in there to go off early, so the ratio can go where a petrol engine cannot — and since ideal efficiency is 1 − r1−γ, that is the whole prize.

Set both to the same compression ratio on this page and the diesel comes out worse. At 10.5:1 the Otto cycle gives 61.0% and the Diesel cycle 51.0%, because burning at constant pressure while the piston is already moving away is a less effective way to spend heat than burning it all at the top. The diesel wins in the world by running 18:1, not by the shape of its cycle — 62.7% against the petrol engine's 61.0%. It is one of the few places where the popular explanation and the real one point the same way for opposite reasons.

The Atkinson cycle is one valve closing late

Hold the intake valve open into the compression stroke and some of the charge goes back out of the port. The engine now expands further than it compressed, and the extra area under the expansion curve is work taken instead of thrown out of the exhaust. The dashed loop on the indicator diagram is where an ordinary Otto cycle stops; everything past it is the gain.

Complete expansion — all the way down to atmospheric — would need an expansion ratio around twice the compression ratio. That is why the cycle sat unused for a century: the engine is physically larger for the power it makes, which is a bad trade in a car and an excellent one in a hybrid, where a small, efficient, unhurried engine is exactly what is wanted.

And the one with no pistons

A Wankel's rotor has three faces and each runs a complete four-phase cycle every rotor revolution. The rotor turns at a third of the eccentric shaft, so one chamber takes 1080° of shaft to go round its cycle — but with three faces sharing it, each rotor still fires once per shaft revolution, the same rate as a two-stroke. The 3 and the ⅓ cancel exactly, which is the neatest thing about the design.

The housing is an epitrochoid, and not as a styling choice: it is precisely the curve the apexes trace out, which is what allows three chambers to stay sealed from one another with no valves anywhere. Nothing reciprocates, so there is no inertial load to speak of and the whole engine is smooth in a way a piston engine cannot be — and the ports are enormous and overlap heavily, which is most of why it drinks.

The real limit

Engines are not limited by rpm

Mean piston speed is 2 × stroke × rpm, and it is the oldest limit in engine design: it sets ring wear, oil film survival and the inertial load on every reciprocating part. Look at what happens to it across engines that could not be more different.

EngineStroke mmrpmm/s
Large marine two-stroke25001028.5container ship, direct-drive propeller
Farm tractor diesel12022008.8unhurried
Road car, peak power86600017.2normal road engine
Sport motorcycle42.51400019.8normal road engine
Formula 1 power unit531500026.5regulation 80 mm bore, 53 mm stroke

The rpm figures span 147×. The piston speeds span 3.1×. A ship engine turning at 102 rpm and a Formula 1 unit at 15,000 are doing far more similar things to their pistons than the rev counters suggest. This is why "high revving" is meaningless without the stroke: a short-stroke engine can spin to 15,000 rpm and load its rings less than a long-stroke diesel at 2,200.

Roughly where the bands sit: 20 m/s is the usual production ceiling, 20–25 is competition territory, and past about 25 cast pistons start failing by ring groove collapse and oil breakdown — which is where forged and exotic alloys become compulsory rather than optional.

Kinematics

The piston is fastest well before half way

Ask when the piston is moving quickest and the intuitive answer is 90° after TDC, half way down. It never is. The rod swings as well as the crank, and that asymmetry pulls the peak earlier — the shorter the rod, the earlier it comes.

Rod : crankPeak atm/s @ 6,000 rpmvs mean
2.5 : 170.7°29.11.694×
3 : 173.2°28.51.657×
3.5 : 175.1°28.11.634×
4 : 176.7°27.91.619×
5 : 179.1°27.61.602×
8 : 183.0°27.21.583×

An infinitely long rod would peak at exactly 90°, at π/2 = 1.571× the mean. Every real rod beats both figures. That is the whole reason rod ratio is a design variable rather than whatever fits: it moves where in the stroke the loads land, not just how big they are.

Stroke and rpm scale the speeds but not the angles — the peak stays in the same place whatever the engine size, because the shape of the motion depends only on the rod ratio.

Loads

Why the top of the stroke is the dangerous end

At TDC the piston's acceleration is rω²(1 + λ) and at BDC it is rω²(1 − λ), where λ is crank over rod. The top is always the harder end, and the rod ratio decides by how much. Below: an 86 mm stroke at 7,000 rpm with a 450 g reciprocating assembly.

Rod : crankTDC (g)BDC (g)ratioForce at TDC
2.5 : 1329914142.3314.6 kN
3 : 1314215712.0013.9 kN
3.5 : 1302916831.8013.4 kN
4 : 1294517671.6713.0 kN
5 : 1282718851.5012.5 kN

3029 g at the top of the stroke. That load is what the rod bolts hold against, and it arrives once per revolution whether the engine is making power or being towed in gear. It scales with the square of rpm, which is why a redline is a structural number rather than a breathing one: raise the revs 20% and the inertial load goes up 44%.

A longer rod lowers the TDC peak and raises the BDC one, evening out the two ends. That is the real reason to want one — not "more time at TDC", which is a description of the same effect rather than a separate benefit.

Timing

Spark advance is a clock, not an angle

Flame takes roughly the same time to cross the chamber whatever the crank is doing — a couple of milliseconds. The crank does not wait. So the advance needed to put peak pressure just after TDC is not a number you set once; it is that fixed time expressed in degrees, and degrees per millisecond scale directly with rpm.

rpm1.5 ms burn2.0 ms burn3.0 ms burn
8007°10°14°
1,50014°18°27°
2,40022°29°43°
4,00036°48°72°
6,00054°72°108°
9,00081°108°162°

The same 2 ms costs 12° at 1,000 rpm and 72° at 6,000. That is the entire job of a centrifugal advance mechanism, and later of the ignition map: not to optimise anything clever, just to keep a constant burn time pointed at the same place in the stroke.

Burn time is not truly constant — it shortens with turbulence at higher rpm and lengthens with a leaner mixture — so real advance curves flatten off rather than rising forever. The straight line is the first-order picture, and it is most of the answer.

Version history · 1 release
  1. v1.582026-08-03Engine simulator gains a size, and with it piston speed, inertial load and power

Releases in which this page changed, newest last. Derived from the archived copy of every release, not from notes written afterwards — so it reflects what actually shipped. Site-wide passes are left out; they are in the full changelog.

Rules of thumb are approximations, offered to get you to the right order of magnitude fast. Check anything load-bearing against its source or the exact tool. Privacy · Terms

© 2026 Rules of Thumb · Runs entirely in your browser