Phase Field Method To Simulate Fluid Flow

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Two Methods for Modeling Free Surfaces in COMSOL Multiphysics®

Ed Fontes May 15, 2018

Phase filed formalism is a modelling technique to capture interface between two fluid. An
interface is a zone separating region and is represented as an iso-surface of phase filed
function. The free liquid surface corresponds to the phase boundary between the liquid and
the gas and is represented on a fixed mesh. The droplet surface does not coinside with the
surface of the elements. Phase field function is advected by the velocity vector computed by
the Navier-Stokes equations. (1)

Note that we are using Φ for phase field functions. In the phase field method, F represents a
term that tries to minimize the free energy of the system. Also, higher-order derivatives of Φ
are introduced in this term. In fact, the source term in the phase field equation includes fourth-
order terms. This means that, for practical reasons, the equation is often broken up into two
equations, where an auxiliary dependent variable is defined as a function of the second
derivatives of Φ. This is also what is done in COMSOL Multiphysics.
This introduces the source term into the Navier-Stokes equations that originate from the
surface tension at the free liquid surface. In the phase field method, the contribution to the
Navier-Stokes equations from the surface tension is calculated from the chemical potential,
which yields the surface tension and the gradient of the phase field function close to the
interface.
The properties of the fluid transition smoothly from liquid to gas over a given value of the level
set or phase field functions; i.e., the value that represents the free surface.
The phase field function, Φ, varies between -1 and 1, where the free liquid surface is the
isosurface for Φ = 0. The computation of the viscosity and density is done in an analogous way
to the level set method, but with a different expression, since the phase field function varies
between -1 and 1

As well as the dynamic viscosity:


(3)
Settings in the Phase Field Interfaces

The Phase Field interfaces contain a number of parameters that need tuning in order for the
methods to perform optimally. The values of these parameters depend on the modeled system
and the numerical discretization of the equations. The size of the geometry (length, width, and
depth); properties of the fluids; wetting of the walls; initial conditions; operating conditions;
and size of the elements in the created mesh all have an impact on the selection of the model
settings.

The interface thickness parameter, denoted ε in the user interface, is more intuitive to
understand. It simply controls the thickness of the region where the variations of the phase
field function are obtained. A large thickness smears out the shape of the free surface. The
problem becomes easier to solve, but accuracy in the shape of the free surface is lost. A small
value of ε yields a compact representation of the surface but requires a corresponding
resolution of the mesh. There is no point in setting a value that is much smaller than the mesh
element size, since the interface then becomes ragged and unresolved surface tension forces
might cause spurious velocities. The value of ε should be set approximately to the same value
of the largest elements close to the surface.

The mobility tuning parameter for the phase field method, χ in the user interface, determines in
a certain way the diffusivity of the phase field. This value has to be large enough for the phase
field equation to be stable but small enough to give a sharp interface. The proper value is
proportional to the speed at the surface and inversely proportional to the coefficient of surface
tension.
(4)

This means that once we have found a proper value of χ for a certain set of operating
conditions, we can use the relation above to set χ for a new set of conditions.
Geometry and definition of the example problem.
Note that the moving mesh functionality is used to prescribe the movement of the little
rectangular bar back and forth on the surface. However, in the level set and phase field
methods, the mesh is not moved with the liquid surface.
Here are a few remarks about the model implementation in COMSOL Multiphysics:

 We add gravity as a source in the momentum equations


 We add a reference and a point constraint for the pressure field
 In order to compare results, we select Navier slip conditions for the walls and use a slip
length equal to the size of the element length
Simulation Results for the Level Set and Phase Field Methods
The results for the flow field and the shape of the water surface are shown below for the
following times: 0.07 s, 0.57 s, and 1.0 s. The flow streamlines and the shape of the water
surface are in decent agreement for both methods at the respective times. There is a slight
difference in the maximum velocity and in the height of the water surface, which may be
explained by the fact that the two methods treat surface tension differently.
There are also some differences in the streamlines after longer times, for example, in the
recirculation zones at t = 1.0 s. The phase field method tends to give a slightly calmer behavior
of the surface. The level set method computes the surface tension force from the curvature of
the surface, which is obtained from the gradient of the level set function. This gives a more
“spiky” surface force compared to the smoother force obtained with the phase field method.
Results from the level set (left) and phase field (right) methods after 0.07 s (top), 0.57 s (center),
and 1.0 s (bottom).
We can also visualize the full results from the simulation in an animation for the period from 0 s
to 2 s. We can see that although the movement of the rectangular bar causes vigorous stirring,
the free surface never breaks.

An animation created from the solution of the problem using the phase field method.
The level set and phase field methods also compute the flow field in the air domain above the
free liquid surface. We can see that the movement of the rectangular bar leads to a vigorous
flow field pattern that is continuous over the phase interface.
The flow field in the water and air domains as computed with the phase field method after 0.57
s.
If the agitation of the surface is increased so that it becomes more vigorous, then the surface
can break up and later coalesce, which is shown in the animation below. This is also one of the
benefits with the level set and phase field methods: It is relatively easy to deal with topology
changes in the free surface in any of these two methods.

Although the level set and phase field methods are similar, the treatment of the surface tension
has a large impact on the stability of the two methods, at least in the implementation in
COMSOL Multiphysics. For problems involving a strong effect from surface tension, the phase
field method shows better performance regarding computation time compared to the level set
method. The reason for this difference is that the computation of the surface curvature in the
level set method forces the time-dependent solver to take substantially smaller time steps
compared to the phase field method.
In our example, the time steps are on average five times larger in the phase field method, which
results in a five-times-larger computation time for the level set method. So, for free surface
problems at a small scale and for laminar flows where surface tension has a large impact (for
example, in microfluidics), the phase field method is in general a better option.
Phase Field Model
The Phase Field Model node adds the equations described in The Equations for the Phase Field Method. The node
defines the associated phase field parameters including surface tension and interface thickness.

PHASE FIELD PARAMETERS

Define the following phase field parameters. Enter a value or expression for the:

•Surface tension coefficient σ (SI unit: N/m).

Parameter controlling interface thickness epf (SI unit: m). The default expression is pf.hmax/2, which means that
•the value is half of the maximum mesh element size in the region through which the interface passes.

Mobility tuning parameter χ (SI unit: m·s/kg). The default is 1 m·s/kg, which is a good starting point for most
models. This parameter determines the time scale of the Cahn-Hilliard diffusion and it thereby also governs the
•diffusion-related time scale for the interface.

Keep the χ parameter value large enough to maintain a


constant interface thickness but still low enough to not
damp the convective motion. A too high mobility can
also lead to excessive diffusion of droplets. A good first

guess is often where U is


the expected velocity at the interface and hmax the
largest mesh cell size at the interface.

You might also like