NABUCO, Lecture 3, February 01/02/2018
Numerical Solution of Initial Boundary ValueProblems
Jan NordstromDivision of Computational Mathematics
Department of Mathematics
Multiple dimensions: FDM, FVM, DG
• All the methods discussed below are of SBP-SAT type.• Stability and conservation should be guaranteed.• Overlapping/sliding methods not included.
FDM on SBP-SAT form
Kronecker products
For arbitrary matrices A ∈m×n and B ∈p×q, the Kroneckerproduct is defined as
A ⊗ B =
a1,1B . . . a1,mB...
. . ....
an,1B . . . am,nB
. (1)
The Kronecker product is bilinear, associative and obeys
(A ⊗ B)(C ⊗D) = (AC ⊗ BD) (2)
if the usual matrix products are defined. For inversion andtransposing we have
(A ⊗ B)−1,T = A−1,T⊗ B−1,T (3)
if the usual matrix inverse is defined.
Organisation
∂F∂x≈ (P−1
x Qx ⊗ Iy)~F = (P−1x Qx ⊗ Iy ⊗ I4)~F = (P−1
x Qx ⊗ Iy ⊗ A)~u
∂G∂y≈ (Ix ⊗ P−1
y Qy)~G = (Ix ⊗ P−1y Qy ⊗ I4)~G = (Ix ⊗ P−1
y Qy ⊗ B)~u
~F =
F0...
Fi...
FN
→
Fi0...
Fij...
FiM
→
F1F2F3F4
ij
→ A
u1u2u3u4
The semi-discrete schemes
Focus only at the interface:
ut + (P−1x Qx ⊗ Iy)~F + (Ix ⊗ P−1
y Qy)~G = (P−1x ⊗ Iy)ΣL(u − v)
vt + (P−1x Qx ⊗ Iy)~F + (Ix ⊗ P−1
y Qy)~G = (P−1x ⊗ Iy)ΣR(v − u)
Determine ΣL,ΣR such that the coupling is stable andconservative.
Conservation φ = φ(x, y, t) = smooth, φ(±∞,±∞, t) = 0.
φT(Px⊗Py)ut +φT(Qx⊗Py)F+φT(Px⊗Qy)G = φT(Ix⊗Py)ΣL(u−v)
SBP: Qx → −QTx + Bx
Qy → −QTy + By
φT(Px ⊗ Py)ut − φT(QT
x ⊗ Py)F − φT(Px ⊗QTy )G+
φT(Bx ⊗ Py)F + φT(Px ⊗ By)G = φT(Ix ⊗ Py)ΣL(u − v)
Note φT(QTx ⊗ Py)F = φT(QT
x ⊗ Iy)(Ix ⊗ Py)F =
φT(QTx ⊗ Iy)((P−1
x )T⊗ Iy)︸ ︷︷ ︸
φTx
(Px ⊗ Iy)(Ix ⊗ Py)︸ ︷︷ ︸(Px⊗Py)
F = φTx (Px ⊗ Py)F
Same procedure as in one dimension, all derivatives flipped⇒
φT(Px ⊗ Py)ut − φTx (Px ⊗ Py)F − φT
y (Px ⊗ Py)G =
Boundary terms at i = 0 for all gridpoint j = 0,M.
−φTNPyFN + φT(Ix ⊗ Py ⊗ I4) (EN ⊗ Iy ⊗ ΣL)︸ ︷︷ ︸
ΣL
(u − v)
︸ ︷︷ ︸−φT
N(PLy⊗A)uN+φT
N(PLy⊗ΣL)(uN−v0) = ITL
From the other equation we get the corresponding terms
ITR = φT0 (PR
y ⊗ A)v0 + φT0 (PR
y ⊗ ΣR)(v0 − uN).
Conservation at interface requires ITL + ITR = 0, hence
ITL + ITR = (φ0 = φN = φi, PLy = PR
y = Py) =
φTi (Py ⊗ (−A + ΣL − ΣR)(uN − v0)) = 0
lead to conservation.
∴ ΣL = ΣR + A is the conservation condition.
Note similarity with 1D σL = σR + a
The same technique, multiplying from left with uT(Px ⊗ Py)⇒
ddt
(uT(PLx ⊗ PL
y)u + vT(PRx ⊗ PR
y )v) =
[uNv0
]T [Py ⊗ (−A + 2ΣL) Py ⊗ (−ΣL − ΣR)Py ⊗ (−ΣR − ΣL) Py ⊗ (A + 2ΣR)
]︸ ︷︷ ︸
A
[uNv0
]
Recall A ⊗ B = aijB, Unfortunately, this is not the form of A.
However there exists ψ such that Py ⊗ Aij = ψT(Aij ⊗ Py)ψ.“even permutation similar. ”⇒
[uNv0
]T [ψT(A11 ⊗ Py)ψ ψT(A12 ⊗ Py)ψψT(A12 ⊗ Py)ψ ψT(A22 ⊗ Py)ψ
] [uNv0
][ψuNψv0
]T [A11 ⊗ Py A12 ⊗ PyA12 ⊗ Py A22 ⊗ Py
]︸ ︷︷ ︸[
A11 A12A12 A22
]︸ ︷︷ ︸
˜A
⊗Py
[ψuNψv0
]
For stability we need ˜A ≤ 0. The conservation condition in ˜A⇒[−A + 2ΣL −2ΣL + A−2ΣL + A −A + 2ΣL
]=
[1 −1−1 1
]︸ ︷︷ ︸
λ=0,2
⊗
[−A + 2ΣL
]︸ ︷︷ ︸
≤0
.
∴ Stability if conservation condition holds and −A + 2ΣL ≤ 0.
We need 2ΣL − A ≤ 0. However A = XΛXT = X(Λ+ + Λ−)XT.
Let ΣL = XΣLXT⇒
2ΣL − A = XT(2ΣL −Λ+−Λ−)X = −XΛ+XT + X(2ΣL −Λ−)XT
1st choice ΣL = Λ−
2 damping by −A+
2nd choice ΣL = Λ− damping by A− − A+
Summary of the SBP-SAT-MB technique
• It is a conservative and stable method.• Nodes on interface must coincide.• The integration operators (norms) must be the same on
both sides of interface.• If the norms are different, interpolation operators must be
used.• If the nodes do not coincide, interpolation operators must
be used.• The stability and conservation conditions are similar to the
one-dimensional ones.
Node centered unstructured finite volume methods
SBP property
Considerut + ux = 0 (4)∫
Ωc
utdxdy︸ ︷︷ ︸Ωcuct
+
∫Ωc
uxdxdy = 0︸ ︷︷ ︸Green’s formula⇒
∮∂Ωc
udy
(5)
∮∂Ωc
udy ≈∑
i
uc + ui
2∆yi =
∑i
uc
2∆yi︸ ︷︷ ︸
closed loop=0
+∑
i
ui∆yi
2︸ ︷︷ ︸Matrix elements
QcNi =∆yi
2counter clockwise, QNic = −
∆y2⇒ Q skew-symmetric
SBP operatorsBoundaries ∮
∂ΩB
udy ≈∑
i
uB + uNi
2∆yi + uB∆yB
= uB(∑
i
∆yi
2+ ∆yB︸ ︷︷ ︸
−∆yB2 +∆yB
) +∑
i
uNi∆yi
2=
∴ QBB =∆yB
2, QBNi =
∆yi
2= −QNiB
∴ Qx + QTx = ∆Y, elements of ∆Y , 0 only at boundary points.
∴ QTy + QT
y = −∆X, elements of ∆X , 0 only at boundaries.
∴ The UFVM yields SBP operators.
Boundary procedures
What about boundary bonditions and SAT?
ut + Aux + Buy = 0, ~x ∈ Ω
Lu = g, ~x ∈ ∂Ωu(~x, 0) = f , ~x ∈ Ω
Let A,B be symmetric and consider the energy.∫Ω
uutdxdy +
∫Ω
uT(Au)x + uT(Bu)ydxdy = 0 ⇒
12||u||2t +
12
∫Ω
(uTAu)x + (uTBu)ydxdy = 0⇒
Boundary procedures
||u||2t +
∮∂Ω
uTAudy − uTBudx = 0⇒
||u||2t +
∮∂Ω
uT ((A,B) · ~n)︸ ︷︷ ︸A=symmetric
uds = 0, A = XΛAXT, ΛA = Λ+A+Λ−A ⇒
||u||2t +
∮∂Ω
uTX(Λ+A + Λ−A)XTu ds = 0, Λ−A dangerous.
Use the characteristic boundary condition (XTu)− = (XTu)− ⇒
ddt||u||2 +
∮∂Ω
uTA+u + uTA−uds = 0. (6)
∴ A well-posed problem.
Conservation
Is the scheme Put + (Qx ⊗ A)u + (Qy ⊗ B)u = 0 conservative ?
φTPut + φT(Qx ⊗ A)u + φT(Qy ⊗ B)u = 0
Qx = −QTx + ∆Y, Qy = −QT
y − ∆X⇒
φTPut − φT(QT
x ⊗ A)u − φT(QTy ⊗ B)
+φT(∆Y ⊗ A)u + φT(−∆X ⊗ B)u = 0
φTPut −[(Qx ⊗ I)φ
]T[I ⊗ A] u −
[(Qy ⊗ I)φ
]T[I ⊗ B] u
+∑
i
φi((A,B) · ~ni)uidsi︸ ︷︷ ︸BT
∴ No remaining interiour terms: Conservative!
Stability of UFVM
(P ⊗ I)ut + (Qx ⊗ A)u + (Qy ⊗ B)u = (ETB ⊗ I) Σ(u − G)︸ ︷︷ ︸
H
EB picks out boundary points. Non-zero on the boundary only.
uT(P ⊗ I)ut + uT(Qx ⊗ A) + uT(Qy ⊗ B)u = uT(ETB ⊗ I)H =
= ((EB ⊗ I)u)TH = uTBH =
∑i∈B
uTBiHi =
∑uT
i Σi(u − u)i
(||u||2P⊗I))t + uT(∆Y ⊗ A)u + uT(−∆X ⊗ B)u = 2uTBH.
(||u||2P⊗I)t =∑−uT
i ((A,B) · ~ni)uidsi + 2uTi Σi(ui − ui)
=∑
i
(−uT
i Aiui + 2uTi Σi(ui − ui)
)dsi
Energy estimate
Ai = A+i + A−i ⇒
∑i
(−uT
i A+i ui − uT
i (A−i − 2Σi)ui − 2uiΣiui
)dsi.
Let Σi = +A−i ⇒
ddt
(||u||2P⊗I) +∑i∈B
uTi A+ui + uT
i A−uidsi =∑i∈B
(u − ui)TA−i (u − ui)dsi︸ ︷︷ ︸≤0
.
∴ An estimate in terms of data !
∴ UFVM both conservative and stable.
∴ Warning ! Could be suprisingly inaccurate with O(1) errors.
SBP-SAT-MB + UFVM = Hybrid
Discontinuous Galerkin (DG)
ut + (Au)x + (Bu)y = 0, F = Au, G = Bu, u = solution vector
A = AT, B = BT = constant matrices
1. Multiply with smooth function α = α(x, y, t).∫Ωi
αut dx dy +
∫Ωi
αFx + αGy dx dy = 0
Derivation of penalty term
2) Integrate-by-parts
∫Ωi
αut dx dy +
∫Ωi
(αF)x + (αG)y dx dy −∫
Ωi
∇α · ~F dx dy = 0
where ~F = (F,G). Green-Gauss⇒∫Ωi
αutdΩ −
∫Ωi
∇α · ~FdΩ +
∮∂Ωi
αFdy − αGdx = 0
∫Ωi
αutdΩ −
∫Ωi
∇α · ~FdΩ +
∮∂Ωi
α~F · ~nds = 0
3) Change F→ F = numerical Flux= what you want it do be.
Derivation of penalty term
∫Ωi
αut − ∇α · FdΩ +
∮∂Ωi
αF · ~nds = 0 (7)
Integrate back⇒
∫Ωi
αut + α∇ · FdΩ +
∮∂Ωi
α(F − F) · ~uds︸ ︷︷ ︸penalty term
= 0 (8)
A penalty term just as in the SBP-SAT technique.
ConservationLook at two nearby elements. Let α = φ.∫
∂Ωi
φiFi · ~nids +
∫∂Ωi+1
φi+1Fi+1 · ~ni+1ds =
= (~ni+1 = −~ni, φi+1 = φi) =
∫∂Ωi
φiFi · ni + φi+1Fi+1(−~ni)ds
=
∫∂Ωi
φi(~Fi −
~Fi+1) · ~nids.
∴ No terms at the interface if (~Fi −~Fi+1) · ~ni = 0.
∴ DG is a conservative if numerical fluxes on adjacentelements are the same.
Stability
Let α = u⇒ ∫Ωi
uutdΩ +
∫Ωi
uT(Au)x + uT(Bu)ydΩ
+
∫∂Ωi
uT(F − F) · ~nds = 0
12||u||2t +
12
∫∂Ωi
uTAudy − uTBu︸ ︷︷ ︸uTF·~nds
dx +
∮∂Ωi
uT(F − F) · ~nds = 0
||u||2t + 2∮∂Ωi
uT(F −12
F) · ~nds = 0.
Stability
The other side⇒
(||u||2i + ||u||2i+1)t+2∮∂Ωi
uTi (FT
i −12
Fi) · ~nids +
2∮∂Ωi+1
uTi+1(FT
i+1 −12
Fi+1) · ~ni+1ds = 0
Fi · ~ni = C0 Fi + C1 [F]i ; Fi = (A,B) · ~ni
(ui + ui+1
2
)Fi+1 · ~ni = C2 Fi + C3 [F]i ; [F]i = (A,B) · ~ni (ui − ui+1)
Conservation⇒ (C0 − C2) Fi + (C1 − C3) [F]i = 0
⇒ C2 = C0,C3 = C1
Stability
BT =
∮uT
i (C0A(ui + ui+1
2
)+ C1A(ui − ui+1) −
12
Aui)
− uTi+1
(C0A
ui + ui+1
2+ C1A(ui − ui+1) −
12
Aui+1
)ds =
=
∮uT
i (12
(C0 − I) + C1)Aui + uTi (
C0
2− C1)ui+1
− uTi+1(
12
(C0 − I) − C1)Aui − uTi+1(
C0
2− C1)uids
Put on matrixform, to be able to see what is going on.
BT =
∮ [ui
ui+1
]T [( 1
2 (C0 − I) + C1)A ( C02 − C1)A
−( C02 + C1)A (− 1
2 (C0 − I) + C1)A
] [ui
ui+1
]ds =
=
∮ [ui
ui+1
]T [(C1 + C0−I
2 )A −C1A−C1A (C1 −
C0−I)2 )A
] [ui
ui+1
]ds.
Stability
Choose C0 = I⇒ BT =
∮ [ui
ui+1
]T [1 −1−1 1
]︸ ︷︷ ︸λ=0,+1
⊗C1A[
uiui+1
]ds
Need to choose C1 such that C1A ≥ 0.
A = XΛXT C1 = XΣXT⇒ C1A = XΣΛXT = XTΣ(Λ+ + Λ−)X
Choose Σ such that: ΣΛ+ = Λ+, ΣΛ− = δ|Λ−| ⇒
CA = X(Λ+ + δ|Λ−|)XT =
A+, δ = 0|A|, δ = 1
Stability
With the above choices we find
∴ BT =
∮ [ui
ui+1
]T [|A| −|A|−|A| |A|
] [ui
ui+1
]ds =
∮(ui−ui+1)T
|A|(ui−ui+1)ds⇒
and hence
ddt
(||u||2i + ||u||2i+1) = −
∮[u] |A| [u]︸ ︷︷ ︸
jumps
ds
∴ A stable scheme.
∴ Also expensive, interfaces everywhere, needed for highaccuray.
Summary of multi-dimensional schemes
• SBP-SAT-MB: Highly efficient. Requires non-nastygeometry to be optimal.
• UFVM: Can handle complex geometry, low accuracy, slow.• DG: Very stable and accurate but expensive for high order
and multiple dimensions.• Hybrid: Combines SBP-SAT-MB + UFVM or dG. Maybe
optimal by combining the best properties.• References
• J. Nordstrom et al, APNUM, 2003.• J. Nordstrom & J. Gong, JCP, 2006.• J. Gong & J. Nordstrom, JCP, 2007.• J. Nordstrom, J. Gong, Van der Weide & M. Svard, JCP, 2009.• K. Mattson & M.H. Carpenter, SISC, 2010.• J. E. Kozdon & L. C. Wilcox, SISC, 2016.
End of Lecture 3