Numerical calculation of multiphase fluid flow