The flow in an axisymmetric piston-cylinder configuration has been studied by means of a novel technique that solves the Navier-Stokes equations in two domains: one fixed and another stretching and compressing. The valve has been simulated as an infinitesimally thin “plate” in which the law of the wall is used for the calculations of the radial velocity and the turbulent kinetic energy. Both two- and four-stroke calculations with heat transfer have been performed. In the two-stroke calculations, the valve was kept at a fixed location. In the four-stroke calculations, the valve moves in the fixed domain with a velocity profile corresponding to a cam with valve overlap. This procedure has the advantage that the exact location of the valve is known at any time. The turbulence is generated by the intake stroke which shows a recirculation zone behind the valve. During the compression stroke, the cylinder wall eddy formed during the intake stroke still persists but it is damped. During the expansion or power stroke, the piston drives the flow and the velocity and turbulent kinetic energy contours are almost uniform.