CSE5004 – Solved

$ 20.99
Category:

Description

Lecture 10
PDE and Programming โ€“ 1
Jung-Il Choi

Lecture 10
โ€ข Partial Differential Equation โ€ข 1D PDEs
๏ฌ 1D Heat equation
๏ƒจ Semi-discretization
๏ƒจ Stability analysis
๏ƒผ Eigenvalue analysis
๏ƒผ Modified wavenumber analysis
๏ƒผ von Neumann analysis
๏ƒจ Accuracy via modified equation
๏ƒจ Example 1
๏ฌ 1D Wave equation
๏ƒจ Semi-discretization
๏ƒจ Stability analysis
๏ƒผ Modified wavenumber analysis
๏ƒจ Example 2
Contents
Lecture 11
โ€ข Multi-dimension
๏ฌ Heat equation
๏ƒจ Implicit methods in higher
๏ƒจ Approximate factorization
๏ƒจ Stability analysis
๏ƒจ Alternating direction implicit methods (ADI)
๏ฌ Poisson equation
๏ƒจ Iterative solution methods
๏ƒผ Point Jacobi method
๏ƒผ Gauss-Seidel method
๏ƒผ Successive over relaxation method (SOR)
๏ฌ Non-linear PDEs
2 / 41
โ€ข Partial Differential Equation (PDE)
๏ฌ๏€ An equation stating a relationship between a function of two or more independent variables and the partial derivatives of this function with respect to these independent variables.Non linear์˜ ๋Œ€ํ‘œ์ ์ธ ์˜ˆ
๏ƒจ0: 2D Laplace equation
๐‘ข 0
๏ƒจ ๐‘“ ๐‘ฅ, ๐‘ฆ: 2D Poisson equation
๏ƒผ โ†’ ๐‘ข ๐‘ข ๐‘“
๏ƒจ ๐‘ : 1D Diffusion equation
๏ƒผ (โ†’ ๐‘ข ๐‘ ๐‘ข )
๏ƒจ ๐‘ : 1D Wave equation
๏ƒผ (โ†’ ๐‘ข ๐‘ ๐‘ข ) ์ด ๊ฒฝ์šฐ๋Š” ์ผ์ •ํ•œ ์†๋„์™€ ๋ฐฉํ–ฅ์œผ๋กœ ์›€์ง์ž„ ์†๋„๊ฐ€ ๋น ๋ฅด๋ฉด ๋น ๋ฅด๊ฒŒ, Diffusion equation ๋А๋ฆฌ๋ฉด ๋А๋ฆฌ๊ฒŒ
ํ•˜๋Š” wave equation
ฮ”ฮฆ 4๐œ‹๐บ๐œŒ
https://en.wilipedia.org/wiki/
3 / 41

โ€ข Solution and linearity(or nonlinearity) of PDEs
๏ฌ The solution of a PDE in some region ๐‘… of the domain of interest, ๐ท ๐‘ฅโƒ—, ๐‘ก
๏ƒจ the particular function, ๐‘ข ๐‘ฅโƒ—, ๐‘ก satisfies the PDE in ๐‘…,
๏ƒจ and the initial and/or boundary conditions specified on the boundaries of ๐‘… โŠ‚ ๐ท.
ํ‰๊ท ์— ๋Œ€ํ•ด์„œ๋Š” ๋ณด์žฅ์„ ๋ฐ›์„ ์ˆ˜ ์žˆ์Œ (analysis๊ฐ€๋Šฅ)
initial์„ ๋ฌด์กฐ๊ฑด ์ •.ํ™•.ํžˆ ์•Œ์•„์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ์ด ์•„๋‹˜! ์—ฌ๋Ÿฌ๋ฒˆ์˜ trial์„ ํ•ด์•ผํ•จ
๏ฌ Linear PDE https://m.blog.naver.com/pmw9440/221442252220
๏ƒจ All partial derivatives appear in a linear form (first degree in the unknown function ๐‘ข and its derivatives)
๏ƒจ โ€œANDโ€ none of the coefficients depend on the dependent variable
๐‘ข ๐‘ข 0, ๐‘ข c ๐‘ข , ๐‘Ž๐‘ข ๐‘๐‘ฅ๐‘ข 0
๏ฌ Nonlinear PDE
Variable coefficient linear PDE
๏ƒจ The derivatives appear in a nonlinear form depends on โ€œindependentโ€ variable
๏ƒจ โ€œORโ€ the coefficients depend on the dependent variable
๐‘ข๐‘ข ๐‘๐‘ข 0, ๐‘Ž๐‘ข ๐‘๐‘ข
4 / 41
โ€ข Order of PDE
๏ฌ๏€ The highest-order derivative
๐œ• ๐‘ข ๐œ•๐‘ข
0 โ†’ 2 ๐‘œ๐‘Ÿ๐‘‘๐‘’๐‘Ÿ ๐œ•๐‘ฅ ๐œ•๐‘ฆ
โ€ข Homogeneous vs Nonhomogeneous
๏ฌ๏€ Homogeneous PDE
๏ƒจ๏€ each of the terms contains ๐‘ข or the dependent variables or its partial derivatives.
๐‘ข ๐‘ข 0
๐‘ข๐‘ข ๐‘๐‘ข 0 ๐‘Ž๐‘ข ๐‘๐‘ข 0
๏ฌ๏€ Nonhomogeneous PDE
โˆ‡ ๐‘ข ๐‘ข ๐‘ข ๐‘ข ๐‘“ ๐‘ฅ, ๐‘ฆ, ๐‘ง
5 / 41
โ€ข Classification of PDEs using characteristics analysis
๏ƒจ๏€ Consider the general quasilinear 2nd order nonhomogeneous PDE in 2D:
๐ด๐‘ข ๐ต๐‘ข ๐ถ๐‘ข ๐น ๐‘ฅ, ๐‘ฆ, ๐‘ข, ๐‘ข , ๐‘ข
๏ฌ Parabolic equation (๐ต
๏ฌ Hyperbolic equation (๐ต 4๐ด๐ถ

4๐ด๐ถ Quasilinear : linear in the highest-order derivative
0) ์—๋„ˆ์ง€๊ฐ€ ๋งŽ๋‹ค๋ฉด, ์˜จ ์‚ฌ๋ฐฉ์— ๊ท ์ผํ•˜๊ฒŒ ๋‚˜๋ˆ ์คŒ๋ชจ๋ž˜์„ฑ์ด ์‚ฌ๋ผ์ง€๋Š” ๊ทธ๋ฆผ ์ƒ๊ฐํ•˜๋ฉด ์ข‹์•„ ๋ชจ์–‘์ด ํฌ๋ฌผ์„  ๊ฐ™์•„์„œ!
๐‘ โˆ‡ ๐‘ข : Diffusion equation 0)
ํŒŒ๋„๊ฐ€ ์ณ์„œ ์˜ค๋Š” ๋ชจ์–‘!
u(x,t)์„ y๋ผ๋Š” ์‹์„ ์จ์„œ ํ‰ํ–‰์ด๋™ ํ•ด๋ฒ„๋ฆฌ์ž
๐‘ โˆ‡ ๐‘ข : Wave equation t์ถ•๊ณผ x์ถ•์ด ์žˆ์„ ๋•Œ, ๋งค๊ฐœ์ฒด๊ฐ€ c:์†๋„
c์— t๋ฅผ ๊ณฑํ•˜๋ฉด ๊ฐ„ ๊ฑฐ๋ฆฌ๊ฐ€ ๋˜๋‹ˆ, y = x – ct๋กœ ํ•˜๋ฉด 1๋ณ€์ˆ˜๋กœ ๋ฐ”๋€œ
u(x,t) ==> f(x-ct) + f(x+ct) : solution์ด dependentํ•จ
๏ฌ๏€ Elliptic equations (๐ต 4๐ด๐ถ 0)
โˆ‡ ๐‘ข 0
โˆ‡ ๐‘ข ๐‘“ ๐‘ฅโƒ— : Laplace equation (homogeneous) and Poisson equation (nonhomogeneous)
Heat equation์˜ steady stationary condition์ด๋ฉด laplace eq.
โ€”> ์‹œ๊ฐ„์— ๋Œ€ํ•œ ์š”์†Œ๊ฐ€ ์—†์Œ
โ€”> diffusion eq. solution์ด ๋ณ€ํ•˜์ง€ ์•Š์„ ๋•Œ๊นŒ์ง€ ๊ฐ€๋Š” ๊ฒƒ ( time scale์ด ์—†์–ด
6 / 41
โ€ข Classification of PDEs using characteristics analysis
๏ฌ๏€ The terminology elliptic, parabolic, and hyperbolic chosen to classify PDEs reflects the analogy between the from of the discriminant ๐‘ฉ๐Ÿ ๐Ÿ’๐‘จ๐‘ช
๏ƒจ๏€ (from the idea of dโ€™Alembertโ€™s solution, methods of characteristics) ๏ƒจ๏€ And that which classifies conic section.
๐ด๐‘ฅ ๐ต๐‘ฅ๐‘ฆ ๐ถ๐‘ฆ ๐ท๐‘ฅ ๐ธ๐‘ฆ ๐น 0
Type Defining condition Examples
Parabolic ๐ต 4๐ด๐ถ 0 Diffusion equation
Hyperbolic ๐ต 4๐ด๐ถ 0 Wave equation
Elliptic ๐ต 4๐ด๐ถ 0 Laplace/Poisson equation
๐ด๐‘ข ๐ต๐‘ข ๐ถ๐‘ข ๐น ๐‘ฅ, ๐‘ฆ, ๐‘ข, ๐‘ข , ๐‘ข
https://en.wilipedia.org/wiki/
7 / 41
โ€ข Classification of PDEs using characteristics analysis
๏ฌ Characteristics
๏ƒจ Propagate behavior of each fixed point on the space at the โ€œHyperโ€ space( ๐‘› 1 D space for ๐‘›D PDE) ๏ƒจ๏€ Information, ๐‘ข (velocity, temperature, pressure etc.) propagates along path.
๏ฌ Are there any points in the solution domain ๐ท ๐‘ฅ, ๐‘ฆ passing through a general point ๐‘ƒ along which the second derivatives of ๐‘ข x, y are multivalued or discontinuous (kernel space)?
๏ƒจ Homogeneous solution
๏ƒจ If there are such paths, they are called path of information propagation ๏ƒจ๏€ Or Characteristics
8 / 41
โ€ข Classification of PDEs using characteristics analysis
๏ฌ๏€ Chain rule & Homogeneous solution (Kernel space)
๐‘‘ ๐‘ข ๐‘ข ๐‘‘๐‘ฅ ๐‘ข ๐‘‘๐‘ฆ
๐ด
๐‘‘๐‘ฅ
๐ต
๐‘‘๐‘ฆ
๐‘‘๐‘ฅ ๐ถ

๐‘‘๐‘ฆ ๐‘ข
๐‘ข
๐‘ข
๐‘ข ๐‘‘๐‘ฆ
๐ด ๐ต ๐ถ
โ‡’ det ๐‘‘๐‘ฅ ๐‘‘๐‘ฆ 0
๐‘‘๐‘ฅ ๐‘‘๐‘ฆ
0
Discriminant Characteristics Type
๐ต 4๐ด๐ถ 0 Real & Repeated Parabolic
๐ต 4๐ด๐ถ 0 Real & Distinct Hyperbolic
๐ต 4๐ด๐ถ 0 Complex Elliptic
๐‘‘๐‘ฆ ๐ต ๐ต 4๐ด๐ถ
โ‡’
๐‘‘๐‘ฅ 2๐ด
9 / 41
โ€ข Classification of PDEs using characteristics analysis
๏ฌ Parabolic PDEs have one real repeated characteristic path (Critical damping, diffusing)
๏ฌ Hyperbolic PDEs of two real distinct characteristic paths (Overdamping, diffusing)
๏ฌ Elliptic PDEs have no real characteristic paths (Oscillatory)
10 / 41

One-dimensional PDEs

โ€ข 1D Heat equation
๏ฌ Semi-discretization
๏ฌ Temporal discretization
๏ฌ Stability analysis
๏ƒจ Eigenvalue/Eigenvector analysis
๏ƒจ Modified wavenumber analysis
๏ƒจ von Neumann analysis
๏ฌ Accuracy via modified equation
๏ฌ Example 1
โ€ข 1D Wave equation
๏ฌ Semi-discretization
๏ฌ Stability analysis
๏ƒจ๏€ Modified wavenumber analysis
๏ฌ Example 2
11 / 41
Full๋กœ ํ•˜๋ ค๋‹ˆ ๋„ˆ๋ฌด ์จ์•ผํ•˜๋Š”๊ฒŒ ๋งŽ์•„..!! 1D Heat equation
โ€ข Semi-discretization – Solving a PDE as a system of ODEs
๏ฌ Numerical methods for PDEs are straightforward extensions of methods developed for initial and boundary value problems in ODEs.
๏ฌ That is, a PDE can be converted to a system of ODEs by using finite difference methods for the derivatives in all but one of dimensions.
๏ฌ Consider the one-dimensional diffusion(or heat equation)
๐œ•๐œ™ ๐œ• ๐œ™ Initial condition : ๐œ™ ๐‘ฅ, 0 ๐‘” ๐‘ฅ

๐œ•๐‘ก ๐›ผ ๐œ•๐‘ฅ Boundary condition : ๐œ™ 0, ๐‘ก ๐œ™ ๐ฟ, ๐‘ก 0
๏ฌ Discretization of the Domain with ๐‘ intervals โ†’ ๐‘ 1 uniformly spaced grid points
ฮ”๐‘ฅ ฮ”๐‘ฅ

๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ๐‘ฅ ฮ”๐‘ฅ
๐‘— 0, ๐‘— ๐‘ are the boundaries
๐‘— 1, 2, 3, โ‹ฏ , ๐‘ 1 are interior points
12 / 41

๊ณต๊ฐ„์ฐจ๋ถ„ ๋จผ์ € (x(j)์‹œ์ )
Semi-discretization
๏ฌ Letโ€™s use the second-order central difference scheme to the second derivative.
๐‘‘๐œ™ ๐œ™ 2๐œ™ ๐œ™
๐›ผ , ๐‘— 1,2,3, โ‹ฏ , ๐‘ 1 ๐‘‘๐‘ก ฮ”๐‘ฅ
Where ๐œ™ ๐œ™ ๐‘ฅ, ๐‘ก
๏ฌ A system of ๐‘ 1 ordinary differential equations
๏ƒจ Space derivatives for fixed time (โ†’ Semi-discretization) and solving time marching as solving ODEs.
๏ƒจ Can be written in matrix form as:
๐‘‘๐œ™
๐ด๐œ™
๐‘‘๐‘ก
๏ƒจ Where as ๐œ™ are the (time-dependent) elements of the vector ๐œ™, and ๐ด is an ๐‘ 1 ๐‘ 1 tridiagonal
matrix.
13 / 41
Semi-discretization
2 1 โ‹ฏ
๐›ผ 1 2 1
๐ด
ฮ”๐‘ฅ โ‹ฑ โ‹ฑ โ‹ฑ
1 2
โ†’ ๐‘ 1 ๐‘ 1 tridiagonal matrix which is symmetric
๏ฌ The result is a system of ODEs that can be solved using any of the numerical methods introduced for ODEs, such as Euler methods, RK formulas or multi-step methods.
๏ฌ However, when dealing with systems, we should be concerned about stability.
๏ฌ The range of the eigenvalues of ๐ด determines whether the system is stable.
๐ด๐œ™ ๐œ†๐œ™ โ†’ det ๐ด ๐œ†๐ผ 0
14 / 41
Temporal discretization
โ€ข (Recall) Various time advancement schemes
๐‘‘๐œ™
๐ด๐œ™
๐‘‘๐‘ก
๏ฌ Forward Euler scheme
๐œ™ ๐œ™
๐ด๐œ™
ฮ”๐‘ก
๏ฌ Backward Euler scheme
๐œ™ ๐œ™
๐ด๐œ™
ฮ”๐‘ก
๏ฌ Crank-Nicolson scheme
๐œ™ ๐œ™
๐ด
ฮ”๐‘ก
15 / 41

โ€ข Eigenvalue/Eigenvector analysis
๏ฌ (Recall) Diagonalization, Eigenvalues, ฮ› & Eigenvectors(Eigenfunctions), ๐‘‹
๏ƒจ๏€ Diagonalization (Decoupling)
๏ƒผ๏€ Suppose ๐ด has the eigenvalues (๐‘–๐‘’. ๐ด is diagonalizable),
๐‘‹ ๐ด๐‘‹ ฮ› โ†’ ๐ด ๐‘‹ฮ›๐‘‹
๐‘‘๐œ™ ๐‘‘๐œ™๐‘‘๐œ™
๐ด๐œ™ โ‡’ ๐‘‹ฮ›๐‘‹ ๐œ™ โ‡’ ๐‘‹ ฮ›๐‘‹ ๐œ™
๐‘‘๐‘ก ๐‘‘๐‘ก๐‘‘๐‘ก
๐‘‘ ๐‘‹ ๐œ™๐‘‘๐œ“
ฮ›๐‘‹ ๐œ™ โ‡’ ฮ›๐œ“, ๐œ“ ๐‘‹ ๐œ™
๐‘‘๐‘ก๐‘‘๐‘ก
๐‘‘๐œ“
๐œ†๐œ“ โ‡’ ๐œ“ ๐‘๐‘’ โ‡’ ๐œ“ ๐‘
๐‘‘๐‘ก
๐‘’
0
โ‹ฎ ๐‘ 0
๐‘’
โ‹ฎ โ‹ฏ ๐‘ 0
0
โ‹ฎ
0 0 ๐‘’
๐œ“ ๐‘ ๐‘’ โ†’ ๐œ™ ๐‘‹๐œ“
16 / 41
๏ฌ Analytical expressions of eigenvalues of the matrix ๐ด
๐œ‹๐‘—
๐œ†2 2 cos, ๐‘— 1,2,3, โ‹ฏ , ๐‘ 1
๐‘
๏ฌ The eigenvalue with the smallest (๐‘— 1) and the largest magnitude (๐‘— ๐‘ 1) is:
๐›ผ ๐œ‹
๐œ†2 2 cos, ๐œ†2 2 cos ฮ”๐‘ฅ ๐‘

๏ƒจ For large, ๐‘, the Taylor series expansion for cos converges rapidly, and cos converges to -1.
๐œ‹ 1๐œ‹ ๐‘ 1
cos 1 โ‹ฏ , cos ๐‘๐‘œ๐‘ ๐œ‹ 1
๐‘ 2!๐‘
๏ƒจ Using the first two terms in the expansion then,
๐œ‹ ๐›ผ
๐œ† ,
๐‘ ฮ”๐‘ฅ
17 / 41
๐œ‹ ๐›ผ
๐œ† 4 ,
๐‘ ฮ”๐‘ฅ ๐œ† ๐›ผ
4
ฮ”๐‘ฅ
๏ฌ The ratio of the eigenvalue with the largest modulus to that with the smallest modulus is :

๏ƒจ For large N, the system is unstable!
18 / 41
frequency : 1์ดˆ๋‹น ์ง„๋™์ˆ˜ Wavenumber : wave์˜ ์ˆซ์ž
โ€ข Modified wavenumber analysis ๊ณต๊ฐ„์ฐจ๋ถ„์„ ์–ด๋–ป๊ฒŒ ํ•˜๋ƒ์— ๋Œ€ํ•ด์„œ ๊ฒฐ์ •๋จ
๏ฌ๏€ Let revisit the heat equation,
๐›ผ
cos ๐‘˜ฮ”๐‘ฅ
๐‘‘๐‘ก
๐‘‘๐œ“
๐›ผ๐‘˜โ€ฒ ๐œ“
๐‘‘๐‘ก
2
๐‘˜โ€ฒ1 cos ๐‘˜ฮ”๐‘ฅ
ฮ”๐‘ฅ
๏ƒจ ๐›ผ๐‘˜ ๐œ†
๐œ“ ๐œ†๐œ“
๏ƒจ Using the forward Euler for time advancement,
2๐›ผ
1 cos ๐‘˜ฮ”๐‘ฅ ๐œ“
ฮ”๐‘ก ฮ”๐‘ฅ
2 2
ฮ”๐‘ก โ‡’ ฮ”๐‘ก
๐œ† 2๐›ผ 1 cos ๐‘˜ฮ”๐‘ฅ
ฮ”๐‘ฅ
๏ƒจ Since, 1 cos ๐‘˜ฮ”๐‘ฅ 1, the worst-case scenario is :
ฮ”๐‘ฅ
ฮ”๐‘ก
2๐›ผ
20 / 41
๐›ผ๐‘˜
ฮ”๐‘ก
1 ๐œ“
๏ƒผ For the stability analysis,
๐‘‘๐œ“
๐›ผ๐‘˜โ€ฒ ๐œ“
๐‘‘๐‘ก
2
๐‘˜โ€ฒ1 cos ๐‘˜ฮ”๐‘ฅ
ฮ”๐‘ฅ
๐œ“ ๐œŽ๐œ“
Where ๐œŽ โ‡’ ๐œŽ 1
๏ƒจCrank-Nicolson is unconditionally stable
21 / 41
๐‘‘๐œ“
๐›ผ๐‘˜โ€ฒ ๐œ“
๐‘‘๐‘ก
2
๐‘˜โ€ฒ1 cos ๐‘˜ฮ”๐‘ฅ
ฮ”๐‘ฅ
๏ƒจ Using backward Euler
๐›ผ๐‘˜ ๐œ“
ฮ”๐‘ก
1 ๐œ“ ๐œ“
๏ƒผ For the stability analysis,
๐œ“ ๐›พ๐œ“
1 1
Where ๐›พ โ‡’ ๐›พ 1
๏ƒจBackward Euler is unconditionally stable
๏ƒผ However, in contrast to Crank-Nicolson, ๐œŽ โ†’ 0 when ฮ”๐‘ก โ†’ โˆž. That is, the solution does not exhibit undesirable oscillations (although it would be inaccurate).
22 / 41
๏ฌ๏€ Consider the wave equation,
๐œ•๐‘ข ๐œ•๐‘ข
๐‘ 0, 0 ๐‘ฅ ๐ฟ, ๐‘ก 0
๐œ•๐‘ก ๐œ•๐‘ฅ
๏ƒจ Assuming, ๐‘ข ๐‘ฅ, ๐‘ก ๐‘ฃ ๐‘ก ๐‘’
๐‘‘๐‘ฃ๐‘‘๐‘ฃ
๐‘’ ๐‘–๐‘˜๐‘ ๐‘’ ๐‘ฃ โ‡’ ๐‘–๐‘˜๐‘ ๐‘ฃ Modified wavenumber
๐‘‘๐‘ก๐‘‘๐‘ก
๏ƒจ Semi-discretized equation with central difference scheme,
๐‘‘๐‘ข ๐‘ข ๐‘ข ๐‘‘๐‘ฃ sin ๐‘˜ฮ”๐‘ฅ
๐‘ 0 โ‡’ ๐‘–๐‘ ๐‘ฃ ๐‘–๐‘๐‘˜๐‘ฃ
๐‘‘๐‘ก 2ฮ”๐‘ฅ ๐‘‘๐‘ก ฮ”๐‘ฅ
23 / 41
โ€ข von Neumann stability analysis
๏ฌ Matrix stability analysis using the eigenvalues of the matrix obtained from a semi-discretization of
PDE
๏ƒจ This is only available for very simple matrices ๏ฌ๏€ Consider full discretization of PDE
๏ƒจ von Neumann stability analysis does not account for the effect of boundary conditions; periodic boundary conditions are assumed.
๏ƒจ Linear, constant coefficient differential equations with uniformly spaced spatial grids.
๐œ•๐œ™ ๐œ• ๐œ™
๐›ผ
๐œ•๐‘ก ๐œ•๐‘ฅ
๏ฌ Second-order central difference with the explicit Euler method
๐œ™ ๐œ™ ๐œ™ 2๐œ™ ๐œ™
๐›ผ
ฮ”๐‘ก ฮ”๐‘ฅ
๏ฌ Assuming a solution of the form
๐œ™ ๐œŽ ๐‘’
24 / 41

๐œ™๐œ™2๐œ™๐œ™
๐œŽ ๐‘’ ๐œŽ ๐‘’ 2๐‘’ ๐‘’
Where ๐‘ฅ ๐‘ฅ ฮ”๐‘ฅand ๐‘ฅ ๐‘ฅ ฮ”๐‘ฅ.
๐›ผฮ”๐‘ก
๐œŽ 12 cos ๐‘˜ฮ”๐‘ฅ 2
ฮ”๐‘ฅ
For stability, ๐œŽ 1
2 cos ๐‘˜ฮ”๐‘ฅ 1
๐›ผฮ”๐‘กฮ”๐‘ฅ
2 cos ๐‘˜ฮ”๐‘ฅ 2 โ†’ ฮ”๐‘ก
ฮ”๐‘ฅ
The worst (or the most restrictive) case occurs when cos ๐‘˜ฮ”๐‘ฅ
ฮ”๐‘ฅ
ฮ”๐‘ก
2๐›ผ
25 / 41

Accuracy via modified equation
๏ฌ By 1 ๐›ผ 2 ,
๐œ• ๐œ™
๐›ผ
๐œ•๐‘ฅ
๏ฌ Consider the (unsteady) heat equation (or 1D diffusion equation) given by:
๏ƒจ ๏€ ๐‘ฅ ๐‘ฅ ฮ”๐‘ฅ
๏ฌ Discretized equation:

28 / 41

๏ฌ Discretized equation:
๏ƒจ The PDE has been converted to a system of ODEs
๏ฌ Time advancement
๏ƒจ Using forward Euler,
๐‘‡ ๐‘‡ ฮ”๐‘ก๐น ๐‘‡ , ๐‘ก
1,2,3, โ‹ฏ , ๐‘ 1
๐›ผ
๐‘‡ 2๐‘‡
ฮ”๐‘ฅ
๐›ผ
๐‘‡ 2๐‘‡ ๐‘‡
ฮ”๐‘ฅ
โ‹ฎ
๐œ‹ 1 ๐‘’ sin ๐œ‹๐‘ฅ
๐œ‹ 1 ๐‘’ sin ๐œ‹๐‘ฅ
29 / 41

๏ฌ๏€ The stability of the numerical solution for time advancement depends on the eigenvalue of the system having the largest magnitude:
๐›ผ
๐œ† 4
ฮ”๐‘ฅ
๏ƒจ When forward Euler is used for real and negative ๐œ†:
2 ฮ”๐‘ฅ
ฮ”๐‘ก
2๐›ผ
๏ƒจ For ๐›ผ 1 and ฮ”๐‘ฅ 0.05,
ฮ”๐‘ก 0.00125
30 / 41
โ€ข Pseudo-code & Code

31 / 41
โ€ข result
๏ฌ ฮ”๐‘ก 0.001, ฮ”๐‘ฅ 0.05, ๐›ผ 1

๏ฌ ฮ”๐‘ก 0.0015, ฮ”๐‘ฅ 0.05, ๐›ผ 1

32 / 41

(dissipatio i ์—๋„ˆ์ง€๊ฐ€์ ์ ์—†์–ด์ง‘ n dispersion: ์—๋„ˆ์ง€๊ฐ€์ ์ ๋งŽ์•„์ง? p ์‹œ๊ฐ„์ด์ง€๋‚˜๋„๋ชจ์–‘์ด๋ณ€ํ•˜์ง€์•Š์•„์•ผํ•จ .
๏ฌ Consider a semi-discretization of the following first-order wav1diD Wave equationssipation๋˜๋Š”ๅœๆŒ‘ๆ˜จ e equation :์ฐจ๋ถ„ํ™”ํ• ๋•Œ ,์—†๋‚ด๊ทธ์„๋ž˜๊ฐ€์ˆ˜์›ํ”„๋„ํ•˜๋ชจ์–‘์ด์žˆ๋Š”๊ฒฉ์ž–์•„์ž์œ„?!์น˜์—
๏ƒจ aka the convection/transport equation ๊ทธ๋ž˜์„œ์–ด๋ ต๋‹ค. (FDM),
๐œ•๐‘ข ๐œ•๐‘ข Initial condition : ๐‘ข ๐‘ฅ, 0 ๐‘“ ๐‘ฅ
๐‘ 0
๐œ•๐‘ก ๐œ•๐‘ฅ Boundary condition : ๐‘ข 0, ๐‘ก ๐œ™ ๐ฟ, ๐‘ก 0 ๅฒฌๅทž์‹ถ์€๋ฐ’
๏ƒจ A simple model equation for the convection phenomena. l l h t l l l r
๏ƒจ The exact solution is such that an initial disturbance in the domain (๐‘ข ๐‘ฅ, 0 ) simply propagates with the constant convection speed ๐‘ in the positive (or negative) ๐‘ฅ-direction.
33 / 41
๐œ•๐‘ข ๐œ•๐‘ข
๐‘ 0
๐œ•๐‘ก ๐œ•๐‘ฅ
Semi-discretization
๏ฌ๏€ Semi-discretization
๏ƒจ Assume ๐‘ 0, and using central difference scheme, ์‹œ๊ฐ„์—๋Œ€ํ•œ์ฐจ๋ถ„X c ๊ณต๊ฐ„์—๋Œ€ํ•œ์ฐจ๋ถ„0.
๐‘‘๐‘ข ๐‘ข ๐‘ข
๐‘ 0
๐‘‘๐‘ก 2ฮ”๐‘ฅ ์˜ System o f ODE๊ฐ€๋จ .
๏ƒจ In matrix from,
๐‘‘๐‘ข
๐ด๐‘ข
๐‘‘๐‘ก
0 1 โ‹ฏ
1 0 1 where ๐ด ๐‘ 1 ๐‘ 1 tridiagonal matrix which is not symmetric
โ‹ฑ โ‹ฑ โ‹ฑ
1 0
๏ƒผ From analytical consideration, no boundary condition is prescribed at ๐‘ฅ ๐ฟ.
๏ƒผ However, a special numerical boundary treatment is required at ๐‘ฅ ๐ฟ owing to the use of central differencing in this problem.
๏ƒผ A typical well-behaved numerical boundary treatment at ๐‘ฅ ๐ฟ slightly modifies the last row of the coefficient matrix ๐ด, but we will ignore it for now.
34 / 41

๏ƒจ Thus, the eigenvalues of the matrix resulting from semi-discretization of the convection equation are purely imaginary N ๋ฐ”๋žŒ์ด๋ถ€๋Š”๋ฐฉํ–ฅ์œผ๋กœN . balanced๋œ stability์จ๋„
upwind ์ข‹์ง€์•Š์•„์„œ๊ฒฐ๊ตญ Upwind .
๐‘ ๐œ‹๐‘—
๐œ† ๐‘–๐œ”, where ๐œ” cos
ฮ”๐‘ฅ ๐‘
๏ƒจ The solution is a superposition of modes, where each modeโ€™s temporal behavior is given by ๐‘’ ๏ƒจ๏€ Oscillatory or sinusoidal(non-decaying) character.
35 / 41
๐‘‘๐‘ฃ
๐‘–๐‘๐‘˜๐‘ฃ
๐‘‘๐‘ก
sin ๐‘˜ฮ”๐‘ฅ
๐‘˜
ฮ”๐‘ฅ
Stability analysis
๏ƒจ Leap flog method for time advancement,
๐‘ฃ ๐‘ฃ sin ๐‘˜ฮ”๐‘ฅ

๏ฌ Consider the numerical solution to the homogeneous convection equation
๐œ•๐‘ข ๐œ•๐‘ข
๐‘ 0
๐œ•๐‘ก ๐œ•๐‘ฅ 0
๐‘ก ๐‘ฅ ๐ฟ 0
๏ƒจ Initial conditions: ๐‘ข ๐‘ฅ, 0 ๐‘’ .
๏ƒจ Boundary conditions: ๐‘ข 0, ๐‘ก 0
๏ƒจ Although the proper spatial domain for this PDE is semi-infinite, numerical implementation requires a finite domain.
๏ƒจ Thus, we arbitrarily truncate the domain to 0 ๐‘ฅ 1
๏ฌ Semi-discretized equation using a 2nd order central difference scheme:
๐‘‘๐‘ข ๐‘ข ๐‘ข
๐‘ 0
๐‘‘๐‘ก 2ฮ”๐‘ฅ
37 / 41
โ€ข Pseudo-code & Code

๐‘ฅ
๐‘ก
๐‘ข u โ† e
0
๐‘ โ† 1
๐‘‘๐‘ข๐‘‘๐‘ก
๐‘‘๐‘ข๐‘‘๐‘ก
๐‘‘๐‘ข๐‘‘๐‘ก Program solve_wave_eq
โ† 0, ๐‘ฅ โ† 0.75
โ† 0, ๐‘›๐‘ก โ† 21 ๐‘‘๐‘ก โ† 0.01, ๐‘‘๐‘ฅ โ† 0.01
.
โ† 0
๐ถ๐‘Ž๐‘™๐‘™ ๐ธ๐‘ข๐‘™๐‘’๐‘Ÿ ๐‘œ๐‘Ÿ ๐‘…๐พ4 ๐‘ก, ๐‘ข, ๐‘›๐‘ก, ๐‘‘๐‘ก, ๐‘ค๐‘Ž๐‘ฃ๐‘’๐‘’๐‘ž, ๐‘ฅ, ๐‘‘๐‘ฅ
End program
Function waveeq(T, t, x, dx)
โ†
โ†
๐‘Ÿ๐‘’๐‘ก๐‘ข๐‘Ÿ๐‘› ๐‘‘๐‘ข๐‘‘๐‘ก
End function

38 / 41

๐‘ฅ
๐‘ก
๐‘ข u โ† e
0
๐‘ โ† 1
๐‘‘๐‘ข๐‘‘๐‘ก
๐‘‘๐‘ข๐‘‘๐‘ก
๐‘‘๐‘ข๐‘‘๐‘ก Program solve_wave_eq
โ† 0, ๐‘ฅ โ† 0.75
โ† 0, ๐‘›๐‘ก โ† 21 ๐‘‘๐‘ก โ† 0.01, ๐‘‘๐‘ฅ โ† 0.01
.
โ† 0
๐ถ๐‘Ž๐‘™๐‘™ ๐ธ๐‘ข๐‘™๐‘’๐‘Ÿ ๐‘œ๐‘Ÿ ๐‘…๐พ4 ๐‘ก, ๐‘ข, ๐‘›๐‘ก, ๐‘‘๐‘ก, ๐‘ค๐‘Ž๐‘ฃ๐‘’๐‘’๐‘ž, ๐‘ฅ, ๐‘‘๐‘ฅ
End program
Function waveeq(T, t, x, dx)
โ†
โ†
๐‘Ÿ๐‘’๐‘ก๐‘ข๐‘Ÿ๐‘› ๐‘‘๐‘ข๐‘‘๐‘ก
End function

โ€ข Pseudo-code & Code
39 / 41
๐‘“๐‘œ๐‘Ÿ๐‘ค๐‘Ž๐‘Ÿ๐‘‘ ๐ธ๐‘ข๐‘™๐‘’๐‘Ÿ: ๐ถ๐น๐ฟ 1
๐‘…๐พ4: ๐ถ๐น๐ฟ 2.83
โ€ข result ฮ”๐‘ก 0.01, ฮ”๐‘ฅ 0.01, ๐‘ 1)
๏ฌ๏€ Euler method ๏ฌ๏€ Fourth order Runge-Kutta method

Q&A Thanks for listening

Reviews

There are no reviews yet.

Be the first to review “CSE5004 – Solved”

Your email address will not be published. Required fields are marked *