A nonlinear Galerkin method for numerical approximation of the dynamics of mesophases under flow