In thermodynamics, the mass in a closed system (such as a piston-cylinder) is constant. In an open system ... The first four energy types are a function of the state or condition of the substance.
I'm a big fan of this kind of thermodynamics as it matches well to the theory and is very repeatable. So what's going on inside a fire piston? To start with, the cylinder (tube) is full of air at ...
starts with the piston at the top of the cylinder (TDC) and the intake valve open to admit air and fuel. At bottom-dead-center (BDC) the inlet valve is closed and the compression stroke (b) starts.