Methods for multiphase computational fluid dynamics