From the theory of unsteady flow, the processes of the heavy piston motion and the variation of the compressed gas property have been obtained under various circumstances. The numerical method is a development from the operating principle of a heavy piston compressor and the utility program is very important to the design and calibration of a free-piston shock tunnel. Examples show that the piston velocity and compressed-gas property depend strongly on the unit area mass of the piston, σ, and the initial pressure on both sides of the piston, p b and p 1 , but the effect of the sliding friction between the piston and compress tube on the piston motion is very small in the range of sliding friction coefficients from 0.4 to 1.2.