# Finite Differences: Parabolic Problems - MIT OpenCourseWare · PDF fileFinite Differences:...

date post

25-Jun-2018Category

## Documents

view

224download

0

Embed Size (px)

### Transcript of Finite Differences: Parabolic Problems - MIT OpenCourseWare · PDF fileFinite Differences:...

SMA-HPC 2002 NUS

16.920J/SMA 5212 Numerical Methods for PDEs

Thanks to Franklin Tan

Finite Differences: Parabolic Problems

B. C. Khoo

Lecture 5

SMA-HPC 2002 NUS

Outline

Governing Equation Stability Analysis 3 Examples Relationship between and h Implicit Time-Marching Scheme Summary

2

SMA-HPC 2002 NUS

[ 2

2 0,u x t

=

GoverningEquation

3

Consider the Parabolic PDE in 1-D

0subject to at 0, atu u x u u x = = =

If viscosity Diffusion Equation If thermal conductivity Heat Conduction Equation

0x = x =

0u

( ), u x t =

] u x

=

u

?

SMA-HPC 2002 NUS

Stability Analysis Discretization

4

Keeping time continuous, we carry out a spatial discretization of the RHS of

There is a total of 1 grid points such that ,

0,1, 2,...., jN j x

j

+ =

=

0x = x =

0x 1x 3x 1Nx Nx

2

2

u t

=

x

N

u x

SMA-HPC 2002 NUS

Stability Analysis Discretization

5

2 1 2

2

2 ( j j

j

u uu O x x

+ =

2

2Use the Central Difference Scheme for u

x

which is second-order accurate.

Schemes of other orders of accuracy may be constructed.

1 2 )j u

x + +

SMA-HPC 2002 NUS 6

Stability Analysis Discretization

We obtain at

0

0

Note that we need not evaluate at and since and are given as boundary conditions.

N

N

u x x x u

= =

1 1 22: 2 )o

du x u udt x

= +

2 2 2 32: 2 )

du x u udt x

= +

1 2: 2 )j

j j j

du x u u

dt x

+ = +

1 1 12: 2 )

N N N N

du x u udt x

= +

x u

1 ( u

1 ( u

1( j u

2 ( N u

SMA-HPC 2002 NUS 7

Stability Analysis Matrix Formulation

Assembling the system of equations, we obtain 1

1 2

2

2

2

1 1 2

2 1

01 1

0

1 1

1 0

1

o

jj

NN N

du u udt x du

udt

udu x dt

udu u xdt

=

0

0

A

2

2

2

+

SMA-HPC 2002 NUS 8

Stability Analysis PDE to Coupled ODEs

Or in compact form

du Au bdt

=

We have reduced the 1-D PDE to a set of Coupled ODEs!

[ ]1 1where T

Nu u u =

2 0 0 T

o u b x

=

+

2 u

20 Nu

x

SMA-HPC 2002 NUS 9

Stability Analysis Eigenvalue and

Eigenvector of Matrix A

If A is a nonsingular matrix, as in this case, it is then possible to find a set of eigenvalues

{ 1 1, ,...., ,....,j =

For each eigenvalue , we can evaluate the eigenvector consisting of a set of mesh point values , i.e.

j j

j i

V v

1 1 Tj j j

NV v v =

( from det 0.A }2 N

2 j v

)I =

SMA-HPC 2002 NUS 10

Stability Analysis Eigenvalue and

Eigenvector of Matrix A

The ( 1) ( 1) matrix formed by the ( 1) columns diagonalizes the matrix byj

N E N V

1E AE = 1

2

1

where

N

=

0

0

N A

SMA-HPC 2002 NUS 11

Stability Analysis Coupled ODEs toUncoupled ODEs

Starting from du Au bdt

= +

1Premultiplication by yieldsE

1 1duE E Au E bdt

=

( 1 1 1duE E A EE u E bdt =

I

( 1 1 1duE E AE E u E bdt =

1 +

)1 +

)1 +

SMA-HPC 2002 NUS 12

Stability Analysis Coupled ODEs to Uncoupled ODEs

1 Let and , we haveU E u F E b =

d U Fdt

= +

which is a set of Uncoupled ODEs!

1 1duE u E bdt

= +

Continuing from

1=

U

1 E

SMA-HPC 2002 NUS 13

Stability Analysis Coupled ODEs to Uncoupled ODEs

Expanding yields

Since the equations are independent of one another, they can be solved separately.

The idea then is to solve for and determineU EU=

1 1 1 1

dU U dt

= +

2 2 2

dU U dt

= +

j j j

dU U

dt = +

1 1 1

N N N

dU U dt

=

u

F

2 F

j F

1 N F +

SMA-HPC 2002 NUS 14

Considering the case of independent of time, for the general equation,th

b j

Stability Analysis Coupled ODEs to Uncoupled ODEs

1jt j j

j

U e F

=

is the solution for j = 1,2,.,N1.

Evaluating, ( ) 1 tu EU E ce E E b = Complementary

(transient) solution Particular (steady-state)

solution

( 11 1 1where j N Tt tt t j ce c e c e c e c e =

j c

1=

) 2 2 t N

SMA-HPC 2002 NUS

We can think of the solution to the semi-discretized problem

15

Stability Analysis Stability Criterion

( ) 1 tu E ce E E b =

This is the criterion for stability of the space discretization (of a parabolic PDE) keeping time continuous.

Since the transient solution must decay with time,

for all j( )Real 0j

Each mode contributes a (transient) time behaviour of the form to the time-dependent part of the solution.j t

j e

as a superposition of eigenmodes of the matrix operator A.

1

SMA-HPC 2002 NUS 16

Stability Analysis Use of Modal (Scalar)

Equation

It may be noted that since the solution is expressed as a contribution from all the modes of the initial solution, which have propagated or (and) diffused with the eigenvalue

, and a contribution frj

u

om the source term , all the properties of the time integration (and their stability properties) can be analysed separately for each mode with the scalar equation

jb

j

dU U Fdt

=

+

SMA-HPC 2002 NUS 17

Stability Analysis Use of Modal (Scalar)

Equation

The spatial operator A is replaced by an eigenvalue , and the above modal equation will serve as the basic equation for analysis of the stability of a time-integration scheme (yet to be introduced) as a function of the eigenvalues of the space-discretization operators.

This analysis provides a general technique for the determination of time integration methods which lead to stable algorithms for a given space discretization.

SMA-HPC 2002 NUS 18

1 11 1 12 2

2 21 1 22 2

du a u a udt du a u a udt

=

=

1 1 12

2 1 22

Let , u a

u u a

=

du Audt

=

Consider a set of coupled ODEs (2 equations only):

Example 1 Continuous Time

Operator

+

+

1

2

a A

a =

SMA-HPC 2002 NUS 19

Proceeding as before, or otherwise (solving the ODEs directly), we can obtain the solution

1

1

1 11 2 12

2 21 2 22

t

t

u e c e

u e c e

=

=

11 21 1

21 22

1

where and are eigenvalues of and and are

eigenvectors pertaining to and respectively.

A

( )j As the transient solution must decay with time, it is imperative that Real 0 for 1, 2.j

Example 1 Continuous Time

Operator

2

2

1

1

t

t

c

c

+

+

2

2

=

SMA-HPC 2002 NUS 20

Suppose we have somehow discretized the time operator on the LHS to obtain

1 1 1 1 12 2

1 2 1 1 22 2

n n

n n

u u a u

u u a u

=

=

where the superscript n stands for the nth time level, then

1 11 12 1

21 22

where and Tn n n a u u u u u A

a = =

Since A is independent of time, 1 0

.... n n nu u AAu A u

= = =

Example 1 Discrete Time Operator

1 1

1 2

n

n

a

a

+

+

2

n n a Aa

=

2 n A

=

SMA-HPC 2002 NUS 21

Example 1 Discrete Time Operator

1 0 1

2

0where =

0

n n n

n u E u

=

' 1 1 11 1 2 12 2

' 2 1 21 1 2 22 2

n n

n n

u c

u c

=

= 1 1 0

2

' where are constants.

' c

E u c

=

1

1 1 0

,

.... n

A E E

u E E E E E u

=

=

As

A A A

n E

'

'

n

n

c

c

+

+

1 E

SMA-HPC 2002 NUS 22

Example 1 Comparison

Comparing the solution of the semi-discretized problem where time is kept continuous

[ 1

2

1 1 12 1

2 1 22

t

t

u e c

u e

=

to the solution where time is discretized

[ 1 1 12 1 1 2 1 22 2

' n n

n

u c

u

=

coTh nte di inuofference equation where time is hus exponential solution

as . te

The difference equation where time is hasdiscretized power solution . n

] 12 2

c

] 12 2

' c

SMA-HPC 2002 NUS 23

Exampl