Mechanical · engine cycle

2 & 4-Stroke Engine Simulator

Piston, valves or ports, and spark firing together in phase — one animated cylinder, one synced timing 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
Field notes

Reading the cycle

How it works

Every stroke is the same slider-crank, timed differently

The piston's motion here isn't a canned animation — it's computed live from the actual slider-crank equation that governs every reciprocating engine, using the rod-to-crank ratio you set. What changes between 2-stroke and 4-stroke isn't the mechanism, only when the valves or ports open relative to that motion: a 4-stroke uses a camshaft turning at half crank speed to open valves once per two revolutions, while a 2-stroke lets the piston itself uncover ports cut into the cylinder wall, timed purely by height.

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 only lasts a quarter of that, around 12.5 ms, which is why multi-cylinder engines exist: to overlap those short power pulses into smoother output.

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.
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
80010°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.