You are on page 1of 49

« Finite volume » methods

http://www.hach.ulg.ac.be

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Finite volume » methods : introduction

Finite difference methods Finite element methods


• Discretization of the • Discretization of integrated
equations over a structured equations over elements
chartesian mesh • Existence of a weak solution
• Simplified method • Robustness and flexibility
• Simplified computation of (any mesh) of the method
derivatives • High computational time
• No « weak » solution (matrix inversion)
• No flexibility in the mesh
construction

Volumes finis
http://www.hach.ulg.ac.be

• Existence of a weak solution


• Any mesh
• Explicit method, smaller computational
time than EF

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Finite volume » methods : introduction

• Basic principle:
– Discretization of domain in control volume
– Integration of equations over each volume

• Several sets of finite volumes


http://www.hach.ulg.ac.be

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Different approaches : mainly two sets of FVM

• Formulation « cell-centered » • Formulation « node-centered »


– Control volume – unknowns to mesh apexes
= mesh cells – control volume to be rebuilt
– unknowns « adequately positioning » – necessary to rebuild the mesh
– No overlapping or open domain – overlapping risk
http://www.hach.ulg.ac.be

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Principles of FVM

• Let be a system of n transitory equations in conservative form


∂s ∂f ∂g
+ + =b
∂t ∂x ∂y
  
• The integration over a control surface, Green theorem:  ( )
n. Ω dS =  ∇. ΩdV
σ S
σ
∂s  ∂f ∂g 
S ∂t dS + S  ∂x + ∂y dS = S b dS
S n

s dS +  ( f nx + g n y ) dσ =  b dS
∂t 
S σ S

• Mean values of s and b over volume,


∂s n
+  ( f nx + g n y ) Δσ c = S b
c

• Approached computation for S


∂t c =1
http://www.hach.ulg.ac.be

• Example : explicit time discretization – structured mesh


σ
1  nc
l
s l +1 − s l 
Δyc +   ( f Δy − g Δx )c  + b = 0
S
nxc Δt S  c =1 
n yc 

Δxc

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Method’s order of precision : unsteady term

• Let integrate f over the surface S


I =  f dS
S

• By Taylor, if P is the center of gravity of S :



4
f dS = f P S + O ( h )
S

•  for unsteady term, second order of precision if the


unknowns are places in CG
http://www.hach.ulg.ac.be

1 ∂s  ∂s 

S S ∂t
dS =   + O(h ²)
 ∂t  P

Inconnue au centre de gravité

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Method’s order of precision : convective term

• Conservative form
• Theorem of Green
 ∂f ∂g 
S  ∂x + ∂y  dS = ∂S ( fnx + gny ) d ∂S

• Flux computational problems at interface



Fi , j+½
ht
ht+1
 
Fi −½, j Fi +½, j
http://www.hach.ulg.ac.be

(i,j)
qi-1/2 qi+1/2

Fi , j−½ i

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Typical structure of a FVM code

Read data and initializations


Computation of weighting parameters for derivatives
Loup over time steps

Time step assessment


Unknown reconstruction at edges
Flux assessment (FVS, FDS, …)
Budgets computation
http://www.hach.ulg.ac.be

Update the unknown in the nodes

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Variables reconstruction  determine the flux precision

• Constant reconstruction : • Linear reconstruction :


values at edges values at edges
= value at center of gravity of neighbor = value at CG of neighbor element
element linearly extrapolated

Constante Linéaire
http://www.hach.ulg.ac.be

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Variables reconstruction  determine the flux precision

• 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 )

Sur maillage structuré régulier, on a Sur maillage quelconque,


O(h²) si : on a O(h²) si :
– 1 point de Gauss – 2 points de Gauss
http://www.hach.ulg.ac.be

– reconstruction linéaire – reconstruction quadratique


on a O(h) si : on a O(h) si :
– 1 point de Gauss – 1 point de Gauss
– reconstruction constante – reconstruction linéaire

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Method’s order of precision : convective term

• Flux integration over the edges


– Use of nG points of Gauss :
nc nG

σ ( fn x + gn y ) d σ ≅  ω ( f n
c =1 p =1
p x + g ny )
p ,c
Δσ c

– Exact integration for polynomial of degree 2nG-1 over one interval


– Total precision : summing the error on each subinterval
– The order of error is 2nG

• Flux computation
http://www.hach.ulg.ac.be

– Addition of an error due to approached computation of flux over the edges


If the flux is computed for the order O(hn)  the additional error of order O(hn-1)
– Over a regular mesh, the error is reduced at O(hn)

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Addition of an error due to the computation of flux over the edges

• Let be an 1D pure convective equation


n
u c,bordi +1/2
¶u ¶u
+a =0
¶t ¶x u n i −1 u ni u n i +1
hi −1
• Solve by FVM : hi hi +1

(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

If a > 0  u nc,bord i -1/2 = u n i -1, u nc,bord i +1/2 = u n i , u nc,bord i + 3/2 = u n i +1

¶ui a(u n i - u n i -1 ) ¶ui +1 a(u n i +1 - u n i )


+ =0 + =0
¶t hi ¶t hi +1

 first order of accuracy only for uniform mesh, otherwise inconsistent


(upwind scheme with 2 VF values)
ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)
Second order of accuracy on non-uniform mesh

• Using the following series, the accuracy of the approximation


can be determined :
¶f ¶2 f Dx i2-1 1
fi -1 = fi - Dx i -1 + + O ( Dx i3-1 ) Dx i -1 = x i - x i -1 = ( hi + hi -1 )
¶x ¶x 2 2 2
fi = fi
¶f ¶2 f Dx i2 1
fi +1 = fi + Dx i + + O ( Dx i3 ) Dx i = x i +1 - x i = ( hi +1 + hi )
¶x ¶x 2 2 2

¶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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH) 13


Addition of an error due to the computation of flux over the edges

• Let be an 1D pure convective equation


n
u
∂u ∂u c,bordi +1/2
+a =0
∂t ∂x u n i −1 u ni u n i +1
hi −1
• Solve by FVM : hi hi +1

(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

u c,bord i +1/2 - u nc,bord i -1/2 = ççç u n i + - u n i -1 - ÷÷


hi hi èç 2 ¶x i 2 ¶x i -1 ø÷÷
1 é Dx i Dx i -1 ù
= ê uni + (ai u n i -1 + bi u n i + gi u n i +1 ) - u n i -1 - (ai -1u n i -2 + bi -1u n i -1 + gi -1u n i ) ú
hi êë 2 2 ú
û
1 ê é D x n ç
æ D x D x ö
÷ D x D x D x i -1 ù
= i n
gi u i +1 + u i çç 1 + i
bi - i -1
gi -1 ÷÷ - u i -1 (1 -
n i
ai + i -1 n
bi -1 ) - u i -2 ai -1 ú
ê
hi ë 2 èç 2 2 ÷
ø 2 2 2 ú
û
1 éê Dx i -1 n n ç
æ D x i - D x i -1 D x i -2
ö
÷ D 2
xi Dx i -1 - Dx i -2 D2x i -1 ù
ú
= ê u i +1 + u i çç 1 + - ÷ - u i -1 (1 +
÷
n
+ ) + u n i -2
hi êë 2(Dx i -1 + Dx i ) ç
è 2Dx i -1 2(Dx i -2 + Dx i -1 ) ø ÷ 2Dx i -1 (Dx i -1 + Dx i ) 2Dx i -2 2Dx i -2 (Dx i -2 + Dx i -1 ) úúû

 for uniform mesh


1 n
hi
(
u c,bord i +1/2 - u nc,bord i -1/ 2 =
1 é n
4h ê
ë )
u i +1 + 3u n i - 5u n i -1 + u n i -2 ùú
û

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Second order of accuracy on non-uniform mesh

• Using the following series, the accuracy of the approximation


can be determined :

ì
ïï 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+ +

î è
ï 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)

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH) 15


Method’s order of precision : convective term

• Total order of precision


Constant 1
– Variable reconstruction Linear 2 eVR
Quadratic 3

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

min (eVR , eGI ) - b

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Method’s order of precision : convective term

• Total order of precision (in the sense of finite difference)


min (r + 1, 2nG ) - b
With :
• r = the order of the Taylor polynomial reconstruction phase
(0 = constant, 1 = linear…)
• nG = the number of Gauss points
• b = correction (0 if regular ; 1 otherwise)

Some examples :
http://www.hach.ulg.ac.be

• Regular, 1 Gauss point, constant : 1


• Unstructured, 1 Gauss point, constant : 0
• Unstructured, 2 Gauss points, linear : 1
• Regular, 1 Gauss point, linear : 2
• Unstructured, 2 Gauss points, quadratic : 3
• …
ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)
Limited variables reconstruction

Monotonicity condition of Harten


min (U j −1 , U j , U j +1 ) ≤ u ( x ) ≤ max (U j −1 , U j ,U j +1 ) ∀ x∈Ωj

      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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Limited variables reconstruction

 
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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Examples of limits
 ∂u ∂v 
u R = ui +  ΔxR

+ ΔyR  ≡ ui + θ R
 ∂x i ∂y i

Barth and Jespersen Vankatakrishnan


  uimax − ui 
 min 1,  θR > 0   uimax − ui 
  θ R  ψ   θR > 0
   θ 
 uimin − ui 
R
 
ϕ R = min 1,  si θR < 0   ui − ui 
min

  θ 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

 The « diamond » model


budget in a defined control volume, marked by two
neighboured mesh centers and two mesh nodes

S Q U
http://www.hach.ulg.ac.be

B C


Ω BPCQ
∇φ d Ω = 
Γ BPCQ
φ dΓ R
P
T

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Computation of diffusive flux


Ω BPCQ
∇φ d Ω = 
Γ BPCQ
φ dΓ

ΔxΔy  φC + φQ  Δy 2  φQ + φB  −Δy 2  φB + φP  −Δy 2  φP + φC  Δy 2 


[∇φ ]BC  =  +  +  +  
 2  2  Δx 2  2  Δx 2  2  −Δx 2  2  −Δx 2 

φ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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Multiblock mesh

a b c

a' b' c'


http://www.hach.ulg.ac.be

Domain boundary

Fluxes evaluation
’ Ghost point

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Flux computation at edges

∂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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Flux computation at edges

• Importance of proper evaluation

Let be a 1D pure convective equation with the flux f = a u :

∂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

 The discretization of a flux has to take into


consideration the propagation in the vicinity of edges

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Inconsistency of a non-conservative form

• Let be an 1D pure convective equation ( a variable)


∂u ∂u
+ a ( x, t ) + ... = 0
∂t ∂x
• Solve by FDM :
u n i −1 u ni u n i +1
a n i −1 a ni a n i +1
f n i −1 f ni f n i +1

∂u a (u − u i −1 ) 
If a in > 0 ∀i → + i i + ... = 0 
http://www.hach.ulg.ac.be

∂t i Δx  "what leaves from i



∂u a i +1 (u i +1 − u i ) does not arrive in i+1"
→ + + ... = 0 
∂t i +1 Δx 

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Flux in conservative form

• Let be an 1D pure convective equation ( a variable)


∂u ∂f (u ) ∂u ∂u
+ = + a ( x, t ) + ... = 0
∂t ∂x ∂t ∂x
• Solve by FDM :
u n i −1 u ni u n i +1
a n i −1 a ni a n i +1
f n i −1 f ni f n i +1

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

 "what leaves from i



i +1 ( ) i( )
∂u f n
u − f n
u  arrives in i+1"
→ + = 0
∂t i +1 Δx 

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Non singularity of flux in conservative form

• Let be an 1D pure convective equation ( a variable)


∂u ∂f (u ) ∂u ∂u
+ = + a ( x, t ) + ... = 0
∂t ∂x ∂t ∂x
• Solve by FDM :
u n i −1 u ni u n i +1
a n i −1 a ni a n i +1
f n i −1 f ni f n i +1

If a in > 0 et a in+1 < 0 →


∂u
+
f n
i ( u ) − f n
i −1 ( u )
=0

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 !

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Singularity of flux forced in finite volume

• Let be an 1D pure convective equation ( a variable)


∂u ∂f (u ) ∂u ∂u
+ = + a ( x, t ) + ... = 0
∂t ∂x ∂t ∂x
• Solve by FVM:
u n i −1 u ni u n i +1
a n i −1 a ni a n i +1
→ → →
Fi −1 Fi Fi +1
VFi VFi +1

∂u 
http://www.hach.ulg.ac.be

If a in > 0 and a in+1 < 0 → Δx + Fn bord i +1/2 − Fn bord i −1/2 = 0 


VFi ∂t  "what leaves from i

∂u arrives in i+1"
Conclusions over a bords → Δx + Fn bordi +3/2 − Fn bordi +1/2 = 0 
∂t VFi +1 

 Never decoupling due to flux singularity at edge!

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Typical structure of a FVM code

Read data and initializations


Computation of weighting parameters for derivatives
Loup over time steps

Time step assessment


Unknown reconstruction at edges
Flux assessment (FVS, FDS, …)
Budgets computation
http://www.hach.ulg.ac.be

Update the unknown in the nodes

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Splitting methods

• Flux Vector Splitting • Flux Difference Splitting

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

 The information is taken from


« the direction from which it arrives »
i.e. according to the physical direction
of the wave propagation

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Quasi-linear form and study of the characteristics

• System of linear equations


   
∂U ∂f ∂U ∂U
+ =0 ⇔ +A =0
∂t ∂x ∂t ∂x
∂f 
A =  A i, j  =  i
where the jacobean matrix  ∂u j 
• If A is diagonalizable with real eigenvalues
(i.e. the system is hyperbolic)
A = K ΛK −1
λ1  0
où Λ =     
http://www.hach.ulg.ac.be

 0  λn 
K = [ r1  rn ]

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Quasi-linear form and study of the characteristics
 
• The quasi-linear equation becomes ∂U + K ΛK −1 ∂U = 0
∂t ∂x

• 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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Flux splitting method

• Splitting in function of positive and negative eigenvalues

 
∂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

• For 1D pure convective equation +a =0 ; a>0


∂t ∂x

Λ = Λ + = a  Fi + 1 = aui
2

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method: Godunov’s method

Algorithm in three steps:


• Mean of u ( x, t ) : Solution
n u ( x, t ) is constant over the finite volume
n

• Develop this solution « constant over part » according to the equation in


order to obtain u ( x, tn+1 )
• Solution at next step = the mean value over finite volume of

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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method: Godunov’s method

Godunov’s method for 1D pure convective equation


∂u ∂u
+a =0 ; a>0
∂t ∂x

Development of u ( x, tn ) = velocity translation

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 )

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method: Godunov’s method

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 )

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method: Godunov’s method

Godunov’s method for any system of hyperbolic equations


 
∂U ∂U
+A =0
∂t ∂x
How to develop ?
u ( x, tn )
u ( x, tn )
http://www.hach.ulg.ac.be

x x
Mean
values u ( x, tn ) ????

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Riemann’s problem

• The principle of Riemann’s problem


– Hyperbolic equation with any initial conditions
 
∂U ∂U
 + A =0 =0
 ∂ t ∂x
  
  U L si x < 0
 U(x, 0) = U 0 (x) =  
u0(x)
  U R si x > 0

uL
– Initial conditions = discontinuity uR

x=0 x
http://www.hach.ulg.ac.be

• The Godunov’s method introduces the Riemann’s problem at


each boarder of Finite Volume

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Quasi-linear form and study of the characteristics

• 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

• The solution : wave propagation at velocity λi


http://www.hach.ulg.ac.be

wi ( x, t ) = wi ( x − λi t , 0 ) = wi initial ( x − λi t )

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Quasi-linear form and study of the characteristics

• In the characteristic space :


t
λi

λ1
λn

wi ( x, t ) = wi initial ( x − λi t )
http://www.hach.ulg.ac.be

• Along ith characteristic


dx
i.e. along the line dt
= λi , the value wi is constant

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Quasi-linear form and study of the characteristics

 
• As W =K U−1

• The unknown U of the conservative equations is written


 
U = KW

 n 
U =  wi ( x, t ) ri
i =1

• The solution of a hyperbolic problem is the superposition of


quantity wi to a simple wave which propagates at velocity λi
http://www.hach.ulg.ac.be

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Riemann’s problem

• Riemann’s problem for pure convective equation


 ∂u ∂u
 ∂t + a =0
 ∂x
 u if x < 0
u(x, 0) = u 0 (x) =  L
 u R if x > 0

– Initial condition = discontinuity


– The propagation in function of celerity
– Splitting of space-time in 2 regions of constant state
u0(x) ut(x) t Characteristic curve
x-a.t=0
http://www.hach.ulg.ac.be

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

 Fi + 1 = F U  xt =0  = auL


2
ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)
« Flux difference splitting » method : Riemann’s problem

• Riemann’s problem for an hyperbolic system


   
∂U ∂U ∂W ∂W
 +A =0 =0  +Λ =0
 ∂ t ∂x  ∂ t ∂x
   ⇔ 
  U L si x < 0    W L si x < 0
 U(x, 0) = U 0 (x) =    W(x, 0) = W 0 (x) =  
 
  U R si x > 0   W R si x > 0

• Diagonalization  N convective equations


t
If λp < 0 then w p,i + 1 = w p,R
2
λ1
If λp > 0 then w p,i + 1 = w p,L
http://www.hach.ulg.ac.be

w1L w2R x

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Riemann’s problem

• Riemann’s problem for an hyperbolic system


   
∂U ∂U  ∂W ∂W
 +A =0 =0  +Λ =0 =0
 ∂ t ∂x  ∂ t ∂x
   ⇔ 
  U L if x < 0    W L if x < 0
 U(x, 0) = U 0 (x) =    W(x, 0) = W 0 (x) =  
 
  U R if x > 0   W R if x > 0

• Space-time divided in (m+1) regions by the carrying characteristics of « Riemann


invariants » Wi
• The unknowns are constant in each region,   x
U ( x, t ) = U ( ), t>0
 solution « auto-similar » t t

λk λk+1
• Solution = linear combination λ m
http://www.hach.ulg.ac.be

of m waves from the initial discontinuity. λ1

UL UR x
  x=0 
U ( x = 0, t ) = U ( ) = U (0), ∀t > 0
t

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Riemann’s problem

• Riemann’s problem for an hyperbolic system


   
∂U ∂U  ∂W ∂W
 + A = 0 = 0  + Λ =0 =0
 ∂ t ∂x  ∂ t ∂x
   ⇔   
  U L si x < 0   W L si x < 0
 U(x, 0) = U 0 (x) =    W(x, 0) = W 0 (x) =  
 
  U R si x > 0   W R si x > 0

• 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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Riemann’s problem

• Riemann’s problem for an hyperbolic system


 n  n 
U=  x
wi , R ( x, t ) ri +  x
wi , L ( x, t ) ri
i:λ p < i:λ p >
t 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

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


Riemann’s problem : Euler equations

• 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 !!

ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)


« Flux difference splitting » method : Godunov’s flux

• Godunov’s flux for an hyperbolic system


 The flux of the Riemann’s solution at the interface
(
 Fi + 1 = F U  xt =0 
2
)
     
( ) 
n n
= F  U L +  ( wi , R − wi , L ) ri  = F UL + λi ( wi , R − wi , L ) ri
 
 i:λ p < 0  i:λ p < 0

     
( ) 
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

• Averaging these two equations :


  
Fi + 1
2
1
( ( ) ( ))
= F UL +F UR
2
1 n
−  λi ( wi , R − wi , L ) ri
2 i
1 1
Ex. 1 inc. : Fi + 1 = ( L
au + au R) − a ( uR − uL )
2 2 2
ArGEnCo – MS²F - Hydrologie, Hydrodynamique Appliquée et Constructions Hydrauliques (HACH)

You might also like