We report the study of a fluid of hard-disk particles in a contracting cavity. Under supersonic contraction speed, a shock wave converges to the center of the cavity where it implodes, creating a central peak in temperature. The dynamics of the fluid is studied by solving the Euler and Navier-Stokes equations, as well as by molecular dynamics simulations and the Enskog direct simulation Monte Carlo method. The value of the maximum temperature reached at the center of the cavity is systematically investigated with the different methods which give consistent results. Moreover, we develop a scaling theory for the maximum temperature based on the self-similar solutions of Euler's equations and mean-free-path considerations. This scaling theory provides a comprehensive scheme for the interpretation of the numerical results. In addition, the effects of the imploding shock wave on an passively driven isomerization reaction A[r harp over l]B are also studied.