Upload
william-ruys
View
190
Download
0
Embed Size (px)
Citation preview
Differences Among Difference Schemes
NUMERICAL METHODS FOR PDES
Will iam L. Ruys
Objectives β’ Understand the classification of Second Order Linear
PDEsβ’ Understand the Finite Difference Methodsβ’ How to discretize an equationβ’ How to analyze convergence
β’ Implement and Analyze Schemes forβ’ A Parabolic PDE: 1D Heat-Diffusion Equationβ’ An Elliptic PDE: Laplaceβs Equation πππΌ π₯
πΉ β
π»2
Second Order Linear PDEs
πππΌ π₯
πΉ β
π»2
+E
β’ Evolution with DiffusionParabolic
β’ Steady StateElliptic
β’ Evolution with ConservationHyperbol
ic
Finite Difference ApproximationsFORWARD DIFFERENCEBACKWARD DIFFERENCE
πππΌ π₯
πΉ β
π»2
SECOND ORDER CENTERED DIFFERENCE
ππ’π , π
π π₯ =π’π+1 , πβπ’π , π
Ξπ₯ππ’π , π
π π₯ =π’π , πβπ’π β1 , π
Ξπ₯
π2π’π , π
π π₯2=π’π+1 , πβ2π’π , π+π’πβ 1 , π
(Ξπ₯ )2
Von-Neumann Analysisβ’ A Finite Difference Equation converges to its PDE when it
is stableβ’ Lax-Equivalence Theorem
β’ Break the solution into its Fourier modes and examine one of them.β’ Let in the difference equation (Where is the imaginary unit)
β’ Solve for the amplification factor, β’ Stable when πππΌ π₯
πΉ β
π»2
1D Heat-Diffusion EquationA PARABOLIC PDE β TEMPERATURE DISTRIBUTION IN A ROD
ππ’ππ‘ =π π
2π’π π¦ 2
Forward Time Difference!
π’ππ+1=π’π
π+π Ξπ‘Ξπ₯2
[π’π+1π β2π’π , π+1+π’πβ1
π ]
Backward Time
Difference! Centered Space Difference !
π’ππ=βπ Ξπ‘Ξπ₯2
π’π+1
π+1
+[1+π Ξπ‘Ξπ₯2 ]π’ππ+1+
βπ Ξπ‘Ξπ₯2
π’πβ1
π+1
BTCS FTCS
Comparison of FTCS and BTCSBTCS
β’ Implicitβ’ Slowβ’ Unconditionally Stable
FTCS
β’ Explicitβ’ Fastβ’ Conditionally Stable
β’ Only when
πππΌ π₯
πΉ β
π»2
Error Analysisβ’ Both schemes have an error O() and
O()
πππΌ π₯
πΉ β
π»2
Different Boundary Conditions - Example
DIRICHLET
β’ Heat escapes out of the sidesβ’ Temperature at boundaries
is fixed
NEUMANN
β’ Heat is trappedβ’ Heat Flux at boundaries is
fixed
πππΌ π₯
πΉ β
π»2
Laplaceβs EquationAN ELLIPTIC PDE β STEADY STATE 2D HEAT
π2π’ππ₯2
+π2π’π π¦2
=0Centered
Differences!
π’π , π=π’π+1 , π+π’πβ1 , π+π’π , π+ 1+π’π , πβ1
4
Jacobi IterationIterations through Grid: 999
πππΌ π₯
πΉ β
π»2π’π , ππ+1=
π’π+1 , ππ +π’πβ 1 , π
π +π’π , π+1π +π’π , πβ 1
π
4
Gauss-SeidelIterations through Grid: 692
πππΌ π₯
πΉ β
π»2π’π , ππ+1=
π’π+1 , ππ +π’πβ 1 , π
π+1 +π’π , π+1π +π’π , πβ 1
π+1
4
Successive Over Relaxation Iterations through Grid: 395
πππΌ π₯
πΉ β
π»2π’π , ππ+1= (1βπ )π’π , π
π +ππ’π+1 , ππ +π’πβ1 , π
π+1 +π’π , π+ 1π +π’π , πβ1
π+1
4
Iterations Needed to Increase Accuracy
0 1 2 3 4 5 6 7 8 9 100
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
SOR Linear (SOR) JacobiPolynomial (Jacobi) Gauss Polynomial (Gauss)
Number of Times Error Threshold is Halved from 0.10
Num
ber
of It
erat
ions
πππΌ π₯
πΉ β
π»2
High Frequency Error Dampening
πππΌ π₯
πΉ β
π»2
Jacobi Iteration Gauss-Seidel