Professional Documents
Culture Documents
Volumes Finis 21-22
Volumes Finis 21-22
http://www.hach.ulg.ac.be
Volumes finis
http://www.hach.ulg.ac.be
• Basic principle:
– Discretization of domain in control volume
– Integration of equations over each volume
Δxc
1 ∂s ∂s
S S ∂t
dS = + O(h ²)
∂t P
• Conservative form
• Theorem of Green
∂f ∂g
S ∂x + ∂y dS = ∂S ( fnx + gny ) d ∂S
(i,j)
qi-1/2 qi+1/2
Fi , j−½ i
Constante Linéaire
http://www.hach.ulg.ac.be
• Constant reconstruction :
u ( r ) = U j ∀r ∈Ωj u ( r ) = u ( r ) + ( Δs )
• Linear reconstruction :
T
u ( r ) = U j + ( r − rj ) ⋅ [∇u ] j ∀r ∈Ωj u ( r ) = u ( r ) + ( Δs 2 )
σ ( fn x + gn y ) d σ ≅ ω ( f n
c =1 p =1
p x + g ny )
p ,c
Δσ c
• Flux computation
http://www.hach.ulg.ac.be
(Constant reconstruction)
VFi VFi +1
¶u ïüï
hi + a(u nc→ n
→
,bord i +1/2 - u c,bord i -1/2 = 0
→
ïï "what
¶t VFi ï leaves from i
Fi −1 F ý Fi +1
¶u n i ï arrives in i+1"
n
hi +1 + a(u c,bord i + 3/2 - u c,bord i +1/2 ) = 0 ïï
¶t VFi +1 ïï
þ
http://www.hach.ulg.ac.be
¶f
= ai fi -1 + bi fi + gi fi +1
¶x i
ì
ï
ï Dx i -2 ( hi + hi +1 )
ï
ï a = - =
i
Dx i -1(Dx i -1 + Dx i ) ( hi -1 + hi )( hi -1 + 2hi + hi +1 )
http://www.hach.ulg.ac.be
ìï a + b + g = 0 ï
ï
ï i ï
ïï -a Dx
i i ï
ï b = Dx i - Dx i -1 = 2 ( hi +1 - hi -1 )
í i i -1 + g Dx = 1 í i
ïï i i
ïï ai Dx 2i -1 + gi Dx 2i = 0
ï
ï
ï
Dx i -1Dx i ( hi -1 + hi )( hi + hi +1 )
î ï
ï Dx i -1 2 ( hi -1 + hi )
ï
ï gi = =
ï
ï D x (Dx + Dx ) ( hi + hi +1 )( hi -1 + 2hi + hi +1 )
ï
î i i -1 i
(linear reconstruction)
VFi VFi +1
¶u ¶u a n
hi + a(u nc→
,bord i +1/2 - u n
c,bord→
i -1/2 ) = 0 → + (u c,bord i +1/2 - u nc,bord i -1/2 ) = 0
¶t VFi ¶t VFi hi
Fi −1 Fi Fi +1
h ¶f hi ¶f
If a > 0 u nc,bord i -1/2 = u n i -1 + i -1 , u nc,bord i +1/2 = u n i +
2 ¶x i -1 2 ¶x i
1æ Dx i ¶u n Dx i -1 ¶u n ö÷
1 n
( )
http://www.hach.ulg.ac.be
ì
ïï 1 æç ¶f ¶2 f 2 8 3 ¶ 3 f ö÷
ï çç fi -2 = fi - 2h + 2h + h ÷÷
ï
ïï 4h è ç ¶x ¶x 2 6 ¶x ÷ø 3
ï
ïï -5 æç ¶f ¶2 f h 2 h 3 ¶ 3 f ö÷
ï ç f = f - h + - ÷
ïï 4h ççè i -1 3÷ ¶f 1 2 ¶3 f
¶x ø÷ 1
i
¶x ¶x 2 2 6 = (f - 5 fi -1 + 3 fi + fi +1 ) - h
í
ï
ï 3 ¶x 4h i -2 3 ¶x 3
ï
ï ( f = f ) i i
ï
ï 4h i i
ïïï 1 çæ ¶f ¶2 f h 2 h 3 ¶ 3 f ÷ö
÷÷
ï ï ççç fi +1 = fi + h+ +
3÷
î è
ï 4h ¶ x ¶x 2 2 6 ¶x ø
http://www.hach.ulg.ac.be
Second order of accuracy for uniform mesh (“full” upwind scheme with 4
VF values)
1 point 2
– Gauss integration 2 points 4
eGI
3 points 6
Unstructured 1
– Flux computation (correction)
Regular 0
b
http://www.hach.ulg.ac.be
Some examples :
http://www.hach.ulg.ac.be
T
u ( r ) = U j + ϕ K j ( r ) ∀ r ∈ Ω j avec K j ( r ) ( r − rj ) ⋅ ∇ u
j
min (U k ) − U j ≤ ϕ K j ( r ) ≤ max (U k ) − U j ∀r ∈Ωj
http://www.hach.ulg.ac.be
k
k
≤0 ≥0
min (U k ) − U j ≤ ϕ K j ( r ) ≤ max (U k ) − U j ∀r ∈Ωj
k
k
≤0 ≥0
min (U k ) − U j
ϕ ≤ k si K j (r ) < 0
K j ( )
r
max (U k ) − U j
ϕ ≤
k
si K j (r ) > 0
K j ( r )
ϕ = 1
http://www.hach.ulg.ac.be
si K j (r ) = 0
θ R ϕ R = ψ si θ R < 0
θR
1 θR = 0
1 θR = 0
http://www.hach.ulg.ac.be
ϕi = min (ϕ R ) z2 + 2z
R
ψ (z) = 2
z +z+2
uimax − ui
z = si θ R > 0
θ R
min
z = ui − ui si θ R < 0
θR
ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)
Computation of diffusive flux
The estimation of diffusive fluxes requires that the
gradients of the unknowns at edges are known
S Q U
http://www.hach.ulg.ac.be
B C
Ω BPCQ
∇φ d Ω =
Γ BPCQ
φ dΓ R
P
T
φB = (φQ + φS + φR + φP ) 4 φC (φU + φQ + φP + φT ) 4
∂φ φC − φB (φU + φT ) 2 − (φS + φR ) 2
∂x S Q U
Δ x 2Δx
http://www.hach.ulg.ac.be
BC
B C
∂φ φQ − φP R T
∂y Δy P
BC
a b c
Domain boundary
Fluxes evaluation
’ Ghost point
∂u
∂t i
=−
1
Δx (
Fi + 1 − Fi − 1 −
2 2
1
Δy ) (
G j+ 1 − G j− 1 −
2 2
1
Δz ) (
Hk+ 1 − Hk− 1
2 2
)
• Essential for the model stability
• It is necessary to consider the direction of waves
Fi+½
http://www.hach.ulg.ac.be
i i+1
∂u ∂f ∂u ∂u
+ =0 + a + ... = 0
∂t ∂x ∂t ∂x
u n +1i − u n i u n i − u n i −1 aΔt
If a>0, it has to be discretized by: +a + ... = 0 and to satisfy: 0 ≤ ν ≤ 1 with: ν =
Δt Δx Δx
n +1
If a<0, it has to be discretized by : u i − u i + a u i +1 − u i + ... = 0
n n n
http://www.hach.ulg.ac.be
Δt Δx
∂u a (u − u i −1 )
If a in > 0 ∀i → + i i + ... = 0
http://www.hach.ulg.ac.be
n
If a > 0 ∀i →
∂u
+
f n
i ( u ) − f n i−1 ( u ) = 0
i
∂t i Δx
http://www.hach.ulg.ac.be
∂t i Δx "what leaves from i
i+2 ( ) i +1 ( )
∂u f n
u − f n
u does not arrive in i+1"
→ + = 0
∂t i +1 Δx
Decoupling !
∂u
http://www.hach.ulg.ac.be
fΔ = f + (s− ) + f − (s+ ) f Δ = f ( s − ,s + )
• Solve the Riemann problem for each edge
• Flux splitting in two parts
• Roe : solve the linear Riemann problem
• The convective matrix ∂f+/∂s in the positive or zero eigenvalues
• The convective matrix ∂f -/∂s in the negative or zero eigenvalues
http://www.hach.ulg.ac.be
0 λn
K = [ r1 rn ]
• Multiplying by K −1
Decoupling of m equations :
∂U ∂U
K −1 + K −1 K ΛK −1 =0
∂t ∂x
(
∂ K −1U )+Λ ( ∂ K −1U ) =0
http://www.hach.ulg.ac.be
∂t ∂x
∂W ∂W
+Λ =0
∂t ∂x
∂W ∂W
+Λ =0
∂t ∂x Λ = Λ+ + Λ−
A+ = K Λ + K −1 → f + = A+U
A = K ΛK −1
A− = K Λ − K −1 → f − = A−U
∂u ∂u
http://www.hach.ulg.ac.be
Λ = Λ + = a Fi + 1 = aui
2
u ( x, t n )
http://www.hach.ulg.ac.be
x x
Mean Developed
values values
u ( x, t u ( x, t )
n ) n +1
u ( x, t n )
Δx=aΔt
http://www.hach.ulg.ac.be
x x
Developed
Mean
values u ( x, tn ) values u ( x, tn +1 )
The mean of u ( x, tn +1 ) :
xi + 1
1 2 aΔt aΔt
u ( x, tn +1 ) = u ( x, tn +1 ) = u ( xi −1 , tn ) + 1 − u ( xi , tn )
Δx x 1 Δx Δx
i−
2
Δ t
= u ( xi , tn ) − au ( xi , tn ) − au ( xi −1 , tn )
Δx
Fi + 1
2
Fi − 1
2
u ( x, t n )
Δx=aΔt
http://www.hach.ulg.ac.be
x x
Developed
Mean
values u u( x,xtn,)tn
( ) values
u ( x, tn+1 )
x x
Mean
values u ( x, tn ) ????
x=0 x
http://www.hach.ulg.ac.be
• N independent equations :
∂w1 ∂w1
+ λ1 =0
∂t ∂x
∂wn ∂w
+ λn n = 0
∂t ∂x
dx dwi
• Along = λi , it appears =0
dt dt
wi ( x, t ) = wi ( x − λi t , 0 ) = wi initial ( x − λi t )
λ1
λn
wi ( x, t ) = wi initial ( x − λi t )
http://www.hach.ulg.ac.be
• As W =K U−1
uL uL x-a.t<0
x
uR uR U =0 x-a.t>0
t uL
uR
x=0 x x=0 d=a.t x
( )
x
w1L w2R x
λk λk+1
• Solution = linear combination λ m
http://www.hach.ulg.ac.be
UL UR x
x=0
U ( x = 0, t ) = U ( ) = U (0), ∀t > 0
t
• Solution =
n x
U = wi ( x, t ) ri t U ( x, t ) = U ( ), t > 0
i =1
λk λk+1 t
n λm
U = wi ( x − λi t , 0 ) ri λ1
http://www.hach.ulg.ac.be
i =1
n n
U= wi , R ( x, t ) ri + wi , L ( x, t ) ri
UL UR
x x
i:λ p < i:λ p >
t t
x
x=0
U ( x = 0, t ) = U ( ) = U (0), ∀t > 0
t
n n n n
U= x
wi , R ( x, t ) ri + x
wi , L ( x, t ) ri + x
wi , L ( x, t ) ri − x
wi , L ( x, t ) ri
i:λ p < i:λ p > i:λ p < i:λ p <
t
t
t t
UL
n
U =U L + ( w ( x , t ) − w ( x, t ) ) r
x
i,R i,L i
i:λ p <
t
n n n n
U= wi , R ( x, t ) ri + wi , R ( x, t ) ri + wi , L ( x, t ) ri − wi , R ( x, t ) ri
http://www.hach.ulg.ac.be
x x x x
i:λ p < i:λ p > i:λ p > i:λ p >
t
t t t
UR
n
U =U R − ( w ( x, t ) − w ( x, t ) ) r
x
i,R i,L i
i:λ p >
t
• Non-linear equations !!
• Decomposition in possible waves, but very complex
• Combination of three types of waves
t Contact
wave
Shock
Expansion
wave
http://www.hach.ulg.ac.be
x
!! Possible analytic computation , but very costly !!
( )
n n
= F U R − ( wi , R − wi , L ) ri = F UR − λi ( wi , R − wi , L ) ri
i:λ p > 0 i:λ p > 0
http://www.hach.ulg.ac.be