Professional Documents
Culture Documents
1
posed. fluid velocity and density in field κ. The momentum sources
The light water reactor safety analysis codes RELAP5 are sκ = −τκ σκ ± τi σi − aκ ρκ g sin θ, where τ is the skin
and CATHARE have also been studied with von Neumann frictions at the walls and interface. θ is the pipe inclination,
analysis by Pokharna et al.. Pokharna et al. [1997], looking positive above datum, and g is the gravitational acceleration.
into how numerical diffusion and terms added to achieve
model hyperbolicity affect stability predictions. They found
the numerical regularization to be dominant in the cases
studied. Fullmer et al. Fullmer et al. [2014] preformed
similar analyses on an upwind discretization of the two-fluid
model, demonstrating the mesh size dependency of the
predicted stability in both the linear and nonlinear range.
A Reynolds stress modelling was shown provide grid
independent regularization.
Figure 2.1: Pipe cross-section
The present article focuses on providing general theory
for a wider family of discrete two-fluid model representa-
tions. This will be done by relating the predicted growth and The circular pipe geometry itself enters into the modelling
decay of the discrete representations directly to the growth through the relation between the level height h, the specific
results of the Kelvin-Helmholtz analysis of the differential areas aκ and the peripheral lengths σκ and σi . These are
two-fluid model. Linear theory of the type here presented is algebraically interchangeable through a geometric function
demonstrated to be powerful tool when it comes to assessing
h = H(a` ) (2.2)
the predictive capability of any chosen discrete representa-
tion, providing support with decisions related to the para- whose derivative is H0 = 1/σi . See e.g.Akselsen [2016a]
metric setup prior to simulation and interpreting the sim- for expressions of the geometric relationships.
ulation results. Predictive capability here refers to the re-
liability and accuracy with which a discrete representation Fluid compressibility is commonly ignored when consid-
predicts wave growth or decay under limited computational ering the surface wave stability of (2.1). This enables us to
resolution. It will be shown that the growth and dispersion base the stability analysis on the incompressible two-fluid
response of discrete representations is perfectly analogous to model, which has lower rank and a conservative form.
that of the differential model. What’s more, the differential Assuming incompressible phases, the two-equation
Kelvin-Helmholtz expression directly provides that growth model is obtained by reducing the momentum equations
and dispersion which will be predicted by the discrete meth- with their respective mass equations and eliminating the
ods in the linear range, provided these representations uses pressure term between them, resulting in
the same discrete differentiations all over.
∂t v + ∂x f = ν∂xx v + s (2.3)
2
parametric. Directly inserting (3.3) into (3.2) then yields
X ∂F ∂S
Finally, the eigenstructure of (2.3) is useful to know. The −ikHk + k 2 νI + ik − P-1eik(x−Ck t) P v̂k = 0.
Jacobian of f is ∂V ∂V
k
1 (ρu)∗
∂f 1
= ∗ ∗ , (2.5) The bracket term cancels at each wavenumber due to the
∂v ρ κ2 (ρu)
definition of Hk .
whose eigenvalues are
So, the linear response of the system will be through the
± (ρu)∗ ± κ growth and dispersion of a number of linear waves. We will
λ = . (2.6)
ρ∗ not bother too much with this general solution, but are inter-
A new variable ested in the stability behaviour of (3.2) – stable flow occurs
if the real component of all eigenvalues is negative or zero.
ρ` ρg
r
2 The solution (3.3) is just a linear combination of waves; we
κ= ρ∗ m y H 0 − (ug − u` ) . (2.7)
a` ag re-write it to the form
has here been introduced along with the operator X X
ṽ (x, t) = v̂k,p eik(x−ck,p t) . (3.4)
ψ` ψg k p=1,2
ψ∗ = + . (2.8)
a` ag
Inserting (3.4) into (3.2) yields the algebraic system
3
The components of Fr are the fluxes in a relative frame, with S = 0 from the holdup equation (3.1). We may there-
moving with (complex) velocity cν . Fr equals F with the fore regard the VKH criterion as the equilibrium state with
relative velocities respect to changes in phase fraction in the frame of a mov-
ing wave perturbation. S 0 = 0 then gives the critical wave
Uκ,r = Uκ − cν celerity ccrit and wave growth will occur if Jr0 (ccrit ) < 0.
replacing Uκ . Since the mass equation contains no source Note that the rate of growth will in (3.13) depend upon
term, the first component of (3.11), combined with (2.4), the wavenumber k (present in δx ,) but that the condition for
yields directly marginal stability, (3.18), will not.
These results are identical to those provided in e.g.,
Qκ,r = Aκ Uκ,r = const., (3.12) Barnea and Taitel [1993], Holmås [2010], Liao et al. [2008],
though a different approach has been chosen which provides
which relates both velocity components to A` . The second a physical interpretation.
component of (3.11) yields the dispersion equation
4
(3.3), provided Gk is diagonalisable. In this case, P contains
source weight: 1 ln λGk ,p
0.2 Q g/A = 6.0m/s
source weight: 1/4 the eigenvectors of Gk and cdk,p = ki ∆t , λGk ,p being
source weight: 1/16
0.15
source weight: 1/64 5.4 the p-th eigenvalue of Gk . In fact, this is a solution at any
0.1 source weight: 0 point in our discrete system for as long as non-linear effects
d
ill-pose 4.7
remain negligible. Again, these are just linear combinations
0.05 s ed
well-po 4.1 of modes; we may express the discrete point solution analo-
ℑ(c) 3.4
0 gous to (4.4) by
2.8
2.2
0.3
1.5
0.9
-0.05 IKH VKH X X d
ṽjn = v̂k,p eik(xj −ck,p tn ) . (4.4)
ed
-0.1
os
k p=1,2
ose
ll-p
-0.15
we
ill-p
-0.2 Inserting (4.4) into the discrete model (4.1) and linearizing
-0.25
yields a system analogous to (3.5),
0.8 0.9 1 1.1 1.2 1.3
ℜ(c) X X ∂Ek,pd
d
v̂k,p eik(xj −ck,p tn ) = 0, (4.5)
Figure 3.1: Complex celerity c with altering superficial gas p=1,2
∂V
k
velocity Qg /A. Q` , A` and the source differentials are kept
constant about the critical VKH state. The source differ- E d being the discrete equivalent of E from (3.6), differing
entials are reduced in steps with a constant ‘source weight’ only in that discrete differential operators
between plots. Parameter values are presented in Section 5.2 n
δ exp ik(x − cd t) j
d
δ ≡ (4.6)
exp ik(xj − cd tn )
to represent the partial differentials. System (2.3) may be
written
replace δ. These δ d terms, approximating δ, hold all nu-
(δt v)nj + (δx f )j = ν(δxx v)j + sj (4.1) merical error in its entirety and are simple algebraic ex-
pressions. Again, E d is independent of n and j so that
after discretization. ν is here whatever artificial numerical each k, p-term must equal zero individually. The problem is
viscosity one chooses to impose on the discretization. For now equivalent to (3.7) and its solution is obtained directly
example, ν = ∆x2 /2∆t and central differences for the from (3.13)-(3.15), with two celerities for each wavenum-
spatial derivatives constitutes a Lax-Friedrich scheme. ber k. Also the discrete viscous celerity cdν follow the def-
inition (3.10) using the discrete δ d operators. δ d gives the
First, let us regard the stability of (4.1) in the context of value of δtd , which in turn gives the wave growth and dis-
a common von Neumann analysis VonNeumann and Richt- persion from the chosen time discretization method. For
myer [1950]. Introduce ṽjn = vjn −V and express {ṽjn } and example, the explicit or forward time integration has
Euler
{ṽjn+1 } with spatial Fourier transforms d 1 −ikcd
the operator δt = ∆t e − 1 . Solving for cd yields
1
X X cd = k∆t ln 1 + δtd ∆t with δtd = νδxx d
− cdν δxd from
ṽjn = v̂kn eikxj , ṽjn+1 = v̂kn+1 eikxj . (4.2) (3.10).2
k k
δ d -functions for some of the most common discrete dif-
Insertion into (4.1) and dropping higher order terms yields a ferentiations are presented in Table 1. Tabulated operators
system on the form are presented with phase angles φx = k∆x and φt =
X kcd ∆t, which represent the phase rotation within a grid
n+1 n ikxj
v̂k − Gk v̂k e = 0, cell length or time step, respectively. Constructing simi-
k lar operators for more complicated interpolations is usually
straight forward. For instance, δxd in the QUICK scheme is
G being the amplification matrix. We have 1
3e iφx
+ 3 − 7e −iφx
+ e −i2φx
. Notice that all opera-
8∆x
n+1 n n−1 n+1 0 tors listed in Table 1 are consistent, i.e., they satisfy δ d → δ
v̂k = Gk v̂k = Gk Gk v̂k = (Gk ) v̂k , (4.3)
as ∆x and ∆t approach zero.
which provides the result of a common von Neumann
analysis, namely that the spectral radius of Gk must be less 2 We may generalize the discrete time differential operators listed
or equal to one as a necessary condition for system stability. in Table 1 by introducing the ‘degree of implicitness’ r as a lin-
ear combination of the forwards and backwards Euler integrations,
1
Rather than examining Gk , we will use the continuous ∆t
ψ n+1 − ψ n + r(· · · )n+1 + (1 − r)(· · · )n . The discrete differen-
exp −ikcd −1
stability analysis from the previous section for which the so- tial operator for this integration is δtd = 1
, giving
∆t r (exp (−ikcd )−1)+1
lution is already calculated. Notice that the equation (4.2),
1+(1−r)δtd ∆t
1
once (4.3) is inserted, can be written on exactly the form c = k∆t ln d .
1−rδt ∆t
5
(δψ)nj δd
1 n+1 1 −iφt
δt −ikc explicit ∆t ψj − ψjn + (· · · )n ∆t e −1
1 n+1 1
δt −ikc implicit ∆t ψj − ψjn + (· · · )n+1 ∆t 1 − e iφt
1 n+1 φt
− ψjn + 12 (· · · )n+1 + 12 (· · · )n 2i
δt −ikc Crank-Nicolson ∆t ψj ∆t tan 2
1 2i φx −i φ2x
δx ik upwind ∆x (ψj − ψj−1 ) ∆x sin 2 e
1 i
δx ik central difference 2∆x (ψj+1 − ψj−1 ) ∆x sin φx
1 2i φx
δx ik ψ 1 − ψ
staggered ∆x sin 2
1
∆x j+ 2 j− 2
2 1 2
δxx −k central difference (ψ
∆x2 j+1
− 2ψ j + ψj−1 ) ∆x2
(cos φx − 1)
ψj Ψ mean 1
2 ψj+ 2 + ψj− 2
1 1 cos φ2x
Table 1: Some discrete differentiation operators and their corresponding wave operator. φx = k∆x and φt = kc∆t.
Remark 1. The stability behaviour of a discrete represen- Any discrete representation of system 2.1 will thus be
tation will converge towards that of the continuous model equivalent, provided the discrete differential operators δtd ,
if δxd and δxx
d
are respectively the same.
d d
d δt − νδxx
cν ≡ − → c + ikν.
δxd A consequence of Remark 3 is that four equation formula-
d
For this to happen, all δ operators must be consistent tions of the compressible system (2.1) is equivalent to (4.1)
d
(δ → δ) and ∆x and ∆t must approach zero together, provided we do not mix different discrete differentiations.
smoothly. Examples of commonly used mixed discrete differentiations
are convection flux terms of the form
Remark 2. The predicted linear stability is independent of (
which variable the discrete system is solved for, provided the ψj uj+ 21 if uj+ 12 ≥ 0,
discrete differentiations δ d are independent of this choice. (ψu)j+ 1 =
2 ψj+1 uj+ 21 otherwise,
Remark 3. The predicted linear stability is independent of
the form of the discrete system, be it conservative, primitive, (which linearizes to a central difference in ũ and an upwind
four-equation, two-equation, etc., provided the discrete dif- difference in ψ̃.) Staggered grid formulations, in which the
ferentiations δ d are independent of these choices. differentiation depends on the proximity of the data points,
is another example.
Remark 2 and 3 are results of the linearisation. This is Incompressible fluids are assumed in the stability analy-
briefly illustrated by Taylor expanding any chosen variable sis itself in the present work, even though the representa-
v (w) about W which yields tion is of the compressible model. This is common prac-
∂V tise and provides us with simple, explicit stability expres-
ṽ = V + w̃ + O |w̃|2 ,
∂W sions, though denies us information about the sonic stability.
Including density variations is straightforward, but necessi-
where V = v (W ). We may thus define
tates solving a higher order dispersion equation numerically.
∂W
w̃ ≡ ṽ Example 1 (The stability of a Lax-Friedrich and a local
∂V
and freely impose variable transformations which does not Lax-Friedrich scheme). The Lax-Friedrich scheme is com-
affect the linear stability of the system, provided those trans- monly written
formation matrices exist. fj+ 12 − fj− 21
v n+1 − v n
Further, in linearizing an arbitrary discretized variable w, + = sj
n
and remembering that (δW )j = 0, one finds ∆t ∆x
with
∂W d
(δw)nj → δ d w̃ = δ ṽ. ν
∂V fj+ 12 = 12 (fj+1 + fj ) − (vj+1 − vj ).
The linear system of one variable will thus only be a fac- ∆x
torization of the same system in another variable, as alluded Numerical viscosities in the Lax-Friedrich scheme and the
to in Remark 2. Also noted in the remark, δ d must be un- local Lax-Friedrich scheme are then
changed in the variable transformation of the last equality.
Finally, any type term representation based on the chain ∆x2 ∆x
ν LF = and ν LLF = max |λ± |,
rule will, after the linearization, be equivalent. For example 2∆t 2
n
∂f n ∂F respectively. Thus, the local Lax-Friedrich scheme deter-
(δw)j → + O(w̃) δ d w̃ = δ d f˜.
∂w j ∂W mines the artificial numerical diffusion according to spectral
6
radius of ∂f
∂v . Eigenvalues, presented in (2.6), are computed The discrete pressure differential (δx p)nj can again be elim-
at the steady state v = V . inated between the momentum equations after dividing eace
These schemes use simple central differences; from Ta- by aκ,j . Thus, a Fourier solution on the form (4.4) once
i 2
ble 1 we find δxd = ∆x sin φx and δxxd
= ∆x 2 (cos φx − 1).
more yields a linearized system similar to (4.5), but with the
T
Extracting the stability equations of either scheme is strik- variables w̃ = (ã` , ãg , q̃` , q̃g ) . The system reads
ingly easy; equation (3.17) gives cdν , δtd is obtained from the
−cdν â` + δx q̂`
definition (3.10) and the complex wave celerity from the ex-
d
pression of the chosen time discretization. −cν âg + δx q̂g
ρ i`
∂E d
h
−cdν q̂ + δ[ d + my H0 δxd â`
Example 2 (The stability of a scheme for the compressible ŵ = x qu
∂W A g
model on a staggered grid). Say we wish to simulate the
−â` cos φx SA − q̂` SQ − q̂g SQ
2 ` ` g
compressible model (2.1) with a staggered grid discretiza- â` + âg
tions. Staggered grids are quite common with this model as
the staggered grid offers a tight stencil for most of the data with [·]` = (·) − (·) . The tight stencil reduces the error in
g ` g
points and denies so-called checkerboard solutions of the
the δxd operator to δxd = ∆x 2i
sin φ2x for those data points lo-
pressure field (see e.g. Ferziger and Peric [1999].)
cated favourably on the staggered grid. In this case only the
Upper-case indices J are used for the mass control vol-
momentum convection term requires an alternative form of
ume centre points, and lower-case indices j for the momen-
spacial differencing. We split it into âκ and q̂κ components
tum ones. The staggered grid is constructed with the mo- d d
and define δa,x and δq,x by
mentum control volumes shifted spatially half a cell length
behind the mass control volumes, i.e., xj = xJ − 21 ∆x, as d 2 d
illustrated in Figure 4.1. δ\d
x (qu)κ = 2Uκ δq,x q̂κ − Uκ δa,x âκ
hJ = H a`,J ,
This is a rather diffusive choice, made to stabilize the scheme
n
as the staggered conservative variable formulation turns out
ρq`,j ρq n
sκ,j = Sκ aκ,j , ρ`,j , ρ g,j ,
g,j
to provide very little diffusion otherwise. Solving for other
variables, such as phase fractions and velocities, is also
and arithmetic averaging quite common and would entail other differentiations and
result in a different dispersion equation. One may for exam-
wj = 12 (wJ + wJ−1 ) ple look to the example in Liao et al. [2008], although this
example appear to neglect that some of the information in
being used in between data points. The momentum con- the momentum equation is dislocated.
vection term (δx (ρqu)κ )nj is for now kept purely symbolic.
Compressibility effects are dismissed in the linear analysis Example 3 (The Stability of a Roe Scheme). The Roe
and densities again made constant, as in all VKH analyses. scheme is presented in A. A viscous matrix, the Roe matrix,
7
is used in this scheme in place of a scalar viscosity. Let’s Friedrich scheme (Example 1), abbreviated LF, the stag-
split it into a diagonal part and an off-diagonal part: gered upwind scheme solved for conservative variables (Ex-
ample 2), abbreviated UWS, and the Roe scheme (Exam-
∆x -1 0 1/κ ple 3.) The aim of these comparisons is not to establish a
2 L |Λ|L = νI + νT
κ 0 favourite amongst the chosen representations, but to demon-
where strate how the linear theory provides a powerful simulation
support tool. Indeed, multiple considerations are important
+ − + −
ν = ∆x 1 ∆x 1
2 2 |λ | + |λ | , νT = 2 2 |λ | − |λ | when choosing a scheme. Many choices can be made both
stable and accurate if the simulation parameters are collected
Following the previous procedure, we regain the form (3.13), with the aid of the hitherto presented linear theory.
but with
2 ∗ 2
0 (γκ) − (ρ Ur ) 0 2 ∗
1 − γ 2 2 5.1 Initial Conditions
Jr,d = = m y H − ρ U r − κ ,
ρ∗ ρ∗ Disregarding compressibility, the flow development that
Sd0 = γSA` + cdν,νT SQ` − SQg ,
springs out from the initial conditions will generally con-
sist of two waves per wavenumber, as given in theP solution
where (3.4) or (4.4). These solutions show that v̂k0 = p v̂k,p ,
∗ d
ρ∗ δxx
d
(ρ U ) δ xx
each v̂ k,p superimposing one of the two c k,p waves. In or-
γ = 1 − νT and cdν,νT = cdν − νT . der for a simulation to provide only a single wave ck1 ,p1 the
κ δxd κ δxd
initial conditions must be v̂k01 = v̂k1 ,p1 , v̂k60=k1 = 0, where
i
Central difference operators δxd = ∆x sin φ x , v̂k1 ,p1 satisfies (3.7). This was implicitly carried through
d 2
δxx = ∆x 2 (cos φx − 1) are again implied. The vis- in the VKH derivation of Section 3 by the transformation
∂V
cous terms will disappear form cdν,νT if both characteristics ∂A `
â` = v̂, which revealed (3.12). (3.12) implies the trans-
are of the same sign; the predicted wave celerity will be formation ∂V = 1, −(ρ U )∗ T . Thus, after choosing a
∂A` r
very precise as the flow turns unstable. volumetric disturbance â , a pure c disturbance wave
`,k1 k1 ,p1
Roe is obtained by choosing
∂F
In fact, because L-1 |Λ|L equals the Roe matrix ∂V ∗
0 `
Roe v̂2,k 1
= [ρû]g = − ρ U − cdν,k1 ,p1 â0`,k1 . (5.1)
∂F
from (A.1) if both eigenvalues are positive, and − ∂V
if both eigenvalues are negative, and because the Roe matrix Corresponding primitive variables ûκ are found from the
is designed to obey transformation matrix (B.1b).
∂F Roe Figure 5.1 shows a single wavelength â0`,k1 , simulated
(vj+1 − vj ) = fj+1 − fj , twice with an explicit, non-staggered Lax-Friedrich scheme.
∂V j+ 21 First, the initial perturbation is applied only to the phase
the stability of the Roe scheme (A.2) is identical to that of fraction, i.e., û0κ,k ≡ 0. Expression (5.1) is used for the
the simple upwind scheme phase velocities in the second simulation. After a short tran-
( sition period where both waves interact, the fast wave is seen
fj , λ+ > 0, λ− > 0 to dominate the growth of the first simulation. No transition
fj+ 12 = (4.7) period is observed in the second simulation. Indeed, Liao
fj+1 , λ+ < 0, λ− < 0
et al. Liao et al. [2008] demonstrated that the wave growth
in the case of supercritical flow. Then, the growth and celer- of a simulation with fairly random initial conditions quickly
ity equations once more reduce to (3.17) with the upwind dif- turns independent of these and develops according the the
ferentiation δxd = ∆x 1
1 − e−iφx = ∆x
2i φx
sin φ2x e−i 2 and dominant wavelength. A figure similar to 5.1 is also pre-
no net artificial viscosity; ν = 0. sented in Brook et al. [1999/10/10] for gravity driven flows
Equation (3.16) reveals that the VKH criterion (3.18), in collapsible tubes.
where wave growth is at an equilibrium with c = ccrit ∈ R,
coincides with hydraulically critical flow relative to the per- 5.2 Test Case
turbation wave. That is, one of the relative eigenvalues
λ± ± The setup for the computational examples will now be pre-
r = λ − c equals zero at neutral stability. This means
that the Roe scheme is equivalent to (4.7) whenever the VKH sented. This setup is chosen fairly arbitrarily and corre-
wave growth is positive. sponds to the experimental and numerical setup used in
Holmås [2010], Johnson [2005], Akselsen [2016a,b]. The
friction closures τκ and τi are from the Biberg friction model
5 Numerical Tests and Results as presented in Biberg [2007], also described in the other
citations just mentioned. Fixed parameters are presented
Predictions from a number of schemes will here be pre- in Table 2 unless otherwise stated and constitutes a high-
sented, namely the explicit and implicit variants of the Lax- pressure, positively inclined flow. The flow state is chosen
8
10 -2 CFL = 0.95 has been adopted in the presented Roe and lo-
Simulation
cal Lax-Friedrich schemes. One of the phase velocities is
Perturbation amplitude
Analytical
VKH
commonly used in schemes not based on the model eigen-
structure. Following Liao et al. [2008], the liquid velocity is
10 -3
chosen to limit the time step for the staggered upwind and
Lax-Friedrich schemes, ∆t = CFL ∆x/ maxj |u`,j |, with
CFL = 0.5. Implicit scheme simulations are performed by
iterating on the new state with a 0.5 relaxation factor.
10 -4
0 10 20 30 40 50 60 70
time [s] 5.3 Predictions
Figure 5.1: Perturbation wave amplitude maxj {ãn`,j }/A vs. First, Figure 5.2 validates that the theory corresponds pre-
time. cisely to the linear growth of the discrete representations
Comparing single wave simulation with initial conditions and shows the further development into the non-linear range.
v̂k01 = (â0`,k1 , 0)T (plot with initial disturbance) to simu- The simulation domain here consists of 128 cells contain-
lation with initial conditions from (5.1) (plot without initial ing a single wave of the prescribed 30 diameter wavelength.
disturbance); explicit Lax-Friedrich simulation. Subfigure ((a)) show the wave growth by logarithmically
plotting the largest liquid fraction amplitudes. The spa-
tial locations of the wave crest peeks are plotted in Subfig-
such that the flow is weakly unstable according the differ- ure ((b)), providing the wave speed. Initial conditions are set
ential VKH criterion. Truly fixed flow parameters in the to accommodate the most unstable wave, which is in these
incompressible flow simulations are the steady state level cases the fast wave.
height h = 0.2d and mixture velocity Q/A = 3.4m/s. The The presented schemes provide a range of different be-
equivalent mean liquid area fraction is A` /A = 0.142 and haviours. We note immediately from Figure 5.2a that all
the chosen friction closures will yield the steady state super- implicit schemes are significantly more diffusive than their
ficial velocities Q` /A ≈ 0.154 m/s and Qg /A ≈ 3.245 m/s. explicit counterparts, with numerical diffusion dominating
The overall properties of the friction closure does not affect the weak wave growth present in the differential solution.
the linear stability analysis; only their resulting steady state Explicit versions of both the Lax-Friedrich scheme and the
S = 0 and its state derivatives enter into it. In this particular staggered upwind scheme eventually reach a final unstable
case we have SA` = 1.39E6 kg/m6 s2 , SQ` = −9.07E5 kg/ms state in which waves grow until the model is no longer hy-
and SQg = 7.63E4 kg/ms. perbolic and simulations crash. They do so, however, in
Only numerical parameters are varied in the tests provided quite different manners. Where the Lax-Friedrich scheme
in this section. The wavelength is therefore fixed at 30 di- first appears diffusive for then to be dominated by a high-
ameters and the cell lengths are varied. Of course, doing wavenumber instability, the upwind scheme simply overpre-
it the other way around would also be insightful, showing dicts the growth rate of the principle wave. This is further
which wavelengths one can expect to see on any given grid illustrated in Figure 5.3, showing growth rates and snapshots
arrangement. of simulations in which the differential model is stable due to
a lower mixture velocity. The former instability will usually
liquid density ρ` 998 kg/m3 be regarded as a ‘numerical instability,’ commonly identified
gas density ρg 50 kg/m3 by the sudden unphysical high-wavenumber growth. Deter-
liquid dynamic viscosity µ` 1.00E -3 Pa s mining, from visual inspection, whether the latter instabil-
gas dynamic viscosity µg 1.61E -5 Pa s ity is ‘physical or not’ is however not as straight forward as
internal pipe diameter d 0.1 m there are essentially no differences between the natural wave
wall roughness 2E -5 m growth and the growth here attributed to numerical errors.
pipe inclination θ 1° − Lastly, the explicit Roe scheme is in Figure 5.2a seen to
mean level height h 0.02 m accurately match the continuous growth rate of the differ-
mixture velocity Q/A 3.4 m/s ential model. It also developers into a steady roll-wave so-
wavelength λ 3 m lution, which is a valid solution for the differential problem
(see Akselsen [2016a];) Roe schemes are designed to be well
Table 2: Fixed parameters. adopted for strongly non-linear flows.
The dispersion error of a 128 cell wave is very small, as
The time steps are regulated using a CFL number, which seen in Figure 5.2b; wave crest positions are overlapping
makes the time step length proportional to the grid cell for as long as the waves remain in the linear range.
length (see Remark 1.) The spectral radius will typically be
used for selecting the time step length in schemes where the Next we examine the response of the 30 diameter wave to
characteristic information is computed, and the CFL num- changes in the spatial resolution. Figure 5.4 shows the wave
ber chosen close to unity; ∆t = CFL ∆x/ maxj,± |λ± d 1
j | with growth, or pulsation, k =(c ) [ /s] and the wave celerity
9
<(cd ) [m/s]. Both the fast and the slow waves are shown,
a bold line used for the wave with the higher growth rate.
Subfigure ((a)) shows that the Roe scheme gives very accu-
(a) Wave growth: Perturbation wave amplitude maxj {ãn `,j }/A vs. rate growth results for φ ≤ π/32 (using 64 cells or more)
time. and predicts wave growth for all φ. An accurate celerity
10 0 Simulation for the fast wave is observed in Subfigure ((b)) for all φ.
Analytical Roe exp The explicit Lax-Friedrich and implicit staggered upwind
Perturbation amplitude
VKH
UW
e x p schemes start predicting wave growth around φ = π/100,
10 -2
and the implicit Roe and implicit Lax-Friedrich schemes
start doing so around φ = π/210. The explicit upwind
LF exp
10 -4 scheme overpredicts the wave growth everywhere above
UW imp
φ = π/3. Finally, we see that the explicit Lax-Friedrich
LF R o e im
scheme becomes unstable around φ & 23 π, and that it is then
10 -6 imp p
the slow wave that has taken over the growth. In fact, from
0 50 100 150
Subfigure ((b)) we see that the ‘slow’ wave moves faster
time [s] here. This very particular finding is tested and confirmed
in Figure 5.5, where three-celled waves (φx = 23 π) are
(b) Wave celerity: Perturbation peak location vs. time.
300
applied as the initial condition. Two simulations are shown
Wave peak position [m]
Simulation imp imp wherein the initial velocity condition (5.1) is made to
UW Roe
Analytical
e x p accommodate the fast wave in one and the slow wave in
200 VKH Roe
the other. The simulations follow the predicted growth
behaviour precisely, with the slow wave growing and the
p
UW ex LF imp fast wave diminishing. After a while though, also the fast
100
e x p wave simulation becomes unstable as the slow wave grows
LF
from out of numerical inaccuracies. The plotted points are
0
0 50 100 150 200 the maximum amplitudes of the spatial node sets; there
time [s] is some scattering of these points as the simulated waves
are represented by a regularly alternating three-point pattern.
Figure 5.2: Numerical simulations vs. linear theory. Wave-
length 30 d. 128 cells; φx = π/64. Next we look at how the discrete representations respond
to changes in the time step. We have already observed that
there is a significant difference in the stability and diffusivity
of explicit and implicit time step integration. A strong time
step dependence was also noted in Akselsen [2016a] for both
linear and non-linear wave simulations. Figure 5.6 shows the
wave growth and wave celerity as functions of the CFL num-
Perturbation amplitude
0.1423
0 5 10 15 20 25 30
0.1426
Staggered upwind increasing explicitness’ for the Roe and upwind scheme. As
0.1424
noted in Akselsen [2016a], growth predictions seems to be
0.1422
0 5 10 15 20 25 30 accurate in explicit schemes based on characteristic infor-
x/d
mation, in this case the Roe scheme, as the CFL number
Figure 5.3: Wave growth and accompanying snapshots from nears unity. An interpretation of why this is is shown in
unstable Lax-Friedrich and staggered upwind simulations. Figure 5.7; information from the upwind mean state would
The mixture velocity Q/A equals here 3.1 m/s, at which the spread nicely over the cell face during the time step limited
differential model is stable. by CFL ≈ 1. This is particularly so if the cell face fluxes are
dominated by information travelling along the path of the
quickest characteristic, which seem to be case for supercrit-
ical flows.
10
The celerity graphs shown in Figure 5.6b show that the
wave celerity of the Roe scheme becomes increasingly ac-
(a) Wave growth k=(cd ) − [1/s] curate as the time step is reduced. Indeed, the Roe scheme is
1 designed to provide the accurate shock speeds for non-linear
problems. Both centred schemes (Roe and Lax-Friedrich)
LF
ex
UWS exp
provide better estimates of the wave celerity than the up-
p
0
Roe exp wind scheme, whose dispersion error is mostly caused by
k ℑ(cd )
p
UWS im p
LF exp the e−iφx /2 term generated by the spatially asymmetric up-
-1 ex UWS exp
LF
Roe exp wind formulation.
Roe imp p LF imp
im
-2 LF UWS imp
Roe imp (a) Wave growth k=(cd ) − [1/s]
VKH 0.15
-3
0.1 0.1
UWS e
LF exp
xp
k ℑ(cd )
0.05 0.05
Roe exp
k ℑ(cd )
xp p 0
0 LF e p oe im F imp
R L
S im LF exp
UW
-0.05 UWS exp
-0.05 Roe exp
π π/2 π/4 π/8 π/16 π/32 π/64 π/128 π/256 π/512 π/1024
-0.1 LF imp
φx UWS imp
-0.15 Roe imp
(b) Wave celerity <(cd ) − [m/s] VKH
-0.2
LF exp 0 0.2 0.4 0.6 0.8 1
3
LF e
Roe exp
xp
S
2.5
ex
LF imp
(b) Wave celerity <(cd ) − [m/s]
p
LF
2
ex
p UWS imp
2.92
ℜ(cd )
Roe imp
1.5 Roe exp VKH
2.915
1 xp
Se p im
p
2.91
UW im LpF LF exp
S e im
0.5 W Ro
ℜ(cd )
U UWS exp
2.905 Roe exp
0 LF imp
π π/2 π/4 π/8 π/16 π/32 π/64 π/128 π/256 2.9 UWS imp
φx Roe imp
VKH
2.895
Figure 5.4: Linear theory with varying cell lengths ∆x. 30
d wavelength. φx = k ∆x = 2π/(# cells in a wave) 2.89
0 0.2 0.4 0.6 0.8 1
CFL
VKH wave
10 -2 slow
10 -4
fas
tw
av
10 -6
e
11
makes this form of visualization more computationally numerical diffusion errors are often thought of as a symptom
costly than the other plots presented in this section, which of the spatial discretisation alone.
were all explicitly computed. Note that Equation (3.18) is If the wave growth in this example is dominated by the
not valid in the discrete representations because cdν does not time integration then we would expect accurate growth re-
equal cd . A consequence is that the marginal stability of a sults for small time steps ∆t. In fact, since δxd = ∆xi
sin φx
discrete representation is wavelength dependent, while the is purely imaginary, examining the dispersion equation
marginal stability of the differential model is not. (3.13)-(3.15) reveals that cdν equals the critical VKH celerity
exactly at the state of marginal VKH stability. The discrete
growth rates at marginal stability will then be the exact
0.3
VKH growth if also δtd is purely imaginary, which is the
0.25
case if ∆t → 0. Wave growth shown in Subfigure 5.9a for
vanishing time steps is thus very close to the differential
0.2
growth as the considered state is close to the marginally
Qℓ stable state. Spatial discretisation errors are manifested
A 0.15 foremost in the real components of c, i.e., the wave speeds,
LF exp which are often deemed to be of secondary importance.
0.1 UWS exp
Roe exp
LF imp
0.05 UWS imp
Roe imp (a) Wave growth k=(cd ) − [1/s]
VKH
0 expli
2 2.5 3 3.5 4 0.5 cit
Qg
A
0 ∆t → 0
k ℑ(cd )
VKH →0
near φ = π as the simple Lax-Friedrich scheme. ∆t
0.5 licit
imp
So how does the time integration affect the stability and
diffusivity of our solution? Let us examine the influence of
the time discretization on a centred, non-staggered scheme 0
without artificially added viscosity (using ν = 0 in the π π/2 π/4 π/8 π/16 π/32 π/64 π/128
Lax-Friedrich scheme.) Such a scheme, though on a stag- φx
gered grid, was in Liao et al. [2008] deemed the most ac-
Figure 5.9: Non-staggered centred difference scheme with
curate amongst those tested. Figure 5.9 shows the growth
ν = 0.
rates and wave celerities of this centred scheme with an ex-
plicit and implicit time integration, the liquid velocity based
CFL number equalling 0.5. The curves for when the time Figure 5.10 shows plots similar to the celerity plots shown
step approaches zero are also shown. Note first that the back in Section 3, Figure 3.1, where viscous and inviscid
high-wavenumber slow-wave instability of the explicit Lax- Kelvin-Helmholtz celerities were compared under varying
Friedrich scheme is not present here, attributing that phe- gas rates. The plots in Figure 5.10 show the errors form the
nomenon to the artificial viscosity ν. The growth rates of the time integration only, i.e., δtd = δt = −ikc, equivalent to
fast wave in Subfigure ((a)) are near mirror images of each the error as ∆x approaches zero. A somewhat shorter wave,
other, the numerical error being predominantly attributed to one diameter in length, has here been chosen to highlight the
the time step integration. This is important to be aware of; time integration effect, and the time step is ∆t = 0.0025 s.
12
The general trend of the time integration error is most eas- tween numerical and physical instabilities. Discrete stability
ily observed from the thinner lines in Figure 5.10, showing theory was further able to demonstrate the way in which the
the celerities in the inviscid case S ≡ 0. These lines would time discretization affects predicted stability and to indicate
follow the abscissa if not for the error, as in Figure 3.1. The appropriate values for the CFL number.
effect of the time integration error is to curve the celerity This information can aid in choosing reliable simulation
lines about the origin, convexly if the integration is foremost parameters prior to simulation, and may give insight into
directed forwards in time (explicit,) and concavely if it is whether or not simulation results can be considered physi-
foremost directed backwards in time (implicit.) Errors are cal.
thus seen to increase with <(cd ), which for the fast wave
is means that it increases with decreasing Qg /A. Crank-
Nicolson integration, abbreviated ‘C-N’ in the figure, is seen References
to be quite accurate in this case. A. H. Akselsen. Characteristic methods and Roe’s method for the incom-
pressible two-fluid model for stratified pipe flow. Under review in the
0.5 International Journal of Multiphase Flow, April 2016a.
0.2 D. Barnea. Stability analysis of annular flow structure, using a discrete form
explicit
of the ‘two-fluid model’. International Journal of Multiphase Flow, 17
0.1 explicit (6):705 – 16, 1991/11/. ISSN 0301-9322. URL http://dx.doi.
ℑ(cd ) org/10.1016/0301-9322(91)90052-5.
0
Figure 5.10: Complex celerity c under varying superficial D. Biberg. A mathematical model for two-phase stratified turbu-
lent duct flow. Multiphase Science and Technology, 19(1):1 – 48,
gas velocity Qg /A, plotted with time integration error only 2007. ISSN 0276-1459. URL http://dx.doi.org/10.1615/
d
(δt = δt .) Explicit, implicit and Crank-Nicolson time in- MultScienTechn.v19.i1.10.
tegrations are shown, cf. Table 1, along with the differ-
ential VKH celerity. Thinner lines (dot-dashed) show the B.S. Brook, S.A.E.G. Falle, and T.J. Pedley. Numerical solutions for un-
steady gravity-driven flows in collapsible tubes: evolution and roll-wave
corresponding explicit and implicit IKH celerities (where instability of a steady state. Journal of Fluid Mechanics, 396:223 –
S ≡ 0.) The considered wave is one diameter long and 56, 1999/10/10. ISSN 0022-1120. URL http://dx.doi.org/10.
∆t = 0.0025 s. State parameters and markers for the super- 1017/S0022112099006084.
ficial gas velocities are the same as in Figure 3.1 J. H. Ferziger and M. Peric. Computational Methods for Fluid Dynamics.
Springer, Berlin, 1999.
13
Jun Liao, Renwei Mei, and James F. Klausner. A study on the nu- where
merical stability of the two-fluid model near ill-posedness. Inter- +
λ
national Journal of Multiphase Flow, 34(11):1067 – 1087, 2008.
|Λ| = 0− , and L=
1 1/κ
ISSN 03019322. URL http://dx.doi.org/10.1016/j. 0 λ 1 −1/κ
ijmultiphaseflow.2008.02.010.
Himanshu Pokharna, Michitsugu Mori, and Victor H. Ransom. Regular- are the absolute eigenvalue and eigenvector matrices of
Roe
ization of two-phase flow models. J. Comput. Phys., 134(2):282–295, ∂F
, respectively. These are evaluated from (2.6) and
July 1997. ISSN 0021-9991. doi: 10.1006/jcph.1997.5695. URL ∂V 1
j+ 2
http://dx.doi.org/10.1006/jcph.1997.5695. e 0 replacing H0 .
(2.7) at the mean state w with H
H.B. Stewart. Stability of two-phase flow calculation using two-
fluid models. Journal of Computational Physics, 33(2):259 – 70,
1979. ISSN 0021-9991. URL http://dx.doi.org/10.1016/ B Transformation Matrices
0021-9991(79)90020-2.
Conversion between primitive variables w =
Y. Taitel and A.E. Dukler. A model for predicting flow regime transitions T
(a` , ag , u` , ug )
in horizontal and near horizontal gas-liquid flow. AIChE Journal, 22(1): and conservative variables v =
T
47 – 55, 1976/01/. ISSN 0001-1541. URL http://dx.doi.org/ `
10.1002/aic.690220105.
a` , [ρu]g of the incompressible system (obeying
(2.4)) is often useful. Transformation matrices for these are
J. VonNeumann and R. D. Richtmyer. A method for the numer-
ical calculation of hydrodynamic shocks. Journal of Applied ∂V 1 0 0 0
Physics, 21(3):232–237, 1950. doi: http://dx.doi.org/10.1063/1. = , (B.1a)
1699639. URL http://scitation.aip.org/content/aip/ ∂W 0 0 ρ` −ρg
A` Ag ρ ∗
journal/jap/21/3/10.1063/1.1699639. 0
∂W 1 −A` Ag ρ∗ 0
= . (B.1b)
∂V A` Ag ρ ∗ ρg (Ug − U` ) Ag
A A Roe Scheme ρ` (Ug − U` ) −A`
∂F Roe
at each cell face xj+ 12 . ∂V j+ 12
is the Roe-average of the
Jacobian (2.5), constant in each Riemann problem. Using
arithmetic mean notation w = 12 (wj +wj+1 ), the Roe matrix
of model (2.3) is
Roe
∂F ∂f
= ;
∂V j+ 12 ∂v w,He 0
and
hj+1 −hj
(
e0 = a`,j+1 −a`,j , a`,j+1 6= a`,j
H 0
H (a` ), otherwise
replacing H0 .
The flux solution of (A.1) may be written
14