Two Phase Fluid Mechanics
Two Phase Fluid Mechanics
Abstract
In this report we investigate a recently published article [6] by M. Pelanti & K.-M. Shyue on numerical
simulation of two phase ow and generalize the simulation to nite relaxation. We do this by a thorough
review of the theory needed to understand and simulate the model. By direct implementation of these
ideas we simulate the hyperbolic part of the model using LaxFriedrichs, HLLC and a Roesolver and
the relaxation by the ASYmethod. Our simulations not only replicates the ndings in [6], they also led
to nding a aw in one of the temperature graphs. Implementation of the ASYmethod for this model
proved problematic due to divergences, however with a small modication of the method, these were
eventually removed.
1
2
Preface
This report is a result of the premasters project in the nal year of the masters program Applied Physics
at NTNU. The work has been carried out as a collaboration between the physics faculty at NTNU and
SINTEF Materials and Chemistry.
Before starting this project I was largely unfamiliar with the topic of twophase ow. I contacted
Tore Flåtten at SINTEF Materials and Chemistry and discussed the dierent opportunities for a project
within this eld. Tore being on the forefront of numerical simulation of two phase ow and me wanting
to to acquire skills in computational uid mechanics quickly agreed to do a numerical project. We
chose to focus on a recently published paper by a fellow collaborator Marica Pelanti. In this paper,
sophisticated numerical techniques were used for simulating Cavitating ow. We decided on the ambi-
tious goal of replicating key results of this paper and generalizing them to nite relaxation by numerical
implementation.
Working on this project has allowed me to learn a lot about numerical simulation of two phase ow.
I'm also very happy with how this project has led me into the fascinating eld of hyperbolic conservation
laws and to understand how important having an understanding of the mathematics is for numerical
study. The end result is a project that covers a wide range of topics. Our study replicates the result of [6]
and found aws in some graphs presented. The implementation of the ASYmethod was problematic
due to divergences. This was overcome by a small change of the method. Most important of all, this
project gives a solid foundation of knowledge on which to build the master thesis.
The report is organized into multiple sections. We start out by a short introduction of twophase
ow and the model we want to simulate. We then introduce the fractional step method to motivate
a separate and detailed treatment of the homogeneous part and the relaxation part. Here we present
both the theory and how to numerically deal with these parts. Further we describe our numerical
implementation, followed by numerical experiments done with the dierent techniques. Finally we end
by summarizing and evaluating the future prospects of this work.
I would like thank my supervisor Dr. Tore Flåtten at Materials and Chemistry for always having
and an open door and for sharing his time and insight generously with me. My thanks also goes my
supervisor at the Department of Physics, Jon Andreas Støvneng for agreeing to supervise my external
project without any hesitation. I would also like to thank my friend Gaute Linga at SINTEF energy for
fruitful discussions and for sharing his interesting opinions on twophase ow.
CONTENTS 3
Contents
1 Introduction 4
2 Hyperbolic conservation equations 6
2.1 Characteristic solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Nonlinear conservation laws and shock formation . . . . . . . . . . . . . . . . . . . . . . . 7
2.3 The Riemann Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 Relaxation systems 19
4.1 Innitely fast relaxation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.2 ASYmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.3 Fractional step approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
1 Introduction
In recent years a lot of attention has been put into modeling multiphase ows ows where multiple
phases (e.g. liquid and gas) coexist and interact. These are phenomena which not only are abundant in
nature, but of great industrial importance. One example we will focus on in this report is the forming of
bubbles inside a liquid due to low local pressure. This process is called cavitation (illustrated in Figure
1.1) and can cause extensive damage on pipes, valves and turbines when these bubbles burst. Successful
modeling of multi-phase ow can yield information about how we should design the equipment in order
to avoid cavitation, thereby prolonging the lifetime. From a physicist point of view a goal has been to
provide models that can capture both the uid mechanicsand interaction between the dierent phases,
yet simple enough to be of practical use. There exist no single model for twophase ow. The choice of
model will depend on the physical problem and the demanded accuracy. Many of them belong to the
category of hyperbolicrelaxation equations of the form
1
Ut + A(U)Ux = R(U), (1.1)
where U is the quantity of interest, A(U) is a matrix
1 and (1/)R(U) is a relaxation source term.
Physically the rst term represents the change of a quantity per time, for instance mass, momentum
or energy. The second term will generally represent some ux of a quantity through the boundary of
the control volume, for instance by convection. The source term is a relaxation term that seeks to
equilibrate dierences in temperature and pressure between the phases. Typically, relaxation is a very
quick process compared to the ux, and happens at a very short time scale. The short time scale makes
this term very sti and requires special numerical treatment. This special treatment is complicated in
combination with the hyperbolic part. A less costly method is to divide the (1.1) into two problems
Ut = −A(U)Ux , (1.2a)
Ut = R(U) (1.2b)
solving problem (1.2a) rst and then problem (1.2b). This method is called the fractional step method,
and we will present in detail later. The purpose of presenting it is to show that we can separate our
problem into two parts, motivating a separate treatment of the dierent terms. Therefore what we need
is numerical methods for dealing with hyperbolic systems and relaxation systems. We will focus on
one model belonging this group, the sixequation singlevelocity model of SaurelPetitpasBerry [8]. In
this model we consider a uid made up of two dierent phases k = {1, 2}. Each uid element contains
volume fraction αk of both phases, and each phase has separate pressure, density and temperature. The
1
In order for the system to be hyperbolic, all eigenvalues of A(U) have to be real. If some of the eigenvalues are degenerate,
but the eigenvectors linearly independent the system is weakly hyperbolic.
1 INTRODUCTION 5
Ignoring the relaxation terms and the volume fractions, these are essentially the Euler equations for each
phase. To put this model into the general context of hyperbolic conservation laws it is useful to consider
(1.3) in the following form
∂t U + ∇ · f (U) + σ(U, ∇U) = ψ µ , (1.5)
where
0 u · ∇α1 µ(p1 − p2 )
α1 ρ1
0
0
α2 ρ2 u 0 0
f (U) =
, σ(U) =
, ψ(U) =
, (1.6)
ρu ⊗ u + α1 p1 + α2 p2 0 0
α1 E1 u + α1 p1 u Σ(U, ∇U) −µpI (p1 − p2 )
α2 E2 u + α2 p2 u −Σ(U, ∇U) µpI (p1 − p2 )
and
α1
α 1 ρ1
α 2 ρ2
U=
, (1.7)
ρu
α1 E1
α2 E2
where f contains conservative ux terms and σ contains spatial derivatives of nonconservative form.
Finally, ψ is a mechanical relaxation term, that seeks to equalize the pressures. Special care needs to be
taken in handling each term. We will start out by considering the homogeneous system part, ψ = 0.
2 HYPERBOLIC CONSERVATION EQUATIONS 6
which can be interpreted as the change of U inside the control volume is equal to the ux of U through
the boundary of the control volume. This form is the most general, but solving actual problems with
this form is very cumbersome, as we have an integral equation and not a partial dierential equation.
A partial dierential equation formulation is obtained by the Gauss theorem
Z Z
∂
UdV + ∇F(U)dV = 0, (2.2)
∂t
Ω Ω
and by the fundamental theorem of calculus this can be written as a partial dierential equation
∂U
+ ∇F(U) = 0. (2.3)
∂t
Remark It is important to note that in obtaining this equation we have assumed that U is a continu-
ous function. However, this is not always the case. For nonlinear conservation equations, discontinuous
solutions can emerge from continuous initial conditions. In such situations we are forced to return to
the original integral formulation.
u = u0 (x − at). (2.5)
x = at. (2.6)
Figure 2.1 shows how the initial condition is advected by traveling on characteristic lines in the time
and position space.
To generalize this concept to systems in 1d we start by writing (2.3) in quasilinear form
2
∂F(U)
Ut + Ux = 0 (2.7)
∂U
Ut + A(U)Ux = 0, (2.8)
where A(U) now is a matrix, called the Jacobian of the system. Multiplying by the similarity matrix
T−1 we diagonalize our system of equations
Vt + DVx = 0 (2.11)
where V = T−1 U and D is a diagonal matrix given by D ≡ diag (λ1 , . . . , λn ), where n is the number of
components. We will limit ourself to hyperbolic systems, for which all eigenvalues are real. Componen-
twise (2.11) can be written as
∂Vi ∂Vi
+ λi = 0. (2.12)
∂t ∂x
For a linear conservation law (A(U) = A), this corresponds to a set of independent advection equations
with advection speed a replaced by the eigenvalue λi . The solutions of these are given by Vi = Vi0 (x−λi t).
Its important to note that it is the characteristic components of V that are advected and not vU . U
is only obtained through
U = TV. (2.13)
This method of nding the solution is limited to linear systems. However, the eigenstructure of the
conservation equations can also elucidate how a general system behaves. For a general hyperbolic
system of equations, we can interpret the eigenvalues as the speeds at which characteristic variables or
information travels. In case of the Euler equation, the eigenvalues are given by a combination of the
uid speed and the speed of sound. In addition to telling us at which speeds the information travels,
they also tell us the direction it travels. This is key when prescribing boundary conditions. Variables
traveling to the right needs to be prescribed at the left and vice versa. Not doing so correctly can lead
to ill posed problems.
1
ut + ( u2 )x = 0,
2
and in in quasilinear form,
ut + uux = 0. (2.14)
Similarly to the advection equation, the solution can be written implicitly as follows
where now the eigenvalue is given by u. This means that the solution is constant on lines of x = ut.
Thus starting from initial values u0 (x), solutions travel on lines x = u0 t. The best way to visualize this
is by drawing lines in the (x, t)plane as in Figure 2.2. Firstly note that like for the advection equation
the lines are straight, however due to the nonlinearity the slope dier dependent on the initial velocity.
We see in the right graph that solutions with high initial velocity will travel faster to the right than
solutions with low initial velocity. This results in the creation of a shock at t = 0.3, shown in Figure 2.2
a discontinuity in the solution. Note that the time when this sharp discontinuity appears coincides
with the time the characteristic lines start intersecting. At time t=1 we see that the solution is no
2
For a linear system F(U) = AU, where A is independent of U.
2 HYPERBOLIC CONSERVATION EQUATIONS 8
1.5 1
t=0
t=0.3
t=1 0.8
1
0.6
u
t
0.4
0.5
0.2
0 0
−1 0 1 2 −1 0 1 2
x x
Figure 2.2: (Left) Initial condition and solution of Burgers equation at t = 0.3, and t = 1. (Right)
Characteristic lines on which the solution is constant.
longer unique (at some positions in space there are two values of u). This can also be seen in the right
graph were characteristic lines cross. Clearly something has gone wrong, because for a physical problem
there can only be one solution. The problem appears when the lines starts to intersect. At this time
the derivative is illdened and hence (2.14) is not valid. Keep in mind that the Burgers equation we
wrote is a special case of the more general integral version and for this equation there are no problems
with discontinuities. The problem of nding what the correct behavior at these discontinuities is called
the Riemann problem, and solving it is the key to good numerical methods for hyperbolic systems.
Ut + (F(U))
x = 0,
UL x < 0 (2.16)
U(x, 0) =
UR 0 ≤ x
A possible solution to the problem, is for the discontinuity to move without change in form, this referred
to as a shock. Using the integral formulation, we can derive the speed s with which this discontinuity
should travel (also called the Rankine-Hugoniot conditions). The speed and conditions are derived by
integrating (2.1) over [x− , x+ ] (x− < 0 < x+ )
Zx+
∂
Udx + F(UR ) − F(UL ) = 0, (2.17)
∂t
x−
∂
(UL · (xshock − x− ) + UR · (x+ − xshock )) = − (F(UL ) − F(UR )) (2.18)
∂t
(2.19)
where s ≡ ∂xshock /∂t. Note that s has to satisfy this equation for all components. We now look at some
specic examples of this.
Scalar In the scalar case we are left with the shock satisfying the following condition
f (UR ) − f (UL )
s= . (2.21)
UR − UL
For the advection equation (f (U ) = au) we have
aUR − aUL
s= = a. (2.22)
UR − UL
Not surprisingly the shock moves at the advection speed a. For the Burgers equation (2.14)
1
2 UR − 12 UL 1
s= = (UR + UL ) , (2.23)
UR − UL 2
i.e. the arithmetic average of the two velocities. Coincidentally, if UL > UR > 0 the solution will be
UL x < st
U (x, t) = . (2.24)
UR st ≤ x
∆U = UR − UL (2.26)
as being eigenvalue and eigenvector of A. Thus the shock moves at the same speed as one of the
eigenvalues. This is exactly what we see for the scalar advection equation where the shock speed is equal
to a.
So far we have stressed that from the integral formulation of conservation laws, one may obtain
solutions that allow for discontinuities and we have obtained the speed at which these discontinuities
travel. However, in using the integral formulation great care needs to be taken. Unlike for the partial
dierential formulation, this formulation does not have an unique solution, but many weak solutions.
The challenge of the Riemann problem becomes then to nd which solution corresponds to the physical
solution (also referred to as the strong solution). A guiding principle for nding which of the solutions
is the correct one is obtained by adding a small amount of viscosity. For the Burgers equation this is
done as follows
1
ut + ( u2 )x = νuxx . (2.27)
2
This equation can no longer have discontinuities. Taking the limit at which ν→0 we obtain the true
3
solution . In practice, adding viscosity in such a way for systems is a cumbersome way to nd the right
3
Numerical techniques for solving such problems often introduce such viscosity, this helps to explain why methods with
large viscosity (like LaxFriedrichs) converge to the correct solution.
2 HYPERBOLIC CONSERVATION EQUATIONS 10
solution as it will make already complex problems even more complex. However, we can show that this
is equivalent to the method of choice, which is to check if the solution obeys the Entropy conditions.
This method originates from the Euler equations, where the correct solution to the Riemann problem
was determined by nding which solution decreases the entropy of the system. For a scalar quadratic
0
(f (U ) > 0) conservation law we have the Lax entropy conditions: A shock is the correct solution given
that
f 0 (UL ) > s > f 0 (UR ). (2.28)
That is if the left side of the discontinuity has a higher characteristic speed than the shock speed and the
shock speed has a higher speed than the right side, then the solution will be a shock. Let's go back to
the Burgers equation. We have that s = (UR + UL ), and thus we have for a discontinuity the following
cases
UR < UL satises the entropy condition and thus for this case we get a shock. As UL < UR does not
satisfy (2.28), this means that a shock is not a physical solution. In this case the physical solution is
the rarefaction wave solution shown in Figure (2.4). Why this is the correct solution can be seen by
considering vanishing viscosity. If we have viscosity we expect the discontinuity to be of nite width.
Drawing the characteristics we see that there is no intersection of lines. Taking the limit of vanishing
viscosity we get the rarefaction wave shown in Figure (2.4). Note that this would not be possible for
UL > UR where we would get intersection of lines.
1.5 1
t=0
t=1
0.8
1
0.6
u
0.4
0.5
0.2
0 0
−1 0 1 2 −1 0 1 2
x x
We have in this discussion not treated in detail a nonlinear system of conservation equations. Instead
we have focused on linear systems and nonlinear scalar equations. Solving the Riemann problem for
nonlinear systems is of course more dicult. However the general behavior can to a large degree be
understood as a combination of the two.
3 THE FINITE VOLUME METHOD 11
tnZ+∆t xi+1/2
Z
∂U
dt dx + F(U)i+1/2 − F(U)i−1/2 = 0,
∂t
tn xi−1/2
∆t n
Ûn+1
i − Ûni + n
f̂i+1/2 − f̂i−1/2 = 0, (3.1)
∆x
where we used the following denitions
xi+1/2
Z
1
Ûni ≡ U(xi , tn )dx, (3.2a)
∆x
xi−1/2
tnZ+∆t
n 1
f̂i±1/2 ≡ F(U(xi±1/2 , t))dt. (3.2b)
∆t
tn
Equation (3.1) tells us that the change in average conserved quantity Ûi is equal to the average ux in
and out at the boundary of the cell from time tn to tn + ∆t. The goal of the Finite volume method is to
nd good approximations to f̂i±1/2 . There are two challenges to this. Firstly the uxes are computed
on the cell edges not inside the cells. Secondly these values change during the time integration.
Before going into specic methods we give some general remarks on the FVM.
Remark 1: Conservative method As we derived the method from the conservation equation
the method is conservative. This can be shown by summation over the whole computational domain as
follows
N N
X ∆t X n ∆t n
∆Utot = (Ûn+1 − Û n
i ) = − ( f̂ − f̂ n
) = − f̂ − f̂ n
1/2 ,
i=1
i
∆x i=1 i+1/2 i−1/2
∆x N +1/2
The change ∆Utot is equal to the total amount of ux going out at the right boundary minus the ux
coming in at the left boundary. Methods where the ux is written in a consistent manner (the ux of left
cell for the right cell border equals the ux for the right cell at left cell border) are always conservative.
3 THE FINITE VOLUME METHOD 12
Remark 2: Weak solutions We could have started from the dierential equation formulation
and easily derived nite dierence methods. However, we saw that a partial dierential formulation had
problems treating shocks. Only using the integral formulation, we were able to treat these shocks. In
the same way a great advantage of the FVM is that it being derived from the integral formulation we
are able to describe these discontinuous solutions. Note how well these are approximated depend on
how f̂i±1/2 is approximated.
2
2
1.8
1.8
1.6
1.6
U
U
1.4
1.4
1.2 1.2
1 1
0.8 0.8
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x x
D = {x − λp t, p = 1, . . . , n}, (3.3)
only these points will decide the solution at (x, t). Similarly, a point at (x, t) has a domain of inuence
I = {x + λp t, p = 1, . . . , n}. (3.4)
For a nonlinear conservation law, eigenvalues will depend on U and the domain of dependence and
inuence will be a bounded area rather than a set of points. Most FVMs only consider two cells per
edge. For this to be correct one needs to make sure that information does not travel beyond one cell.
The simplest example is shown in Figure 3.3 for the advection equation. Here the time step is chosen
low enough so that cells only can inuence neighboring cells. This limitation on the time step is called
the CFLcondition. For a system of equations this can be generalized to
max (λi ) ∆t
< 1, (3.5)
∆x
or the time step needs to be limited so that the distance the fastest information travels is less than the
cell width. Note that the CFLcondition is a necessary condition for stability, however it is not sucient.
Individual methods and problems can require a smaller time steps than that of the CFLcondition for
the FVM to be stable.
3 THE FINITE VOLUME METHOD 13
where U↓ is value of U at the position of the edge during the time step. This process is visualized in
Figure 3.4. Here we have two Riemann problems between two cells. In the left Figure the solution is a
shock while in the right Figure the solution is a rarefaction fan. Despite this dierence, in both situations
during the whole time step, we have that the solution at x=0 is given by U↓ = UL . Using this value in
the ux we obtain the Godunov method in both cases. For a nonlinear system the solution is obtained
Figure 3.4: Illustration of how FVM works for the Godunovmethod for two Riemann problems. (Left) We
have a shock moving to the right, we see as time goes, the value of the edge (x = 0) is given by U↓ = UL .
(Right) Example with left moving rarefaction, also in this case U↓ = UL .
in the same way by solving the Riemann problem exactly. If this cannot be done analytically, then it
is done numerically, for instance by Newton's method. This can be very costly. Another approach is to
solve the Riemann problem approximately. Many techniques are based on linearization of the system.
That is to assume
F(U) ' ÃU, (3.7)
where à depends on which approximate solver is used. The problem is then solved using the Godunov
method as if the problem was linear. Motivated by this we seek a method for linear systems that is
F(U) = AU.
Since the system is linear we have that all cells share the same eigenvectors rp . This implies that
m
X m
X m
X m
X m
X
Ui − Ui−1 = βip rp − p
βi−1 rp = (βip − βi−1
p
)rp = p
αi−1/2 rp = p
Wi−1/2 , (3.8)
p=1 p=1 p=1 p=1 p=1
3 THE FINITE VOLUME METHOD 14
p p
thus we have decomposed the discontinuity into waves Wi−1/2 . To each wave there corresponds a λ
p
the speed at which the wave travels. How each wave W
i−1/2 aects neighboring cells can be understood
by interpreting the Godunov method in terms of projection. Suppose we instead had a scalar system
(see Figure 3.5) and that the eigenvalue is given by a > 0. The discontinuity wave will move into the
right cell and cover a portion a∆t thereby changing it from Ui → Ui − Wi−1/2 . The remaining part of
the cell is unaected. Averaging or projecting the solution we obtain the following
∆x − a∆t a∆t
Uin+1 = Uin + (Uin − Wi−1/2 ) ,
∆x ∆x
or
a∆t
Uin+1 − Uin + Wi−1/2 = 0. (3.9)
∆x
For a < 0, cell i will only be aected by cell i+1 and we will have
a∆t
Uin+1 − Uin + Wi+1/2 = 0. (3.10)
∆x
This is easily generalized to any a as follows
∆t +
Uin+1 − Uin + (a Wi−1/2 + a− Wi+1/2 ) = 0, (3.11)
∆x
where a+ = max (a, 0) and a− = min (a, 0). The same projection interpretation works for a system,
however instead of one discontinuity wave there are multiple, each with its own advection speed. The
generalization is straightforward
m
∆t X +
Un+1 − Uni + (λ Wi−1/2 + λ−
p Wi+1/2 ) = 0. (3.12)
i
∆x p=1 p
where
m
X
A± ∆Ui∓1/2 = λ±
p Wi∓1/2 . (3.14)
p=1
or
m
∆t X +
Un+1
i − Uni + (A ∆Ui−1/2 + A− ∆Ui+1/2 ) = 0, (3.15)
∆x p=1
because
m
X p
A± ∆U ∓ = RΛ± R−1 ∆U ∓ = RΛ± αi∓1/2 = λ± p ±
p αi∓1/2 r = A ∆Ui∓1/2 . (3.16)
p=1
3 THE FINITE VOLUME METHOD 15
Remark When we say that we solve the Riemannproblem exactly using the Godunovmethod this
does not mean that our numerical method is exact. No matter how well the Godunovmethod solves
the Riemann problem, it still only considers only two cells and can only get rst order accuracy. To
obtain higher accuracy extrapolation from next neighboring cells needs to be used. However this must
be done with care using limiters as straightforward extrapolations will lead to large oscillations near the
discontinuities. For a thorough treatment of this we refer to [5].
3.2.1 LaxFriedrichs
One of the simplest and most robust approximate Riemann solver is the LaxFriedrichs. In this scheme
we approximate f̂ (U) by
(LF ) 1 ∆x
fi−1/2 = (f (Ui−1 ) + f (Ui )) − (Ui − Ui−1 ) , (3.17)
2 2∆t
giving the following method
∆t 1
Un+1
i − Uni + (f (Ui+1 ) + f (Ui−1 )) − (Ui+1 + Ui−1 − 2Ui ) = 0. (3.18)
2∆x 2
We can show that the method is consistent by Taylor expansion, this gives
∂U ∂f (U) ∆x2 ∂ 2 U
+ = + O(∆t), (3.19)
∂t ∂x 2∆t ∂x2
a convectiondiusion equation. However we have an upper CFLcondition for the ratio ∆x/∆t, and
thus the diusion term is O(∆x). With grid renement this term will disappear and the method is thus
consistent. The viscous part works in the same way as an entropy condition making sure we always
obtain the correct solution to the Riemann problem. LaxFriedrichs is thus very robust, but also tends
to smear out the solutions. Because of it is simplicity and robustness, it is very useful as a rst approach.
However, due to its smearing, other methods are generally preferred.
integrating over the control volume and time we nd the following consistency condition
ZxR ZxR ZT ZT
U(x, T )dx = U(x, 0)dx + F(U (xL , t)dt − F(U (xR , t)dt (3.21)
xL xL 0 0
= xR UR − xL UL + T (FL − FR ). (3.22)
ZxR T
ZSL T
ZS∗ T
ZSR ZxR
U(x, T )dx = U(x, T )dx + U(x, T )dx + U(x, T )dx + U(x, T )dx (3.23)
xL xL T SL T S∗ T SR
T
ZS∗ T
ZSR
= U(x, T )dx + U(x, T )dx + (T SL − XL )UL + (xR − T SR )UR (3.24)
T SL T S∗
Setting (3.22) and (3.24) equal we obtain a the consistency condition for the HLLCmethod
S∗ − SL SR − S∗ SR UR − SL UL + FL − FR
U∗L + U∗R = , (3.25)
SR − SL SR − SL SR − SL
where we dened
T
ZS∗
1
U∗L = U(x, T )dx, (3.26)
T (S∗ − SL )
T SL
T
ZSR
1
U∗R = U(x, T )dx. (3.27)
T (SR − S∗ )
T S∗
3 THE FINITE VOLUME METHOD 17
or in terms of uxes
FL , if 0 ≤ SL
F∗L , if SL ≤ 0 ≤ S∗
FHLLC
i−1/2 = (3.29)
F∗R , if S∗ ≤ 0 ≤ SR
FR , if SR ≤ 0
Inserting one into the other one can show that these three equations also contain (3.25), thus we have
four unknowns and three equations. This might seem as a problem, but it is actually the opposite. This
freedom allows us to put additional constraint which we see t.
When using the HLLCRiemann solver we can directly insert (3.29) into the Godunov method. An
equivalent approach is a wave formulation similar to what we did for the linear system, only we have
three waves ∆Up = {U∗L − UL , U∗R − U∗L , UR − U∗R } traveling at speeds Sp = {SL , S∗ , SR }. The
HLLCmethod then becomes
3 + −
∆t X p
Un+1
i − Uni + Si−1/2 ∆Upi−1/2 + Si+1/2
p
∆Upi+1/2 ) = 0. (3.33)
∆x p=1
where
∂F
A (U) = (3.35)
∂U
is the Jacobi matrix. We saw previously that for a linear system we can easily solve the Riemann
problem. In this spirit Roe [7] proposed to rather than approximating the ux, to approximate A(U )
by a constant matrix à constant in time and then solve
Ut + ÃUx= 0
UL if x≤0 (3.36)
U(x, 0) =
UR if x≥0
exactly for each edge. However, which value should we use: à = A(UL ) or à = A(UR )? Roe proposed
to use an average or a combination of the two. Further he required this matrix to satisfy the following
properties:
Porperty A: Hyperbolicity of the problem. This equivalent to require that à has only real eigen-
values and that all eigenvectors are linearly independent.
Property (A) ensures us that the approximate Riemann problem has the same mathematical character
as the one we are trying to approximate. Secondly it also guarantees that we can solve the problem
using the wave structure. Property (B) ensures that our problem becomes consistent with our original
problem. Property (C) ensures that the method is conservative.
The Roematrix will of course depend on the problem and is in general cumbersome to derive,
especially if the problem is complicated (like for our model system). Assuming we have the Roematrix,
p
we then automatically obtain the eigenstructure. Projecting the discontinuity onto waves Wi−1/2 going
m + −
∆t X p p
Un+1
i − Uni + λi−1/2 Wi−1/2 p
+ λpi+1/2 Wi+1/2 = 0. (3.39)
∆x p=1
Note that we now use lower indcies on eigenvalues, because unlike for a linear system, the Roematrix
is dierent at each edge. For some problems including our model, algebraic relations can be found for
the eigenvaluee, strengths and eigenvectors. In doing so we save computing time that would have gone
into the system and computing eigenvalues and vectors numerically. In doing so we avoid computation
of the Roematrix altogether.
4 RELAXATION SYSTEMS 19
4 Relaxation systems
In nature we are often faced with systems in which there is an equilibrium relationship between the
variables. Whenever the system is perturbed from equilibrium the system will seek to restore equilibrium
and the process by which this happens is called relaxation. To model such systems we generalize our
conservation law to
1
Ut + F(U)x = R(U), (4.1)
where the right side is the hyperbolic conservation law and on the left side R(U) is the equilibrium
relationship, and the time scale at which the system relaxes towards equilibrium. This extension adds
an equilibrium relationship to the model and models the process by which this happens. An example of
such a term can be seen in our model: The ψ source term which relaxes the dierent pressures of the
two phases. In this case, relaxation is modeled to happen through changes in volume fraction of the two
phases and through the associated energy exchange.
Relaxation typically happens in a short time scale and the relaxation term will become big whenever
the system is perturbed from equilibrium, making such terms sti. To account for such terms numerically
for arbitrary relaxation times, special care needs to be taken. Here we present some options for dealing
with such terms assuming fractional step, and an equation of the form
1
Ut = R(U). (4.2)
the equilibrium value after relaxation. Thus, to use this method we only need to compute the equilibrium
value. This method is both fast, robust and simple. However it assumes very fast relaxation, and for
some problems relaxation process might be slow and a part of the physics we want to describe.
Remark An alternative way whenever relaxation is very fast is to enforce the equilibrium condition
of R(U) onto the system of dierential equation such that R(U) = 0 always. This will reduce the
number of equations. In fact this type of relaxation is the link between the many twophase models.
One might think that it is always best to reduce the number of equations to the minimal as possible,
thereby reducing complexity. However in doing it is sometimes harder to construct numerical techniques
that respect conservation.
4.2 ASYmethod
The ASYmethod [1] is a relatively new method that was specically designed for relaxation problems.
In this method we assume that the system relaxes asymptotically in time towards the equilibrium value
Ueq . The ASYmethod is given by
Un+1
i = Uni + (Ueq n ∆t
i − Ui ) 1 − exp − τi
eq
U −U n . (4.4)
τi = i n i
R(Ui )
For the method to be of any use it has to be convergent. This can be shown by proving the method
is consistent and stable and then applying the Laxequivalence theorem which states that convergence
is equivalent to consistency and stability. First we show consistency by taking the limit
4 of ∆t → 0 and
4
∆t
4 RELAXATION SYSTEMS 20
Taylor expansion
∆t
− = Un+1
i − Uni (Ueq
1 − exp −
i Uni )
τi
2 !
1 2 3 eq ∆t 1 ∆t 3
Ut ∆t + Utt ∆t + O∆t = (U − U) 1 − 1 + − + O(∆t )
2 τ 2 τ
2 !
1 2 3 eq ∆tR(U) 1 ∆tR(U) 3
Ut ∆t + Utt ∆t + O∆t = (U − U) − + O(∆t ) .
2 (Ueq − U) 2 (Ueq − U)
1 1 1
Ut = R(U) − Utt + 2 eq R(U)2 ∆t + O(∆t), (4.5)
2 (U − U)
giving a convergent method when ∆t → 0. Note that there seems to be a problem for the consistency
when → 0, however the more detailed analysis in [1] shows consistency for → 0.
A detailed analysis of stability is beyond the scope of this report (see [1]). However, a close look
at gure 4.1 can shed some light into why it is stable. In this gure we see how the step is done by
following an exponential that goes asymptotically towards the equilibrium value. No matter how long
the time step and how many, the method cannot reach the equilibrium value, thus making it stable for
any time step.
Strengths and weaknesses There are many strengths to the ASYmethod that makes it suitable
for relaxation system. Firstly it is a very robust method. Not only is it stable for any time step, it also
doesn't allow for overshoots. This can be seen from Figure 4.1 where no matter the length and number
of time steps, we can never fully reach the equilibrium value and thus never pass it. This is very desirable
as overshoots can result into nonphysical values, like negative pressure and mass fractions, which might
lead to the simulation crashing. Another great strength is that the ASYmethod becomes exact when
we have exponential relaxation of the form
1 eq
ut = (u − u), (4.6)
0
4 RELAXATION SYSTEMS 21
which is a very frequent form of relaxation. Thus in theory the method has few weaknesses. However
there are some numerical issues for the actual implementation of the method when it comes to the limit
U − Ueq → 0. In this limit we run into problems in computing τ (assuming R(Ueq) = 0) of form
0/0, thereby crashing the program. One way of dealing with this problem is by adding ifstatements
eq
to deal with U − U < δ , to ensure correct limit of U not changing. Another might be to add an
machineepsilon to the nominator and denominator in some fashion in order to avoid divergence. In
any case, this is a complicating factor which adds complexity and can the reduce the eciency of the
ASYmethod. When using ASY on a problem care needs to be taken. For it to work properly we need
the following:
If either of the two propperties are not met we can get negative τ and the exponential will easily diverge,
leading to the program crashing.
ASYmethod vs. implicit methods A very viable alternative to the ASYmethod is an implicit
method, for instance implicit Euler
1
Un+1 = Un + ∆tR(Un+1 ). (4.7)
Like the ASYmethod, it is stable for any time step and has no problem in dealing with sti terms. It
can have overshoots, but when this is not a problem, they have about the same robustness and their
accuracy is O(∆t). Thus, their performance is similar, and not necessarily the deciding factor for which
to use. In most cases the deciding factor is computing time. For the ASYmethod, we need to compute
the Ueq at each time step, while for the implicit Euler we need to solve (4.7) at each step. Which is
fastest will depend on the problem. In some cases Ueq can be calculated analytically and ASY is then
likely to outperform implicit Euler in speed. In other cases Ueq is not easily available and implicit
Euler might be faster. Finally, we might be interested in increasing the order of accuracy. With the
ASYmethod, we can, by adding a few lines of code obtain second order accuracy, without calculating
a new Ueq . Using an implicit method (like second order implicit Runge Kutta) we have to further
solve a second set of equations. Thus, an increased demand of accuracy can in some cases make the
ASYmethod the best choice.
∂U
+ A(U)Ux = ψ(U), (4.8)
∂t
most often the hyperbolic part of this equation operates at a slower time scale than that of the relaxation
term, making this term sti. For solving this equation numerically, there are three options. We can solve
it with an explicit method, with a short enough time step to resolve the relaxation term in time. This is
not practical, as the number of time steps needed becomes very large. It will also decrease the accuracy
of the hyperbolic part, which starts to smear when time step becomes much smaller than the CFL
condition. A second option is to solve the whole equation implicitly. If implemented this would work
and allow for large time steps. However, it would require us to solve a nonlinear system of equations.
This will result in a much slower method, without adding much to the accuracy of the hyperbolic part,
which is well treated by an explicit method. The third option, is the fractional step method, and is the
one we will focus on in this report. In this method we combine the best features of the two methods
above, explicit treatment of the hyperbolic part, and special treatment of the second part. Fractional
step is illustrated in Figure 4.2. First we solve the hyperbolic part of the dierential equation, obtaining
U∗ . Then we solve the equation with relaxation with U∗ as initial condition. A nice way of interpreting
this approach, is that the hyperbolic part drives the system out of equilibrium, and the relaxation term
tries to reinstate it afterwards.
5 INVESTIGATION OF MODEL SYSTEM 22
As the equations stand now, there are not enough constraints on the system for closing this set of
equations. We need a way of calculating the pressure given U (given in (1.7)). To do so we specify the
equation of state.
pk + πk
Tk = (5.3)
Cvk ρk (γk − 1)
where γk is the adiabatic ratio γ = Cp /Cv , ek is the specic internal energy, e∗k is the zero point specic
energy and πk is a parameter that stiens the gas by increasing the sound velocity. For details on the
SGEOS the reader is referred to [3].
To close the system of equations we use that
1
αk Ek = αk ρk ek + αk ρu2 , (5.4)
2
giving a direct link between thermodynamical variables like pressure and temperature to the conserved
variables
5 of U. How this is done is shown in Appendix A.1.
5
Using the SGEOS we could very well write (5.1) in terms of thermodynamical variables. However these are not conserved
and will make it dicult to design numerical methods that conserve the conserved quantities.
5 INVESTIGATION OF MODEL SYSTEM 23
right from the outset we see there is an immediate complication to our problem as σ is not of conservative
form and is given by
u · ∇α1
0
0
σ(U) =
. (5.6)
0
Σ(U, ∇U)
−Σ(U, ∇U)
In order to treat this term, the FVMs we introduced earlier need to be generalized. We will look at how
this can be done on a case by case basis.
LaxFriedrichs: The ux term is incorporated into the classical LaxFriedrichs method. σ cannot
be included into this. What we can do is to approximate the derivatives by a nite dierence method.
In our case we choose to approximate all derivatives of arbitrary quantities q by
HLLC: In deriving the HLLCmethod we assumed only to have conservative ux F(U). To treat σ
fully would require us to rethink the whole method. However, using the discontinuity wave interpretation
of the HLLCmethod we can easily generalize it to contain the rst term
∂t α1 + u · ∇α1 = 0, (5.8)
which is simply convection of volume fraction. We could very well add a fourth wave to our method only
containing α1 traveling with speed u. However this is unnecessary as middle velocity wave will move at
a speed very close to u, thus we can just add α1 to our discontinuity wave. The Σ(U, ∇U) is harder to
incorporate and would require more discontinuity waves. In this report we choose the simplest way of
dealing with this term, which is to ignore it. This is also what was done in [6], where it was emphasized
that simulation of with generalized HLLC including this term dier little from the one without. We
would like to stress that we have implemented two dierent solvers incorporating this term, thus we
are not totally dependent on this approximation. Another aw to our approach is the the HLLC
method we use (which was found in [6]) assumes equilibrium of the pressures, thus only allowing for
instantaneous relaxation and the ASY-method thus cannot be used.
Roe-scheme: We cannot write our homogeneous system in conservative form. However we can write
it in quasilinear form
Ut + A(U)Ux = 0, (5.9)
opening for a linearized Riemannsolver like that of Roe. Like Roe we seek a matrix à which satises
property A and B, that is it has to be hyperbolic and to be consistent with the original A. However, since
our system is not conservative we need to modify property C. We replace this property by property
6 C̃:
6
Mixture energy: E ≡= α1 E1 + α2 E2
5 INVESTIGATION OF MODEL SYSTEM 24
∂t α1 = µ (p1 − p2 ) (5.10a)
∂t (α1 ρ1 ) = 0 (5.10b)
∂t (α2 ρ2 ) = 0 (5.10c)
∂t (ρu) = 0 (5.10d)
First we note that relaxation only involves α and the two dierent energies. Thus component n = {2, 3, 4}
of U∗ are unchanged and are the equilibrium values. The three other variables however can change, but
not entirely freely. Adding (5.1e) to (5.1f) we get
Et + ∇ (Eu + α1 p1 u + α2 p2 u) = 0 (5.11)
where
E ≡ α1 E1 + α2 E2 , (5.12)
eq
the mixture energy is conserved. This adds a constraint a to what U might be. However this constraint
is not enough for determining uniquely the equilibrium conguration. This becomes clear by writing the
two last equations as
∂t (α2 E2 ) = pI ∂t α, (5.13b)
which cannot be integrated analytically as pI , the interface pressure, will change in time. How to
overcome this hurdle is one of the biggest innovation presented in [6]. In this paper it was assumed that
peq ∗
I − pI
pI = p∗I + eq (α1 − α1∗ ) , (5.14)
α1 − α1∗
also shown in gure 5.1. With this approximation we can easily integrate (5.13), and we nd that
p∗I + peq
(α1 E1 )eq − (α1 E1 )∗ = − I
(α1eq − α1∗ ) (5.15)
2
p∗ + peq
(α2 E2 )eq − (α2 E2 )∗ = I I
(α1eq − α1∗ ) (5.16)
2
giving the connection needed for computing the an approximate equilibrium conguration. We do not
intend going through the whole derivation for nding Ueq as it is thoroughly presented in [6]. What
we would like however, is to emphasize that this value can be obtained analytically, thus making an
approximate value of Ueq available for use in the ASYmethod, thus avoiding implicit methods. This
gives the nal piece needed for implementing numerical simulation of the model system.
The parameters for the equation of state are given in Table 1. Figure 5.2 shows the results of the
Table 1: Parameters for the stiened gas equation of state for Dodecane.
numerical experiment with the parameters above after t = 473 µs for the HLLC and LaxFriedrichs
method
8 using 10000 cells and CFLnumber 0.9. we rst look at the overall picture this experiment
gives. The experiment starts out uniformly distributed and at equilibrium on each side. Then right
after the experiment is started the two uids start moving due to the pressure dierence. This motion
is reected in the plateau we see for the velocity expanding to the left by a rarefaction wave and to the
right by a shock. Note that the experiment is short enough so that information cannot reach the left
x = 0 m. Thus the conguration at the far left is unchanged. It is interesting to note how well this
experiment is captured in terms of shocks and rarefaction waves.
The results we see are in agreement with those observed in [6] with the exception of the temperature
dierence which has a twice as high plateau in this paper. We were initially puzzled by this, but became
more and more condent that our results were indeed the correct ones. First of all, we are doing the
simulation with both LaxFriedrichs and HLLC. These are two very dierent methods, yet they give the
same plateau. Thus a systematic error is largely out of the question. Combine this with the fact that
information travels at nite speed and the time of the experiment is not long enough for information
8
We tried using the Roesolver, but it turned to be unstable for this problem. Although Roe is very accurate, it is not as
robust as LaxFriedrichs or HLLC. The problem originates from us almost having an one phase ow at the two sides and Roe
is notorious for not being able to handle that. This was also the case in [6] and even in [2] which was on the two uid model
another model.
5 INVESTIGATION OF MODEL SYSTEM 26
3
10 200
2
150
ρ[kg/m 3 ] 10
u[m/s]
100
1
10
50
Lax−Friedrichs Lax−Friedrichs
HLLC HLLC
0
10 0
0 0.5 1 0 0.5 1
x[m] x[m]
1
1
0.8
0.8
0.6
0.6
αv
Yv
0.4 0.4
0.2 Lax−Friedrichs 0.2 Lax−Friedrichs
HLLC HLLC
0 0
0 0.5 1 0 0.5 1
x[m] x[m]
5
3 x 10
10 15
Lax−Friedrichs
HLLC
2
(Tv − Tg )[K]
10 10
p[bar]
1
10 5
Lax−Friedrichs
HLLC
0
10 0
0 0.5 1 0 0.5 1
x[m] x[m]
Figure 5.2: Shock tube simulation for Dodecane using the HLLC and LaxFriedrichs method with 10000
cells and CFL number 0.9.
to travel from x = 0.75 m to the left side, leaving the only possibility of wrong initial conditions. We
checked our initial conditions and they were consistent with the values given above. Finally all the other
graphs agreed. We contacted one of the authors of the paper, Marica Pelanti and she conrmed our
results with revised graph with the same plateau as us, see Appendix A.5.
5 INVESTIGATION OF MODEL SYSTEM 27
It is interesting to compare the results obtained by the two methods. First we note that the overall
behavior is very similar. As expected the HLLC method gives sharper solutions than the LaxFriedrichs
method. The large numerical viscosity of LaxFriedrichs tends to smear the solutions out. However, this
is not the only signicant dierence between the two. The discontinuities to the left are also positioned
dierently, and the pressure plateau is dierent for the two. The are many possible causes for this
discrepancy. One plausible candidate is the smearing in LaxFriedrichs. We initially did the simulation
using 5000 cells, increasing to 10000 these discrepancies became smaller, especially the dierence of
the pressure plateau. Yet there are still dierences, like the bump on the top of the velocity graph
and dierence in position of the temperature discontinuity. A good candidate for such dierences are
entropy mistakes the Riemann solver has converged to the wrong weak solution. This is very common
for approximate Riemann solvers. LaxFriedrichs has a large numerical viscosity and will in general
have an easier time than the HLLCsolver to choose the right weak solution. Thus it can very well be
the that LaxFriedrichs solution that corresponds more closely to true solution than the HLLC. Lastly
we should remember that in constructing the HLLCsolver that we ignored the Σ-terms. Even if their
contribution tends to be small, it could very well cause the small dierences we observe. That being
said it is very important to emphasize that the LaxFriedrichs method required many points to give a
reasonable solution, while the HLLC could give reasonable results only using 100 points. Normally we
will not have the luxury of using lots of points and the LaxFriedrichs is left useless due to its smearing.
Table 2: Parameters for the stiened gas equation of state for water.
In gure 5.3 we see the results after a time t = 3.2 ms using HLLC- and the Roe-method. We rst
consider the overall behavior of the system. As the uid moves away from the middle a pressure vacuum
is left behind. This pressure vacuum causes water to turn into vapor, shown in the peak of volume
fraction of αv . The velocity prole is a rarefaction wave going to the left and right.
The two methods match perfectly each other and are in good agreement with the graphs presented
in [6]. There is one discrepancy between our results and those of Pelanti & Shyue. The volume fraction
peak is twice as high and sharper than that of Pelanti and Shue. This is most likely due to the fact that
we use 10000 points and they use 5000. Thus we are able to capture the sharper peak better than them.
We now do the same numerical experiment, only now we turn up the velocity to u = 500 m/s. Figure
5.4 shows the results of this. The behavior of the system is similar to that of the previous numerical
experiment, but much more violent. Instead of having a small peak in the middle of the tube with
vapour, we have a large of portion of water turning entirely into vapour. Again our results match very
well with those obtained by Pelanti & Shyue and the two solvers give almost identical solutions.
The performance of the two solvers is very comparable, this despite the Roesolver being more
sophisticated. However due to the eigenstructure of the model this is also to be expected. We only have
three distinct eigenvalues for this model three velocities for which the discontinuity can separate into
four dierent levels. This is also the same number of velocities in the HLLC. Roe allows for six velocities,
but only three of them are actually needed. Thus they're both able to capture all the intermediate levels
of the model system.
5 INVESTIGATION OF MODEL SYSTEM 28
4
x 10
10 2
8
1
6
u[m/s]
p[Pa]
0
4
−1
2
HLLC HLLC
Roe Roe
0 −2
0 0.5 1 0 0.5 1
x[m] x[m]
0.25 1.5
HLLC
Roe
0.2 1
0.15 0.5
αv
Yv
0.1 0
0.05 −0.5
HLLC
Roe
0 −1
0 0.5 1 0 0.5 1
x[m] x[m]
Figure 5.3: Results from cavitation tube experiment with water at t = 3.2 ms for v = 2 m/s using the
HLLC and Roemethods. Simulations were done with 10000 cells and a CFLnumber of 0.5.
It is interesting to note that for the Cavitation tube our simulations also replicate what is very likely
a aw in the ndings of Pelanti & Shyue. A close look at the velocity graph in gure 5.3 reveals a
small bump in the middle. This is most likely not a part of the true solution, but an artifact of the
approximate Riemann solver we use an entropy mistake. In fact the initial condition is a textbook
example of where transonic rarefaction is the correct solution of the Riemann problem a rarefaction
wave spanning from the left to the right of the cell edge in between the discontinuity. HLLC and Roe
will treat this as a shock and thus give a wrong solution.
5 INVESTIGATION OF MODEL SYSTEM 29
4
x 10
10 500
u[m/s]
p[Pa]
5 0
HLLC HLLC
Roe Roe
0 −500
0 0.5 1 0 0.5 1
x[m] x[m]
1 1.5
HLLC
Roe
1
0.5
αv
Yv
0.5
0
−0.5 HLLC
Roe
0 −1
0 0.5 1 0 0.5 1
x[m] x[m]
Figure 5.4: Results from cavitation tube experiment with water at t = 0.58 ms for v = 500 m/s using the
HLLC and Roemethods. Simulations were done with 10000 cells and a CFLnumber of 0.1.
be entirely sure that it is not caused by incorrect implementation. However we have some theories as
to why we experience this problem. For the ASYmethod to work properly, the equilibrium has to be
monotonously reached. In gure 5.5 we see line I moronically converging to the correct equilibrium while
line II takes a detour before converging to U eq . Such a detour will be reected in a negative τ and can
cause the exponential to diverge for fast relaxation and thus the simulation to crash. However is such a
detour possible for the system of equations? We haven't been able to answer this question yet, but just
because we seem to experience this in our simulations doesn't mean that it is. Another plausible cause
might be the approximation we perform to compute the equilibrium value Ueq . This is an approximate
value. If it diers from the real equilibrium value we may have situations as shown in gure 5.5 (Right).
Here we will have negative τ and possible blowing up of the exponential.
Figure 5.5: (Left) Paths from U ∗ to U eq . Path I is monotonnically approaching U eq , while II is taking a
detour eventually reaching U eq . (Right) Illustration of a situation where the possible approximate value is
on the wrong side of U ∗ , leading to negative τ .
To overcome this problem we chose to tweak the ASY-method by taking the absolute value of τ. By
doing so we guarantee that we always go toward the approximate equilibrium value. One can argue that
it is only in rare cases that we have negative τ. However one will always in this way bias the problem
toward the approximate equilibrium value. This will therefore to some degree also bias how well an
ASYmethod can be used to model the physics in a problem for which relaxation is slow.
6 CONCLUSION AND FUTURE PROSPECTS 31
References
[1] Peder Aursand, Steinar Evje, Tore Flåtten, Knut Erik Teigen Giljarhus, and Svend Tollak Munke-
jord. An exponential time-dierencing method for monotonic relaxation systems. Applied Numerical
Mathematics, 80(0):1 21, 2014.
[2] Steinar Evje and Tore Flåtten. Hybrid ux-splitting schemes for a common two-uid model. Journal
of Computational Physics, 192(1):175 210, 2003.
[3] T. Flåtten, A. Morin, and S. Munkejord. On solutions to equilibrium problems for systems of stiened
gases. SIAM Journal on Applied Mathematics, 71(1):4167, 2011.
[4] S. K. Godunov. Dierence methods for the numerical calculations of discontinuous solutions of the
equations of uid dynamics. Mat. Sb., 47:271306, 1959. In Russian, translation in: US Joint Publ.
Res. Service, JPRS, 7226 (1969).
[5] R.J. LeVeque. Finite Volume Methods for Hyperbolic Problems. Cambridge Texts in Applied Math-
ematics. Cambridge University Press, 2002.
[6] Marica Pelanti and Keh-Ming Shyue. A mixture-energy-consistent six-equation two-phase numerical
model for uids with interfaces, cavitation and evaporation waves. Journal of Computational Physics,
259(0):331 357, 2014.
[7] P. L. Roe. Approximate riemann solvers, parameter vectors and dierence schemes. J. Comput.
Phys., 43:357372, 1981.
[8] RICHARD SAUREL, FABIEN PETITPAS, and REMI ABGRALL. Modelling phase transition
in metastable liquids: application to cavitating and ashing ows. Journal of Fluid Mechanics,
607:313350, 7 2008.
[9] E.F. Toro, M. Spruce, and W. Speares. Restoration of the contact surface in the hll-riemann solver.
Shock Waves, 4(1):2534, 1994.
A APPENDIX 33
A Appendix
A.1 Closing the system and Macroscopical variables
The varibles in (1.3), that is
α1
α1 ρ1
α2 ρ2
U=
, (A.1)
ρu
α1 E1
α2 E2
are by no means unique. However they have desirable properties in that the momentum of each phase,
and the total energy E = α1 E1 + α2 E2 is conserved. Using these variables one can design numerical
schemes which guarantees these conservations. However, these microscopical variables are not typically
the variables of interest when evaluating the data. Typically what one is interested in are the macro-
copical variables likes temperature and pressure. Using the equation of state one could also derive the
set of equations for
α1
u
T1
V=
T2 ,
(A.2)
P1
P2
which represents variables that are easy to measure in an experiment and give more macroscopic picture.
Keeping in mind we want a conservative scheme and that the variables of interest in the end are the
macroscopical variables of (A.2), we are interested in nding a transformation between between (A.1)
and (A.2). Not only is such a transformation useful in the end to transform microscopical data into
macroscopical data, it is also useful as such transformation provides the information needed to close
system of equations. Using the stiened gas EOS we derive the following transformation from (A.1) to
A.2 (assuming one dimension)
U1
U4
U2 +U3
1 U5 1 2 ∗ U1 π1
− V − e −
C U2 2 2 1 U2
v
V = G(U) =
1 U6
− 1 2
V − e ∗
− (1−U 1 )π2 . (A.3)
C v U3 2 2 2 U 3
U2 U5 1 2 ∗
(γ1 − 1) U1 U2 − 2 V2 − e1 − γ1 π1
U3 U6 1 2 ∗
(γ2 − 1) 1−U 1 U 3
− 2 V 2 − e 2 − γ 2 π 2
For completeness we also provide the inverse operation which is useful as check and in obtaining initial
conditions from data given in macroscopic variables
V1
V1 Cv1VV53+π 1
(γ1 −1)
V6 +π2
−1
(1 − V1 ) Cv2 V4 (γ2 −1)
U = G (V) = (A.4)
V2 (U2 + U3 )
U2 (Cv1 V3 VV5 +γ 1 π1 ∗ 1 2
5 +π1
+ e 1 + V
2 2 )
V6 +γ2 π2 ∗ 1 2
U2 (Cv2 V4 V6 +π2 + e2 + 2 V2 )
A.2 Eigenstructure
The homogeneous part can be diagonalized. The eigenvalues are given by
λ1 = u − c, λ2 = λ3 = λ4 = λ5 = u, λ6 = u + c. (A.5)
A APPENDIX 34
with eigenvectors
0 0 0 0 1 0
Y1 0 0 1 0 Y1
Y2 0 1 0 0 Y2
R(U) =
u−c 0 u u 0 u+c
,
(A.6)
c22 c21
Y1 (H1 − uc) − κ2 κ2 Π1 −Π2
κ1 κ 1 H2 − κ1 H1 − κ1 κ1 Y1 (H1 + uc)
Y1 (H2 − uc) 1 0 0 0 Y2 (H2 + uc)
∂pk
where Hk is the total enthalpy, Πk = −ρk c2k + pk (1 + κk ), with κk = ∂Ek
A.3 Transformation
1
Ek = ρk ek + u2 (A.7)
2
πk
ek − e∗k = Cv Tk + (A.8)
ρk
1 ∗ π k
Tk = ek − ek − (A.9)
Cv ρk
1 Ek 1 2 ∗ πk
Tk = − u − ek − (A.10)
C v ρk 2 ρk
1 α k Ek 1 2 ∗ πk
Tk = − u − ek − (A.11)
Cv αk ρk 2 ρk
In terms U for
1 U5 1 2 ∗ U 1 π1
T1 = − V2 − e1 − (A.12)
Cv U2 2 U2
1 U6 1 2 ∗ (1 − U1 )π2
T2 = − V2 − e2 − (A.13)
Cv U3 2 U3
Pressure
pk = (γk − 1)ρk (ek − e∗k ) − γk πk (A.14)
αk Ek 1 2 ∗
pk = (γk − 1)ρk − u − ek − γk πk (A.15)
αk ρk 2
In terms of U
U2 U5 1 2 ∗
p1 = (γ1 − 1) − V 2 − e 1 − γ1 π1 (A.16)
U1 U2 2
U3 U6 1 2 ∗
p1 = (γ2 − 1) − V 2 − e 2 − γ2 π2 (A.17)
1 − U1 U3 2
A.4 From V to U
p k + γk πk
ek − e∗k = CV k Tk (A.18)
p k + πk
p k + γk πk pk + πk
ρk = (A.19)
Cvk Tk (γk − 1) pk + γk πk
p k + πk
ρk = (A.20)
Cvk Tk (γk − 1)
V 5 + π1
U2 = V1 (A.21)
Cv1 V3 (γ1 − 1)
V 6 + π2
U3 = (1 − V1 ) (A.22)
Cv2 V4 (γ2 − 1)
Figure A.1: Revised graph of temperature dierence by Marica Pelanti. Note that prelaxation is only
important to us, the others correspond to dierent relaxation.