Hydroinformatik II [1ex] ''Prozesssimulation und ... · Hydroinformatik II "Prozesssimulation und...
Transcript of Hydroinformatik II [1ex] ''Prozesssimulation und ... · Hydroinformatik II "Prozesssimulation und...
BHYWI-08: Semester-FahrplanVorlesungen
1 / 25
Hydroinformatik II
”Prozesssimulation und Systemanalyse”
BHYWI-08-06 @ 2018
Finite-Differenzen-Verfahren I
Olaf Kolditz
*Helmholtz Centre for Environmental Research – UFZ
1Technische Universitat Dresden – TUDD
2Centre for Advanced Water Research – CAWR
18.05./01.06.2018 - Dresden
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 2 / 25
Konzept
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 3 / 25
Fahrplan
Vorlesung
I Grundlagen der Finite Differenzen Methode
I Approximation methods
I Finite difference method – FDM (Ch. 3)
I Taylor series expansion
I Derivatives
I Diffusion equation
I (Finite element method – FEM ⇒ Hydrosystemanalyse)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 4 / 25
Naherungsverfahren
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 5 / 25
FDM Anwendungen - MODFLOW
http://water.usgs.gov/pubs/FS/FS-121-97/images/fig7.gif
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 6 / 25
Ableitungen
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 7 / 25
Taylor-Reihe
in time
un+1j =
∞∑m=0
∆tm
m!
[∂mu
∂tm
]nj
(1)
∆t = tn+1 − tn
in space
unj+1 =∞∑
m=0
∆xm
m!
[∂mu
∂xm
]nj
(2)
∆x = xj+1 − xj
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 8 / 25
Trunkation
un+1j = unj + ∆t
[∂u
∂t
]nj
+∆t2
2
[∂2u
∂t2
]nj
+ 0(∆t3) (3)
unj+1 = unj + ∆x
[∂u
∂x
]nj
+∆x2
2
[∂2u
∂x2
]nj
+ 0(∆x3) (4)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 9 / 25
1. Ableitung
[∂u
∂t
]nj
=un+1j − unj
∆t− ∆t
2
[∂2u
∂t2
]nj
+ 0(∆t2) (5)
[∂u
∂x
]nj
=unj+1 − unj
∆x− ∆x
2
[∂2u
∂x2
]nj
+ 0(∆x2) (6)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 10 / 25
Differenzen-Schemata
Forward difference approximation[∂u
∂x
]nj
=unj+1 − unj
∆x+ 0(∆x) (7)
Backward difference approximation[∂u
∂x
]nj
=unj − unj−1
∆x+ 0(∆x) (8)
Central difference approximation[∂u
∂x
]nj
=unj+1 − unj−1
2∆x+ 0(∆x2) (9)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 11 / 25
Zentrale Differenzen
unj+1 = unj + ∆x
[∂u
∂x
]nj
+∆x2
2
[∂2u
∂x2
]nj
+ 0(∆x3)
unj−1 = unj −∆x
[∂u
∂x
]nj
+∆x2
2
[∂2u
∂x2
]nj
− 0(∆x3) (10)
Central difference approximation[∂u
∂x
]nj
=unj+1 − unj−1
2∆x+ 0(∆x2) (11)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 12 / 25
Ableitungen
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 13 / 25
2. Ableitung
[∂2u
∂x2
]nj
≈ 1
∆x
([∂u
∂x
]nj+1
−[∂u
∂x
]nj
)
≈unj+1 − 2unj + unj−1
∆x2(12)
[∂2u
∂x2
]nj
=unj+1 − 2unj + unj−1
∆x2+
∆x2
12
[∂4u
∂x4
]nj
+ ... (13)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 14 / 25
Ubersicht Differenzenverfahren
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 15 / 25
Diffusionsgleichung
∂u
∂t− α∂
2u
∂x2= 0 (14)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 16 / 25
Analytical solution for diffusion equation (Skript 5.2.2)
I Diffusion equation
∂u
∂t− α∂
2u
∂x2= 0 (15)
I Analytical solution
u = sin(πx)e−αt2
(16)
I K: validity
⇒ Ubung
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 17 / 25
Ubersicht Differenzenverfahren
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 18 / 25
Explizite FDM - FTCS Verfahren (Skript 3.2.2/4.1)
I PDE for diffusion processes
∂u
∂t− α∂
2u
∂x2= 0 (17)
I forward time / centered space[∂u
∂t
]nj
≈un+1j − unj
∆t
[∂2u
∂x2
]nj
≈unj−1 − 2unj + unj+1
∆x2(18)
I substitute
un+1j − unj
∆t− α
unj−1 − 2unj + unj+1
∆x2= 0 (19)
I FTCS scheme for diffusion equations
un+1j = unj +
α∆t
∆x2(unj−1 − 2unj + unj+1) , Ne =
α∆t
∆x2(20)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 19 / 25
Eigenschaften numerischer Verfahren
Analysis of approximation schemes consists of three steps:
I Develop the algebraic scheme,
I Check consistency of the algebraic approximate equation,
I Investigate stability behavior of the scheme.
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 20 / 25
Eigenschaften numerischer Verfahren
Analysis of approximation schemes consists of three steps:
I Develop the algebraic scheme,
un+1j = unj +
α∆t
∆x2(unj−1 − 2unj + unj+1) (21)
I Check consistency of the algebraic approximate equation,
lim∆t,∆x→0
|L(unj )− L(u[tn, xj ])| = 0 (22)
I Investigate stability behavior of the scheme.
Ne = α∆t∆x2≤1/2
(23)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 21 / 25
Losung des FTCS Schemas
Algebraische Schema
un+1j = unj +
α∆t
∆x2(unj−1 − 2unj + unj+1) (24)
Resultierendes Gleichungssystem
un+1 = Aun , n = 0, 1, 2, ... (25)
A =
1− 2. . .
. . .. . .
. . .. . .
. . .. . .
1− 2
, un =
un2un3...
unnp−2
unnp−1
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 22 / 25
Explizite und implizite Differenzenverfahren
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 23 / 25
Implizites Differenzenverfahren: Next Lecture
Algebraische Schema:[∂2u
∂x2
]n+1
j
≈un+1j−1 − 2un+1
j + un+1j+1
∆x2(26)
un+1j − unj
∆t− α
un+1j−1 − 2un+1
j + un+1j+1
∆x2= 0 (27)
α∆t
∆x2(−un+1
j−1 + 2un+1j − un+1
j+1 ) + un+1j = unj (28)
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 24 / 25
BHYWI-08: Semester-FahrplanVorlesungen
BHYWI-08-06: FDM#1 // 18.05./01.06.2016 25 / 25