Modeling of Heat Transfer in Two-Phase Flow Using The Level-Set Method
Modeling of Heat Transfer in Two-Phase Flow Using The Level-Set Method
Magnus Aashammer
Gjennestad
The cover photo is by Nir Schneider and it is licensed under the Creative
Commons Attribution 2.0 Generic license.
An electronic version of this document (navigable and in color) should be
available at http://mastersthesis.aashammer.net/thesis.pdf.
Abstract
The implementation of a two-phase flow model, developed at SINTEF Energy Research and relying on the level-set method, was extended through
the discretization and implementation of an advection-diffusion equation
for temperature and a Boussinesq coupling between the temperature and
velocity fields. In two-phase flow, both the continuum surface force method
and the ghost-fluid method was employed for handling jumps at the interface. Results from simulated cases indicated that the implementation for
both single- and two-phase flow with the ghost-fluid method was correct,
with second- and first-order convergence, respectively.
Also, a model for phase transition was implemented to allow for vaporization and condensation mass transport between the phases. Results from
simulated one-dimensional cases indicated that the implementation of this
model was correct in one dimension, with first-order convergence. These
results from one dimension and the qualitatively correct results from two
dimensions gave reason to believe that the implementation was correct
also in two dimensions.
Through the introduction of heat-transport physics in the implementation of the two-phase flow model, this implementation has been developed
in direction of performing more detailed simulations that are relevant for
natural gas liquefaction processes.
Sammendrag
Implementasjonen av en modell for tofasestrmning, som er utviklet ved
SINTEF Energi og basert p
a level set-metoden, ble utvidet gjennom
a
diskretisere og implementere en adveksjons-diffusjonsligning for temperaturen og en Boussinesq-kobling mellom temperatur- og hastighetsfeltene.
For tofasestrmning ble b
ade continuum surface force-metoden og ghost
fluid-metoden brukt for
a h
andtere grenseflatehopp. Resultatene fra simuleringene som ble utfrt tydet p
a at implementasjonen for b
ade en- og
tofasestrmning med ghost fluid-metoden var korrekt, med henholdsvis
andre- og frsteordens konvergens.
I tillegg ble en modell for faseovergang implementert for
a kunne ta
hyde for massetransport som flge av fordamping og kondensering mellom fasene. Simuleringsresultater fra endimensjonale problemer tydet p
a
at implementasjonen var rett i en dimensjon, med frsteordens konvergens.
Disse resultatene og de kvalitativt rette resultatene fra to dimensjoner ga
grunn til
a tro at implementasjonen var korrekt ogs
a i to dimensjoner.
Gjennom
a inkludere varmetransportfysikk i implementasjonen av tofasemodellen har denne blitt utviklet i retning av kunne utfre mer detaljerte simuleringer som er relevante for flytendegjring av naturgass.
iii
Preface
This work will be submitted as a thesis for the degree Master of Science
in Physics and Mathematics at The Norwegian University of Science and
Technology.
I have had the privilege of conducting this work under the supervision
of Chief Scientist Svend Tollak Munkejord at SINTEF Energy Research,
whose experience, insight, advice and feedback have all been indispensable
to me, and Associate Professor Jon Andreas Stvneng at The Department
of Physics at The Norwegian University of Science and Technology, who
has been very helpful and has always found the time to answer my questions. I am most grateful to both of them.
Through the supervision by Svend Tollak Munkejord, this thesis is part
of the Enabling Low-Emission LNG Systems project at SINTEF Energy
Research and The Norwegian University of Science and Technology. I want
to acknowledge contributions from Statoil, GDF SUEZ E&P Norge and
the Petromaks program of the Research Council of Norway (193062/S60).
I wish to thank PhD candidate Karl Yngve Lerv
ag for good advice and
for lending me his Python scripts for parsing .tec-files and I must thank
my office mate MSc Eskil Aursand for productive discussions, comments
and coffee breaks and for challenging me at explaining concepts I may not
have understood as well as I initially thought. Also, I am very grateful to
my brother Morten and my dear Ida for proofreading and, especially to
Ida, for all encouragement and support.
Of course, in spite of all assistance, the responsibility for any errors in
this work, both typographic and more severe, is mine.
Nomenclature
Latin letters
~a
cp
d
d0
Eabs
Ess ()
E1
f~b
f~s
f~sfd
~g
H
H
h
k
L
m
~
N
n
n
p
Pr
~q
Ra
m s2
J kg1 K1
m
m
Nm3
Nm3
Nm3
m s2
J kg1
m1
m
2
1
kg m s
1
1
1
Pa
1
2
Wm
1
vii
S
T
t
t
~u
u
V
v
w
~
~x
x
y
z
1
K
s
1
m s1
m s1
Pa
m s1
m s1
m
1
1
1
Dummy section
Greek letters
viii
Thermal diffusivity
Coefficient of thermal expansion
Interface between phases
Dirac and Kronecker delta function
Interface location parameter
Cell division parameter
Threshold cell division parameter
Thermal conductivity
Dynamic viscosity
Kinematic viscosity
Second viscosity
Density
Coefficient of interfacial tension
Pseudo time and generic integration variable
Level-set function
m2 s1
K1
1
1
W m1 K1
Pa s
m2 s1
Pa s
kg m3
N m1
m
Stream function
Fluid domain
Boundary of fluid domain
m2 s1
J (, )
i
n
t
kk1
kk2
()T
Abbreviations
BC
CD
CFL
CSF
ENO
Boundary condition
Central differences
CourantFriedrichsLewy
Continuum surface force
Essentially non-oscillatory
ix
FUP
GFM
LNG
MAC
ODE
PDE
RK
SI
SSP
WENO
First-order upwind
Ghost-fluid method
Liquefied natural gas
Marker-and-cell
Ordinary differential equation
Partial differential equation
RungeKutta
International system of units
Strong-stability-preserving
Weighted essentially non-oscillatory
Contents
Abstract
Sammendrag
iii
Preface
Nomenclature
vii
Contents
xi
1 Introduction
1.1 Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Survey of Thesis . . . . . . . . . . . . . . . . . . . . . . . .
1
2
3
2 The
2.1
2.2
2.3
2.4
2.5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
7
8
10
12
12
13
14
15
16
16
17
17
xi
3 Numerical Methods
3.1 The Projection Method . . . . . . . . . . . . . . . . . . .
3.1.1 Solving the Poisson Equation . . . . . . . . . . . .
3.2 The Level-Set Method . . . . . . . . . . . . . . . . . . . .
3.2.1 Reinitialization . . . . . . . . . . . . . . . . . . . .
3.2.2 Velocity Extrapolation . . . . . . . . . . . . . . . .
3.3 Time Integration with Strong-Stability-Preserving Runge
Kutta Methods . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Spatial Discretization . . . . . . . . . . . . . . . . . . . .
3.4.1 Discretization of the Advective Operator . . . . . .
3.4.2 Interface-Capturing Methods . . . . . . . . . . . .
3.5 Numerical Strategy for Handling Phase Transition . . . .
3.5.1 Computing the Mass Flux Density from the Temperature Field . . . . . . . . . . . . . . . . . . . .
3.5.2 Enforcing the Interface Conditions on the Velocity
3.5.3 Computing the Interface Velocity . . . . . . . . . .
3.6 Boundary Conditions . . . . . . . . . . . . . . . . . . . . .
3.6.1 Velocity Boundary Conditions . . . . . . . . . . . .
3.6.2 Level-set Function Boundary Conditions . . . . . .
3.6.3 Pressure Boundary Conditions . . . . . . . . . . .
3.6.4 Temperature Boundary Conditions . . . . . . . . .
3.7 Time-Step Restrictions . . . . . . . . . . . . . . . . . . . .
3.7.1 Single-Phase Simulations . . . . . . . . . . . . . .
3.7.2 Two-Phase Simulations . . . . . . . . . . . . . . .
3.8 Estimation of Error and Convergence Order . . . . . . . .
3.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Numerical Experiments
4.1 De Vahl Davis Benchmark Case . . . . .
4.1.1 Numerical Results . . . . . . . . .
4.2 Two-Phase Heat Conduction . . . . . . .
4.2.1 Analytical Solution . . . . . . . . .
4.2.2 Numerical Results . . . . . . . . .
4.3 Wang et al.s Two-Layer Convection Case
4.3.1 Analytical Solution . . . . . . . . .
4.3.2 Numerical Results . . . . . . . . .
xii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
19
19
21
22
24
24
.
.
.
.
.
25
26
27
33
40
.
.
.
.
.
.
.
.
.
.
.
.
.
41
43
44
44
44
46
46
47
48
48
49
51
52
.
.
.
.
.
.
.
.
53
53
54
59
60
61
66
67
73
4.4
4.5
4.6
4.7
4.8
4.9
Lava Lamp . . . . . . . . . . . . . . .
4.4.1 Numerical Results . . . . . . .
Vaporization with Uniform Mass Flux
4.5.1 Analytical Solution . . . . . . .
4.5.2 Numerical Results . . . . . . .
Vaporization with Physical Mass Flux
4.6.1 Analytical Solution . . . . . . .
4.6.2 Numerical Results . . . . . . .
Vaporization of a Drop . . . . . . . . .
4.7.1 Numerical Results . . . . . . .
Boiling Film . . . . . . . . . . . . . . .
4.8.1 Numerical Results . . . . . . .
Summary . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
76
77
80
80
81
85
87
88
92
93
96
97
99
105
xiii
1 Introduction
During the past few years, liquefied natural gas (LNG) has become an increasingly important product of the Norwegian petroleum industry. Since
the start of extraction in 2007, the Snhvit field alone has yielded 2.0 1010
standard m3 oil equivalents of natural gas, 4.65 109 standard m3 oil equivalents of these in 2012 [Norwegian Petroleum Directorate, 2013]. Due
to Snhvits remote location, natural gas transport by pipeline all the
way to the markets was deemed unfeasible as the pipelines would have to
be too expensive. Instead, the well stream from Snhvit is transported
through a 145 km pipeline to the processing facility at Melkya where it
is cooled down to become LNG, which is more efficiently transported by
ship [Gisvold, 2004].
The liquefaction process is performed in heat exchangers that can liquefy
11 106 kg of natural gas per day [Gisvold, 2004]. A large amount of the
greenhouse gas emissions from production, transport and combustion of
LNG is incurred at the liquefaction stage [Tamura et al., 2001]. Therefore
there is a great potential for enabling a more energy-efficient and less
emission-intense LNG life cycle by optimizing the liquefaction stage. Any
reduction in energy consumption in the processing would also be beneficial
from a financial point of view.
Even though some optimizations can be performed with more conventional engineering approaches, a better and more detailed understanding
of the underlying physical behavior of the fluid streams involved in the gas
liquefaction is essential. To contribute to such an understanding, SINTEF
Energy Research and The Norwegian University of Science and Technology are running the five-year (2009-2014) research program Enabling
Low-Emission LNG Systems [Lvseth, 2013] with industry partners Statoil and GDF SUEZ E&P Norge.
According to Kunugi [2012], there seems to be a general consensus
Still, according to Gisvold [2004], the longest of its kind in the world.
1 Introduction
that direct numerical simulation is one of the most promising approaches
towards clarifying heat transfer characteristics and condensation/boiling
phenomena and discussing their mechanisms. Therefore this thesis aims
to describe and implement the discretization of a transport equation for
temperature into an existing implementation of a two-phase flow model,
developed at SINTEF Energy Research, and thus enable the numerical
study of heat transfer in two-phase flow. Also, the ambition is to describe
and implement a phase-transition model to enable detailed numerical studies of the liquefaction process. Performing such physically realistic LNG
simulations, however, is beyond the scope of the thesis.
The flow model relies on the level-set method to keep track of the location of the interface between the phases under consideration. The level-set
method was first described by Osher and Sethian [1988] and has since been
used in two-phase flow models; both compressible and incompressible [Osher and Fedkiw, 2003]. A review of some of the early advances in the use
of this method to study boiling phenomena is given by Dhir [2001]. In this
thesis, however, we consider a more recent level-set-based phase-transition
model similar to that proposed by Gibou et al. [2007].
1.1 Notation
In this section, we comment on some important points regarding the notation used in this work.
Vector quantities are distinguished from scalars using arrows. The
exception is unit vectors who wear hats. The velocity vector field is
therefore denoted by ~u, whereas the unit vector in the x-direction is
x
and the scalar pressure field is p.
We will use derivative notations in full, e.g.
forms interchangeably.
x ,
+ (~u) = 0.
(2.1)
t
In (2.1), ~u is the fluid velocity. The interested reader is referred to Landau
and Lifshitz [1987, 1] for a derivation of this equation.
We will assume incompressible flow throughout this work, that is we
will assume that
~u = 0.
(2.2)
The continuity equation for the fluid density (2.1) then becomes
+ ~u = 0.
t
(2.3)
+ uk
=
,
(2.4)
+ (fb )i +
t
xk
xi
xk
where p is the pressure, (fb )i is the i-component of the body force density
and V is the viscous stress tensor. The derivation of this equation can be
found in Landau and Lifshitz [1987, 15].
According to Landau and Lifshitz [1987, 15], the general form of the
viscous stress tensor V for an isotropic fluid and small velocity gradients
is
ui
uk
2 u`
u`
Vik =
+
ik
+ ik
,
(2.5)
xk
xi
3 x`
x`
where is the dynamic viscosity and is the second viscosity. Since Vik
is a linear combination of derivatives i uk , the fluids we consider may be
classified as Newtonian fluids [White, 2008, Section 4.3].
Under assumption of incompressible flow, i ui = 0 (2.2), the balance
equations for all momentum components (2.4) reduce to
~u
Body forces is the collective name given to all external forces, such as gravity or
electric forces, that are acting on the fluid. In the case where we consider only
gravitational external forces, f~b = ~g .
(2.7)
where f~sfd is a force density, is the Dirac delta function and ~xi is a
parametrization of the interface. In this thesis, f~sfd is modeled by
f~sfd = k
n,
(2.9)
(2.11)
This equation is derived from the general equation for heat transfer by
Landau and Lifshitz [1987, 50] and more directly from considering a list
of selected physical effects by Griebel et al. [1998, Section 9.2].
The source term on the right hand side of (2.11) is the diffusion term.
It models direct molecular transfer of energy from areas with high temperature to areas with low temperature by a heat flux proportional to the
temperature difference. This term is independent of the fluid velocity ~u
and may lead to heat transfer even when the fluid is macroscopically at
rest.
Within each phase, we will assume that is uniform and we can rewrite
(2.11) as
T
+ (~u ) T = 2 T,
(2.12)
t
where the thermal diffusivity [Griebel et al., 1998, Section 9.2] is
=
.
cp
(2.13)
(2.14)
(2.15)
Since ~g appears only in the body force term in the NavierStokes equations, we can transfer the temperature dependence of the density in this
term to the gravitational acceleration and still expect the same solutions
for the ~u and p fields. In other words, we can replace the buoyancy force
density (T ) ~g with ~g (T ). The temperature-dependent gravitational
acceleration now becomes
~g (T ) = ~g (1 {T T }) ,
(2.16)
(2.17)
We will adopt the convention that the liquid phase occupies and the
gaseous phase occupies + . Since n
is defined as pointing into + , local
mass flux from to + , vaporization, is characterized by a positive m.
Applying mass conservation across the interface gives the following expression for the mass flux density m in terms of the fluid velocities on each
side of the interface and the interface velocity,
m = + ~u+ n
w
~ n
,
= ~u n
w
~ n
.
10
(2.18)
(2.19)
m
n
.
(2.20)
From these equations we see that when there is no mass flux m = 0, the
velocity field is continuous at the interface and w
~ is equal to the fluid
velocity at the interface.
Eliminating w
~ from (2.19) and (2.20) gives
~u n
~u n
=m
1
1
+
.
(2.21)
~u ~u = m
1
1
n
.
(2.22)
As the interface condition for temperature, we demand that the temperature in both phases should be equal to the saturation temperature,
T + = T = Tsat .
(2.23)
(2.24)
11
(2.25)
for the viscosity and so on for other fluid and flow properties.
So far, the presented equations have been valid in any number of spatial dimensions, depending on the definitions of the vector fields and the
spatial derivative operators. In the following, however, we will restrict our
attention to two spatial dimensions.
In order to treat the interface sharply, with the method we will later call
the ghost-fluid method (GFM), we need to be able to compute the jumps
in various quantities. How we do that will depend on whether we include
the phase-transition model or not. In the following two subsections we
will first state the required jumps for two-phase immiscible flow and then
state those for two-phase flow with phase transition.
12
(2.26)
(2.27)
(2.28)
(2.29)
(2.30)
(2.31)
(2.32)
(2.33)
If this were not the case, the temperature could vary independently along
each side of an interface and thus violate (2.32).
Also according to Landau and Lifshitz [1987, 50], the local conductive
heat flux out of one phase must be equal to the local conductive heat flux
into the other. This amounts to demanding that the component of the
heat flux normal to the interface is continuous at the interface,
[T ] n
= 0.
(2.34)
(2.35)
(2.36)
(2.37)
This means that the conductive heat flux tangential to an interface may
be discontinuous if the phases have different thermal conductivities.
13
2 1
~
,
(2.39)
[p] = [
n ~u n
] + fsfd ~n m
[p] = 0,
(2.40)
[T ] = 0,
[T n
] = mh.
(2.41)
(2.42)
Note that we have not stated a jump condition for ~u. This is because,
according to Gibou et al. [2007], it is not clear how to treat the jump in
viscous stress sharply when modeling phase transitions and we will use
the continuum surface force (CSF) method rather than the GFM when
computing the viscous stress in these cases.
14
u v
+
,
x y
(2.43)
+ 2
2
x
y
T
T
T = x
+ y ,
x
y
2T
2T
2 T =
+
.
x2
y 2
2
2
2
u + y
+ 2
2
x
y
v,
(2.44)
(2.45)
(2.46)
However, when we do three-dimensional simulations under the assumption of rotational symmetry around the y-axis, we use a different grid and
different definitions of the above operators. We now let x be the radial
coordinate and u be the radial component of the velocity and use the
cylindrical-coordinate operators and an axisymmetric grid. With the assumption of rotational symmetry around the y-axis, these operators are
[Kreyszig, 2006, Appendix 3.4]
1
v
(xu) +
,
x x
y
2
2
1
2
2
2
~u = x
+
u + y
+
v,
x2 x2 y 2
x2 y 2
T
T
T = x
+ y ,
x
y
2
1 T
2T
T
+
+
.
2 T =
x2
x x
y 2
~u =
(2.47)
(2.48)
(2.49)
(2.50)
15
(2.52)
(2.53)
Outflow
At a boundary where the fluids can flow freely out of and into the domain,
we impose that the derivative in the normal direction of both velocity
components is zero,
n ~u = 0.
(2.54)
(2.55)
16
2.8 Summary
This choice of BC is not physically founded, but merely an artifact from
the projection method. For further details, see Griebel et al. [1998, Section
3.2.3]. With this BC on all boundaries, p is only determined up to the
addition of a constant. Therefore we must also supply the value of p at
given point.
(2.57)
2.8 Summary
In this chapter, the mathematical model for the two-phase flow physics was
presented. The most significant parts of the model were the incompressible
NavierStokes equations (2.2) and (2.10) for the velocity ~u and pressure p
fields (Section 2.1) and the advection-diffusion equation (2.11) for temperature T (Section 2.2). The body force term in the NavierStokes equations
was given a temperature dependence (2.15) according to Boussinesq approximation (Section 2.3) to enable simulations with temperature-driven
flows and a phase-transition model was presented (Section 2.4) to allow
17
18
3 Numerical Methods
In the previous chapter, the mathematical model for the two-phase flow
physics was presented. In this chapter, we present the methods used to
numerically solve it. The general scheme is similar to those used by e.g.
Kang et al. [2000] and Gibou et al. [2007] and can be summarized as
follows.
We will use explicit RungeKutta (RK) methods to integrate the equations of motion and thus approximate the velocity, pressure and temperature fields discrete at points in time. This can be done if we are able
to compute the time derivatives of the velocity and temperature fields at
every time step (and RK stage) and the pressure at the next. To this avail
we will make use of a variant of Chorins projection method. This method
yields explicit expressions for the required time derivatives and a Poisson
equation for the pressure. To compute these time derivatives and solve the
Poisson equation, we also need schemes to approximate spatial derivative
operators. We will use the weighted essentially non-oscillatory (WENO)
scheme for advective operators and central differencing (CD) schemes for
Laplacian, gradient and divergence operators. This again requires knowledge of the interface location at each time step and to keep track of that,
we employ the level-set method. Also, when computing approximations
to the spatial derivatives, we need to treat discontinuities at the interface.
For this we use the GFM, the CSF method or a combination of them,
depending on the case at hand.
19
3 Numerical Methods
the time derivative of the velocity field t ~u(n) at time step n and a Poisson equation the pressure p(n+1) at the next time step (or time stage for
higher-order RK methods). It is thus explicit in all fields except the pressure where it is implicit. In this section, we present the projection method
by giving a brief derivation of it.
We start our derivation by defining an intermediate vector field ~a(n) .
This contains the entire right hand side of the momentum balance equation
(2.10) when solved for t ~u at time step n, except the contribution from
the gradient of the pressure,
t ~u(n) = ~a(n)
p(n+1)
.
(3.1)
(3.2)
This equation for ~a(n) can be directly evaluated, with proper discretization
of the spatial differential operators, since the right hand side contains
known fields only. However, in order to use (3.1) to get t ~u(n) , we must
find the as of yet unknown pressure p(n+1) . To do this, we discretize the
time derivative in (3.1) using the forward Euler method and get
~u(n+1) ~u(n)
p(n+1)
= ~a(n)
.
t
(3.3)
t
This is a Poisson equation for the pressure p(n+1) , with a known right-hand
side. According to Hansen [2005], it can be solved with the appropriate
boundary conditions.
20
d~x =
~a +
d~x,
(3.5)
and apply the divergence theorem of Gauss [Kreyszig, 2006, Section 10.7],
we get
!
Z
Z
~u(n)
p(n+1)
(n)
~a +
n
d~s =
n
d~s.
(3.6)
21
3 Numerical Methods
to satisfy (3.5) when we impose the Neumann BCs. Therefore, (3.7) is
our condition for compatibility between the right hand side of the Poisson
equation (3.4) and the Neumann BCs on p. According to Griebel et al.
[1998, Section 3.2.1], compatibility is necessary for the Poisson equation
(3.4) to have a solution (determined up to the addition of a constant).
Looking more closely at (3.7), we see that we have compatibility whenever the net flow of fluid across the boundaries and into the domain is zero.
Therefore, as long as there is no phase transition, we can follow Griebel
et al. [1998] and Kang et al. [2000] and say that (3.7) is satisfied because
of the BCs we impose on ~u.
When we do have a phase transition, however, these arguments are no
longer valid. The easiest way to ensure that the Poisson equation (3.4) still
has a solution is to resort to Dirichlet BCs for the pressure and therefore
this is what we will do in this thesis.
(3.8)
The level-set function thus divides the fluid domain in two parts, +
and , where
+ (t) = {~x | (~x, t) > 0} ,
(3.9)
(3.10)
We refer to the fluid occupying the region as Phase 1 and the fluid
occupying + as Phase 2.
22
+w
~ = 0,
t
(3.11)
where w
~ is the velocity of the interface. In cases without phase transition,
w
~ is the fluid velocity at the interface. Then (3.11) can be viewed as an
advection equation for and the temporal evolution of the interface is
advection with the velocity field ~u.
There are many scalar functions that could serve as suitable level-set
functions. We will, however, stick to a particularly useful and widely used
choice, the signed distance-function
(
d0 (~x) if ~x
,
(3.12)
d (~x) =
d0 (~x)
if ~x +
where d0 (~x) is the Euclidean distance from the point ~x to its closest point
on the interface,
~x ~x0
.
(3.13)
d0 (~x) = min
2
0
~
x
The advantages of the level-set method are many. Two of them are the
relative ease with which it can be implemented and its ability to handle
topological changes such as merging and pinching of drops without any
special treatment. Another advantage is the straightforward definition of
the normal vector n
to the interface, pointing from into + [Lerv
ag,
2008, Gibou et al., 2007],
n
=
,
(3.14)
kk2
and the interface curvature k,
k = n
.
(3.15)
23
3 Numerical Methods
3.2.1 Reinitialization
In the discretization of some of the spatial derivative operators, we will
rely on being a signed distance-function. However, accumulating numerical errors in the time integration of (3.11) and a non-uniform velocity
field w
~ will cause to gradually lose this property during the course of
a simulation. To mend this, we employ the reinitialization procedure by
Sussmann et al. [1994] at regular time-step intervals. With this procedure,
we take our current level-set function 0 and iterate the reinitialization
equation,
+ S (0 ) (kk2 1) = 0,
(3.16)
2 + (2x)2
(3.17)
0, we see that w
~ is indeed constant in direction normal to the interface.
24
= f (, t) ; t 0,
t
(0) = 0 .
(3.19)
s
X
j=1
(3.20)
(n)
+ t
(n+1) = (n) + t
s
X
j=1
s
X
aij f {j} , t(n) + cj t ,
bj f {j} , t(n) + cj t .
j=1
25
3 Numerical Methods
If aij = 0 for j i, the RK method is explicit. In this work, only
explicit RK methods with the strong-stability-preserving (SSP) property
are used. Strong-stability-preserving methods are higher-order RK methods that preserve the stability of the forward Euler method. This property
is obtained by ensuring that the RK method can be written as a convex
combination for Forward Euler steps. For a more complete discussion
of RK methods and the SSP property and its practical importance, the
reader is referred to S
uli and Mayers [2006, Section 12.5] and Ketcheson
and Robinson [2005] respectively.
In this thesis, the forward Euler method with Butcher table
0
1
1
,
1/2 1/2
26
.
(3.24)
x (i)
2x
27
3 Numerical Methods
(i, j + 1/2)
Grid cell
(i + 1/2, j)
(i, j)
Boundary
Figure 3.1: Schematic illustration of the MAC grid. The solid lines mark the cell edges.
Scalar values are stored at the cell centers (i, j), marked by circles. Vector quantities
have their x-components stored at the vertical cell edges (i + 1/2, j), marked by squares,
and their y-components at the horizontal cell edges (i, j + 1/2), marked with diamonds.
Boundaries lie along cell edges and boundary conditions are applied by setting the field
values in the gray ghost cells.
28
+
D(i) T and forward D(i)
T differences respectively. This results in the FUP
scheme,
(
T
T(i)
+
if u(i) 0
(Tx+ )(i) = D(i)
T = (i+1)
T
x
.
(3.25)
T
T
x (i)
(Tx )(i) = D T = (i) (i1) if u(i) > 0
(i)
This scheme is first-order accurate and produces much better results than
CD, according to Osher and Fedkiw [2003, Section 3.2].
The Essentially Non-Oscillatory Scheme
A scheme of higher than first-order accuracy would be an obvious improvement over the FUP scheme. The ENO scheme accomplishes increased accuracy by calculating the approximations Tx and Tx+ in a more elaborate
fashion compared to FUP. The general idea is to use divided differences
to construct a Newton interpolation polynomial Q to T and then compute the derivative of this polynomial. See e.g. Kreyszig [2006, Section
19.3] for an introduction to Newton interpolation polynomials and divided
differences.
29
3 Numerical Methods
The first four divided differences, here indexed 0 to 3, can be expressed
as
0
T
D(i)
= T(i) ,
1
T
D(i+1/2)
2
T
D(i)
3
D(i+1/2)
T
(3.26)
0
0 T
D(i+1)
T D(i)
,
x
1
1
D(i+1/2)
T D(i1/2)
T
2x
2
2 T
D(i+1)
T D(i)
3x
(3.27)
,
(3.28)
(3.29)
Note that the zeroth and second divided differences are defined at the cell
centers and that the first and third divided differences are defined at the
1
cell edges. We notice also that D(i1/2)
T = D(i)
T , that is, the first divided
difference at (i 1/2), is the backward difference approximation to x T
+
1
at (i) and that D(i+1/2)
T = D(i)
T is the forward difference approximation
to x T at (i).
From the divided differences, we can construct a Newton interpolation
polynomial Q approximating T ,
Q (x) = Q0 (x) + Q1 (x) + Q2 (x) + Q3 (x) ,
(3.30)
(3.31)
(3.33)
30
C2 =
` =
(
2 T
D(k)
2 T | < |D 2
if |D(k)
(k+1) T |
2
D(k+1)
T otherwise
(
2 T | < |D 2
k 1 if |D(k)
(k+1) T |
otherwise
(3.34)
(3.35)
Then
Q2 (x) = C2 x x(k)
x x(k+1) ,
(3.36)
(3.37)
x x(`+1)
x x(`+2) ,
(3.39)
(3.40)
31
3 Numerical Methods
relative magnitudes of the divided differences and the sign of u(i) . Defin
ing j = D(i3+j)
T, j {1, 2, 3, 4, 5} the three possible approximations
Tx are
1 72 113
+
,
3
6
6
2 53 4
+ ,
= +
6
6
3
3 54 5
=
+
.
3
6
6
Tx1 =
(3.41)
Tx2
(3.42)
Tx3
(3.43)
choice of Tx is
Tx = 1 Tx1 + 2 Tx2 + 3 Tx3 .
(3.44)
In the rest of this section we will consider this choice of Tx , noting that the
following formulas apply also for the choice of Tx+ using the appropriate
definition of j .
In Jiang and Shu [1996], it was shown that the WENO scheme produces
fifth-order accurate results in smooth regions if the weights are chosen as
1 = 0.1, 2 = 0.6, and 3 = 0.3. Unfortunately, this choice of weights
can be very inaccurate in regions where T is not smooth. The key to
mending this is to choose the weights so that they are close to the optimal
weights when T is smooth around (i) and Tx1 , Tx2 and Tx3 all correspond to
smooth interpolation polynomials, and, when T is not smooth around (i),
to give less weight to those of Tx1 , Tx2 and Tx3 that correspond to the least
smooth interpolation polynomials. This results in third order-accuracy in
non-smooth regions.
The non-smoothness measures associated with each of the approximations Tx1 , Tx2 and Tx3 are
Z1 =
32
13
1
(1 22 + 3 )2 + (1 42 + 33 )2 ,
12
4
(3.45)
Z2 =
Z3 =
13
(2 23 + 4 )2 +
12
13
(3 24 + 5 )2 +
12
1
(2 4 )2 ,
4
1
(33 44 + 5 )2 .
4
(3.46)
(3.47)
Next, we define weights that are small when the corresponding measure
of non-smoothness is large,
1 =
2 =
3 =
0.1
,
(Z1 + )2
0.6
,
(Z2 + )2
0.3
,
(Z3 + )2
(3.48)
(3.49)
(3.50)
1
,
1 + 2 + 3
2
,
1 + 2 + 3
3
.
1 + 2 + 3
(3.51)
(3.52)
(3.53)
The WENO scheme is thus preferable to the ENO scheme and, by extension, to the other schemes considered in this section because of its
fifth-order accuracy in smooth regions. It also has another advantage over
the ENO scheme in that a smaller computational effort is needed for each
approximation to x T . This was demonstrated e.g. by Lerv
ag [2008] in
his Table 3.1.
33
3 Numerical Methods
In this section, we present two strategies for handling the interfacial
discontinuities in the diffusive term in the advection-diffusion equation
(2.11). These are the continuum surface force (CSF) method and the
ghost-fluid method (GFM). The GFM scheme is discussed twice, once
for two-phase immiscible flow and once for two-phase flow with phase
transition.
For a presentation of these methods in the context of the viscous term
in (3.2), the Poisson equation (3.4) and the projection equation (3.1), the
interested reader is referred to Kang et al. [2000] and Osher and Fedkiw
[2003].
The Continuum Surface Force Method
The CSF method handles discontinuities by smearing out the discontinuous properties around the interface in a controlled way.
Consider the discretization of the term
1
T
.
(3.54)
cp x
x
The discretization of the y-term will be completely analogous to this. We
discretize it at the grid point (i, j) using a standard CD scheme
1
cp x
(i,j)
2 (i,j)
T(i+1,j) T(i,j)
x(i)
T(i,j) T(i1,j)
x(i1)
x(i) + x(i1)
, (3.55)
where x(i) is the distance between grid points (i, j) and (i + 1, j) and
is smeared out in the vicinity of the interface. The smearing of is given
by
() ,
() = + (+ )H
(3.56)
0
if <
() = 1 + + 1 sin
if .
(3.57)
H
2
2
2
1
if <
() is illustrated in Figure 3.2.
The smoothness of H
34
H()
1.0
0.5
0.0
0.5
2.0
1.5
1.0
0.5
0.0
/
0.5
1.0
1.5
2.0
(i,j)
(x T )(i+1/2,j) (x T )(i1/2,j)
x(i) + x(i1)
(3.58)
Now, if (i1,j) , (i,j) and (i+1,j) are either all positive or all negative,
the discretization of the numerator above is straightforward. If all are
positive, then
T(i+1,j) T(i,j)
T
+
,
(3.59)
x (i+1/2,j)
x(i)
T(i,j) T(i1,j)
T
+
.
(3.60)
x (i1/2,j)
x(i1)
35
3 Numerical Methods
x(i1)
(1 )x(i1)
(i 1, j)
(i, j)
x(i1)
Figure 3.3: An illustration of the sub-cell resolution of the interface location. The
dashed line shows the interface position.
For the case where (i1,j) , (i,j) and (i+1,j) are all negative, we replace
+ with in the above equations,
T(i+1,j) T(i,j)
T
,
(3.61)
x (i+1/2,j)
x(i)
T(i,j) T(i1,j)
T
.
(3.62)
x (i1/2,j)
x(i1)
If (i1,j) and/or (i+1,j) have a different sign from (i,j) , we must take
the presence of an interface into account.
Consider first the case where there is an interface located between the
grid points (i1, j) and (i, j), that is when (i1,j) and (i,j) have opposite
signs. Assume also that (i1,j) 0 and (i,j) > 0. Relying on the
distance-function property of the level-set function, we will assume that
the interface is located at
where is given by
xi = x(i1) + x(i1) ,
(3.63)
(i1,j)
.
=
(i1,j) + (i,j)
(3.64)
In this way, we resolve the position of the interface on a scale smaller than
the cell sizes, see Figure 3.3.
36
T(i,j) Ti
Ti T(i1,j)
.
(1 ) x(i1)
x(i1)
(3.65)
(3.66)
(3.67)
,
(3.68)
x (i1/2,j)
(1 )x(i1)
0
T(i,j) T(i1,j)
Ji
+ 0 .
x(i1)
(3.69)
+
.
+ + (1 )
(3.70)
By a similar argument one finds, for the case where (i1,j) > 0 and
(i,j) 0,
T(i,j) Ti
T
,
x (i1/2,j)
(1 )x(i1)
00
T(i,j) T(i1,j)
Ji
+ 00 + ,
x(i1)
(3.71)
(3.72)
+
.
+ + (1 )
(3.73)
37
3 Numerical Methods
Now we can insert the appropriate one of (3.69) and (3.72) for the discretization of x T at (i 1/2, j) to evaluate (3.58) in the case where
there is an interface between (i 1, j), and (i, j).
Next, consider the situations where there is an interface located between
(i, j) and (i + 1, j). Then we can interpolate the jump condition to the
interface as
Ji (1 )J(i+1,j) + J(i,j) ,
(3.74)
where is now given by
(i+1,j)
.
=
(i+1,j) + (i,j)
For the case where (i,j) > 0 and (i+1,j) 0, we use
Ti T(i,j)
T
+
,
x (i+1/2,j)
(1 )x(i)
0
T(i+1,j) T(i,j)
Ji
+ 0 ,
x(i)
(3.75)
(3.76)
(3.77)
in the evaluation of (3.58). And for the case where (i,j) 0 and (i+1,j) >
0, we use
Ti T(i,j)
T
,
(3.78)
x (i+1/2,j)
(1 )x(i)
00
T(i+1,j) T(i,j)
Ji
+ 00 + ,
x(i)
(3.79)
in (3.58).
The Ghost-Fluid Method for Two-Phase Flow with Phase Transition
When simulating two-phase flow with phase transition, we replace the interface condition (2.31) on the temperatures with the condition (2.23);
that the interface temperature should be equal to the saturation temperature Tsat . This leads to a slightly different GFM treatment of the Laplacian
operator in (2.11), which we will proceed to describe in this section. This
new scheme is similar to that described by Gibou et al. [2002] for treating
Stefan problems.
38
+
.
(3.81)
x (i1/2,j)
x(i1)
According to Gibou et al. [2002], this scheme becomes unstable when is
small, because we end up subtracting two numbers of similar magnitude
and dividing the result by a small number. Therefore, we use it only when
> c , for some specified constant c h0, 1i. To get good approximations
to x T , we should choose c reasonably small.
If instead c and (i,j) and (i+1,j) have the same sign, we choose
T(i+1,j) Tsat
T
+
,
(3.82)
x (i1/2,j)
x(i1) + x(i)
and thus avoid the problem that occurs when is small. From this equation it is evident that the cost of choosing a finite c to keep this scheme
stable is a smearing out of the approximated x T at the interface.
When c and (i,j) and (i+1,j) do not have the same sign, we give
up and set
T
0.
(3.83)
x (i1/2,j)
According to Gibou et al. [2002], this is acceptable since we now have two
interfaces close together, both have temperatures Tsat and the temperature
derivative must therefore be small.
39
3 Numerical Methods
Similarly, we need to account for the interface condition also when (i,j)
and (i+1,j) have different signs. Assume for now that (i,j) > 0 and define
(i,j)
.
=
(3.84)
(i,j) + (i+1,j)
When > c , we approximate
Tsat T(i,j)
T
,
+
x (i+1/2,j)
x(i)
(3.85)
and when c and (i1,j) and (i,j) have the same sign, we use
Tsat T(i1,j)
T
+
.
(3.86)
x (i+1/2,j)
x(i) + x(i1,j)
Again, when c and (i1,j) and (i,j) have different signs we give up
and set
T
0.
(3.87)
x (i+1/2,j)
In the case where (i,j) 0, we use the same procedure, but replace +
with in the equations above.
40
41
3 Numerical Methods
If instead |(i1,j) | |(i+1,j) |, then the point (i + 1, j) lies closer to the
interface than (i 1, j) and we follow an analogous procedure to approximate x T at (i, j). If (i+1,j) and (i,j) are both positive or both negative,
we discretize according to
T(i+1,j) T(i,j)
T
Tx =
.
(3.93)
x (i,j)
x(i)
On the other hand, if (i,j) and (i+1,j) have different signs, there is an
interface between (i, j) and (i + 1, j) and we need to enforce the interface
condition (2.23). Let
(i,j)
.
(3.94)
=
(i,j) + (i+1,j)
Then, if > c for the specified constant c h0, 1i, we use the approximation
Tsat T(i,j)
T
Tx =
.
(3.95)
x (i,j)
x(i)
If instead c and (i,j) and (i1,j) have the same sign, we choose
T
x
(i,j)
Tx =
Tsat T(i1,j)
.
x(i) + x(i1)
(3.96)
In the case where c and (i,j) has a different sign than (i1,j) , we
give up and set
T
Tx = 0.
(3.97)
x (i,j)
The scheme for approximating y T is completely analogous to that presented for x T and will not be discussed in further detail.
Assume now that we have our approximations Tx and Ty in a band
around the interface. Then we compute approximations Tn to n
T by
taking
Tn = n
[Tx , Ty ].
(3.98)
To compute the jump (2.42) we need to extrapolate Tn from Phase 1
into Phase 2 and vice versa to have liquid values Tn and gas values Tn+
42
Tn
= {1 H ()} n
Tn+ ,
= H () n
Tn ,
(3.99)
(3.100)
(+ Tn+ Tn )
.
h
(3.101)
(
~u
=
~u+
g
(
~ug
=
~u
if > 0
,
if 0
(3.102)
if > 0
.
if 0
(3.103)
The values of the scalar level-set function is obtained at the velocity points
by linear interpolation. The ghost values are defined as
1
+
~u
=
~
u
m
n
,
(3.104)
g
1
+
~ug = ~u + m
n
.
(3.105)
43
3 Numerical Methods
and (~u )(n) to calculate (~a+ )(n) and (~a )(n) , respectively, with (3.2). Then
we approximate the corresponding time derivatives of ~u+ and ~u with
(3.1). The pressure is obtained by solving the Poisson equation (3.4),
where the right hand side is discretized using values from (~u )(n) and
(~a )(n) for Phase 1 points and (~u+ )(n) and (~a+ )(n) for points in Phase 2.
Then, after each time step (or stage), we update the physical velocities
~u(n+1) point by point according to
(
(~u+ )(n+1) if (n+1) > 0
~u(n+1) =
.
(3.106)
(~u )(n+1) if (n+1) 0
44
(3.107)
(3.109)
(3.108)
(3.110)
j {1, . . . , jmax }
(West),
(3.111)
i {1, . . . , imax }
j {1, . . . , jmax }
(East),
(3.112)
(South),
(3.113)
i {1, . . . , imax }
(North).
(3.114)
u(i,0) = u(i,1) ,
Free-Slip
With the free-slip BCs, the normal components of the velocities are zero
and we can set them with (3.107) to (3.110). The normal derivative of
the tangential velocity components are to be zero and we achieve this by
mirroring their values across the boundary,
j {1, . . . , jmax } , ` {1, 2, 3}
(West),
(3.115)
(East),
(3.116)
(South),
(3.117)
(North).
(3.118)
v(1`,j) = v(`,j) ,
u(i,1`) = u(i,`) ,
u(i,jmax +`) = u(i,jmax +1`) ,
Outflow
With the outflow BC, the normal derivatives of both the normal and
tangential velocity components are to be zero. We accomplish this by
45
3 Numerical Methods
mirroring both the normal,
u(0,j) = u(1,j) ,
u(imax +1,j) = u(imax ,j) ,
v(i,0) = v(i,1) ,
v(i,jmax +1) = v(i,jmax ) ,
(3.119)
(3.121)
(3.120)
(3.122)
v(0,j) = v(1,j) ,
j {1, . . . , jmax }
i {1, . . . , imax }
u(i,0) = u(i,1) ,
i {1, . . . , imax }
(West),
(3.123)
(East),
(3.124)
(South),
(3.125)
(North),
(3.126)
(West)
(3.127)
(East)
(3.128)
(South)
(3.129)
(North)
(3.130)
46
j {1, . . . , jmax }
(West)
(3.131)
(East)
(3.132)
i {1, . . . , imax }
(South)
(3.133)
(North)
(3.134)
j {1, . . . , jmax }
p(i,jmax +1) = 0
i {1, . . . , imax }
Neumann
Due to the choice of projection method we can in most cases set the
normal component of the pressure gradient equal to zero at the boundaries
[Griebel et al., 1998, Section 3.2.10],
p(0,j) = p(1,j) ,
p(imax +1,j) = p(imax ,j) ,
p(i,0) = p(i,1) ,
p(i,jmax +1) = p(i,jmax ) ,
j {1, . . . , jmax }
(West),
(3.135)
j {1, . . . , jmax }
(East),
(3.136)
(South),
(3.137)
i {1, . . . , imax }
(North).
(3.138)
i {1, . . . , imax }
j {1, . . . , jmax }
(West),
(3.139)
(3.140)
(3.141)
Neumann
With Neumann BCs, we want to impose heat flux densities qwest , qeast ,
qsouth or qnorth into the fluid domain from the west, east, south or north
47
3 Numerical Methods
boundaries respectively. We set
qwest
T(0,j) = T(1,j) +
x(0) ,
(3.143)
T(imax +1,j)
qeast
= T(imax ,j) +
x(imax ) ,
(3.144)
T(i,0)
qsouth
= T(i,1) +
y(0) ,
(3.145)
qnorth
y(jmax ) ,
(3.146)
(3.147)
48
(3.152)
(3.153)
(3.155)
|u(i,j) |
x(i)
+ max
i,j
|v(i,j) |
y(j)
,
(3.157)
49
3 Numerical Methods
= 2 max + ,
s
Cs =
s
Cg =
max
i,j
maxi,j
1
x(i)
k(i,j)
max (+ , ) (min {x
2 +
1
y(j)
2,
min , ymin })
|gy |
|gx |
+
.
xmin ymin
2
(3.158)
(3.159)
(3.160)
Note that in (3.159), Kang et al. [2000] use min (+ , ). However, this
was judged overly conservative and replaced with max (+ , ) by Lerv
ag
[2008]. We then let
(t)~u =
2CCFL
Cc + C +
(3.161)
(3.162)
50
(3.165)
k~a ~aref k1
,
N
(3.166)
C
.
Nn
(3.167)
(3.168)
51
3 Numerical Methods
To have a quantitative notion of how close a simulated solution is to
steady-state, we define Ess of the field as
(n)
(n`)
maxi,j (i,j) (i,j)
Ess () =
,
(3.170)
t(n) t(n`)
where ` 1 and n is the final time step in the simulation. If the solution
converges to steady-state, then Ess should provide an upper bound for the
simulated t at the end of the simulation.
3.9 Summary
We have presented the numerical methods used to solve the two-phase
flow model. Chorins projection method (Section 3.1) was employed to
get an explicit expression (3.1) for the velocity derivatives t ~u(n) and a
Poisson equation (3.4) for the pressure p(n+1) . The level-set method, used
to keep track of the interface location through the time integration of
the level-set equation (3.11), was presented (Section 3.2) and the finitedifference approximations to the spatial derivative operators (Section 3.4),
and thus to e.g. the temperature derivative t T (n) , were described. We also
described a strategy for handling the phase-transition model numerically
(Section 3.5), by calculating the mass flux density m from the temperature
field using (3.101) and use m to enforce the interface condition on the
velocity field and find the velocity of the interface. The implementation
of the boundary conditions (Section 3.6) was presented and to ensure
stability of the RungeKutta schemes (Section 3.3), we gave expressions
for the maximum length of safe time steps (Section 3.7).
52
4 Numerical Experiments
In this chapter, we describe the eight test cases for which simulations were
run in this thesis. The main purpose of most of these numerical experiments is to verify the methods and their implementation by comparing
results from simulation against analytical or reliable numerical results.
Some of the cases are therefore maybe not so interesting in themselves,
but they may reveal interesting features of the method or errors in the
implementation.
At the time of writing de Vahl Davis [1983] had 186 article citations according to
Web of Knowledge.
53
4 Numerical Experiments
y
Ly
Twest
Teast
x
Lx
Figure 4.1: Schematic illustration of the de Vahl Davis benchmark case configuration.
(4.1)
(4.2)
54
0.8
293.6
0.6
293.2
0.4
292.8
0.2
292.4
y [m]
T [K]
1.0
0.0
0.0
0.2
0.4
0.6
0.8
1.0
292.0
x [m]
(a)
294.0
0.8
293.6
0.6
293.2
0.4
292.8
0.2
292.4
y [m]
T [K]
1.0
0.0
0.0
0.2
0.4
0.6
0.8
1.0
292.0
x [m]
(b)
Figure 4.2: Contour plot of the temperature in the de Vahl Davis bench mark case
for (a) Case A, Ra = 103 and (b) Case B, Ra = 106 . The black arrows illustrate the
velocity field.
55
4 Numerical Experiments
Table 4.1: Fluid properties used in the de Vahl Davis benchmark case.
Unit
Case A
Case B
Pr
Ra
1
1
0.71
103
0.71
106
cp
kg m3
Pa s
J kg1 K1
K1
W K1 m1
K
1.2041
1.7400 105
1.012 103
1.4990 108
2.4801 102
293.0
1.2041
1.7400 105
1.012 103
1.4990 105
2.4801 102
293.0
tical center line of the fluid domain. In the benchmark solution, this
quantity is 7.4268 105 m s1 for Case A and 1.3154 103 m s1 for Case
B.
In Case A, on the 301 301 grid, umax was 7.4279 105 m s1 . This
value of umax was obtained, as in de Vahl Davis [1983], by doing a fourth
order polynomial interpolation of u around the maximum point on the vertical center line and then finding the maximum of the interpolation polynomial. The obtained value corresponded to an error of approximately
0.01% with respect to the benchmark solution. de Vahl Davis [1983] estimates the error in this benchmark solution to be 0.1%. The error in our
solution with respect to the benchmark is then smaller than the estimated
error of the benchmark itself. In that sense, our 301 301 solution is as
close to the benchmark as one could reasonably hope to get. Therefore we
conclude that there was agreement between our solution on the 301 301
grid and the benchmark solution.
Similarly, the simulated umax was 1.3206 103 m s1 for Case B on the
301 301 grid, corresponding to an error with respect to the benchmark
of 0.4%. This is again smaller than the estimated error of the benchmark
solution of 1% and therefore in agreement with the benchmark solution.
The order of convergence was investigated for both cases A and B, with
the 301 301 solutions as reference solutions. The resulting errors Eabs
and orders of convergence n, estimated using (3.169) from page 51, are
56
Table 4.2: Convergence table based on the maximum horizontal velocity component
umax along the vertical center line for the de Vahl Davis benchmark Case A with Ra =
103 .
N
-
umax
m s1
Eabs
m s1
n
-
21
31
41
51
61
81
7.454 1005
7.440 1005
7.435 1005
7.432 1005
7.431 1005
7.430 1005
2.65 1007
1.23 1007
6.95 1008
4.48 1008
3.08 1008
1.70 1008
1.98
2.04
2.01
2.09
2.09
Table 4.3: Convergence table based on the maximum horizontal velocity component
umax along the vertical center line for the de Vahl Davis benchmark Case B with Ra =
106 .
N
-
umax
m s1
Eabs
m s1
n
-
21
31
41
51
61
81
1.462 1003
1.431 1003
1.384 1003
1.359 1003
1.346 1003
1.334 1003
1.41 1004
1.11 1004
6.34 1005
3.80 1005
2.49 1005
1.31 1005
0.62
2.00
2.35
2.35
2.26
57
4 Numerical Experiments
6.4
6.6
log10 (Eabs )
6.8
7.0
7.2
7.4
7.6
7.8
1.3
1.4
1.5
1.6
1.7
log10 (N )
1.8
1.9
2.0
1.8
1.9
2.0
(a)
3.4
3.6
log10 (Eabs )
3.8
4.0
4.2
4.4
4.6
4.8
5.0
1.3
1.4
1.5
1.6
1.7
log10 (N )
(b)
Figure 4.3: Log-log plot of the error Eabs in umax against the linear grid size N in
the de Vahl Davis bench mark case for (a) Case A, Ra = 103 , where the solid line
represents a first order polynomial fit and has a slope of approximately 2.03 and (b)
Case B, Ra = 106 , where the solid line represents a first order polynomial fit to the five
rightmost points and has a slope of approximately 2.24.
58
= 0,
(4.3)
dy
dy
in steady-state.
We consider a cavity of height L containing two phases, Phase 2 on top of
Phase 1 and a horizontal boundary between them at y = L. The relevant
fluid properties are given in Table 4.4. In order to have no convection, the
fluid is initially at rest and the gravitational vector ~g is set to zero. The
temperature is initially uniform and equal to 290 K.
This situation was simulated with two sets of boundary conditions, Case
A and Case B. First it was run with constant-temperature boundary conditions (Dirichlet), Tnorth = 285 K on the north and Tsouth = 295 K on the
south wall and insulating western and eastern walls (Case A) and second
with constant heat flux densities qsouth = qnorth = 1.0 W m2 (Neumann)
and again insulating eastern and western walls (Case B). Due to our convention from Section 2.7.3, we have heat flowing into the domain through
the southern wall and out through the northern wall.
59
4 Numerical Experiments
Table 4.4: Relevant fluid properties used in the two-phase heat conduction test case.
cp
Unit
Phase 1
Phase 2
kg m3
J kg1 K1
W K1 m1
2.0
100.0
0.04
1.0
100.0
0.01
Although the case was simulated on a two-dimensional grid, the boundary conditions and initial configuration should lead to an x-independent
solution and the temperature field in steady-state along any constant-x
line should be governed by (4.3). The case was run to t = 1 104 s, where
steady-state was verified to have been obtained with the GFM. The results
were then compared to an analytical solution.
T (L) = Tnorth ,
(4.6)
(4.7)
T (L) = T (L) ,
+
dT
+ dT
=
,
dy L
dy L
60
(4.5)
(4.8)
T
Tsouth
north
,
L + {1 } +
(4.9)
C0 = Tsouth ,
C1+ =
C ,
+ 1
C0+ = Tnorth C1+ L.
(4.10)
(4.11)
(4.12)
T (L) = T + (L) ,
+
dT
+ dT
=
dy L
dy L
(4.15)
(4.16)
q
= +,
C1 =
C1+
C0+ = C0 + Lq
(4.17)
(4.18)
1
1
+
.
(4.19)
61
4 Numerical Experiments
The analytical steady-state solution for the temperature profile is piecewise linear with a kink at the boundary, both for Case A and Case B. Thus
the diffusive term in (2.11) should also be zero in the whole domain. In
the absence of advection, we see from (2.11) that a diffusive term that is
zero in the entire domain is necessary to get a steady-state solution. If it
is not zero then t T 6= 0.
Continuum Surface Force Method
The temperature profiles obtained with the CSF method for Case A are
shown in Figure 4.4a for different grid sizes. These simulations did reach
steady-state in the sense that Ess (T ) was zero. This is consistent with the
linear temperature profile obtained from the simulations.
However, as is apparent from Figure 4.4a, the temperature profile is
not in agreement with the analytical solution and grid refinement did
not seem to produce better results. Also, the spatial derivative of the
temperature profile is physically unacceptable. To see why, consider the
heat flux dT /dy at y = 0 and at y = L. Four times as much heat flows
in through the southern wall at y = 0 compared to the amount of heat
that flows out through the northern wall at y = L. So there is a net heat
flow into the domain, yet the domain temperatures do not change. This
is a clear violation of energy conservation.
This leads us to conclude that the CSF discretization of the diffusive
term in the advection-diffusion equation failed to reproduce the analytical
solution in the two-phase heat conduction case with Dirichlet boundary
conditions.
The temperature profile obtained with the CSF method in Case B is
shown in Figure 4.4b for different grid sizes. With Neumann boundary conditions, the analytical steady-state temperature profile is only
determined up to the addition of a constant. Specifically, the constant
C0 = T (0) is undetermined by the boundary conditions. For the sake of
comparison, this constant is here taken to be the calculated south wall
temperature of the 10 80 simulation.
In contrast to Case A with CSF, these simulations did not reach steadystate. That is, t T averaged in the whole domain did not approach zero
during the time integration, but seemed to approach a constant, negative
value instead. Looking at (2.11), we see that a local negative curvature in
62
T [K]
292
290
288
286
284
0.0
Analytical
1080
1020
1010
0.2
0.4
0.6
0.8
1.0
0.6
0.8
1.0
y [m]
(a)
120
110
T [K]
100
90
80
70
60
50
0.0
Analytical
1080
1020
1010
0.2
0.4
y [m]
(b)
Figure 4.4: Comparison between the analytical solution to the one-dimensional heat
equation and the numerical solution with different grid sizes and the CSF method for
(a) constant temperature (Dirichlet) boundary conditions (Case A) and (b) constant
heat flux (Neumann) boundary conditions (Case B).
63
4 Numerical Experiments
the temperature field is equivalent to a temperature drain. The drain of
temperature is then consistent with the negative curvature of the temperature profile in Figure 4.4b, but still unphysical and not in agreement with
the analytical solution. To see why it is unphysical, we again consider the
heat flux at the boundaries. The heat flux into the domain at the south
wall and out of the domain at the north wall are in this case equal, as
posed by the boundary conditions, yet the average domain temperature
does not approach a constant value. This is a clear violation of energy
conservation. The CSF method seems to introduce an artificial curvature
in T that drains temperature from the inner domain.
This leads us to conclude that the CSF discretization of the diffusive
term in the advection-diffusion equation failed to reproduce the analytical
solution in the two-phase heat conduction case with Neumann boundary
conditions.
Ghost-Fluid Method
The temperature profile obtained with the GFM in Case A is shown in Figure 4.5a for different grid sizes. These simulations did reach steady-state,
Ess (T ) was zero, consistent with the obtained piecewise linear temperature
profiles. For all grid sizes E1 with respect to the analytical solution was
zero. The GFM method was thus able to obtain the exact solution of the
one dimensional heat equation in Case A . This leads us to conclude that
the GFM discretization of the diffusive term in the advection-diffusion
equation produced the correct solution to the one dimensional heat equation with Dirichlet boundary conditions.
The temperature profile obtained with the GFM in Case B is shown
in Figure 4.5b for different grid sizes. These simulations did also reach
steady-state, Ess (T ) was zero, consistent with the obtained piecewise linear
temperature profiles. For all grid sizes E1 was approximately 4 1015 K,
so the correct temperature profiles were obtained to machine precision for
It may seem strange and even suspicious that the E1 turned out to be zero and not
a small number on order of magnitude with the machine precision. The reason for
it was probably that, for this particular case and choice of grid point locations,
the analytical solution evaluated in the grid points consisted of rational numbers
that could be exactly represented within the machine precision. Alternatively, the
difference in the numerical solution to the analytical solution was small enough to
cause underflow in the double precision data type used to store it.
64
T [K]
292
290
288
286
284
0.0
Analytical
1080
1020
1010
0.2
0.4
0.6
0.8
1.0
0.6
0.8
1.0
y [m]
(a)
310
300
T [K]
290
280
270
260
250
240
0.0
Analytical
1080
1020
1010
0.2
0.4
y [m]
(b)
Figure 4.5: Comparison between the analytical solution to the one-dimensional heat
equation and numerical solutions with different grid sizes and the GFM method for (a)
Case A, constant temperature (Dirichlet) boundary conditions and (b) Case B, constant
heat flux (Neumann) boundary conditions.
65
4 Numerical Experiments
y
Phase 2
Ly
(1 ) Ly
q
Phase 1
Ly
Lx
Figure 4.6: Schematic illustration of the two-layer configuration in Wang et al.s convection case.
all grid sizes. This leads us to conclude that the GFM discretization of
the diffusive term in the advection-diffusion equation produced the correct
solution to the one-dimensional heat equation with Neumann boundary
conditions.
This test case shows the advantage of treating the interface sharply with
the GFM instead of with the CSF method when solving the heat equation.
The GFM is able to obtain temperature profiles with an error limited by
machine precision regardless of grid size while those produced by the CSF
method are, at best, questionable.
66
Table 4.5: Fluid parameters used in the numerical simulation of Wang et al.s two-layer
convection case.
cp
Unit
Phase 1
Phase 2
kg m3
Pa s
J kg1 K1
W K1 m1
K1
K
1.5
2.0 105
120.0
0.013
1 104
290
1.0
1.0 105
100.0
0.010
1 103
290
0.8 m and Ly = 0.1 m, with the interface located at the constant-y line
defined by y = Ly = 0.05 m. The initial temperature was set to 290 K
in the entire inner domain and the gravitational acceleration vector ~g
was set to 9.81 m s2 along the y-axis. The heat flux density q used was
1.0 W m2 . The fluid properties are given in Table 4.5.
This case was run to t = 103 s with the GFM and compared to the
analytical solution by Wang et al. [1991].
,
y
v = .
x
u =
(4.20)
(4.21)
67
4 Numerical Experiments
Inserting this definition of into the incompressible flow assumption (2.2),
we see that (2.2) is automatically satisfied through the definition of .
Further, to simplify our notation a bit and to be more consistent with
Wang et al. [1991], we introduce the binary differential operator J . This
operator is defined for two scalar functions a and b as
J (a, b) =
a b
b a
.
y x y x
(4.22)
(4.23)
(4.24)
(4.27)
(4.28)
68
(4.29)
(4.30)
which is equivalent to
g
.
J , 2 = 2 2 +
x
(4.31)
g (1 {T T }) ,
= 2 2 +
x
T
= 2 2 g
.
x
(
T+
T =
T
(4.32)
(4.33)
(4.34)
if (x, y) +
.
if (x, y)
(4.35)
+
+
+
,
=
,
=
,
(4.36)
+
,
+
= .
Ra + =
Pr + =
(4.37)
Ra
Pr
(4.38)
69
4 Numerical Experiments
We also introduce dimensionless quantities x
, y, u
, and T,
x
=
1
1
= Ly ~u, = 1 , T = T.
x, y =
y, ~u
Ly
Ly
qLy
2
2
J ,
= Pr
Ra
,
x
)
(
+
T
+
2
+
+
2
+
2
+
Ra
,
J ,
=
Pr
x
= 2 T ,
J , T
J + , T+
=
2 T+ .
(4.39)
(4.40)
(4.41)
(4.42)
(4.43)
The spatial derivatives in these equations are now, of course, taken with
respect to the dimensionless coordinates x
and y.
The Boundary and Interface Conditions
We pose no-slip BCs on the velocity field. Thus,
= 0,
y
v =
= 0,
x
u
=
(4.44)
(4.45)
at the boundaries.
Since is continuous, otherwise the velocity field would not be welldefined, must have the same constant value along the entire boundary.
70
(4.46)
2 +
2
=
,
y2
y2
(4.47)
(4.48)
(4.49)
(4.50)
at y = .
Since the north and south walls are insulating and there is constant and
uniform heat flux density through the east and west walls,
T
y
T+
y
T
x
T +
= 0,
at y = 0,
(4.51)
= 0,
at y = 1,
(4.52)
= 1,
at x
= A/2,
(4.53)
= 1,
at x
= A/2.
(4.54)
,
y
y
(4.55)
(4.56)
at y = .
The Solution
In the parallel flow approximation [Wang et al., 1991], we assume that
= (
y) ,
(4.57)
71
4 Numerical Experiments
+ = + (
y) ,
T
= C0 + C1 x
+ + (
y) ,
+
+
+
T
= C +C x
+ (
y) .
0
(4.58)
(4.59)
(4.60)
From the form of these equations, we see that we must have C0 = C0+ =
C0 and C1 = C1+ = C1 to have continuity of temperature at the interface.
In the parallel flow approximation, the PDEs for and T reduce to the
following ordinary differential equations (ODEs)
d4
d
y4
d4 +
d
y4
d2
d
y2
d2 +
d
y2
= Ra C1 ,
(4.61)
Ra + C1 ,
(4.62)
=
=
d
C1 ,
dy
1 d+
C1 .
dy
(4.63)
(4.64)
+ =
{1 y}2 ( y)
{2 y } + + ,
(4.66)
24
5
Ra (C1 )2
y 5
y3 3
=
2
24
5
3
4
3
3
4
y
y
+
,
(4.67)
4
3
(
Ra (C1 )2 {1 y}5 {1 }5
+
=
24
5
!
{1 y}4 {1 }4
{1 y}3 {1 }3
(1 )2
+ +
3
4
!)
{1 y}3 {1 }3
(1 )
,
(4.68)
3
72
{1 }3 2 (4
+ 5 {1 })
,
2 ({1 } +
)
(4.69)
(4.70)
{1 }2 (4 {1 } + 5
)
2 {1 } ({1 } +
)
are solutions to these ODEs with the posed boundary conditions. Using
the definition of (4.20), we get expressions for the velocity
Ra C1 3
4
y + 3
y 2 2
y + ,
24
Ra
C1
u+ (
y) =
(1 y)2 (
y )
24
+ 3
y 2 + 2
y {2 + } 1 2
+
{2 y } +
.
u (
y) =
(4.71)
(4.72)
1 + +
u
d
y+
u
d
y C1 ( +
{1 }) = 1.
(4.73)
0
This equation was solved numerically for C1 using Simpsons method [S
uli
and Mayers, 2006, Section 7.5] to evaluate the integrals and the bisection
method [S
uli and Mayers, 2006, Section 1.6] to find the appropriate root
of the resulting polynomial. The coefficient C0 , equal to the dimensionless temperature at the interface, is undetermined by the posed boundary
conditions.
73
4 Numerical Experiments
0.12
0.10
Analytical
101100
5150
2120
y [m]
0.08
0.06
0.04
0.02
0.00
0.03
0.02
0.01
0.00
u [m s1 ]
0.01
0.02
0.03
Figure 4.7: Comparison of selected numerically obtained velocity profiles along the
vertical center line in Wang et al.s two-layer convection case with the analytical solution.
It is evident that the numerical solutions approach the analytical solution upon grid
refinement.
steady-state analytical solution. It was verified that Ess (u) did not exceed
107 m s1 in magnitude.
The resulting horizontal velocity component along the vertical center
line of the cavity is shown in Figure 4.7 for a selection of grid sizes. We
observe a buoyancy-driven convection cell in the top layer (Phase 2), similar to that in the de Vahl Davis case, where the fluid moves clockwise,
and we see a viscosity-driven cell in the bottom (Phase 1), where the fluid
moves anti-clockwise. To plotting accuracy, there is good agreement between the analytical solution and the numerical results for the 101 100
grid. Furthermore, the numerical solutions appear to approach the analytical solution when the grid is refined.
74
Table 4.6: Convergence table based on the maximum horizontal velocity component
umax along the vertical center line for Wang et al.s two-layer convection case.
Ny
-
umax
m s1
Eabs
m s1
n
-
20
30
40
50
60
80
100
2.487 1002
2.442 1002
2.421 1002
2.405 1002
2.395 1002
2.386 1002
2.380 1002
1.31 1003
8.66 1004
6.49 1004
4.96 1004
3.97 1004
3.02 1004
2.43 1004
1.03
1.01
1.20
1.21
0.95
0.97
75
4 Numerical Experiments
2.8
2.9
log10 (Eabs )
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
1.3
1.4
1.5
1.6
1.7
log10 (Ny )
1.8
1.9
2.0
Figure 4.8: Log-log plot of the error Eabs in umax against the linear grid size Ny in Wang
et al.s two-layer convection case. The solid line represents a first-order polynomial fit
and has a slope of approximately 1.06.
The author is uncertain as to whether the term blob has a well-defined scientific
meaning or not. Still, it is used in the lava lamp literature [Gy
ure and J
anosi, 2009]
and therefore also in this work.
76
cp
Unit
Phase 1
Phase 2
kg m3
Pa s
J kg1 K1
W m1 K1
K1
K
1080
0.05
1591
0.146
470 106
293
1074
1.08 103
3993
0.596
280 106
293
oscillations in which a blob of Phase 1 would rise from the bottom of the
vessel, attach itself to the top, be cooled and sink down, with regular time
periods. We will use the similar parameters to those of Gy
ure and Janosi
[2009], as far as our model permits it, and try to replicate the oscillating
behavior in our simulations.
The simulation was run on an axisymmetric 75 168 grid. With this
grid, the domain is a cylinder. The eastern wall represents its entire outer
face and the western wall its central axis of symmetry. The height of
the cylinder was Ly = 0.28 m and the radius was Lx = 0.125 m. The
coefficient of surface tension was set to = 0.04 N m1 , the gravitational
acceleration to ~g = 9.81 m s2 y and the rest of the relevant fluid
parameters are given in Table 4.7.
We imposed no-slip BCs for the velocity and Dirichlet for the temperature at all walls, except the western which, due to symmetry, needed to
have free-slip and be thermally insulating. On the north wall we set the
temperature to Tnorth = 312 K, on the south wall we set Tsouth = 332 K
and on the eastern we set Teast = 321.9 K. The fluids were initially at
rest with a uniform temperature of 321.9 K. The initial interface was a
spherical shell of radius 0.0829 m, centered in the south east corner.
77
4 Numerical Experiments
Janosi [2009], Figure 9, we should get that the time period of the oscillations is between 9.2 102 s and 1.8 103 s. The period of the simulated
oscillations was found to be 1.4 103 s, and thus in good agreement with
the experimental results.
However, in spite of having similar time periods, we see, e.g. from comparing Figure 4.9 with Figure 4 from Gy
ure and Janosi [2009], that the
simulated blob oscillations do not look the same as those in the experiments. The reasons for the deviations are probably many, as there are
many aspects of lava lamp convection that are not accounted for in our
model.
For instance, our model assumes uniform viscosities in both phases.
However, according to Gy
ure and Janosi [2009], the viscosity of the oil
(Phase 1) is almost exponentially decreasing with increasing temperature.
This strongly temperature-dependent viscosity is not accounted for by our
model.
Also, we choose constant temperature boundary conditions as the driving force for the lava lamp convection. As e.g. the temperature plot Figure
5 from Gy
ure and J
anosi [2009] shows, this might not be realistic. The
boundary conditions used here were chosen to guarantee fluid domain
temperatures in the region around where Phase 1 and Phase 2 are equally
dense.
The boundary conditions that we use for the level-set function give a
contact angle between the interface and the boundary walls that is always
90 . As we see from Figure 4 in Gy
ure and Janosi [2009], the oil (Phase
1) wets the walls of the vessel slightly in the experiments and the 90
contact angle from the simulations is therefore not correct. The boundary
conditions on the level-set function are chosen the way they are, and not
with the aid of a force balance equation like (61.12) from Landau and
Lifshitz [1987], because we have not included any material properties of
domain walls in our model.
From this test case, we can conclude that our two-phase flow model
reproduced the experimentally observed blob exchange oscillations and
their time periods. This gives reason to believe that the implementation
was correct also on axisymmetric grids. Still, the simulated behavior can
not be said to be in full agreement with the experimental results and
neither can we expect it to be, since many of the physical aspects of lava
lamp convection that were presented by Gy
ure and Janosi [2009] are not
78
0.25
0.25
0.20
0.20
y [m]
y [m]
0.15
0.15
0.10
0.10
0.05
0.05
0.00
0.00
0.10
0.25
0.25
0.20
0.20
0.15
0.15
0.10
0.10
0.05
0.05
0.00
(c)
0.10
(b)
y [m]
y [m]
(a)
0.10
0.00
0.10
(d)
Figure 4.9: The interface location in the lava lamp case at (a) t = 500 s, where the
increased temperature in Phase 1 causes its shape to deviate slightly from a the initial
half-sphere, (b) at t = 766 s, where a rising blob has formed, (c) at t = 775 s, where the
rising blob attaches itself to the top of the vessel, and (d) at t = 1214 s, where the blob
has been cooled and sinks back down.
79
4 Numerical Experiments
accounted for in our model.
1
+
1
~u = 0 m s and ~u = 1.0 m s
n
. However, because there is mass
transport from the liquid to the gaseous phase, the liquid film will shrink
80
Table 4.8: Fluid parameters used in the vaporization with uniform mass flux case.
Unit
Phase 1
Phase 2
kg m3
Pa s
2.0
1.0 105
1.0
1.0 105
81
4 Numerical Experiments
1.5
1.0
t = 0.00 s
t = 0.15 s
u [m s1 ]
0.5
0.0
0.5
1.0
1.5
0.0
0.5
1.0
x [m]
1.5
2.0
1.5
2.0
(a)
3.0
2.5
t = 0.00 s
t = 0.15 s
p [Pa]
2.0
1.5
1.0
0.5
0.0
0.5
0.0
0.5
1.0
x [m]
(b)
Figure 4.10: Plot of (a) the velocity profile and (b) the pressure field in the initial
configuration t = 0.0 s and at t = 0.15 s in the vaporization with uniform mass flux
Case A. The analytical solution is shown as solid lines.
82
83
4 Numerical Experiments
1.5
1.0
t = 6.00 1005 s
t = 8.00 1005 s
u [m s1 ]
0.5
0.0
0.5
1.0
1.5
0.0
0.5
1.0
x [m]
1.5
2.0
1.5
2.0
(a)
1600
1400
1200
p [Pa]
1000
800
600
400
200
0
0.0
t = 8.00 1005 s
0.5
1.0
x [m]
(b)
Figure 4.11: Plot of (a) the velocity field at t = 6.0 105 s and at t = 8.0 105 s and
(b) the pressure field at t = 8.0 105 s in the vaporization with uniform mass flux Case
B.
84
Table 4.9: Fluid parameters used in the numerical simulation of vaporization with
physical mass flux case.
cp
Unit
Phase 1
Phase 2
kg m3
1.0
1.0 105
1.0
1.0
0.2
1.0 105
5.0
1.0
Pa s
J kg1 K1
W K1 m1
85
4 Numerical Experiments
Phase 2
Phase 1
Twest
Tsat
x
L
Figure 4.12: Schematic drawing of the initial fluid configuration in the vaporization
with physical mass flux case. Phase 1 is the liquid and Phase 2 is the gaseous phase.
The east wall is held at the saturation temperature Tsat and the west wall is held at
Twest > Tsat .
eastern wall has an outflow condition. When solving the Poisson equation
for the pressure, we impose Neumann BCs on the pressure at all walls
except the eastern, where we demand p = 0 Pa. As boundary conditions
for temperature, we hold the temperature on the western wall constant,
T (0, t) = Twest = 0.1185 K, and the temperature on the eastern wall constant and equal to the saturation temperature, T (Lx , t) = Tsat = 0 K .
Contrary to the other cases, we do not start the simulation at 0 s, but
rather at t = 0.25 s. The initial interface location is thus (0.25 s) = 0.5 m.
Both the temperature and the velocity profiles were initialized according
to the analytical solution. The simulations were run from t = 0.25 s to
t = 0.6 s.
As in the vaporization case with uniform mass flux, the initial and
boundary conditions made this an effective one-dimensional problem and
the numerical results should be independent of y even though the simula
In spite of having performed most of the work on this thesis behind a computer rather
than in the laboratory, the author is aware that a saturation temperature of 0 K is
rare in real physical systems. This temperature was chosen to have results that
would be comparable to those from Gibou et al. [2007]. Note also that the velocity
and pressure fields do not depend on the zero-level of the temperature, so this could
easily have been chosen differently.
86
(4.76)
(4.77)
(4.78)
T (x, t) = C1 + C2 erf
,
(4.79)
2 + t
where erf is the Gauss error function, defined in terms of an integral of
the Gauss function,
Z
2
2
erf () =
e d.
(4.80)
0
87
4 Numerical Experiments
To determine the constants C1 and C2 , we consider the boundary conditions. The boundary condition at the western wall, T (0, t) = Twest , gives
C1 = Twest .
(4.81)
Tsat Twest
.
erf (C3 )
(t) = 2C3 + t.
(4.82)
(4.83)
c+
p (Tsat Twest )
.
h
(4.84)
This equation was numerically solved for C3 using the bisection method
[S
uli and Mayers, 2006, Section 1.6]. To find u (x, t) we solve the jump
condition (2.38) from page 14, that is
1
+
u u =m
,
(4.85)
u (x, t) =
C2 e(C3 ) .
(4.86)
h + t
88
t = 0.25 s
t = 0.425 s
t = 0.6 s
0.10
T [K]
0.08
0.06
0.04
0.02
0.00
0.0
0.2
0.4
0.6
0.8
1.0
x [m]
Figure 4.13: The temperature profiles obtained on the 40 10 grid at different times
in the vaporization with physical mass flux case. The analytical solution at each time
is drawn as a solid line.
At each time the analytical solution is also shown. From inspecting Figure
4.13, we see that the jump in x T at the interface appears to decrease in
time, so we expect the jump in velocity to decrease too, in accordance
with (2.42) and (2.38) from page 14. We can also conclude that there is
agreement between the simulation results and the analytical solution to
plotting accuracy.
The velocity profiles obtained on the same 40 10 grid at the same
points in time are shown in Figure 4.14. Again the analytical solution at
each point in time is shown for comparison. From inspecting this figure, we
see that the velocity jump at the interface does indeed decrease with time,
as expected from the temperature profiles in Figure 4.13. Also, the jump
in velocity appears a little overestimated with respect to the analytical
solution, especially at t = 0.25 s. This is probably due to overestimation
of + x T + and may thus be attributed to the smearing of x T around
the interface that we commented on in Section 3.4.2. Overall, we conclude
that there is good agreement between the simulated and analytical velocity
profiles to plotting accuracy.
89
4 Numerical Experiments
0.8
u [m s1 ]
0.6
t = 0.25 s
t = 0.425 s
t = 0.6 s
0.4
0.2
0.0
0.0
0.2
0.4
0.6
0.8
1.0
x [m]
Figure 4.14: The velocity profiles obtained on the 40 10 grid at different times in the
vaporization with physical mass flux case. The analytical solution at each time is drawn
as a solid line.
90
0.80
Analytical
8010
2010
1010
0.75
[m]
0.70
0.65
0.60
0.55
0.50
0.25
0.30
0.35
0.40
0.45
t [s]
0.50
0.55
0.60
0.65
Figure 4.15: A plot of the interface location against time t obtained on a selection of
grid sizes in the vaporization with physical mass flux case. The analytical solution is
shown as a solid line.
Table 4.10: Convergence table based on the error Eabs , with respect to the analytical
solution, in the interface location at t = 0.6 s in the vaporization case with physical
mass flux.
Nx
-
(0.6 s)
m
Eabs
m
n
-
10
20
40
60
80
7.803 1001
7.776 1001
7.761 1001
7.756 1001
7.753 1001
5.70 1003
2.99 1003
1.49 1003
1.00 1003
7.49 1004
0.93
1.01
0.97
1.02
91
4 Numerical Experiments
2.2
log10 (Eabs )
2.4
2.6
2.8
3.0
3.2
1.0
1.2
1.4
1.6
log10 (Nx )
1.8
2.0
Figure 4.16: Log-log plot of the error Eabs in the interface location (0.6 s) in the vaporization case with physical mass flux. The solid line represents a first order polynomial
fit and has a slope of approximately 0.98.
92
cp
Unit
Phase 1
Phase 2
kg m3
Pa s
J kg1 K1
W K1 m1
200.0
0.1
400.0
40.0
5.0
0.005
200.0
1.0
93
4 Numerical Experiments
0.08
0.07
0.06
s
0.00
y [m]
0.05
0.04
0
1.0
0.03
0.02
0.01
0.00
0.00
0.01
0.02
0.03
0.04
x [m]
0.05
0.06
0.07
0.08
0.05
0.06
0.07
0.08
(a)
0.08
0.07
0.06
y [m]
0.05
0.04
0.03
0.02
0.01
0.00
0.00
0.01
0.02
0.03
0.04
x [m]
(b)
Figure 4.17: Plots of (a) the initial t = 0 s and final t = 1.0 s interface locations and (b)
the velocity field at t = 1.0 s in the vaporizing drop case.
94
10
6
4
T [K]
2
0
0.08
0.07
0.06
0.05
0.00 0.01
0.04 ]
0.02 0.03
0.03 y [m
0.04
0.02
x [m] 0.05 0.06
0.01
0.07 0.08 0.00
(a)
6
4
3
p [Pa]
2
1
0
0.08
0.07
0.06
0.05
0.00 0.01
0.04 ]
0.02 0.03
0.03 y [m
0.04 0.05
0.02
x [m]
0.01
0.06 0.07
0.00
0.08
(b)
Figure 4.18: Plots of (a) the temperature and (b) the pressure fields at t = 1.0 s in
the vaporizing drop case. The gaseous field values are indicated by green dots and the
liquid values by blue dots.
95
4 Numerical Experiments
do not have cylindrical symmetry. Because of the these BCs, p will
tend to point along the direction normal to closest boundary rather than
radially away from the drop and this will make the fluid tend to flow in
this direction.
The temperature field at t = 1.0 s is plotted in Figure 4.18a. This plot
shows what we would qualitatively expect, a drop with uniform temperature Tsat and gas temperatures that decrease gradually when moving from
the boundary to the interface.
Figure 4.18b shows the pressure at t = 1.0 s. As expected, it exhibits
an interfacial jump that, for this case, can be mostly attributed to the
interfacial tension. We observe that the interfacial pressure jumps at the
points directly north, south, east and west of the drop center are somewhat higher compared to those located north-east, north-west, south-east
and south-west. The reason for this is probably that the magnitude of
temperature gradient in the gas phase is larger around these points resulting in a bigger mass flux. This is natural since the distance to the hot
boundary is smaller for these points.
From this test case we can conclude that the our implementation of the
phase-transition model is able to cope with interfacial jumps also in two
dimensions. We have also seen that we must take care when imposing
Dirichlet BCs on the pressure as they may not always be consistent with
the physical situation we want to model.
96
cp
Unit
Phase 1
Phase 2
kg m3
Pa s
J kg1 K1
W K1 m1
200.0
0.1
400.0
40.0
5.0
0.005
200.0
1.0
97
0.08
0.08
0.07
0.07
0.06
0.06
0.05
0.05
y [m]
y [m]
4 Numerical Experiments
0.04
0.04
0.03
0.03
0.02
0.02
0.01
0.01
0.00
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
x [m]
0.00
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
x [m]
(b)
0.08
0.08
0.07
0.07
0.06
0.06
0.05
0.05
y [m]
y [m]
(a)
0.04
0.04
0.03
0.03
0.02
0.02
0.01
0.01
0.00
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
x [m]
0.00
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
x [m]
(c)
(d)
Figure 4.19: The interface location in the boiling film case at (a) t = 0.3 s, (b) t = 0.4 s,
(c) t = 0.5 s and (d) t = 0.6 s.
98
4.9 Summary
0.08
0.07
0.06
y [m]
0.05
0.04
0.03
0.02
0.01
0.00
0.00
0.01
0.02
0.03
0.04
x [m]
0.05
0.06
0.07
0.08
Figure 4.20: Illustration of the velocity field at t = 0.6 s in the the boiling film case..
Vortices can be observed on either side of the stem.
that the stem of the rising bubble should not pinch off. In two dimensions, the curvature of the stem is negligible and therefore so are the
surface tension effects and thus the stem persists and continues to fill the
rising bubble with vapor. Gibou et al. [2007] observed this behavior in
their boiling film simulations on fine grids. It was only on coarser grids,
that could not resolve the stem of the rising bubbles, that pinch-off was
observed. This explains why bubble pinch-off was not observed in the
simulations run here.
4.9 Summary
In this chapter, we have presented eight test cases and discussed results
from their simulations. Here, we briefly summarize the conclusions from
these discussions.
99
4 Numerical Experiments
De Vahl Davis Benchmark Case
From the results of the simulations of the de Vahl Davis benchmark case we
concluded that the implementation was able to reproduce the benchmark
results on the 301 301 grid. Also, a convergence study indicated that the
order of convergence was consistent with the expected value of 2. This gave
reason to believe that the current implementation of the discretization
of the advection-diffusion equation for temperature and the Boussinesq
coupling to the NavierStokes equations for single-phase flow cases was
correct.
Two-Phase Heat Conduction
In this case we saw that the CSF discretization of the diffusive term in
the advection-diffusion equation for temperature failed to reproduce the
analytical solution both with Dirichlet and Neumann boundary conditions.
The GFM discretization, however, produced solutions in agreement with
the analytical for both Dirichlet and Neumann boundary conditions. This
test case thus showed the advantage of treating the interface sharply with
the GFM instead of with the CSF method when solving the heat equation.
Wang et al.s Two-Layer Convection Case
From this test case we concluded that our implementation produced results in agreement with the analytical steady-state solution for a case
involving temperature-driven two-phase flow. Also, the performed convergence study showed the expected first-order convergence. This gave
reason to believe that the current implementation of the discretization
of the advection-diffusion equation and the Boussinesq coupling to the
NavierStokes equations was correct also for two-phase flow cases where
the interface is treated with the GFM.
Lava Lamp
Here we saw that our two-phase model reproduced the experimentally observed blob exchange oscillations and their time periods. This gave reason
to believe that the implementation was correct also on axisymmetric grids.
Still, the simulated behavior could not be said to be in full agreement with
100
4.9 Summary
the experimental results and neither could we expect it to be, since many
of the physical aspects of lava lamp convection are not accounted for in
our model.
Vaporization with Uniform Mass Flux
From this test case we could conclude that the current implementation
succeeded in preserving the discontinuities in the velocity and pressure
fields, even when grid nodes changed character from liquid to gas, in one
dimension and in the case of uniform mass flux density. It also succeeded
in propagating an instantaneous change in the velocity field at the interface
to the entire domain instantaneously as is necessary in the incompressible
model.
Vaporization with Physical Mass Flux
Here we observed that there was good agreement between the numerical
results and the analytical solution to the temperature and velocity profiles
and the interface location. Also, we demonstrated the expected first-order
convergence when refining the spatial grid.
Vaporization of a Drop
From this test case we could conclude that the our implementation of the
phase-transition model was able to cope with interfacial jumps also in two
dimensions.
Boiling Film
In the boiling film test case we saw a boiling film that produced a rising
bubble. The results were in qualitative agreement with those from Gibou
et al. [2007].
101
103
104
Bibliography
T. D. Aslam. A partial differential equation approach to multidimensional
extrapolation. Journal of Computational Physics, 193:349355, 2003.
S. Balay, J. Brown, K. Buschelman, W. D. Gropp, D. Kaushik, M. G.
Knepley, L. C. McInnes, B. F. Smith, and H. Zhang. PETSc web page,
June 2013. URL http://www.mcs.anl.gov/petsc.
G. de Vahl Davis. Natural convection of air in a square cavity: A bench
mark numerical simulation. International Journal for Numerical Methods in Fluids, 3(3):249264, 1983.
V. K. Dhir. Numerical simulations of pool-boiling heat transfer. AIChE
Journal, 47(4):813834, 2001.
F. Gibou, R. Fedkiw, L. Cheng, and M. Kang. A second-order-accurate
symmetric discretization of the Poisson equation on irregular domains.
Journal of Computational Physics, 176:205227, 2002.
F. Gibou, L. Chen, D. Nguyen, and S. Banerjee. A level set based sharp
interface method for the multiphase incompressible NavierStokes equations with phase change. Journal of Computational Physics, 222:536
555, 2007.
M. Gisvold. Eventyret p
a Melkya. Gemini Forskingsnytt fra NTNU og
SINTEF, June 2004.
M. Griebel, T. Dornseifer, and T. Neunhoeffer. Numerical Simulation in
Fluid Dynamics. SIAM, 1998.
B. Gy
ure and I. M. J
anosi. Basics of lava lamp convection. Physical
Review E, 80(4):046307, 2009.
105
Bibliography
E. B. Hansen. Numerical Simulation of Droplet Dynamics in the Presence
of an Electric Field. PhD thesis, Norwegian University of Science and
Technology, November 2005.
G. S. Jiang and C. W. Shu. Efficient implementation of weighted ENO
schemes. Journal of Computational Physics, 126(1):202228, 1996.
M. Kang, R. Fedkiw, and X. Liu. A boundary condition capturing method
for multiphase incompressible flow. Journal of Scientific Computing, 15:
323360, 2000.
D. I. Ketcheson and A. C. Robinson. On the practical importance of
the SSP property for RungeKutta time integrators for some common
Godunov-type schemes. International Journal for Numerical Methods
in Fluids, 48(3):271303, 2005.
E. Kreyszig. Advanced Engineering Mathematics. Wiley, 9th edition, 2006.
T. Kunugi. Brief review of latest direct numerical simulation on pool and
film boiling. Nuclear Engineering and Technology, 44(8):847854, 2012.
L. D. Landau and E. M. Lifshitz. Fluid Mechanics, volume 6 of A Course
on Theoretical Physics. Elsevier, 2nd edition, 1987.
K. Y. Lerv
ag. Simulation of two-phase flow with varying surface tension.
Masters thesis, The Norwegian University of Science and Technology,
June 2008.
S.
W. Lvseth.
Enabling low-emission LNG systems web
page, June 2013.
URL http://www.sintef.no/Projectweb/
Low-Emission-LNG-Systems.
106
Bibliography
F. S. Oueslati, R. Bennacer, H. Sammouda, and M. El Ganaoui. Analytical and numerical solutions for natural convection in a shallow cavity
filled with two immiscible fluids: Shear stress action. Numerical Heat
Transfer; Part A: Applications, 62(8):605623, 2012.
K. Rottmann. Matematisk Formelsamling. Spektrum forlag, 2003.
R. Scardovelli and S. Zaleski. Direct numerical simulation of free-surface
and interfacial flow. Annual Review of Fluid Mechanics, 31:567603,
1999.
M. Sussmann, P. Smereka, and S. Osher. A level set approach for computing solutions to incompressible two-phase flow. Journal of Computational Physics, 114:149159, 1994.
E. S
uli and D. Mayers. An Introduction to Numerical Analysis. Cambridge
University Press, 2006.
I. Tamura, T. Tanaka, T. Kagajo, S. Kuwabara, T. Yoshioka, T. Nagata,
K. Kurahashi, and H. Ishitani. Life cycle CO2 analysis of LNG and city
gas. Applied Energy, 68(3):301319, 2001.
S. Tanguy, T. Menard, and A. Berlemont. A level set method for vaporizing two-phase flows. Journal of Computational Physics, 221(2):837853,
2007.
G. Tryggvason, B. Bunner, A. Esmaeeli, D. Juric, N. Al-Rawahi,
W. Tauber, J. Han, S. Nas, and Y.-J. Jan. A front-tracking method
for the computations of multiphase flow. Journal of Computational
Physics, 169(2):708759, 2001.
C. H. Wang, M. Sen, and P. Vasseur. Analytical investigation of Benard
Marangoni convection heat transfer in a shallow cavity filled with two
immiscible fluids. Applied Scientific Research, 48(1):3553, 1991.
F. M. White. Fluid Mechanics. McGrawHill, sixth edition, 2008.
H. K. Zhao, T. Chan, B. Merriman, and S. Osher. A variational level set
approach to multiphase motion. Journal of Computational Physics, 127
(1):179195, 1996.
107