Professional Documents
Culture Documents
Values at each line are updated simultaneously based on latest available values
Update direction
4. 5.
Initialize guess Choose a direction for sweeping (rows or columns) Sweep through lines updating all points in each line simultaneously to the k+1th level using the GaussSeidel update. This involves solving a system of tridiagonal equations After one sweep through the domain check error. If error too high, repeat steps 3 and 4
Any efficient way of solving tridiagonal systems?
Back-substitution to obtain x
1 uik, + j
Line SOR
1 = (1 )uik, j + uik, + j
Values at each line are updated simultaneously based on latest available values
Use 1D parabolic equation methods as stepping stone for 2D methods Explicit FTCS Implicit FTCS (same as BTCS) Crank-Nicholson As usual, we need to analyze consistency and stability for these It turns out that all these schemes are consistent. Stability?
Step 1 : Fourier Decomposition: Assume that solution is composed of a sum of waves of the form
Soln at grid point i,j at time step n
Step 2: Obtain evolution equation for the amplitude Substitute Fourier decomposition in the original Finite Difference equation and write it in the form
U n +1 = GU n
Gain or amplification factor
Step 3 : Find region of stability Find the conditions on x, y, t under which the amplitude of the wave will be stable, i.e. not grow. This will happen if
4d y sin 2
2
Why not use FTCS implicit instead?
Stable only if
t t 1 dx + d y = 2 + 2 x y 2
Banded, pentadiagonal system of equations to be solved at each time step Very expensive. Is there a cheaper, equally stable alternative?
y sweep
Update in two steps Each step involves implicit space derivatives in only one direction This results in only a tridiagonal system of equations being solved in each step Unconditionally stable. Second order in space and time What is ADIs relationship to the 2D Crank-Nicholson scheme? Are they identical?
Summary of Lecture 8
Line Methods : Sweep through rows or columns updating all values in a line simultaneously : Line Gauss Seidel, LSOR Crank-Nicholson as a multi-step method involving separate explicit and an implicit steps. Von-Neumann stability analysis with 2 spatial dimensions Implicit schemes for 2D parabolic equations too expensive, explicit schemes too restrictive on time step Option : Alternate direction implicit scheme Update in two steps with each step having an implicit update in one spatial direction Unconditionally stable, second order accurate in time and space Whats its relation to Crank-Nicholson?
y sweep
Update in two steps Each step involves implicit space derivatives in only one direction This results in only a tridiagonal system of equations being solved in each step Unconditionally stable. Second order in space and time What is ADIs relationship to the 2D Crank-Nicholson scheme? Are they identical?
ADI
x sweep
y sweep
CN involves inverting a pentadiagonal matrix : P ADI involves inverting two tridiagonal matrices : T1 and T2 Whats the relation between P, T1 and T2?
ADI
Difference between the two
Since ADI treats each direction successively at a time lag compared to the other direction it is still an approximation of the Crank-Nicholson scheme However, since the difference between the two methods is less than the truncation error, it is a valid approximation and retains consistency and the overall order of convergence Methods such as ADI which approximate a more computationally intensive matrix inversion by a less intensive one (typically involving tridiagonal systems) are known as Approximate Factorization Methods.
Step 2 : y update
Treat each direction separately by Crank Nicholson. Unlike ADI, which approximates the full 2D equation in each step, the fractional step method approximates only one 1D component in each step. This method is also unconditionally stable and second order accurate in time and space Approximate factorization methods can be used for elliptic equations also
Hyperbolic Equations
Recall
Have as many real characteristics as order of PDE Information travels at a finite speed. The effects of an action somewhere will be felt elsewhere after a time lag. Convection predominates in such problems Marching Problems: Initial solution or condition needs to be marched in time to get solution at a later time Domain of dependence : The region in space and time on which the solution at a point depends on Range of influence: The region in space and time which the value at a point will influence The compressible, inviscid fluid dynamic equations are hyperbolic
Let us try and numerically solve the wave equation with some given initial condition
u u +a =0 t x
Use a forward difference scheme in time and central difference scheme in space (FTCS scheme)
u
n +1 i
Stencil
Exact Solution
Using FTCS results in the following behavior irrespective of time step and grid size
t 1 x
Some problems with Leapfrog Need to give some initial condition for n =1 apart from the usual condition for n = 0 Odd and even time steps are decoupled. i.e. The solution at the even time steps never depends on the solution at odd time steps. Often, two independent solutions develop over time (Exercise)
Stable for c = a
First order in space and time Also known as the first order upwind method
Why is the solution somewhat diffusive but less diffusive than CFL = 0.5? Is FTBS consistent?
Artificial viscosity
Here the coefficient artificial viscosity goes down as the grid size becomes smaller and hence the scheme is consistent However, the solution behaves as if it is the solution to a convection-diffusion equation
Summary
ADI is an approximate factorization of the Crank-Nicholson method Fractional Step Methods are another way of reducing computational costs for parabolic equations Hyperbolic equations
Stability analysis of Leapfrog method Leapfrog can lead to odd-even decoupling FTBS is a stable method for hyperbolic equations but it is first order accurate and can be diffusive