CDn.1 n-Dimensional Convection-Diffusioncfdlab.utk.edu/finite/graduate/Public/PDFs/cdnvu551w.pdf ·...
Transcript of CDn.1 n-Dimensional Convection-Diffusioncfdlab.utk.edu/finite/graduate/Public/PDFs/cdnvu551w.pdf ·...
CDn.1 n-Dimensional Convection-Diffusion Unsteady n-D convective transport of a scalar q(x, t)
Interpretation of q , Pa, Pb is problem-specific
2
0 0 0
1( ) 0 , onPa
( ) Pb( ) 0 , on
( , ) ( , ) , on( , ) ( ) , on
ref n R
b b b D
qq q q s tt
q q q q f t
q t q t tq t q t
∂= + ⋅∇ − ∇ − = Ω×
∂= ∇ ⋅ + − + = ∂Ω ×
= ∂Ω ×= Ω ∪ ∂Ω×
u
n
x xx x
L
u(x,t) n-dimensional fluid velocity field s(x,t), fn distributed source, boundary flux Robin/Dirichlet BCs may be time-dependent
CDn.2 GWSh Ingredients for n-D L(q) with BCs
FE implementation of GWSh and/or TWSh
( ){ } { }
{ }β
: ( ) ( ) 0: ( , ) ( , ) ( , ) ( , )
: ( , ) ζ,η ( )
: GWS ( ) ( )dτ 0 TWS
: TWS TS [JAC]{ } RES
[
e
v
N he e
Te k e
N m N h
h
PDE system q q t s BCs ICapproximation q t q t q t q t
FE basis q t N Q t
error exremization q
matrix statement Q tΩ
= ∂ ∂ + ∇⋅ − − = + +
≈ ≡ ≡ ∪
≡
= Ψ ≡ ⇒
+ θ ⇒ Δ = −Δ
∫
f fx x x x
x
x
L
L
[ ]( ) ( ){ } [ ]( ){ } { }
{ } { }22 ( )
0L2
1
JAC] S JAC , {RES} S {RES}
RES UVWVEL [DIFF] [HBC] ( )
[JAC] [MASS] RES /
: ( ) C data C
γ min(1; , 1 Pa 0): & ( , , , , , , ,
e e ee
e ee e e e
e e e e
h fe t EE
Q b
t Q
asymptotic convergence e t h t q
k r forerror spectra U G f k h t
γ θ
−
ω
= =
= + + − ⋅
= + θΔ ∂ ∂
≤ + Δ
= − >
⇒ ω Δ θ α β γ)
CDn.3 n-Dimensional GWSh, FE Bases, ODE Form
For t ime-dependence in coefficient set {Q( t)} • a l l n -d imens iona l bases {N k (ζ ,η )} remain as es tab l i shed • GWSN, hence GWSh, TWSh always yield large (!) ODE systems Galerkin weak statement for L (q) + BCs + IC
GWSh + θTS produces algebraic form
[JAC]{ΔQ} = - Δt{RES}n with {Q}n+1 = {Q}n + {ΔQ}
( )
{ }0}RES{}]{MASS[
}b{}{]HBC[]DIFF[]UVWVEL[d
}{d]MASS[S
}WS{SGWS}0{dτ)()(GWS
'
β
≡+≡
⎟⎠⎞
⎜⎝⎛ −+++=
=⇒≡Ψ≡ ∫Ω
Q
Qt
Q
q
eeeeee
ee
eehNN Lx
CDn.4 GWSh + θTS Statement Contributions
G W S h + θ T S fo r m e d b y a s s e m b ly o v e r Ω e
n e w m a t r i x d u e t o f l u i d c o n v e c t i o n recall e l e m e n t m a t r i x n o t a t i o n c o n v e n t i o n
[M …]e , M ⇒ (A, B, C) for 1 ≤ n ≤ 3
Se( [JAC]e){ΔQ} = -Δt Se({RES}en)
[JAC]e = [M200]e + θ Δt([UVWVEL]e + [DIFF]e + [HBC]e)
{RES}en = ([UVWVEL]e + [DIFF]e + [HBC]e){Q}e
n –{b}e
{b(t)}e = ([M200]e{SRC}e + [HBC]e{QR}e - [N200]e{FN}e)n+θ
nJJJ
wu
eTe
eeeeeee
≤≤⇒
++=
1,]300M[}U{
]203M[]202M[]201M[]UVWVEL[ ν
CDn.5 Fluid Convection FE Matrix Construction
Fluid convection on n-D is sole new matrix
Additional template contributions (TDT = θΔt )
1,1,1,}]{300M[}U{ET
}{dηdetηη
}{}}{{}U{ˆ
+≤≤≤≤=
⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
∂∂
= ∫Ω
nnKnJforQKJKJ
Qx
NNNJ
eTee
ee
ej
k
k
TTe
e
]][3003C)[0;708090}(3U2U1U){)(TDT(]][3002C)[0;405060}(3U2U1U){)(TDT(
]][3001C)[0;102030}(3U2U1U){)(TDT(]JAC[
++++++++=eU
0,}{]JAC)[/1(}RES{}RES{ >θθ+Δ⇒Δ eeene QUtt
dτ}{}{]UVWVEL[j
h
jee xquNQ
e ∂∂
≡ ∫Ω
CDn.6 Accuracy, Convergence & Stability
A sym ptot ic convergence error es t im ates rem ain
Stab i l i ty contro ls accuracy for large P a , reca l l C D 1
C = 0.5 θ = 0.5
Amplification Factor Damping
Artificial diffusion spectra Phase velocity error spectra
Ef
t
t
teE
h
Ef
teE
h
qtqhte
rkqthte
k 0)(2
H21-
0)(2
2L21-
Cdτ),(C)(:0Pa
)1,min(γ,CdataC)(:0Pa
01
θ
θ
Δ+≤=
−=Δ+≤>
∫ +τ
γ
x
CDn.7 GWSh + θTS Newton Template, n = 3
Problem statement L ( q ) = ∂ q ∂ t
+ u ⋅ ∇ q - 1 Pa
∇ 2 q - s = 0
( q ) = ∇ q ⋅ n + Pb q - q ref + f n = 0
Template pseudo-code for {FQ}e for {Nk+} basis, n = 3
Newton ( [MASS] + θ Δt ([UVWVEL] + [DIFF] + [HBC] )){δQ}p+1 = -{FQ}p
{FQ} = [MASS]{QP – QN} + Δt ( [UVWVEL] + [DIFF] + [HBC]{Q} – {b})n+θ
{FQ}e = ( )( ){ }(0; 1)[C200]{QP} +( - )( ){ }(0; 1)[C200]{QN} +( )( ){U1 + U2 + U3}(102030; 0)[C3001]{QP} +( )( ){U1 + U2 + U3}(405060; 0)[C3002]{QP} +( )( ){U1 + U2 + U3}(708090; 0)[C3003]{QP} +(PAI)( ){ }(112233; -1)[C211]{QP} +(PAI)( ){ }(475869; -1)[C223]{QP} +(PAI)( ){ }(445566; -1)[C222]{QP} +(PAI)( ){ }(475869; -1)[C232]{QP} +(PAI)( ){ }(778899; -1)[C233]{QP} +(PAI)( ){ }(172839; -1)[C213]{QP} +(PAI)( ){ }(142536; -1)[C221]{QP} +(PAI)( ){ }(172839; -1)[C231]{QP} +(PAI)( ){ }(142536; -1)[C212]{QP} +( - )( ){ }(0; 1)[C200]{SRC} +(PB, PAI)( ){ }(0; 1)[B200]{QP} +(- PB, PAI)( ){ }(0; 1)[B200]{QR} +(PAI)( ){ }(0; 1)[B200]{FN}
(omitting TDT, TDT1, P, N duplications)
CDn.8 GWSh + θTS Linear Algebra Issues
GWSh + θTS produces large (!) matrix statement Newton j acob ian Linear algebra exchanges speed for slower convergence
where : N, M a re “ i t e ra t ion ma t r i ces , ” p i s i t e ra t ion index
[JAC]{ΔQ} = -Δt{RES} [JAC]{δQ}p+1
= -{F}p
{ } { } { }...)]HBC[]DIFF[]UVWVEL([]MASS[
/}RES{]MASS[/F]JAC[+++Δθ+=
∂∂Δθ+=∂∂≡t
QtQ
bMxNxxxbAfx
bAxbAx
pppp
pppp
+=
=
=
=
−
−−
−
1
21
1
:iterationlinear.)..,,,,(:iterationstationary
:rulesCramer':notationmatrixstandard
CDn.9 Linear Point Iterative Methods
L i n e a r i t e r a t i o n x p = N p x p -1 + M pb , fo r A x = b ite ra te e rro r:
ite ra tiv e co n v erg en ce :
d e p e n d s s t r i c t l y o n i t e r a t i o n m a t r i x N a n d i n i t i a l e r r o r e 0 P o i n t i t e r a t i v e m e t h o d s
1
11
1
−
−−
−
=
−+=
−=
−≡
pp
ppp
p
pp
eNbAbMxN
bAxxxe
011
211
...... eNNN
eNNeNe
pp
pppppp
−
−−−
=
⋅⋅
==
p a rtitio n m atrix : A = L + D + U req u ire n o m atrix so lv es : N ≡ N (L , D , U )
L , D , U are sq u are m atrices , sam e e lem en ts as A D ⇒ d iag o n a l L , U ⇒ tr ian g u la r ( lo w er, u p p er)
CDn.10 Familiar Linear Point Iterative Methods
P i c a r d ( J a c o b i ) i t e r a t i o n G a u s s -S e id e l i t e r a t io n S u c c e s s iv e O v e r -R e la x a t io n ( S O R )
ii
pp
pp
dDDMMULDNN
bDxULDx
/1),(:hence
)(
1
11
111
=
=⇒+−=⇒
++−=
−
−−
−−−
bDUxDLxDxDLMUDLN
bDLUxDLx
ppp
pp
1111
11
111
:formalgebraic)(,)(:hence
)()(
−−−−
−−
−−−
+−−=
+=+−=
+++−=
( )2ω1:factorrelaxation
ω)ω)ω1(()ω( 11
≤≤+−−+= −− bxUDLDx pp
CDn.11 Approximate Factorization
GWS h + θTS matrix statement [JAC] {ΔQ} = -Δt {RES} Newton jacobian: [JAC] = [MASS] + θΔt ([UVWVEL] + [DIFF] + [HBC]) Approximate factorizat ion {P s }and {S s } a re ro w -co lu mn “sh u f f led ”
{ }
{ }s
s
SQ
PStP
≡Δ
≡Δ−=
}~]{J3[
}{}]{J2[RES}]{J1[:sequencesolution
partition [JAC]: [JAC] ≅ [J1]{J2][J3] matrix statement: [J1][J2][J3]{ΔQ}=-Δt{RES}
CDn.12 Tensor Product Approximate Factorization
GWSh + θTS jacobian, n = 3 on Ωe [JAC]e = [C200]e + θΔt (uk [C20K]e + Pa-1[C2KK]e + [HBC]e) Tensor (outer) matrix product (⊗)
then: A200 e ⊗ A200 e =
ly
6 2 1
1 2 ⊗ l x
6 2 1
1 2
= l x l y
36 4 2 1 2 2 4 2 1 1 2 4 2 2 1 2 4
= B200 e
A200 e ⊗ u 1 A201 e =
ly
6 2 1
1 2 ⊗ U x
2 -1 1 -1 1
= l y U x
12 -2 2 1 -1 -2 2 1 -1 -1 1 2 -2 -1 1 2 -2
= U 1 B201 e
also:
eeee ]200C[]200A[]200A[]200A[:then =⊗⊗
and: [A200]e ⊗ [A211]e = [B211]e
for n = 1 and {N1}: [MASS]e ⇒ [A200]e
CDn.13 Tensor Matrix Products, Error
N ew ton jacob ian [JAC] = [C200] + θΔt (uk[C20K] + Pe-1[C2KK] + [HBC]) [JAC]e ≅ [J1]e [J2]e [J3]e [JK]e = [A200]e + θΔt (uK[A20K]e + Pe-1[A2KK]e + [HBC]) T ensor m atr ix product o f the sum f a c to r i z a t i o n e r r o r m a t r ix g e n e r a t e d v i a
[ J 1 ] e ⊗ [ J 2 ] e = ([MX] + θΔt [CX + DX + HX])e ⊗ ([MY] + θΔt [CY + DY + HY])e
= [MX] ⊗ [MY] + [MX] ⊗ θΔt [CY + DY + HY]
+ [MY] ⊗ θΔt [CX + DX + HX]
+ (θΔt)2 [CX + . . . ] ⊗ [CY + . . . ]
= [B200]e + θΔt [B201 + B202 + B211+ B222 + HBC]e
+ (θΔt)2 [error matrix]
CDn.14 Time-Splitting, Alternating Direction Implicit
T e n s o r p r o d u c t A F a l g o r i t h m T i m e - s p l i t t i n g a l g o r i t h m [JX] {ΔQ}n+1/2 = - Δt {RESX(Qn)} {Q}n+1/2 = {Q}n + {ΔQ}n+1/2 [JY] {ΔQ}n+1 = - Δt {RESY(Qn+1/2)} {Q}n+1 = {Q}n+1/2 + {ΔQ}n+1
A l t e r n a t i n g d i r e c t i o n i m p l i c i t ( A D I ) [JX] {ΔQ}n+1/2 = - Δt {RESY(Qn)} {Q}n+1/2 = {Q}n + {ΔQ}n+1/2 [JY] {ΔQ}n+1 = - Δt {RESX(Qn+1/2)} {Q}n+1 = {Q}n + {ΔQ}n+1/2 + {ΔQ}n+1
{RES}toionsapproximatno:note}~{}{}{
}RES{}~]{3J][2J][1J[
1 QQQ
tQ
nn Δ+=
Δ−=Δ
+
CDn.15 GWSh + θTS Jacobian Templates, n = 3
Newton jacobian Tensor product jacobians [JAC]e = ( )( ){ }(0; 1)[C200][ ] [J1]e = ( )( ){ }( )[A200][det] + (TDT)( ){U1 + U2 + U3}(102030; 0)[C3001][ ] + (TDT)( ){U1 + U2 + U3}(102030; 0)[A3001][ ] + (TDT)( ){U1 + U2 + U3}(405060; 0)[C3002][ ] + (PEI, TDT)( ){ }(114477; -1)[A211][ ] + (TDT)( ){U1 + U2 + U3}(708090; 0)[C3003][ ] + (NU, PEI, TDT)( ){ }(0;1)[A200][ ] + (PEI, TDT)( ){ }(112233; -1)[C211][ ] + (PEI, TDT)( ){ }(445566; -1)[C222][ ] [J2]e = ( )( ){ }( )[A200][det] + (PEI, TDT)( ){ }(778899; -1)[C233][ ] + (TDT)( ){U1 + U2 + U3}(405060; 0)[A3001][ ] + (PEI, TDT)( ){ }(142536; -1)[C221][ ] + (PEI, TDT)( ){ }(225588; -1)[A211][ ] + (PEI, TDT)( ){ }(142536; -1)[C212][ ] + (NU, PEI, TDT)( ){ }(0;1)[A200][ ] + (PEI, TDT)( ){ }(475869; -1)[C223][ ] + (PEI, TDT)( ){ }(475869; -1)[C232][ ] [J3]e = ( )( ){ }( )[A200][det] + (PEI, TDT)( ){ }(172839; -1)[C213][ ] = (TDT)( ){U1 + U2 + U3}(708090; 0)[A3001][ ] + (PEI, TDT)( ){ }(172839; -1)[C231][ ] + (PEI, TDT)( ){ }(336699; -1)[A211][ ] + (NU, PEI, TDT)( ){ }(0; 1)[B200][ ] + (NU, PEI, TDT)( ){ }(0;1)[A200][ ]
CDn.16 Verification, Benchmarks & Validation
Protocol for simulation quality assessment Results of these “computational experiments" provide TWSh + θTS templates support full spectrum assessments
• verification - compare simulation to known analytical solutionsPeclet problem traveling mass packet rotating cone
• benchmark - compare simulation to quality numerical results Gaussian plume
• validation - compare simulation to quality experimental data genuine geometries realistic diffusion models
• error mechanism assessments, mesh dependence• knowledge of limitations of theory/code • confidence in the simulation methodology
CDn.17 Rotating Cone, n = 2 Verification
Initial condition & exact solution
Crank-Nicolson FD GWSh k = 1 FE
TWSh, k = 1 FE, α = 0, β = 0, γ = -0.5
u
0 0 0
on : ( ) 0on : ( ) 0
ˆdata : ω: ( , ) ( ) "gaussian "
t
in b b
q q qq qr
at t q t qθ
Ω = + ⋅∇ =∂Ω = ≡
== ⇒
ux
u ex x
L
θθ ==+ 0.5Csolution,TSWSVarious h
CDn.18 Gaussian Plume, n = 2, 3 Benchmarks
GWSh steady solution, n = 2
1 1 2 2 3 -1 1 1 2 3 5 5 6 8 9 9 10 4 6 9 12 14 16 18 20 21 22 24 25 25 26 2 12 21 28 35 38 41 44 45 46 47 48 48 48 49 49 49 49 0 8 50 93 100 97 96 93 90 88 86 83 81 79 77 75 74 72 71 69 0 16 92 159 156 142 132 123 116 110 105 100 97 94 90 87 85 82 80 78
0 25 98 162 166 145 137 129 121 115 109 105 100 97 93 90 88 85 83 81
-2 10 94 169 164 148 138 129 122 116 111 106 101 98 95 91 89 86 83 81 -1 4 50 97 103 101 98 95 93 90 88 86 83 81 80 77 76 74 73 71 2 10 19 26 31 35 38 41 43 44 45 46 47 47 48 48 48 48 -2 -2 -1 1 3 6 9 11 14 15 17 19 20 22 23 24 25 1 2 2 4 5 5 7 8 8 9 1 1 2 2
u
U
1 3 10 26 48 71 81
81 71 48 26 10 3 1
Gaussian
FE k = 1
FE k = 2 source region
1on : ( ) Pa 0ˆon : 0, 0
data : , ( , , ), ( ) givenin out
x y z
q q k q sq q
k k k k s
−Ω = ⋅∇ − ∇ ⋅ ∇ − =∂Ω = ⋅∇ =
= = =
un
u i x
L
GWSh steady-state DOF solutions, n = 2
kji ˆˆˆ0,20Pa ++== k
CDn.19 Enclosure Flow, n = 3 Validation
velocity, Re = 15,000, Ret = 14 temperature, Gr / Re2 = 4.3
on data∂Ω: " ,"q qin out= ⋅∇ =n 0
2
0 0
(1 Re ) Gr ˆon : ( ) 0Re Re
ˆon : ( , ) { , , , } given , 0at : ( , ) 0
t
jj j
Tin out
q qq u qt x x
q q t u v qt q t
⎛ ⎞∂ ∂ + ∂Ω = + − + Θ =⎜ ⎟⎜ ⎟∂ ∂ ∂⎝ ⎠
∂Ω = = ω Θ ⋅ ∇ ==
g
x nx
L
Experiment, mid-plane flow speed
GWSh + θTS k = 1 FE solution
CDn.20 Mass Transport Experiments on n = 3
GWSh, k=1, Ret=14, Sct=1 TWSh, k=1, β=0.9, Sct=1 GWSh, k=1, Sct=0.1 TWSh, Sct=1, RCN
CDn.21 TWSh + θTS Summary
Essential ingredients of TWSh + θTS for all n Template pseudo-code converts theory to practice
{ } { }{ } { }
1: ( ) 1 Pa 0, BCs ICPa
: ( , ) , ( )
: GWS TWS TS [JAC] RES
: [JAC] [JAC approx] matrix iteratio
tj
j j j
TN he e e k
h hn
q q qPDE system q u st x x x
approximation q t q q q q N Q t
minimize error Q t
linear algebra
asym
⎛ ⎞∂ ∂ ∂ ∂= + − + − = + +⎜ ⎟⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠
≅ ≡ = ∪ =
⇒ + θ ⇒ Δ = −Δ
⇒ ⇒
x
L
: , , , Pa, Pa , data
: , (ω, , , , ,α,β, γ)
h h t
Eptotic convergence e f k r
error spectra U G f k h tω
⎛ ⎞≤ Ω⎜ ⎟⎝ ⎠
⇒ Δ θ
- “code in English” - readily input physics nuances - precise non-linearities - linear algebra options