Numerical simulation and analysis of condensation shocks in cavitating flow