A pressure-based algorithm for the prediction of cavitating flows is presented.The algorithm employs a set of equations including the Navier-Stokes equations and a cavitation model explaining the phase change between liquid and vapor.A pressure-based method is used to construct the algorithm and the coupling between pressure and velocity is considered.The pressure correction equation is derived from a new continuity equation which employs a source term related to phase change rate instead of the material derivative of density Dρ/Dt.This pressure-based algorithm allows for the computation of steady or unsteady,2-D or 3-D cavitating flows.Two 2-D cases,flows around a flat-nose cylinder and around a NACA0015 hydrofoil,are simulated respectively,and the periodic cavitation behaviors associated with the re-entrant jets are captured.This algorithm shows good capability of computating time-dependent cavitating flows.