PENG9570 — Lecture 6 (March 11th)

Wave equation for sound

Heat/diffusion equation

equations

Cable equation ,

Reaction-diffusion equations

Navier-Stokes Equations Describe the flow of incompressible fluids.

Maxwell’s equations

(1)Gauss’ Law
(2)Gauss’ Law for magnetism
(3)Faraday’s Law
(4)Ampère-Maxwell Law

Partial differential equations (PDEs)

Solution is a function of more than one variable, e.g. Examples:

Conservation laws

:Density of a substance Conservation law in differential form:

: flux of substance (or heat flux) : production

Diffusion (and heat): . Then

The heat PDE / Diffusion PDE is a linear PDE

1 D heat PDE / diffusion PDE with source:

Can be written in terms of the operator :

is linear since

For homogeneous problems , superpositions of solutions are also solutions:

Initial boundary value problem (IBVP)

1D heat PDE / diffusion PDE with initial and boundary conditions

Solution is unique (this can be proven) !

Finite difference method for diffusion equation

Consider the 1D diffusion PDE with initial and boundary conditions

Use the approximations

Finite difference method for 1D diffusion equation: grid and explicit scheme

Let . Then,

Finite difference method for diffusion PDE: explicit scheme

Equations:

Solution at time step is explicitly expressed in terms of solution at time step . That is, the explicit scheme is

where

Stability of the explicit scheme

The solution of goes to 0 when . Therefore, we should have

A result from linear algebra

A matrix is diagonalizable if we can write

where is a diagonal matrix with the eigenvalues of on the diagonal.

Then,

It all have , then .

What are the eigenvalues of ? (: is an eigenvalue.)

We know that the eigenvalues of are

Note that

Since the eigenvalues of are , the eigenvalues of are :

For stability we need :

Specifically,

Stability requirement for the explicit scheme.

Implicit scheme for the heat/diffusion PDE

PDE: (same as in explicit scheme)

Discretized PDE:

“Calculation molecule”: the scheme couples and .

This gives us the scheme

Numerical solution of implicit scheme Is this scheme stable? has eigenvalues , where .

All eigenvalues of are > 1.

Reminder:

Eigenvalues of are .

Thus, has the eigenvalues such that all eigenvalues of satisfy

The implicit scheme is stable, regardless of the value of .

Crank-Nicolson scheme

Approximations: (same as in the implicit scheme) (at )

Weighted average of the approximations to at and .

Taylor-expanding these expressions at , we get Similarly, if :

The C–N scheme with gives a second order error in both and at . C–N scheme for :

Is this scheme stable? Eigenvalues of :

So, eigenvalues of are

We have

This is and :

Scheme is stable for all .

Numerical solution obtained using the explicit scheme

Numerical solution obtained using the implicit scheme

Numerical solution obtained using the C-N-scheme