All simulations中文
Watch the piston and valves. Step through the strokes or drag the crank-angle slider.

How it works ↓

How a four-stroke engine works

One cycle takes four piston strokes and two crankshaft revolutions. Only one of the four strokes delivers useful work. Step through the cutaway and watch the yellow flywheel marker pass the same point twice.

From fuel to motion

A heat engine turns some of the energy transferred by heating into mechanical work. In an internal combustion engine, fuel burns inside the engine. The piston moves up and down inside the cylinder. The connecting rod links the piston to the turning crankshaft. Each trip from one end of the piston's travel to the other is a stroke.

The four strokes

StrokeIntake valveExhaust valvePistonWhat happens
IntakeOpenClosedDownThe gasoline engine shown draws in a fuel–air mixture. The diesel draws in air.
CompressionClosedClosedUpThe piston does work on the gas. Its internal energy, pressure and temperature rise.
PowerClosedClosedDownHot combustion gases expand and do work on the piston, turning the crankshaft.
ExhaustClosedOpenUpThe piston pushes burned gas out through the exhaust valve.

Combustion transfers chemical energy into internal energy. The gas then transfers energy to the piston as it expands. The spinning flywheel stores rotational energy and helps carry the mechanism through the other three strokes.

Identify a stroke from the cutaway

  1. Look for an open valve. An open intake valve indicates intake, and an open exhaust valve indicates exhaust.
  2. When both valves are closed, use the piston direction. Up means compression and down means power in this idealized cycle.

Convert RPM to strokes per second

Divide RPM by 60 to get revolutions per second. Multiply that result by two for strokes per second, and divide it by two for power strokes per second. At 1,800 rpm, one cylinder completes 60 strokes and 15 power strokes per second.

Gasoline and diesel ignition

FeatureGasoline engine shownDiesel engine shown
IntakeGasoline–air mixtureAir
IgnitionA spark plug ignites the mixture near the end of compression.An injector sprays fuel into hot compressed air, where the fuel ignites.
Compression ratio8:116:1
Illustrative efficiency range20–30%30–45%

The simulation uses representative values. Real ignition timing, fuel delivery and efficiency depend on engine design and operating conditions.

Where does the fuel energy go?

The energy released by complete combustion is Q = mq, where m is fuel mass and q is the fuel's heating value. The engine converts part of Q to useful work W. The rest goes to exhaust, cooling, friction and energy left in unburned fuel.

η = W / Q

Using the model's heating value of 46 MJ/kg for gasoline, 2 kg provides 92 MJ. At 25% efficiency, the useful work is 23 MJ. In the energy-flow diagram, each branch's width represents its share of the fuel energy.

Try it in the simulation

  1. Pause Four strokes and choose Next stroke. Predict which valve opens and which way the piston moves.
  2. Drag the crank-angle slider from 0° toward 720°. Watch the dial and count the flywheel turns. Watch how pressure and temperature rise during compression.
  3. Compare gasoline and diesel near the start of the power stroke. Look for the spark plug or injector at the top of the cylinder.
  4. Set the flywheel to 2,400 rpm. Predict the number of power strokes per second, then check the readout.
  5. Use Stroke quiz to test your prediction from the diagram. Open Efficiency and turn on one improvement at a time to see which energy branch shrinks.

Frequently asked questions

What are the four strokes of a four-stroke engine?

Intake draws gas into the cylinder, compression squeezes it, power uses expanding combustion gases to push the piston down, and exhaust pushes burned gas out.

Which strokes transfer energy between the gas and the piston?

During compression, the piston does work on the gas, increasing its internal energy. During the power stroke, expanding gas does work on the piston and turns the crankshaft.

How can I identify a stroke from the valve positions?

In this idealized model, an open intake valve indicates intake and an open exhaust valve indicates exhaust. With both valves closed, the piston moves up for compression and down for power.

Why does a four-stroke engine fire once every two revolutions?

Each piston stroke takes half a crankshaft revolution. Four strokes therefore take two revolutions, and only one is a power stroke. At 2,400 rpm, each cylinder makes 20 power strokes per second.

How do gasoline and diesel engines ignite their fuel?

The gasoline engine shown uses a spark plug to ignite a fuel–air mixture. The diesel engine compresses air until it is hot enough to ignite the injected fuel.

How do you calculate thermal efficiency?

Divide useful work W by the fuel energy Q, then multiply by 100 to express the result as a percentage. You can find Q by multiplying fuel mass by its heating value.

↑ Back to the simulation