
There may be one or more pistons. Each piston is inside a cylinder, into which a gas is introduced, either already hot and under pressure (steam engine), or heated inside the cylinder either by ignition of a fuel air mixture (internal combustion engine) or by contact with a hot heat exchanger in the cylinder (stirling engine). The hot gases expand, pushing the piston to the bottom of the cylinder. The piston is returned to the cylinder top (Top Dead Centre) either by a flywheel or the power from other pistons connected to the same shaft. In most types the expanded or "exhausted" gases are removed from the cylinder by this stroke. The exception is the Stirling engine, which repeatedly heats and cools the same sealed quantity of gas.In some designs the piston may be powered in both directions in the cylinder in which case it is said to be double acting.
In all types the linear movement of the piston is converted to a rotating movement via a connecting rod and a crankshaft or by a swashplate. A flywheel is often used to ensure smooth rotation. The more cylinders a reciprocating engine has, generally, the more vibration-free (smoothly) it can operate. The power of a reciprocating engine is proportional to the volume of the combined pistons' displacement.
A seal needs to be made between the sliding piston and the walls of the cylinder so that the high pressure gas above the piston does not leak past it and reduce the efficiency of the engine. This seal is provided by one or more piston rings. These are rings made of a hard metal which are sprung into a circular grove in the piston head. The rings fit tightly in the groove and press against the cyinder wall to form a seal.
It is common for such engines to be classified by the number and alignment of cylinders and the total volume of displacement of gas by the pistons moving in the cylinders usually measured in cubic centimeters (cm³). For example for internal combustion engines, single and two-cylinder designs are common in smaller vehicles such as motorcycles, while automobiles typically have between four and eight, and locomotives, and ships may have a dozen cylinders or more. Cylinder capacities may range from 10 cm³ or less in model engines up to several thousand cubic centimetres in ships' engines.
The compression ratio is a measure of the performance in an internal-combustion engine or a Stirling Engine. It is the ratio between the volume of the cylinder, when the piston is at the bottom of its stroke, and the volume when the piston is at the top of its stroke.
Cylinders may be aligned in line, in a V configuration, horizontally opposite each other , or radially around the crankshaft. Opposed piston engines put 2 pistons working at opposite ends of the same cylinder and this has been extended into triangular arrangements such as the Napier Deltic. Some designs have set the cylinders in motion around the shaft, see the Rotary engine.
In steam engines and internal combustion engines valves are required to allow the entry and exit of gasses at the correct time in the piston's cycle. These are worked by cams or cranks driven by the shaft of the engine. Early designs used the D slide valve but this has been largely superseded by Piston valve or Poppet valve designs.
Internal combustion engines operate through a sequence of strokes which admit and remove gases to and from the cylinder. These operations are repeated cyclically and an engine is said to be 2-stroke, 4-stroke or 6-stroke depending on the number of strokes it takes to complete a cycle.
In some steam engines the cylinders may be of varying size with the smallest bore cylinder working the highest pressure steam. This is then fed through one or more, increasingly larger bore cylinders successively, to extract power from the steam at increasingly lower pressures. These engines are called Compound engines.