29
1 Spring 2003 Prof. Tim Warburton [email protected] MA557/MA578/CS557 Lecture 16

MA557/MA578/CS557 Lecture 16

  • Upload
    seven

  • View
    45

  • Download
    1

Embed Size (px)

DESCRIPTION

MA557/MA578/CS557 Lecture 16. Spring 2003 Prof. Tim Warburton [email protected]. Time Stepping Stability. Recall the Jameson-Shmidt-Turkel varient of the Runge-Kutta time integator:. Iterator. - PowerPoint PPT Presentation

Citation preview

Page 1: MA557/MA578/CS557 Lecture 16

1

Spring 2003

Prof. Tim [email protected]

MA557/MA578/CS557Lecture 16

Page 2: MA557/MA578/CS557 Lecture 16

2

Time Stepping Stability

• Recall the Jameson-Shmidt-Turkel varient of the Runge-Kutta time integator:

n

n

n+1

Set U=U

for : 1:1

U=U

end

U

k s

dt dU

k dt

U

Page 3: MA557/MA578/CS557 Lecture 16

3

Iterator

• Recall the JST Runge-Kutta scheme unrolls to exactly discretize the first s+1 terms in the Taylor series (evaluated at t=n*dt):

n

n

n+1

2 32 3

Set U=U

for : 1:1

U=U

end

U ..1 2 1

1 ...1! 2! 3! !

n n n n

ss

k s

dt dU

k dt

dt d dt d dt d dt dU U U U

s dt s dt s dt dt

dt d dt d dt d dt dU

dt dt dt s dt

n

Page 4: MA557/MA578/CS557 Lecture 16

4

Iterator cont• The iterator proves to be:

• For the advection equations, we then replace the d/dt with a numerically discretization of the spatial derivative operator.

• Suppose we diagonalize the spatial operator – i.e. we have created a number of decoupled (i.e. independent) iteration relationships. We will now consider one such iterator

n+1

2 32 3

U

: 1 ...1! 2! 3! !

n

ssn n

L dt U

dt d dt d dt d dt dL dt U U

dt dt dt s dt

n+1

2 32 3

u

: 1 ...1! 2! 3! !

n

sn s n

L dt u

dt dt dt dtL dt u u

s

Page 5: MA557/MA578/CS557 Lecture 16

5

Stability of Iteration

• A sufficient condition for stability is that the L operator:

• Is a contraction mapping (i.e. ||Lu||<= ||u||)• We seek the region of stability of L by looking

for extremal curves where the inequality is an equality. Since the L operator is a scalar we look for curves in the complex plain where:

n+1

2 32 3

u

: 1 ...1! 2! 3! !

n

sn s n

L dt u

dt dt dt dtL dt u u

s

2 32 31 ... where [0,2 ]

1! 2! 3! !

ss idt dt dt dt

es

Page 6: MA557/MA578/CS557 Lecture 16

6

Computing the Stability Region

• Let’s look at the stability of the first order J-S-T scheme:

• We look for the solution of :

• Solution:

1 where [0,2 ]1!

idte

1ie

dt

Page 7: MA557/MA578/CS557 Lecture 16

7

Matlab Script To Plot Alpha(theta)

Page 8: MA557/MA578/CS557 Lecture 16

8

Notes on the Stability

Interior ofcircle is theStable region

Only onepoint on the imaginary axis is in thestability region

Page 9: MA557/MA578/CS557 Lecture 16

9

General Order Case (RK-s)

• To find the stability curve(s) as a function of theta, we need to find the roots of the s+1 order polynomial:

2 32 31 ... 0

1! 2! 3! !

si sdt dt dt dte

s

Matlab code:

3-6) build coefficients

8-9) loop over theta

10) Set coefficient of constant term

13) Find roots of polynomial

15) Plot roots

Page 10: MA557/MA578/CS557 Lecture 16

10

Check p=1

Page 11: MA557/MA578/CS557 Lecture 16

11

Stability Regions For s=1,2,3,4

Page 12: MA557/MA578/CS557 Lecture 16

12

Stability Regions For s=1,2,3,4• Note how the stability

region grows in size.

• This means that a fixed alpha, dt can be made larger if s is increased.

• However, this is not strictly true if alpha lies near the extremal theta for the schemes (see theta = -1).

Page 13: MA557/MA578/CS557 Lecture 16

13

More Stability Notes

• We zoom in:

For the scheme to be stablefor an alpha dipping into theright half plane, the RK schememust be applying a certainamount of dissipation..

Page 14: MA557/MA578/CS557 Lecture 16

14

Class Exercise

• Download the tstability script from

http://www.math.unm.edu/~timwar/MA578S03/MatlabScripts/tstability.m

• Plot the stability regions up to s=8

• Identify which choices of s are likely to be most efficient (this will certainly depend on the range of dt*alpha

Page 15: MA557/MA578/CS557 Lecture 16

15

Time Step Restriction

• So next we need to determine a bound on the eigenvalues (i.e. the spectral radius) of the spatial operator for the DG advection scheme.

• Recall the upwind DG scheme:

1

11

, ,j j

j jj j j j j

I I

j j j

u u x x xt x

or

du u u

dt

ρ M D F ρ Gρ

Page 16: MA557/MA578/CS557 Lecture 16

16

Eigenvalue Bound• For the periodic case we already know that the real right hand side

operator has negative real parts (non-increasing energy property):

• Note we used the two inverse-inequalities we derived previously.

• C1, C2 and C3 are independent of h (i.e. dx) and p

1 11

11 1

1 1 11 1 1

11 1 1

2 21 11 2

1 1

2 13

1

j N j Nt tj j j j j

j j

j N j N j Nt t tj j j j j j

j j j

j N j Nt tj j j j

j j

j Ntj j

j

L u u u

u u u

C p C pu u

h h

C pu

h

ρ ρ ρ M D F ρ Gρ

ρ M D ρ ρ M F ρ ρ M G ρ

ρ ρ ρ ρ

ρ ρ

Page 17: MA557/MA578/CS557 Lecture 16

17

Finally:• We can now bound the eigenspectrum

• And the real part of all the eigenvalues is non-positive.

• So we know from the J-S-T stability analysis that it is sufficient for the semi circle defined by:

to lie in the stability region of J-S-T scheme.

• i.e. approx. for a given h,p,s choose dt such that:

1

21 3

1

1

max

j Ntj j

jj N

tj j

j

LC p

uh

j

ρ ρ

ρ ρ

23 3

, ,2 2

iC pdt dt e

h

4 2

shdt C

p

Page 18: MA557/MA578/CS557 Lecture 16

18

Note

4 2

shdt C

p

From the class exercise and looking at the stability regions for J-S-T you should realize that the s dependence is dubious!!.The stability regions grow differentially in different directions – so watch out.

Page 19: MA557/MA578/CS557 Lecture 16

19

Example Eigenspectrum

Matlab script to construct upwind DG advection operator

Sparsity pattern of operator

Distribution of eigenvaluesof upwind DG advection op.

Page 20: MA557/MA578/CS557 Lecture 16

20

Quick DiscussionThe script for building the operator is at:

http://www.math.unm.edu/~timwar/MA578S03/MatlabScripts/umADEIGSwhole.m

Let’s discuss dt issue.

Page 21: MA557/MA578/CS557 Lecture 16

21

Advection-Diffusion Equation

• We now generalize the advection equation to include possible diffusion effects.

• Examples of diffusion driven processes ??

Page 22: MA557/MA578/CS557 Lecture 16

22

Advection-Diffusion Equation• We consider the motion of a tracer solute in a

fluid with mean velocity ubar.

• We will denote the concentration of the tracer by C(x,t)

• Not only is the tracer advected by the fluid’s mean velocity – it will also diffuse by random particle motion.

• The advection-diffusion equation is:2

2

C C Cu D

t x x

Page 23: MA557/MA578/CS557 Lecture 16

23

Advection

• The advection equation is as previously discussed:

• i.e. the total tracer in a section of pipe is only changed by advection of the tracer through the ends of the section.

• However, if the tracer particles are moving randomly then particles will randomly jump in and out of the section of pipe.

, ,b

a

dCdx uC a t uC b t

dt

Page 24: MA557/MA578/CS557 Lecture 16

24

Diffusion• An underlying assumption of the ADE is that mechanical dispersion,

like molecular diffusion, can be described by Fick’s first law:

• where F is the mass flux of solute per unit area per unit time and D is the effective diffusion coefficient in a porous medium.

• Fick.s law states that particle flux is directly proportional to the spatial concentration gradient. But it is not the spatial concentration gradient that causes particle movement, i.e. particles do not .push. each other (Crank, 1976).

• Particles exhibit random motion on the molecular level. This random motion ensures that a tracer will diffuse, decreasing the concentration gradient (Crank, 1976).

• Crank, J., 1976. The Mathematics of Diffusion. Oxford University Press, New York.

CF D

x

Page 25: MA557/MA578/CS557 Lecture 16

25

Diagram of Diffusion Model

a b

b b b

Assume that each particle is jumping with a rate of R(delta) jumps per second which take it a distance of delta or more then there will be anumber of jumps out of the left delta width~= -R(delta)*0.5*delta*(C(b) + C(b-delta))

We count the number of jumps in from the right delta width~= +R(delta)*0.5*delta*(C(b+delta)+C(b))

Summing: 2

Rflux C b C b

Page 26: MA557/MA578/CS557 Lecture 16

26

Rough Derivation of Fickian Diffusion• Consider the x=b end of the section. We are going to

“monitor” the random motions of a particle in and out of the region:

• Assume that each particle is jumping with a rate of R jumps per second then there will be a flux of out of the b end (similar at the a end)

• We apply tracer counting:

2 2

, ,

, , , ,

2 2

b

a

dCdx uC a t uC b t

dt

C b t C b t C a t C a tR R

,b b

2

Rflux C b C b

Page 27: MA557/MA578/CS557 Lecture 16

27

2

22

2

, ,b

a

b

a

C C C Cu dx R b t a t

t x x x

CR dx

x

We now recall that R is a function of delta and clearly R must be inversely proportional to delta. i.e. as the region we are monitoring shrinks to zero, the rate of random motions into and out of the control region increases…

We denote and obtain: 2

2

C C Cu D

t x x

2

0limD R

[ Note continuity assumptions ]

Page 28: MA557/MA578/CS557 Lecture 16

28

DG Scheme for the ADE2

2

C C Cu D

t x x

1

1 1 1 1

1 1 1 1 1

1

, : , ,

, ,

,

+ 2

2

+2 2

,

j

j

j

j

j

j j

x

Ix

j

I

j j j j j j j j j

j j j j j j j

j jII

I

j

f g f x t g x

Cux

u x C x C x u x C x C x

t dx

C x C x C x C xCq x x

x

C

t

1 1 1 1

1

, +

2 2j

j j j j j j j j

j jI

q x q x q x q xqD x D x Dx

Page 29: MA557/MA578/CS557 Lecture 16

29

Next Classes

• Proof of stability

• Estimate of time step restriction for J-S-T

• Convergence for ADE

• Discrete scheme