/centre for analysis, scientific computing and applications Unsteady Problems Scalar Conservation Laws and Godunov’s Scheme K. Malakpoor CASA Center for Analysis, Scientific Computing and Applications Department of Mathematics and Computer Science 7-July-2005
38
Embed
Scalar Conservation Laws and Godunov's Scheme · GF NPY_]PQZ]LYLWd^T^ ^NTPY_TQTNNZX[`_TYRLYOL[[WTNL_TZY^ Unsteady Problems Scalar Conservation Laws and Godunov’s Scheme K. …
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
/centre for analysis, scientific computing and applications
Unsteady Problems
Scalar Conservation Laws and Godunov’sScheme
K. Malakpoor
CASACenter for Analysis, Scientific Computing and Applications
Department of Mathematics and Computer Science
7-July-2005
/centre for analysis, scientific computing and applications
Unsteady Problems
Conservation equations. Mass conservation
ρt +∇ · (ρv) = 0.
Two-dimensional Euler equation
ut + f1(u)x + f2(u)y = 0,
u =
ρ
ρν1ρν2e
, f1(u) =
ρν1
ρν21 + p
ρν1ν2ν1(e + p)
f2(u) =
ρν2
ρν1ν2ρν2
2 + pν2(e + p)
p = (γ − 1)ρε, e = ρε + 1/2ρ(ν2
1 + ν22).
/centre for analysis, scientific computing and applications
Unsteady Problems
Conservation equations. Mass conservation
ρt +∇ · (ρv) = 0.
Two-dimensional Euler equation
ut + f1(u)x + f2(u)y = 0,
u =
ρ
ρν1ρν2e
, f1(u) =
ρν1
ρν21 + p
ρν1ν2ν1(e + p)
f2(u) =
ρν2
ρν1ν2ρν2
2 + pν2(e + p)
p = (γ − 1)ρε, e = ρε + 1/2ρ(ν2
1 + ν22).
/centre for analysis, scientific computing and applications
Unsteady Problems
Finite Volume Schemes
ut +∇ · f (u) = 0 in Ω× [0, T ]
Discretization of space
Ci
x
t
1−ix ix 1+ix
1+nt
nt
Ω =⋃
Ωi , Ωj ∩ Ωk = ∅, forj 6= k
boundary ∂Ωj piecewise smooth.
/centre for analysis, scientific computing and applications
Unsteady Problems
Finite VolumeIntegration over Ωj × [tn, tn+1]
|Ωj |un+1j = |Ωj |un
j −∫ tn+1
tn
∫∂Ωj
f (u(x , t)) · ndSdt
Finite Volume Scheme in One-DimensionIntegrating over [xi−1/2, xi+1/2]× [tn, tn+1]∫ tn+1
tn
∫ xi+1/2
xi−1/2
ut(x , t) +
∫ tn+1
tn
∫ xi+1/2
xi−1/2
f (u(x , t))x dxdt = 0.
/centre for analysis, scientific computing and applications
Unsteady Problems
Finite VolumeIntegration over Ωj × [tn, tn+1]
|Ωj |un+1j = |Ωj |un
j −∫ tn+1
tn
∫∂Ωj
f (u(x , t)) · ndSdt
Finite Volume Scheme in One-DimensionIntegrating over [xi−1/2, xi+1/2]× [tn, tn+1]∫ tn+1
tn
∫ xi+1/2
xi−1/2
ut(x , t) +
∫ tn+1
tn
∫ xi+1/2
xi−1/2
f (u(x , t))x dxdt = 0.
/centre for analysis, scientific computing and applications
Unsteady Problems
Finite Volume Scheme in Conservation formWe know that the weak solution satisfies in∫ xi+1/2
xi−1/2
[u(x , tn+1)− u(x , tn+1)] = −∫ tn+1
tn
[f (u(xi+1/2, t))dt − f (u(xi−1/2, t))dt
]
un+1i = un
i −∆t∆x
(gni+1/2 − gn
i−1/2)
with
uni approximates
1∆x
∫ xi+1/2
xi−1/2
u(x , tn)dx ,
gi+1/2 approximates1∆t
∫ tn+1
tnf (u(xi+1/2, t))dt ,
/centre for analysis, scientific computing and applications
Unsteady Problems
Linear Advection Equation
ut + aux = 0, a ∈ R
Solution:
C : x = x(t) withdx(t)
dt= a, (characteristics)
A function u = u(x(t), t) satisfies
ddt
u(x(t), t) = ut + aux
u Solution ⇒ u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Linear Advection Equation
ut + aux = 0, a ∈ R
Solution:
C : x = x(t) withdx(t)
dt= a, (characteristics)
A function u = u(x(t), t) satisfies
ddt
u(x(t), t) = ut + aux
u Solution ⇒ u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Solution of Initial Value Problem
u(x , 0) = q(x) for all x ∈ R
u(x , t) = q(x − at) for all x , t .
/centre for analysis, scientific computing and applications
Unsteady Problems
Upwind Scheme
x
t
1−ix ix 1+ix
1+nt
nt
a > 0 :un+1
i − uni
∆t+ a
uni − un
i−1
∆x= 0
stable for:∆t∆x
a < 1 (CFL-Condition)
/centre for analysis, scientific computing and applications
Unsteady Problems
CIR-MethodCourant, Isaacson, Rees (1946)
un+1i = un
i − a∆t∆x
un
i − uni−1 for a > 0,
uni+1 − un
i for a < 0,
Reformulation
un+1i = un
i − a∆t
2∆x(un
i+1 − uni−1), central difference
+|a|∆t2∆x
(uni+1 − 2un
i + uni−1), dissipation
/centre for analysis, scientific computing and applications
Unsteady Problems
CIR-MethodCourant, Isaacson, Rees (1946)
un+1i = un
i − a∆t∆x
un
i − uni−1 for a > 0,
uni+1 − un
i for a < 0,
Reformulation
un+1i = un
i − a∆t
2∆x(un
i+1 − uni−1), central difference
+|a|∆t2∆x
(uni+1 − 2un
i + uni−1), dissipation
/centre for analysis, scientific computing and applications
Unsteady Problems
Reformulation of the CIR-Method, Godunov’s Ideaun piecewise constant
uni (x) = un
i for x ∈ [xi−1/2, xi+1/2].
/centre for analysis, scientific computing and applications
Unsteady Problems
1.Solve the initial value problemut + aux = 0, u(x , 0) = un(x), for x ∈ Run(x) = un
i for x ∈ [xi−1/2, xi+1/2]
2. Average the exact solution
uni :=
1∆x
∫ xi+1/2
xi−1/2
u(x ,∆t)dx
CFL-condition:∆t∆x
a ≤ 1
/centre for analysis, scientific computing and applications
Unsteady Problems
1.Solve the initial value problemut + aux = 0, u(x , 0) = un(x), for x ∈ Run(x) = un
i for x ∈ [xi−1/2, xi+1/2]
2. Average the exact solution
uni :=
1∆x
∫ xi+1/2
xi−1/2
u(x ,∆t)dx
CFL-condition:∆t∆x
a ≤ 1
/centre for analysis, scientific computing and applications
Unsteady Problems
Reformulation of the CIR-MethodIntegration over [xi−1/2, xi+1/2]× [tn, tn+1]∫ tn+1
tn
∫ xi+1/2
xi−1/2
u(x , t) dxdt +
∫ tn+1
tn
∫ xi+1/2
xi−1/2
au(x , t) dxdt = 0
∆xun+1i −∆xun
i = ∆tgni+1/2 −∆tgn
i−1/2
with
uni approximates
1∆x
∫ xi+1/2
xi−1/2
u(x , tn)dx ,
gi+1/2 approximates1∆t
∫ tn+1
tnau(xi+1/2, t)dt ,
numerical flux: gi+1/2 = g(ui , ui+1).
/centre for analysis, scientific computing and applications
Unsteady Problems
Reformulation of the CIR-MethodIntegration over [xi−1/2, xi+1/2]× [tn, tn+1]∫ tn+1
tn
∫ xi+1/2
xi−1/2
u(x , t) dxdt +
∫ tn+1
tn
∫ xi+1/2
xi−1/2
au(x , t) dxdt = 0
∆xun+1i −∆xun
i = ∆tgni+1/2 −∆tgn
i−1/2
with
uni approximates
1∆x
∫ xi+1/2
xi−1/2
u(x , tn)dx ,
gi+1/2 approximates1∆t
∫ tn+1
tnau(xi+1/2, t)dt ,
numerical flux: gi+1/2 = g(ui , ui+1).
/centre for analysis, scientific computing and applications
Unsteady Problems
Scalar Conservation Laws
ut + f (u)x = 0,
Quasilinear form:
ut + a(u)ux = 0
Example: Burger’s equation, f (u) =12
u2
ut + uux = 0
Characteristics: C : x = x(t) withdf (u)
du= a(u)
u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Scalar Conservation Laws
ut + f (u)x = 0,
Quasilinear form:
ut + a(u)ux = 0
Example: Burger’s equation, f (u) =12
u2
ut + uux = 0
Characteristics: C : x = x(t) withdf (u)
du= a(u)
u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Scalar Conservation Laws
ut + f (u)x = 0,
Quasilinear form:
ut + a(u)ux = 0
Example: Burger’s equation, f (u) =12
u2
ut + uux = 0
Characteristics: C : x = x(t) withdf (u)
du= a(u)
u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Scalar Conservation Laws
ut + f (u)x = 0,
Quasilinear form:
ut + a(u)ux = 0
Example: Burger’s equation, f (u) =12
u2
ut + uux = 0
Characteristics: C : x = x(t) withdf (u)
du= a(u)
u = constant along C.
/centre for analysis, scientific computing and applications
Unsteady Problems
Riemann ProblemExample 1:
ut + uux = 0, u(x , 0) =
1, x < 0,
−1, x > 0.
t
1−=ru1=lu
1−=t
x1=
t
x
evawkcohs
/centre for analysis, scientific computing and applications
Unsteady Problems
Riemann ProblemExample 2:
ut + uux = 0, u(x , 0) =
−1, x < 0,
1, x > 0.
x
t
1=ru1−=lu
evawnoitcaferar
/centre for analysis, scientific computing and applications
Unsteady Problems
Solution of the Riemann problem
Case f ′′(u) > 0,
ul > ur : Shock wave u(x , t) =
ul , x/t < s,
ur , x/t > s.with
s =f (ur )− f (ul)
ur − ul.
ul < ur : rarefaction wave
u(x , t) =
ul , x/t < a(ul),
ur , x/t > a(ur ),
a−1(x/t), else
/centre for analysis, scientific computing and applications
Unsteady Problems
Solution of the Riemann problem
Case f ′′(u) > 0,
ul > ur : Shock wave u(x , t) =
ul , x/t < s,
ur , x/t > s.with
s =f (ur )− f (ul)
ur − ul.
ul < ur : rarefaction wave
u(x , t) =
ul , x/t < a(ul),
ur , x/t > a(ur ),
a−1(x/t), else
/centre for analysis, scientific computing and applications
Unsteady Problems
Godunov’s Method:
un+1i = un
i −∆t∆x
(gni+1/2 − gn
i−1/2)
with the numerical flux
g(ul , ur ) =
f (ul), for ul > ur , s > 0,
f (ur ), for ul > ur , s < 0,
f (ul), for ul < ur , a(ul) > 0,
f (ur ), for ul < ur , a(ur ) < 0,
a−1(0), else.
with ul := ui and ur := ui+1
/centre for analysis, scientific computing and applications
Unsteady Problems
Higher Order, Generalized Godunov’s Scheme
To compute the numerical flux gi+1/2, one has to solve theRiemann problem ut + f (u)x = 0, t ≥ tn,
u(x , tn) =
un
i + (x − xi)sni , x < xi+1/2,
uni+1 + (x − xi+1)sn
i+1, x > xi+1/2,
where sni and sn
i+1 called slopes, are constants.
x
nu
+)1-i(u-iu
iu-)1i(u +
+iu
/centre for analysis, scientific computing and applications