By Dan Smith, COMSOL, Inc. - COMSOL News 2009
COMSOL Multiphysics® provides users with a wide range of tools for modeling immiscible two-phase flows. These problems can be solved with a fixed mesh, where the interface between the two fluids is determined by a scalar advection equation, or with a moving mesh, where the boundary between the two fluids moves as the system evolves.
On fixed meshes, COMSOL® offers two options: the Level Set method and the Phase Field method. The level set method represents the interface between the two fluids by a certain contour of a smooth function. The COMSOL implementation of the level set method is unique in that the thickness of the interface always remains the same. It also has significantly better mass conservation properties compared to the original level set method.
The phase field method is a relatively new technique and is based on the Cahn-Hilliard equation. In this case the free energy of the system is minimized within some timescale. Since the Cahn-Hilliard equation is fourth order in space, it is decomposed into two second order partial differential equations. Surface tension is conveniently implemented as a body force in the Navier- Stokes equations. Although the level set method provides better mass conservation, the phase field method has proven to be more robust than the level set method in most cases. Both methods offer superior implementations of the surface tension force over the volume of fluid (VOF) method which must reconstruct the interface from a discontinuous function at each timestep. The mean curvature in particular can make it difficult to accurately account for surface tension using the VOF method.
Level Set Method
In the original level set method, a signed distance function is used. The main drawback of the originally proposed level set method is that mass is not conserved, and significant mass loss may occur. In COMSOL Multiphysics, we use a modified version of the level set method, which has significantly better conservation properties. It is in essence a compromise between the original level set method and the VOF method, with high-order accuracy, and with good mass conservation.
Figure 1: Inkjet printer using the level set method. The shape of the droplet is represented by an iso-level of the level set function. The color scale shows the modulus of the velocity vector and the streamlines show the path of the air flow. Because of the extremely accurate implementation of the surface tension force the level set method is well suited to design and optimization of inkjet printers. The Marangoni effect is naturally built into the level set application mode so forces that arise due to thermal gradients are automatically taken into account in the model.
The level set application mode is used to create the plot in Figure 2, which shows the fluid interface inside a T-junction. T-junctions are commonly used to create emulsions where small liquid droplets are suspended in another liquid.
Figure 2: Droplet breakup in a T-junction using the level set method. The red color indicates the dispersed droplets. The slice and arrows show the velocity field.
Phase Field Method
The phase field method offers an attractive alternative to more established methods for solving multiphase flow problems. Instead of directly tracking the interface between two fluids, the interfacial layer is governed by a phase field variable, Φ. The surface tension force is added to the Navier-Stokes equations as a body force by multiplying the chemical potential of the system by the gradient of the phase field variable. The phase field method can even be solved on a moving frame of reference by coupling it to the moving mesh application mode. This allows fluid structure interaction problems involving two fluid phases to be solved. Figure 3 shows the deformation and stresses inside a rubber obstacle when it is perturbed by a breaking dam. The model simulates four effects: the phase field method to track the interface, the flow field, the stresses and strains in the solid obstacle, and the moving mesh required to describe the dynamics of the system.
Figure 3: Two-phase fluid-structure interaction. The blue color represents water and air makes up the rest of the domain. The orange color in the rubber obstacle highlights regions where the von Mises stress is high. The red arrows show the direction and magnitude of the velocity field.
The phase field model has another advantage in that it can be coupled to the κ-ε or κ-ω turbulence models. This means that COMSOL Multiphysics can now be used to solve turbulent multiphase flow problems such as impingement of high speed liquid jets. The phase field model can easily be coupled to other physics modes. For example, when coupled to electrostatics, elongation of liquid droplets due to electric stresses can be modeled. This is known as electrocoalescence. If the phase field model is coupled to heat transfer then complex phenomena like film boiling can be modeled.
Arbitrary Lagrangian Eulerian (ALE) Method
When high accuracy and perfect mass conservation are required, the ALE method can be superior to both the level set and phase field approaches. Surface tension is conveniently implemented as a boundary condition on the free surface rather than as a volumetric body force. Another advantage of the ALE method comes from the exact boundary that separates the two fluids. This boundary enables auxiliary physics to be modeled in either the gas or liquid phase individually. For example, a mixing tank where chemical reactions are occurring only in the liquid phase could not be handled by the level set or phase field methods, but it can be done with ALE.
Figure 4: Sloshing tank using the ALE method. Plot of the velocity field in a tank perturbed with a sinusoidal motion.
State-of-the-Art Solver Technology
COMSOL Multiphysics provides a wide range of solver tools for multiphase flow problems. The problems can be solved in either a coupled or segregated manner. The coupled approach solves for the pressure, velocity, and phase field or level set functions simultaneously using state-of-the-art multigrid solvers. The amount of memory and CPU-time required to solve large scale multiphase flow problems can be substantially reduced by using a transient, segregated solver. In this approach, the velocity and pressure are solved in one group and the phase field or level set functions are solved in a separate group. The solver iterates between the groups at each timestep until convergence occurs. In certain applications, this can result in time and memory saving of a factor of two.
Summary
In summary, COMSOL Multiphysics provides a wide range of tools for modeling systems involving two immiscible fluid phases. Applications include micro-channel separation, electrocoalescence, inkjet modeling, injection molding, fuel system modeling, film boiling, and microfluidics. There are three approaches available to the user. The first two, more well-established methods, are known as the level set and ALE methods. The third and newest, now available in COMSOL 3.5a, is called the phase-field method, which has proven to be accurate, robust, and easy to couple to other types of physics.

