From OpenFOAMWiki

The sonicLiquidFoam program solves compressible flow typical of a liquid, where the equation of state is assumed to be a simple baratropic function. The pressure and density are linearly related by the equation of state:  \rho=\rho_0 +\psi (p-p_0) The variable  \psi represents the deriative of density with respect to pressure and assumed constant. Similarly,  (\rho_0,p_0) is a reference state and both the reference density and pressure are constants. These values are input through the thermdynamicProperties file.

The program is transient, using the PISO algorithm to march forward in time. Currently, non-orthogonality corrections are not employed. The program is designed to permit fairly large timesteps, despite the constraint that compressiblity causes through the Courant number. The Courant number must include velocity plus the rate of accoustic propogation.

The stability of the program is due to the close coupling of pressure and the continuity equation. The pressure correction and the equation of state are substituted into the continuity equation to produce a convection/diffusion equation for pressure.