of 74

• date post

25-Jun-2018
• Category

## Documents

• view

215
• download

0

Embed Size (px)

### Transcript of Chapter 4 Numerical Techniques for Parabolic, Elliptic ...· Page 4-1 Chapter 4 Numerical Techniques

• r Parabolic,DEs

(4-1)

(4-2)

ui 1n+ )

tx)2---------

12---

Page 4-1

Chapter 4 Numerical Techniques foElliptic, and Hyperbolic P

4-1 Parabolic PDEs in 1D

(1) Explicit Methods

(a) FTCS

(b) The DuFort-Frankel Scheme

CTCS but in the diffusion term is replaced by

tu

x2

2

u

=

uin 1+ ui

n tx( )2

-------------- ui 1+n 2ui

n(+=

O t( ) x( )2,[ ]

Stability Requires(

-----i-1 i i+1

n

n+1

uin

uin

uin 1+ ui

n 1+

2---------------------------------= ?????

• (4-3)

(4-4)

called time linear extrapolation?

t)] t( ) O t( )2[ ]+

)2]

1-----

1+ ui 1n+ )

Page 4-2

Digression:

Accordingly,

or

uin

uin 1+ ui

n 1+

2-----------------------------------= ui

n 1+ uin ui

n uin 1= ???

uin 1+ ui

nt

u

i

nO t( )2[ ]+ + ui

nui

n uin 1( )

t------------------------------- O ([++= =

uin 1+ ui

n uin ui

n 1 O t([+=

uin 1+ ui

n 1

2 t( )----------------------------------

ui 1+n 2

uin 1+ ui

n 1+

2----------------------------------- ui

n+

x( )2------------------------------------------------------------------------=

12 t( )x( )2

------------------+ uin 1+ 1

2 t( )x( )2

------------------ uin 1 2 t( )

x( )2------------------ ui

n(+=

• (4-5)

e rate, such that

ol. to start with and 2

(4-3)/(4-4) gives

x)2 O x( )4[ ]+t

n

tx

---- 0

t2

2

u

A Hyp. Eq.=

Page 4-3

Discussions:

(a)

(b)Unconditionally stable(c)Consistency (??)

Note: If and were to approach zero at the sam

(d) Not a self-starting method, need 2 time level stime level storage space

O t( )2 x( )2 tx------ 2, ,

uin 1+ in time about ui

n uin 1 in time about ui

n

ui 1+n in space about ui

n ui 1n in space about ui

n

into

tu

t2

2

u t

x------ 2 1

6---

t3

3

u

t( )2 O t( )3[ ]+ ++ t2

2

u

12------

x4

4

u (+=

4 5( )[ ]x 0t 0

lim PDE Only if --

x 0t 0

lim

t x

tx------

x 0t 0

lim K then 4 5( ) becomest

u Kt2

2

u

+

• icit Scheme)

(4-6)

(4-7)ui

n 1+ uin

1

t( )2[ ]

Page 4-4

(2) Implicit Methods

(a) BTCS (Fully/Euler Implicit Scheme)

(b) Crank-Nicolson Scheme (Trapezoidal Impl

(c) One-Parameter Formulation

then if

NOTE: If

tu

F r u , ,( )= e.g., Fx

2

2

u=

uin

t----------

tu

i

n 1+1 ( )

tu

i

n+= where

uin =

0

1 Euler Implicit= O t( )[ ]

12--- Crank-Nicolson Implicit= O

0 Euler Explicit= O t( )[ ]12--- 1 Unconditionally Stable

0 12--- Conditionally Stable

• (4-8)

(4-9)

er/nonlinear in u):

linearization, e.g.,

nO t( )2[ ]+

E AuE

and Bu

F= =

n Bnun O t( )2[ ]+ +

Page 4-5

Accordingly

e.g.,

d) Delta () Formulation

Define

For the following problem (fluxes E and F may be lin

uin 1+ ui

n

t-------------------------- Fi

n 1+ 1 ( )Fin+=

uin 1+ ui

n

t--------------------------

x2

2

u

i

n 1+

1 ( )x

2

2

u

i

n

+=

un un 1+ un=

tu

xE

x2

2

F

+= where E and F = fn(t,x,u, ... ) then

En 1+ En tt

E n O t( )2[ ]+ + En t

uE

tu += =

n 1+ En t An un

t---------- O t( )[ ]+ O t( )2[ ]+ += where

En 1+ En Anun O t( )2[ ]+ += similarly Fn 1+ F=

• (4-10)

(4-11)

x

Enx

Fn+

x

Fn+

Fn

)x

x

un

u

2 O t( )2[ ]

Page 4-6

e.gs.,

e) Two-Parameter Formulation

un 1+ unt

-------------------------- x

En Anunx

Fn Bnun+( )+ + 1 ( )+=

x

Anunx

Bnun( )+x

Enx

Fn+ +=

un t( )x

Anunx

Bnun( )+ t( )x

En=

1 t( )x

Anx

Bn+ un t( )

x

Enx

+=

tu

x2

2

u

= 1 t( )x

x

un t(=

tu

uxu

+tu

x u2

2----- += 0= E u

2

2-----= A =

1t1 2+--------------

tu

n 1+un+

1 1( )t1 2+

-------------------------t

u

n 21 2+--------------un 1 1

12---

+ +=

O t( )2[ ] if 1 212---+=

• 4

(4-12)

Accuracy in Time

O t( )[ ]

O t( )2[ ]

O t( )2[ ]

O t( )[ ]

O t( )2[ ]

Page 4-7

-2 Multi-Dimensional Parabolic PDEs

e.g.,

Scheme

0 0 Euler Explicit Scheme

0 - 0.5 Explicit Leapfrog Scheme

0.5 0 Implicit Trapezoidal Scheme (C-N)

1 0 Euler Implicit Scheme

1 0.5 Three-Point Backward Implicit Scheme

1 2

tu

x2

2

u

y2

2

u

+

=

• (4-13)i j, 1n

---------------

i

j

n

x

y

ty( )2

--------------

12--- or d

14---

Page 4-8

(1) Explicit: FTCS

(a)

(b) Stability:

Note:

Inefficient and unattractive

Implicit Methods

ui j,n 1+ ui j,

n

t-----------------------------

ui 1 j,+n 2ui j,

n ui 1 j,n+

x( )2-----------------------------------------------------------

ui j, 1+n 2ui j,

n u+

y( )2--------------------------------------------+=

yx

i-1,j i,j i+1,j

i,j-1

i,j+1

x

y

t

O t( ) x( )2 y( )2, ,[ ]

dx dy+( )12--- dx

tx( )2

--------------= dy =

if x y The diffusion number dx dy d 2d = = =

• (4-14)

(4-15)

(4-16)

ed Matrix

j1+ ui j, 1

n 1++

)2------------------------------

i j 1+,n 1+ ui j,

n=

1+1 fi j,=

.......................

........................

............................ .

.

.

imax - 1 spaces

Page 4-9

(1) Implicit Methods:

(a) Fully Implicit (Euler Implicit)

or

[(imax-1)2 x (jmax-1)

2] Pentadiagonal band

Inefficient and impreactical,

ADI (Alternating-Direction-Implicit),

AF (Approximate-Factorization),

Fractional Step,

etc.

ui j,n 1+ ui j,

n

t-----------------------------

ui 1 j,+n 1+ 2ui j,

n 1+ ui 1 j,n 1++

x( )2-----------------------------------------------------------------

ui j, 1+n 1+ 2ui,

n

y(-----------------------------------+=

dxui 1 j,+n 1+ dxui 1 j,

n 1+ 2dx 2dy 1+ +( )ui j,n 1+ dyui j 1,

n 1+ dyu+ ++

ai j, ui 1 j,+n 1+ bi j, ui 1 j,

n 1+ ci j, ui j,n 1+ di j, ui j 1,

n 1+ ei j, ui j,n ++ + + +

..........

.

.

.

• (4-17)

i j, ui j, 1+ )n

y)2-----------------------------------

i j, ui j, 1+ )n 1+

y)2-----------------------------------------

n+1

n+1/2

n

t/2

t/2

Page 4-10

(b) ADI (Alternating-Direction-Implicit)

Discussions:

(a)(b) Unconditionally Stable(c) Two sweeps, one along x, another

along y, each with tridiagonal matrix(d) BC for n+1/2 ? if time dependent.

ui j,n

12---+

ui j,n

t2-----

----------------------------- ui 1 j,+ 2ui j, ui 1 j,+( )

n12---+

x( )2---------------------------------------------------------------------------

ui j, 1+ 2u(

(-------------------------------+=

Solve for ui j,n

12---+

and then

ui j,n 1+ ui j,

n12---+

t2-----

----------------------------------- ui 1 j,+ 2ui j, ui 1 j,+( )

n12---+

x( )2---------------------------------------------------------------------------

ui j, 1+ 2u(

(---------------------------------+=

to get ui j,n 1+( )

O t( )2 x( )2 y( )2, ,[ ]

• (4-18)

(4-19)

AF

tu

i j,

n

tx)2------------

ty)2------------

j dyy2ui j,

n+ )

Page 4-11

(c) AF (Approximate-Factorization)

Recall

Define

then for , we have

ADI AF and LU Decomposition

ui j,n

t-------------

tu

i j,

n 1+1 ( )

tu

i j,

n+=

ui j,n 1+ t( )

tu

i j,

n 1+ ui j,

n 1 ( ) t( )+=

x2ui j, ui 1+ j, 2ui j, ui 1 j,+= dx (

--=

y2ui j, ui j 1+, 2ui j, ui j 1,+= dy (

--=

tu

x2

2

u

y2

2

u

+

=

ui j,n 1+ dxx

2ui j,n 1+ dyy

2ui j,n 1++( ) ui j,

n 1 ( ) dxx2ui,

n(+=

• (4-20)

(4-21)

(4-22)

quence

(4-23)

(4-24)

(4-25)

ui j,*

i j,n 1+

Page 4-12

or

where

By AF, (4-20) becomes

(4-22) is solved according to the following se

Discussions:(a) (4-24) into (4-23), gives

1 dxx2 dyy

2+( )[ ]ui j,n 1+ RHS( )i j,

n=

RHS( )i j,n 1 1 ( ) dxx

2 dyy2+( )+[ ]ui j,

n=

1 dxx2( ) 1 dyy

2( )ui j,n 1+ RHS( )i j,

n=

1 dxx2( )ui j,

* RHS( )i j,n= Solve for

1 dyy2( )ui j,

n 1+ ui j,*= Solve for u

1 dxx2( ) 1 dyy

2( )ui j,n 1+ RHS( )i j,

n=