A numerical model is presented for the simulation of complex fluid flows with free surfaces in three space dimensions. The model described in Maronnier et al. (J. Comput. Phys. 1999; 155(2):439) is extended to three dimensional situations. The mathematical formulation of the model is similar to that of the volume of fluid (VOF) method, but the numerical procedures are different. A splitting method is used for the time discretization. At each time step, two advection problems-one for the predicted velocity field and the other for the volume fraction of liquid-are to be solved. Then, a generalized Stokes problem is solved and the velocity field is corrected. Two different grids are used for the space discretization. The two advection problems are solved on a fixed, structured grid made out of small cubic cells, using a forward characteristic method. The generalized Stokes problem is solved using continuous, piecewise linear stabilized finite elements on a fixed, unstructured mesh of tetrahedrons. The three-dimensional implementation is discussed. Efficient postprocessing algorithms enhance the quality of the numerical solution. A hierarchical data structure reduces memory requirements. Numerical results are presented for complex geometries arising in mold filling. Copyright (C) 2003 John Wiley Sons, Ltd.