Given by Geoffrey C. Fox at Delivered Lectures of CPS615 Basic Simulation Track for Computational Science on 8 November 96. Foils prepared 11 November 1996
Outside Index
Summary of Material
This starts basic module on Partial Differential Solvers with |
Introduction to Classification of Equations |
Basic Discretization |
Derivation of Sparse Matrix Formulation |
Analogies of Iteration with Artificial Time |
Start of Explicit Matrix Formulation for Simple Cases |
Outside Index Summary of Material
Geoffrey Fox |
NPAC |
Room 3-131 CST |
111 College Place |
Syracuse NY 13244-4100 |
This starts basic module on Partial Differential Solvers with |
Introduction to Classification of Equations |
Basic Discretization |
Derivation of Sparse Matrix Formulation |
Analogies of Iteration with Artificial Time |
Start of Explicit Matrix Formulation for Simple Cases |
This Introduces the three fundamental types of PDE's -- Elliptic, Parabolic and Hyperbolic and studies the numerical solution of Elliptic Equations |
The sparse matrix formulation is used and iterative approachs -- Jacobi, Gauss Seidel and SOR are defined |
These are motivated by analogies between equilibrium of diffusive equations and elliptic systems |
Eigenvalue analysis is used to discuss convergence of methods |
Physical systems which behave as continuous systems at a macroscopic level, in a fluid fashion |
Examples:
|
Partial Differential Equations (PDE's) are characterized by rate of changes in 2 or more independent variables |
Wave equation (hyperbolic): One dimensional equation is: |
The natural generalization is Maxwell's Equations describing computational Electromagnetics for radar cross-sections of aircraft and antenna patterns |
Numerical Relativity has interesting complex wave equation in three dimensions. |
This is a heat or other type of diffusion equation lying intermediate between elliptic and hyperbolic equations |
where y is temperature
|
Laplace's equation (elliptic): steady state in systems of electric or magnetic fields in a vacuum or the steady flow of incompressible non-viscous fluids |
Poisson's equation (elliptic): a variation of Laplace when an outside force, given by the function f, is applied to the system |
Cauchy conditions |
y and ¶y/¶n are given |
on a curve |
Solution given by Taylor series for each point near curve if these are sufficient to determine higher derivatives
|
Can be solved as linear system with deterministic equations for derivatives of boundary conditions if coefficients have certain characteristics -- Gives rise to three types:
|
Another problem with Cauchy conditions on closed boundary |
Two other types of boundary conditions
|
Boundary conditions to give solutions for types of equations |
Equation Type -- Boundary Curve -- Boundary Data -- Example |
Hyperbolic Open Cauchy Wave Equation |
Parabolic Open Dirichilet or Neumann Diffusion Equation |
Elliptic Closed Dirichilet or Neumann Laplace's Equation |
Example of 2nd order diffusion equation with open boundary curve |
Example of Laplace's equation with closed boundary curve |
Discretize region by imposing grid points with spacing h |
Represent two adjacent neighbors of the point (x,y) in the x direction by Taylor series |
Add the two equations |
Solve previous equation for 2nd derivative |
Combine with similar equation in y direction |
Backward difference operator and forward difference operator are O(h) |
Higher order operators use more points on the grid (larger stencil) and are more accurate |
Use difference operator |
to solve for every |
interior point of grid |
Nx*Ny linear |
equations |
of the form |
Example equations |
to solve Laplace on |
a 5x6 grid with b |
labelling boundary |
and y internal points |
System of 12 equations - block tridiagonal |
A sparse matrix |
with two bands -- |
one next to diagonal |
and the other a |
"distance" Nx |
away |
Note original grid shown here is Nx by Ny but matrix is Nx Ny by Nx Nywithzeros outside a band of total width 2Nx +1 |
Note no "compact labelling" where points near each other in two dimensions remain near each in one dimension after mapping onto vector (one dimension) |
We must use Iterative methods to solve the linear equations coming from solution of large elliptic equations (Laplace's equation in example we will study) |
We can motivate iteration by studying an "artificial" diffusion equation |
subject to y having same boundary conditions (in x for all "artificial time" t ) as original equation |
that we needed to solve |
Consider ANY trial function y = y(0) at t = 0 |
Then we solve (*) and look at converged solution as t |
As |
The iteration of (*) in t gives a solution of (**) in limit of infinite t |
If we solve the diffusion equation (*) by finite difference in space (which is as for Laplace's equation) and time |
Here "t" could be t,t+dt or an average such as: |
t0 is Initial value which we can take as t=0 |
t1 = t0+ dt ..... |
tk+1=tk+dt |
The iteration gives yk(x)=y(x,tk) in terms of y(k-1)(x) |
This give Iterative equation if we use k to label time steps |
c1 yk+1(x,y) = ( y"k"(x+h,y) + y"k"(x-h,y)+y"k"(x,y+h)+y"k"(x,y-h))/4 |
- c2 y"k"(x,y) |
where c1 + c2 = 1 |
and the value of c1,c2 depend on K,h and dt. |
as dt is arbitary, we can choose c1 |
(and hence c2 = 1 - c1 ) to optimize convergence. |
We use cryptic notaation "k" to repreprent various possible choices for evaluating time on right hand side. Simplest is "k" = k but choices are k, k+1 or linear combinations which can vary for different x values. |
Different Choices of c1, c2, "k" give |
Either Jacobi Iterative Method
|
or Gauss Seidel
|
Over relaxation
|
There are many iterative methods - our diffusion equation analogy suggested the three simplest or stationary methods - so called because iteration equation is the same at each iteration |
Jacobi Method The Jacobi method is based on solving for every variable locally with respect to the other variables; one iteration of the method corresponds to solving for every variable once. The resulting method is easy to understand and implement, but convergence is slow. |
Gauss-Seidel The Gauss-Seidel method is like the Jacobi method, except that it uses updated values as soon as they are available. In general, it will converge faster than the Jacobi method, though still relatively slowly. |
Successive Overrelaxation (SOR) Successive Overrelaxation (SOR) can be derived from the Gauss-Seidel method by introducing an extrapolation parameter w. For the optimal choice of w, SOR converges faster than Gauss-Seidel by an order of magnitude. |
Superfix k denotes iteration |
Write A = D-L-U D = Diagonal L = Lower Triangle U = Upper Triangle |