Well Balanced CU Scheme
Well Balanced CU Scheme
Submitted by
Subhash Meena
Under the supervision of
Prof. Harish Kumar
6 Well-Balanced Evolution 8
7 Implementation 9
12 Implementation 22
14 Conclusion 39
15 References 40
2
1 Introduction
In this project we aim to implement a second order well balanced central
upwind scheme for the Euler equation of gas dynamics with gravitation. The
Euler equations of gas dynamics with gravitation, which can be written in
the two-dimensional (2-D) case as:-
where
q = (ρ, ρu, ρv, E)t is a vector of conservative variables,
F (q)x = (ρu, ρu2 + p, ρuv, u(E + p))t
G(q)y = (ρv, ρuv, ρv2 + p, v(E + p))t are the fluxes in the x- and y-directions
S(q) = (0, −ρΦx, −ρΦy, −ρuΦx − ρuΦy)t is the source term.
ρ = density
u = velocity in x direction
v = velocity in y direction
E = total energy
p = pressure
Φ = time-independent linear gravitational potential (in y direction g, in x
direction 0)
• To overcome this difficulty, one can use very fine grid, but in many
physically relevant situations, this may be unaffordable.
3
Z
w = p + R, R(y, t) = g ρ()d
4
4 Well Balanced Reconstruction
Implementation of semi-discrete CU scheme is the following system of ODEs
b+
k+ 1
N
G(qK ) − b− GS
k+ 1 q+1 S
Gk+ 1 = 2 2
+ βk+ 1 (qk+1 − qkN )
2 b+
k+ 1
− b−
k+ 1
2
2 2
b+ b−
k+ 1 k+ 1 2 2
βk+ 1 =
2 b+
k+ 1
− b−
k+ 1
2 2
N ∆y
qK e k+ 1 − 0) = q¯k +
= q(y (qy )k
2 2
S ∆y
qK+1 e k+ 1 + 0) = q¯k +
= q(y (qy+1 )k
2 2
(qy ) are computed using a nonlinear limiter applied to the cell averages (q¯k ).
!
q̄k+1 − q̄k q̄k+1 − q̄k−1 q̄k − q̄k−1
(qy )k = minmod θ , ,θ
∆y 2∆y ∆y
where the minmod function is defined by
5
minmod(z1 , z2 . . . ) = if zi < 0 ∀i then max(zi )
else 0
b+
k+ 1
= max(vkN + cN S S
k , vk+1 + ck+1 , 0)
2
b−
k+ 21
= min(vkN − cN S S
k , vk+1 − ck+1 , 0)
ρv
where the velocity vkN and speed of sound cN
K are obtained using v = ρ and
c2 = γp
ρ
and the pressure is obtained using EOS.
The mentioned implementation would not be able to preserve steady state
solutions.
(ρv)y = 0,
(ρv 2 + w)y = 0,
(v(E + p))y = −ρvg.
The main idea is to reconstruct equilibrium variables (ρ; ρv; w) rather than
(ρ; ρv; E). For the first two components above mentioned scheme is used to
obtain the same piecewise linear reconstructions as before, ρ̄(y) and ρv(y)
¯
N,S N,S
and compute the corresponding point values of ρ and v and then obtain
N,S ρv N,S
v = ρN,S To reconstruct the third equilibrium variable w, The point values
of R is computed by integrating the piecewise linear reconstruction of ρ,
6
X
q(y)
e = (q̄k + (qy )k (y − yk )).χCk (y)
k
Then, the point values of R at the cell interfaces and cell centers are
i=k
X
Rk+ 1 = g∆y ρ̄i
2
i=kL
and
i=k
X ∆y ∆y 2
Rk = g∆y ρ̄i + g ρ¯k − g (ρy )k
i=kL 2 8
wk = pk + Rk
Finally, the point values of p needed for computation of numerical fluxes are
pN N
k = wk − Rk+ 1 2
7
pSk = wkS − Rk− 1
2
The value of R relates to each other and are computed recursively using the
relation
1
RkL − = 0,
2
Rk+ 1 = Rk− 1 + g∆y ρ¯k ,
2 2
∆y ∆y 2
Rk = Rk− 1 + g ρ¯k − g (ρy )k .
2 2 8
where k = kL , . . . .., kR
6 Well-Balanced Evolution
The cell-averages of q̄ are evolved in time according to the following system
of ODEs:
dq̄ Gk+ 1 − Gk− 1
=− 2 2
+ S¯k
dt ∆y
then, the second and third components of the numerical fluxes G are com-
puted the same way
−
b+
k+ 1
(ρN N 2 N S S 2 S
k (vk ) + wk ) − bk+ 1 (ρk+1 (vk+1 ) + wk+1 )
(2)
Gk+ 1 = 2 2
+βk+ 1 ((ρv)Sk+1 −(ρv)N
k )
2 b+
k+ 1
− b−
k+ 1
2
2 2
−
b+ v N (EkN + pN
k+ 1 k
S S S
k ) − bk+ 1 vk+1 (Ek+1 + pk+1 )
(3) S
Gk+ 1 = 2 2
+ βk+ 1 (Ek+1 − EkN )
2 b+
k+ 1
− b−
k+ 1
2
2 2
−
b+
k+ 1
(ρv)N S
k − bk+ 1 (ρv)k+1 |wk+1 − wk | ykR + 12 − ykL − 21
!
(1)
Gk+ 1 = 2 2
+βk+ 1 H · ((ρ)Sk+1 −(ρ)N
k )
2 b+
k+ 1
− b−
k+ 1
2 ∆y maxk {wk }
2 2
8
very close to 1 elsewhere. This is done in order to guarantee the well-balanced
property of the scheme. On the other hand, the modification of the original
CU flux is quite minor since H is very close to 1 unless is very small.
7 Implementation
1. ShockTube Probelm :- We Solved the 1D System with g = 1 in the
computational domain [0,1] using the following initial data:-
(ρ(y, 0), v(y, 0), p(y, 0)) = (0.125, 0, 0.1) if y > 0.5
This boundary conditions are implemented using :-
Computed the solution for N=100, and plot the solution at T = 0.2 as
following :-
9
(Results for Well Balanced Scheme at T = 0.2)
10
(Results for Non Well Balanced Scheme at T = 0.2)
In the implementation both the schemes are capable to capture the solu-
tions.
11
2. Isothermal Equilibrium Solution :- In this implementation, the ability
of the proposed CU scheme to accurately capture small perturbations of the
steady state is tasted.
now introduce a small initial pressure perturbation and consider the sys-
tem subject to following initial data:-
2
ρ(y, 0) = e−y , v(y, 0) = 0, p(y) = ge−y + τ e−100(y−0.5)
pressure perturbation constant is taken very small, first as 0.01 and then
0.0001 and obtained pressure perturbation is computed using N =200 and N
= 2000 as follows:-
12
(Results for Well Balanced Scheme at T = 0.25 and τ = 0.01)
13
(Results for Well Balanced Scheme at T = 0.25 and τ = 0.0001)
14
(Results for Non Well Balanced Scheme at T = 0.25 and τ = 0.01)
15
(Results for Non Well Balanced Scheme at T = 0.25 and τ = 0.01)
Here, Well balanced schemes are able to capture the results in both the
cases for high perturbation constant as well as for lower perturbation constant
and in both the grid size n = 200 and n = 2000, where on the other side it
is difficult for non well balanced scheme to capture small perturbation when
n = 200.
16
8 Second-Order Semi-Discrete Central-Upwind
Scheme (2 D)
Well balanced semi-discrete CU scheme for 2-D Euler equations with gravi-
tation can be written as :-
ρt + (ρu)x + (ρv)y = 0,
17
10 Well Balanced Reconstruction
In this scheme like in the case of 1-d, only the first three components of q
(ρ, ρu, ρv) are reconstructed :
and the point values at the cell interfaces are (xk+ 1 ,yk ) and (xj , yk+ 1 ) :
2 2
∆x (i)
(i)
(q (i) )E (i)
j,k = q (x(j+ 1 − 0, yk ) = q̄j.k +
g
(q )j.k
2 2 x
(i) ∆x (i)
(q (i) )W (i)
j,k = q (x(j− 12 + 0, yk ) = q̄j.k −
g
(q )j.k
2 x
(i) ∆y (i)
(q (i) )N (i)
j,k = q (xj , y(k+ 12 − 0) = q̄j.k +
g
(q )j.k
2 y
(i) ∆y (i)
(q (i) )Sj,k = qg
(i) (x , y
j (k− 1 + 0) = q̄j.k − (q )j.k
2 2 y
where the slopes (qx(i) )j,k and (qy(i) )j,k are computed using a nonlinear lim-
iter.
(i) (i) (i) (i) (i) (i)
q̄ − q̄j,k q̄j+1,k − q̄j−1,k q̄j,k − q̄j−1,k
(qx(i) )jk = minmod θ j+1,k , ,θ
∆x 2∆x ∆x
(i) (i) (i) (i) (i) (i)
q̄ − q̄j,k q̄j,k+1 − q̄j,k−1 q̄j,k − q̄j,k−1
(qy(i) )jk = minmod θ j,k+1 , ,θ
∆y 2∆y ∆y
18
The one sided local speeds of propogation in the x and y direction respec-
tively are computed in further way :-
a+
j+ 1 ,k
= max(uE E W W
j,k + cj,k , uj+1,k + cj+1,k , 0)
2
a−
j+ 21 ,k
= min(uE E W W
j,k − uj,k , uj+1,k − cj+1,k , 0)
b+
j,k+ 1
N
= max(vj,k + cN S S
j,k , vj,k+1 + cj,k+1 , 0)
2
b−
j,k+ 12
N
= min(vj,k − cN S S
j,k , vj,k+1 − cj,k+1 , 0)
ρv
where the velocities uE W N S
j,k , uj+1,k , vj,k , vj,k+1 are obtained using v = ρ
and
c2 = γp
ρ
∆x ∆x
pE j, k = pj,k + 2
(px )j,k , pW j, k = pj,k − 2
(px )j,k
where
pE
j,k ρE
E
Ej,k = + j,k ((uE 2 E 2
j,k ) + (vj,k ) )
γ−1 2
pW
j,k ρW
W
Ej,k = + j,k ((uW 2 W 2
j,k ) + (vj,k ) )
γ−1 2
19
for computing E in y direcction it is done as the same way as in 1-D case.
First compute R at the cell interfaces and centres:-
Rj,kL − 1 = 0;
2
1
Rj,k+ 1 = Rj,k − + g∆y ρ̄j,k ,
2 2
1 g∆y g(∆y)2
Rj,k = Rj, k − + ρ̄j,k − (ρy )j,k
2 2 8
and wj,k is computed as follow :-
wj,k = pj,k + Rj,k .
Next reconstructing w in y-direction yields
N ∆y
wj,k = wj,k + (wy )j,k ,
2
S ∆y
wj,k = wj,k − (wy )j,k ,
2
where
!
w̄j,k+1 − w̄j,k w̄j,k+1 − w̄j,k−1 w̄j,k − w̄j,k−1
(wy )j,k = minmod θ , ,θ
∆y 2∆y ∆y
Finally the obtained point values are of w are used to evaluate the corre-
sponding point values of p by:
pN N
j,k = wj,k − Rj,k+ 1 2
pSj,k = wj,k
S
− Rj,k− 1
2
pN
j,k ρN
N
Ej,k = + j,k ((uN 2 N 2
j,k ) + (vj,k ) )
γ−1 2
pSj,k ρS
S
Ej,k = + j,k ((uSj,k )2 + (vj,k
S 2
))
γ−1 2
20
11 Well Balanced Evolution
The cell average of q̄ are evolved with the time according to the following
System of ODEs:-
a+ a−
k+ 1 k+ 1 2 2
αk+ 1 =
2 a+
k+ 1
− a−
k+ 1
2 2
b+ b−
k+ 12 k+ 12
βk+ 1 =
2 b+
k+ 21
− b−k+ 12
−
a+
j+ 1 ,k
(ρu)E W
j,k − aj+ 1 ,k (ρu)j+1,k |wj+1,k − wj,k | xkR + 21 − xkL − 12
!
(1)
Fj+ 1 ,k = 2 2
+αj+ 1 ,k H · (ρW E
j+1,k −ρj,k )
2 a+
j+ 12 ,k
− a−
j+ 12 ,k
2 ∆x maxj,k {wj,k }
−
a+ (ρE (uE )2 + pE
j+ 1 ,k j,k j,k
W W 2 W
j,k ) − aj+ 1 ,k (ρj+1,k (uj+1,k ) + pj+1,k )
(2)
Fj+ 1 ,k = 2 2
+αj+ 1 ,k ((ρu)W E
j+1,k −(ρu)j,k )
2 a+
j+ 1 ,k
− a−
j+ 1 ,k
2
2 2
a+ (ρE uE v E ) − a−
j+ 1 ,k j,k j,k j,k
(ρW uW v W )
j+ 1 ,k j+1,k j+1,k j+1,k
(3)
Fj+ 1 = 2 2
+αj+ 1 ,k ((ρv)W E
j+1,k −(ρv)j,k )
2 a+
j+ 1 ,k
− a−
j+ 1 ,k
2
2 2
−
a+ uE (Ej,k
j+ 1 ,k j,k
E
+ pE W W W
j,k ) − aj+ 1 ,k uj+1,k (Ej+1,k + pj+1,k )
(4) W E
Fj+ 1 ,k = 2 2
+αj+ 1 ,k (Ej+1,k −Ej,k )
2 a+
j+ 1 ,k
− a−
j+ 1 ,k
2
2 2
21
−
b+
j,k+ 1
(ρv)N S
j,k − bj,k+ 1 (ρv)j,k+1 |wj,k+1 − wj,k | ykR + 12 − ykL − 12
!
(1)
Gj,k+ 1 = 2 2
+βj,k+ 1 H · ((ρ)Sj,k+1 −(ρ)N
j,k )
2 b+
j,k+ 21
− b−
j,k+ 12
2 ∆y maxj,k {wj,k }
−
b+
j,k+ 1
(ρN N N S S S
j,k uj,k vj,k ) − bj,k+ 1 (ρj,k+1 uj,k+1 vj,k+1 )
(2)
Gj,k+ 1 = 2 2
+βj,k+ 1 ((ρu)Sj,k+1 −(ρu)N
j,k )
2 b+
j,k+ 12
− b−
j,k+ 12
2
−
b+
j,k+ 1
(ρN N 2 N S S 2 S
j,k (vj,k ) + wj,k ) − bj,k+ 1 (ρj,k+1 (vj,k+1 ) + wj,k+1 )
(3)
Gj,k+ 1 = 2 2
+βj,k+ 1 ((ρv)Sj,k+1 −(ρv)N
j,k )
2 b+
j,k+ 12
− b−
j,k+ 12
2
−
b+ v N (Ej,k
j,k+ 1 j,k
N
+ pN S S S
j,k ) − bj,k+ 1 vj,k+1 (Ej.k+1 + pj,k+1 )
(4) S N
Gj,k+ 1 = 2 2
+βj,k+ 1 (Ej,k+1 −Ej,k )
2 b+
j,k+ 1
− b−
j,k+ 1
2
2 2
12 Implementation
1. Isothermal Equilibrium Solution : In this implementation we solved the
2-D system with subjected to initial conditions:-
ρ0 gy
−
ρ(x, y, 0) = ρ0 e p0
ρ0 gy
−
p(x, y, 0) = p0 e p0
u(x, y, 0) = v(x, y, 0) = 0
where ρ0 = 1.21 and p0 = 1 and the solid boundary conditions imposed
at the edges of unit square [0 , 1]*[0 , 1].
A smalll perturbation to the initial pressure is being added
−p0 gy −100p0 g
( ((x−0.3)2 +(y−0.3)2 )
p(x, y, 0) = p0 e p0
+ ηe p0
22
(Results for Well Balanced Scheme at T = 1.5 and n = 200*200)
23
(Results for Well Balanced Scheme at T = 1.5 and n = 100*100)
24
(Results for Well Balanced Scheme at T = 1.5 and n = 50*50)
25
(Results for Non Well Balanced Scheme at T = 1.5 and n = 100*100)
26
2. Explosion :- In the second 2-D example, performance of well balanced
scheme and non well balance scheme is compared in an explosion setting and
demonstrated non well balanced shock wave generated by non well balanced
scheme with g = 0.118 and in the computational domain [0,3]*[0,3] subject
to the following initial data:-
ρ(x, y, 0) = 1
u(x, y, 0) = 0
p(x, y, 0) = 1 − gy + 0.005, given(x − 1.5)2 + (y − 1.5)2 < 0.01
p(x, y, 0) = 0otherwise
at different times expansion of gas due to heat generation in captured in
this manner :-
27
(Results for Well Balanced)
28
(Results for Well Balanced)
29
For Isothermal Equilibrium problem Well Balanced Scheme can capture
the small perturbation much accurately in all the cases implemented where
Non Well Scheme tends to get the small perturbation and becomes better
in case of using 200 cells but still Well Balanced is more accurate. and for
the explosion example also Well balanced scheme accurately captures the
behaviour of expansion of gas while Non well balanced scheme shifted from
results.
We consider the the potential W(x) = x with solid wall boundary condi-
tions. In the observations we get that well balanced scheme as well as non
well balanced scheme is able to capture the results. :-
30
(Density)
(Velocity)
31
(Pressure)
(Temperature)
32
2. Small Perturbation Test :- Well balanced scheme advantage is that it
is able to capture the solution close to stationary solution with significant
accuracy. The initial profile for this implementation is,
x
− 2RT
ρ(x) = ρ0 e 0 ,
v1 = v2 = 0
−x 100(x−0.5)2
− 2RT −
p11 = ρ0 RT0 e 0 + e 2RT0
, p12 = 0, p22 = 1
,
where p0 = 1 , R = 1, T0 = 1 and = 10−5
The numeric results at the final time t = 0.25 are presented using 100,200,400,800,1000
cells. Well balanced scheme is able to capture the solutions accurately in this
test.
33
we consider a small perturbation of stationary isothermal initial data in p1 1
component ie:-
W (x)
− 2RT
ρ(x) = ρ0 e 0 , v1 = v2 = 0
W (x) 100(x−0.5)2
− 2RT −
p11 = ρ0 RT0 e 0 + e 2RT0
, p12 = 0, p22 = 1
,
with discontinuous potential,
W(x) = 2 when 0.4 < x < 0.6 , 1 otherwise.
with p0 = 1, R = 1, T0 = 1 . The perturbation parameter has been
taken smaller for different comparisons. The numerical results are present
for 100,500,1000 cells with the final time t = 0.25 = 10−5
34
(Non Well Balanced Scheme)
4. Sod ShockTube Test :- In the Sod ShockTube case the domain is con-
sidered to be [0,1] with solid boundary conditions and the initial discontinuity
conditions are as following :-
35
(Density)
(Pressure p11 )
36
(Pressure p12 )
(Pressure p22 )
37
(Velocity in x direction)
(Velocity in y direction)
38
14 Conclusion
In this work we have scrutinized various implementations for well balanced
scheme as well as non well balanced schemes for Euler equations and Ten Mo-
ment Gaussian Closure and compared their significant results. We observed
that Well balanced schemes were able to capture solutions more accurately
preserving steady state conditions while Non well balanced schemes were
leading to oscillations and were not able to capture the small added uncer-
tainties
39
15 References
• Asha Meena, Harish Kumar, A Well-balanced Scheme for Ten-Moment
Gaussian Closure Equations with Source term
40