You are on page 1of 9

1

Computational Fluid Dynamics


Methods to Track
Moving Fluid
Interfaces
Grtar Tryggvason
Spring 2011
http://www.nd.edu/~gtryggva/CFD-Course/
Computational Fluid Dynamics
Motivation

Governing Equations

The One-Fluid Approach

Numerical approach

Advecting the Marker Function
VOF; LS; FT; Other; Tests

Surface Tension
Outline
2
Computational Fluid Dynamics
Motivation and Goals
School of sh Splash
Microstructure Cavitation
Atomization
Bubbly Flow
3
Computational Fluid Dynamics
Example: The two-fluid model

!
!t
"
p
#
p
+ $% "
p
#
p
u
p ( )
= m
p

!
!t
"
p
#
p
u
p ( )
+ $% "
p
#
p
u
p
u
p ( )
= &"
p
$p
p
+$% "
p

p
D
p ( )
+"
p
#
p
g + $% "
p
#
p
< uu >
( )
+ F
int
interfacial
forces
Reynolds
stresses
The goal is to simulate accurately the smallest continuum
scales for multiphase systems that are sufficiently large so that
meaningful averages can be obtained and the results used to
help generate insight and closure models for engineering tools
Equations for the
average motion of
each constituent
Motivation and Goals
4
Computational Fluid Dynamics
BC: Birkhoff and boundary integral methods
for the Rayleigh-Taylor Instability

65 Harlow and colleagues at Los Alamos:
The MAC method

75 Boundary integral methods for Stokes ow and
potential ow

85 Alternative approaches (body tted, unstructured,
etc.)

95 Beginning of DNS of multiphase ow. Return of the
one-uid approach and development of other
techniques
CFD of Multiphase Flowsone slide history
From: B. Daly (1969)
Numerical Method
5
Computational Fluid Dynamics
Governing
Equations
6
2
Computational Fluid Dynamics
Incompressible flows:
Navier-Stokes equations (conservation of momentum)

D!
Dt
= 0
D!
Dt
+ !"# u = 0

! " u = 0

!
"u
"t
+ !u#u = $#p + ! f
b
+ #% #u + #
T
u
( )

!"u
!t
+ #$ "uu = " f + #$ T

!"
!t
+ #$ ("u) = 0
Conservation of mass :
Governing Equations
7
Computational Fluid Dynamics
The conservation equations for mass and momentum apply
to any flow situation, including flows of multiple immiscible
fluids.

Each fluid generally has properties that are different from the
other constituents and the location of each fluid must
therefore be tracked.

We usually also have additional physics that must be
accounted for at the interface, such as surface tension.

The regular conservation equations can be extended to
handle these situations by using generalized functions
Sharply stratified flows
Governing Equations
8
Computational Fluid Dynamics
The One-Fluid
approach
9
Computational Fluid Dynamics
H(x, y, t ) = !(x " x')!(y " y')da'
A(t )
#

!H = !["(x # x')"( y # y')]da'
A
$
= # !'["(x # x')"( y # y')]da'
A
$
= # "(x # x')"( y # y')
S
!$
nds'
= # "(x # x')"( y # y')
S
$
nds'
= # "(s)"(n)
S
$
nds'
= #"(n)n
A
S
!H
!t
+u " #H = 0
H=1
H=0

!(x " x' )!(y " y' ) =!(s)!(n)
Using:
n s
x
y
10
Governing Equations
Computational Fluid Dynamics
The conservation equations are solved on a regular xed grid and the
front is tracked by connected marker points.
The one uid formulation of the conservation equations is the
starting point for several numerical methods, including MAC, VOF, level
sets, and front tracking.

!
"u
"t
+ !#$ uu = %#p + f + #$ #u + #
T
u
( )
+ &
F
' (n) x % x
f ( )
da

! " u = 0

D!
Dt
= 0;
D
Dt
= 0
Conservation of Momentum
Conservation of Mass
Equation of State:
Singular interface term
Incompressible ow
Oscillating drop: pressure
Constant
properties
11
Governing Equations
Computational Fluid Dynamics
The one-uid formulation implicitly contains the proper
interface jump conditions. Integrating each term across a
small control volume centered at the interface:

!
Du
Dt
dv
"V
#
= $ %pdv
"V
#
+ fdv
"V
#
+ %& %u + %
T
u
( )
dv
"V
#
+ '( n" n ( )dv
"V
#
=0 =0

p [ ]n

!u + !
T
u
( ) [ ]
n

!" n
Jump Condition:

!p + "u + "
T
u
( ) [ ]
n = !#$n
12
Governing Equations
3
Computational Fluid Dynamics

u = H
1
u
1
+ H
2
u
2
P = H
1
p
1
+ H
2
p
2
! = H
1
!
1
+ H
2
!
2
Write:
Substitute into the momentum equation


H
1
( ) + H
2
( ) +! x
f ( )
( ) = 0
Interface
conditions
Momentum
equation in
phase 2
Momentum
equation in
phase 1
=0 =0 =0
We can also show that the one-fluid formulation
contains the equations written separately for each
fluid and the jump conditions:
Governing Equations
13
Computational Fluid Dynamics
Numerical
Solutions
14
Computational Fluid Dynamics
Work with the finite volume approximation

u =
1
V
udV
V
!

D
c
=
1
V
! " !
h
u+!
h
T
u ( )dV
V
#
=
1
V
!
h
u+!
h
T
u ( )nds
S
!#
A
c
=
1
V
! " uu ( )dV
V
#
=
1
V
u u" n ( )ds
S
!#

!
!t
"udv
#
+ "u(u$ n)ds
!#
=
" f dv
#
+ %u + %
T
u ( )nds
!#
+ &' n( n ( )dv
V
#
Discretize each term
Discretization in time
15
Computational Fluid Dynamics
!
h
" u
i , j
n +1
= 0
Discretization in time

u
i, j
n+1
!u
i, j
n
"t
= !A
i, j
n
!
1
#
n
($
h
p + D
i, j
n
+ f
%
n
) + f
b
n
Summary of discrete vector equations
No explicit
equation for
the pressure!
Evolution of the velocityfirst order explicit in time:
Constraint on velocity

u =
1
V
udV
V
!

D
c
=
1
V
! " !
h
u +!
h
T
u ( )dV
V
#
=
1
V
!
h
u +!
h
T
u ( )nds
S
#
A
c
=
1
V
! " uu ( )dV
V
# =
1
V
u u " n ( )ds
S
#
16
Computational Fluid Dynamics

u
i, j
n+1
!u
i, j
tmp
"t
= !
1
#
n
$
h
p
i, j

u
i, j
tmp
!u
i, j
n
"t
= !A
i, j
n
+ f
b
n
+
1
#
n
D
i, j
n
+ f
$
n
( )
The momentum equation is solved in two steps
and
Projection
Method
To derive an equation for the pressure we take the divergence
of the second equation and use . The result is:

!
h
" u
i, j
n+1
= !
h
" u
i, j
tmp
# $t !
h
"
1
%
n
!
h
p
i, j
&
'
(
)
*
+
0

!
h
"
1
#
n
!
h
p
i, j
$
%
&
'
(
)
=
1
*t
!
h
" u
i, j
tmp
!
h
" u
i , j
n +1
= 0
Discretization in time
17
Computational Fluid Dynamics
1. Find a temporary velocity using the advection and the
diffusion terms only:
2. Find the pressure needed to make the velocity
field incompressible
3. Correct the velocity by adding the pressure gradient:

u
i, j
n+1
= u
i, j
tmp
!
"t
#
n
$
h
p
i, j

!
h
"
1
#
n
!
h
p
i, j
$
%
&
'
(
)
=
1
*t
!
h
" u
i, j
tmp
u
i, j
tmp
= u
i, j
n
+ !t "A
i, j
n
+ f
b
n
+
1
#
n
D
i, j
n
+ f
$
n
( )
%
&
'
(
)
*
4. Update the marker function to find new density and viscosity
Discretization in time
18
4
Computational Fluid Dynamics
Advecting the
marker
function
19
Computational Fluid Dynamics



!H
!t
+ u " #H = 0
Identify each fluid by a marker function H
The marker moves with the fluid
and is updated by integrating the
following advection equation in time
H =
1 in fluid1
0 Otherwise
!
"
#
Updating Hin spite of its apparent
simplicityis one of the hard
problems in CFD!
Governing Equations
20
Computational Fluid Dynamics
The sharp marker function H can be approximated in
several different ways for computational purposes.
Below we show a smoothed marker function, I, the
volume of uid approximation, C, and a level set
representation, ".
Advecting the Marker Function
21
Computational Fluid Dynamics


In 1D, using upwind and LW.
The solution quickly deteriorates.
Modern advection methods help, but not completely.
Advecting the Marker Function
22
Computational Fluid Dynamics
Volume of
Fluid
Advecting the Marker Function
23
Computational Fluid Dynamics


Upwind
To advect a discontinuous marker function, rst consider 1D
advection. Using simple upwind leads to excessive diffusion
due to averaging the function over each cell, before nding
the uxes
Advecting the Marker Function
24
5
Computational Fluid Dynamics


One-dimensional Volume-Of-Fluid
Since the marker function only takes on two values, 0 and 1,
the advection can be made much more accurate by
reconstructing the function in each cell before nding the
uxes, integrated over time:
Advecting the Marker Function
25
Computational Fluid Dynamics


While VOF works extremely well in one-dimension, there are
considerable difculties extending the approach to higher
dimensions. The basic problem is the reconstruction of the
interface in each cell, given the volume fraction in
neighboring cells.

In the SLIC method the interface was taken to be
perpendicular to the advection direction.

In the Hirt/Nichols method the interface was taken to be
parallel to one axis.

In PLIC the interface is a line with arbitrary orientation.

Once the interface has been reconstructed, the marker
function is advected by geometric considerations
26
Computational Fluid Dynamics


Original
SLIC
PLIC Hirt/Nichols
VOF
27
Computational Fluid Dynamics
Level Set
Methods
28
Computational Fluid Dynamics
Identify the interface as a level-set of a smooth function
Advect the level set function by
use
to get
29
Computational Fluid Dynamics
The level set function can be arbitrarily smooth. To identify
each uid it is necessary to construct a marker function with
a narrow transition zone

!

I ! ( )
The marker function can be
generated by (for example):
The delta function is generated
as the derivative of the marker
function
30
6
Computational Fluid Dynamics


The level set function for two
circles, as a distance function
31
Computational Fluid Dynamics
To keep the interface
shape the same, it is
necessary to reinitialize
the level set function. This
is usually done by making
it a distance function.
At each time step, solve:
For most applications, the shape of the level set
functions must remain the same close to the interface
32
Computational Fluid Dynamics
Front-Tracking
Methods
33
Computational Fluid Dynamics
The method has been used to
simulate many problems and
extensively tested and
validated.
See also Tryggvason et al.
(2002) for details, tests and
applications
Tracked front to advect the
uid interface and nd
surface tension
Fixed grid used for the
solution of the Navier-Stokes
equations. Relatively
standard explicit nite volume
uid solver
Front Tracking (Unverdi &
Tryggvason, 1992)
34
Numerical Method
Computational Fluid Dynamics

!
l
= !
ijk "
w
ijk
The velocities are
interpolated from
the grid:
The front values are
distributed onto the
grid by
!
ijk
= !
l "
w
ijk
#s
l
h
3
On the front: per length
On the grid: per volume
the weights w
ijk
can be
selected in several
different ways
Interpolating from grid
35
Tracked Front
Finite Difference Grid
Computational Fluid Dynamics
Numerical Method
36
7
Computational Fluid Dynamics
Phase Field
Methods
37
Computational Fluid Dynamics
The phase eld Method (Jacqmin)
Solve modied Navier-Stokes equations, developed by
thermodynamic considerations at the microscale
and
The energy function can take several different forms,
for example, if:
and
Then it can be shown that surface tension and
interface thickness are:
and
38
Computational Fluid Dynamics
Several other methods have been developed to
improve the performance of those described
here, including hybrid methods, such as Particle
Level Set and VOF-LS, as well as methods that
capture the interface more sharply, such as the
Ghost Fluid Method and the Immersed Interface
Method.

Similar approach has also been used to capture
rigid and elastic boundaries, both moving and
stationary.
Advecting the Marker Function
39
Computational Fluid Dynamics
Standard Tests
for advection
40
Computational Fluid Dynamics
Zalasaks test:
A notched
circular blob is
advected by a
solid body
rotation,
measuring how
the blob
deteriorates
Advecting the Marker Function
41
Computational Fluid Dynamics


High order
advection (PPM)
Level Set
PLIC Markers
From W. J. Rider and D.B. Kothe.
Reconstructing volume tracking.
Los Alamos National Laboratory
Report la-ur-96-2375. Technical
report, 1996
Advecting the Marker Function
42
8
Computational Fluid Dynamics
Surface
Tension
43
Computational Fluid Dynamics
In addition to advect the marker function accurately, we must
often account for physics unique to the interface. The most
common example is surface tension.
Surface Tension
m
t
n
u const.
v const.
x
v
x
u

k = !"# n
x
u
=
!x
!u
; x
v
=
!x
!v

n =
x
u
! x
v
x
u
! x
v

x u,v ( ) = x u,v ( ), y u,v ( ), z u,v ( ) ( )
Tangent vectors
Normal
to the
surface
It can be shown that:

kn = lim
! A"0
m
!#
ds
Definition of a surface
and
44
Computational Fluid Dynamics
Singular interface forces
are approximated by a
smoothed delta function
that becomes more
singular as the
smoothing is reduced

k = !"# n

!H
!t
+ u " #H = 0
45
Computational Fluid Dynamics
Parasitic Currents

The regular grid induces a
small anisotropy. These
currents are typically small
in immersed boundary
methods.
Stationary drop
Weak parasitic
currents
Numerical MethodSurface Tension

!
h
p + f
"
n
= 0
At steady state the
pressure gradient should
be balanced by surface
tension
46
Computational Fluid Dynamics
Surface tension can be added in several ways:
Numerical MethodSurface Tension
47

f
ij
= !" ( )
ij
#I
ij
Curvature and normal vector computed
directly on the xed gridmarker function
Curvature and normal vector computed
on the front, distributed to the xed grid
our original approach
Curvature computed on the front,
distributed to the xed grid. Normal
vector computed on the grid
f
ij
= !" ( )
ij
f
#I
ij
f

f
ij
= !" ( )
ij
f
#I
ij
The last approach seems to combine the accuracy of
tracking with the possibility of balancing pressure exactly
Computational Fluid Dynamics
For the solution of the Navier-Stokes equations, we
need the net force on each front segment:

!f
f
= "#nds
$S
%
=
" s
2
& s
1
( ) 2D
" s ' nds 3D
S
!%
(
)
*
+
* !n =
"s
"s
-s
2

s
1

s
n
m=s x n
Numerical MethodSurface Tension
48
!" ( )
ij
=
#f
p ( )
w
ij
p
front
$
%s
p
w
ij
p
front
$
!f
f
= "#nds
$S
%
& "#n$s
Distribute to
the grid using
The force can be distributed directly to the
xed grid. Or, we can distribute only the
magnitude and nd the normal on the grid
9
Computational Fluid Dynamics
Although methods based on the one fluid formulation
have been used successfully for many problems,
several challenges remain. These are slowly being
eliminated
High Reynolds numbers: high order advection methods
and non-conservative form of the advection terms
Continuity of the viscous stresses: interpolation using
the harmonic mean
Solution of the pressure equation/slow convergence at
high density ratios: More advanced fast solver
Parasitic currents: increased smoothing helpsor
separate computations of the curvature and the normal
49

You might also like