A numerical model is presented for the simulation of complex fluid flows with free surfaces. The unknowns are the velocity and pressure fields in the liquid region, together with a function defining the volume fraction of liquid. Although the mathematical formulation of the model is similar to the volume of fluid (VOF) method, the numerical schemes used to solve the problem are different. A splitting method is used for the time discretization. At each time step, two advection problems and a generalized Stokes problem are to be solved. Two different grids are used for the space discretization. The two advection problems are solved on a fixed, structured grid made out of small rectangular cells, using a forward characteristic method. The generalized Stokes problem is solved using a finite element method on a fixed, unstructured mesh. Numerical results are presented for several test cases: the filling of an S-shaped channel, the filling of a disk with core, the broken dam in a confined domain. (C) 1999 Academic Press.