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

MA557/MA578/CS557 Lecture 21

  • Upload
    milton

  • View
    33

  • Download
    0

Embed Size (px)

DESCRIPTION

MA557/MA578/CS557 Lecture 21. Spring 2003 Prof. Tim Warburton [email protected]. Recap. So far we have derived the advection-(diffusion) equation in a one-dimensional domain. We created a numerical scheme based on piecewise polynomial approximations. - PowerPoint PPT Presentation

Citation preview

Page 1: MA557/MA578/CS557 Lecture 21

1

Spring 2003

Prof. Tim [email protected]

MA557/MA578/CS557Lecture 21

Page 2: MA557/MA578/CS557 Lecture 21

2

Recap

• So far we have derived the advection-(diffusion) equation in a one-dimensional domain.

• We created a numerical scheme based on piecewise polynomial approximations.

• Boundary conditions between sub-intervals are imposed by the use of fluxes.

• We proved stability and consistency for these schemes.

• But…. we do not live in a one-dimensional world

• So – on the march to our three-dimensional world we are going to investigate PDE’s with two spatial-dimensions.

Page 3: MA557/MA578/CS557 Lecture 21

3

Two-Dimensional Polynomial Space

• For the following we will use a two-dimensional space which is spanned by the polynomials of total order not greater than p:

• Later we will choose an orthonormal basis to discretize this space.

0

p a b

a b pP x y

Page 4: MA557/MA578/CS557 Lecture 21

4

Two-Dimensional Advection

• Recall in one-dimensions we chose an arbitrary section of a pipe.

• We monitored the flux of fluid into and out of the ends of the pipe.

• The conservation equation in 1D we derived was:

• Now we start with a 2D domain and consider any simply connected sub-region:

, , , ,b

a

dC u b t C b t u a t C a t

dt

Page 5: MA557/MA578/CS557 Lecture 21

5

Our Domain

Page 6: MA557/MA578/CS557 Lecture 21

6

Our Sub-region

Page 7: MA557/MA578/CS557 Lecture 21

7

Outward Normal n

n

Page 8: MA557/MA578/CS557 Lecture 21

8

Conservation

• Suppose the fluid has a mean velocity everywhere.

• This time is a two-vector.

• The flux of fluid through the boundary is the integral of the concentration C being advected normal to the surface of w:

n=outward pointing normal

u

u

u

flux CdS

u n

Page 9: MA557/MA578/CS557 Lecture 21

9

Conservation Law

• Now we know how much of the concentrate is being advected through the boundary of our sub-region.

• The conservation law is now:

• We apply the divergence theorem (beware this relies on smoothness arguments):

dCdV CdS

dt

u n

dCdV CdS

dt

C dV

u n

u

Page 10: MA557/MA578/CS557 Lecture 21

10

In Component Form

• Assuming ubar is constant this becomes:

dCdV CdV

dt

u v CdVx y

u

u

v

x

x

u

Page 11: MA557/MA578/CS557 Lecture 21

11

Finalize

• For all sub-regions:

• Assuming enough continuity we obtain:

0

dCdV u v CdV

dt x y

C C Cu v dV

t x y

0C C C

u vt x y

Page 12: MA557/MA578/CS557 Lecture 21

12

Straight To DG

• The pde is:

• We substitute the DG scheme (using Lax-Friedrichs fluxes):

0C C C

u vt x y

Find 0, such that

, , 02

where ,

p pC P T P

C C Cu v C

t x y

C C C

u n

Page 13: MA557/MA578/CS557 Lecture 21

13

+/- Notation

• For the purpose of the numerical scheme notation:

– The + notation implies the limit of C from outside the sub-region– The - notation implies the limit of C from inside the sub-region

C-

C+

C C C n

Page 14: MA557/MA578/CS557 Lecture 21

14

Sample Domain Partition

1-

Suppose we have a domain:

Which we partition into 5 triangles:

We note the unique edges, and arbitrarily label their edge limits with +/-

1

23

4

5

1+

2+2-

3- 3+

4-4+

5-5+

Page 15: MA557/MA578/CS557 Lecture 21

15

Stability

Set

, , 02

1, , , 0

2 2 2

1, , , 0

2 2 2

C

C C CC u v C C C

t x y

dC C C C C C C

dt

dC C C C C C C

dt

u n

Page 16: MA557/MA578/CS557 Lecture 21

16

1, , , 0

2 2 2

1, , , 0

2 2 2

, ,2 2

1, ,

2 2

jj j

j

j

jj

j

j j

e e

j

dC C C C C C C

dt

dC C C C C C C

dt

C C C C

dC C C

dt

0

,2

uniqueeedges

e

C C

C C C

Suppose We Partition jj

Page 17: MA557/MA578/CS557 Lecture 21

17

Continuing

e

, ,2 2

1, , 0

2 2

,2

, ,1 2 2,2

j

j

e e

j uniqueeedges

e

ej

C C C C

dC C C C C

dt

C C C

C C CdC C

dt

e ,

euniqueedges

e

C

C C

Where we have gathered like terms (note we ignored the boundary terms)

Page 18: MA557/MA578/CS557 Lecture 21

18

Finally -- Stability

22

e

e

22

e

, ,1 2 2,2

,

,2

02

j

jj

e ej unique

edges

e

uniqueeedges

L eL unique

edges

C C C CdC C

dtC C

C C C C

dC C

dt

u n

Where we have gathered like terms (note we dropped the boundary terms)

Page 19: MA557/MA578/CS557 Lecture 21

19

Now The Details

• Recall in 1D we were restricted to breaking the interval [a,b] into segments.

• In 2D there are many more choices.

• Two obvious shapes for sub-regions are the triangle and quadrilateral.

• There is plenty of software available for mesh generation using triangles.

• Building quadrilateral meshes is slightly tougher for a complex domain.

Page 20: MA557/MA578/CS557 Lecture 21

20

Mesh Generation

• For simplicity we will use the Triangle mesh generator.

• This has been built into WinUSEMe – review the previous notes.

• For now assume that the task of creating a mesh has been done – and – the mesh is held in a file.

• Note that for the DG we do not need to much information about how the element are connected – it is mostly sufficient to know which edge connects to which edge.

• We also need to know which faces lie on a domain boundary.

Page 21: MA557/MA578/CS557 Lecture 21

21

Reference Triangle

• The following will be our basic triangles:

• All straight sided triangles are the image of this triangle under the map:

s

r

(-1,-1) (1,-1)

(-1,1)

1 2 3

1 2 3

1 1

2 2 2x x x

y y y

v v vx r s r s

v v vy

Page 22: MA557/MA578/CS557 Lecture 21

22

Reference Triangle

• The following will be our basic triangles:

• All straight sided triangles are the image of this triangle under the map:

s

r

(-1,-1) (1,-1)

(-1,1)

1 2 3

1 2 3

1 1

2 2 2x x x

y y y

v v vx r s r s

v v vy

2 2,x yv v 1 1,x yv v

3 3,x yv v

Page 23: MA557/MA578/CS557 Lecture 21

23

Orthonormal Basis for the Triangle

• Fortunately an orthonormal basis for the triangle has been discovered (and rediscovered multiple times).

• First we need to know some details about the Jacobi polynomials. These polynomials are parameterized by two reals: and their integer orders n,m such that they satisfy the orthogonality relationship (for integer alpha,beta):

• Basic identity:

,

1, ,

1

! !1 1 2

2 2 2 1 ! !n m nm

n nx xP x P x dx

n n n

,

, ,

!1

! !

1

n

n

n n

nP

n

P x P x

Page 24: MA557/MA578/CS557 Lecture 21

24

Rodrigues’ Formula

• The Jacobi polynomials can be generated in a similar way to the Legendre polynomials:

• Note the Legendre polynomials are a special case of the Jacobi polynomials:

, 211 1 1

1 2 ! 1 1

nn

n n nn

dP x x x x

dxn x x

0,0n nL x P x

Page 25: MA557/MA578/CS557 Lecture 21

25

Recurrence Relation

,0

,1

1

12 1 2 1

2

P x

P x x

,1

2 2 ,

,1

2 1 1 2

2 2 !2 1

2 1 !

2 2 2

n

n

n

n n n P x

nn x P x

n

n n n P x

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

Page 26: MA557/MA578/CS557 Lecture 21

26

Orthonormal Basis for the Triangle

• The following basis is due to Koornwinder (later revived by Proriol, Dubiner, Owens,….)

• Part of HW7 is to show that this is an orthogonal basis in the sense that:

0,0 2 1,0

2(1 )1

(1 )

1,

2

nn

n mnm

ra

s

b s

br s P a P b

1

1 1

2 2

2 1 2 2 2

s

ik jlij kl drds i j i

Page 27: MA557/MA578/CS557 Lecture 21

27

Homework 7

Q1) Prove that the Koornwinder-Proriol-Dubiner-Owens… basis is orthogonal on the triangle: T={-1<=r,s;r+s<=0}:

(HINT: under the mapping (r,s)->(a,b) the image of the triangle T is the square Q={-1<=a,b<=1} and the Jacobian is (1-b)/2 )

Q2) Determine an orthonormal basis

for the triangle by normalizing the basis functions of the KPDO.. basis

Q3) Construct a p’th order Vandermonde for the equally spaced points on the triangle (take half of the square of (p+1)x(p+1) points) using the orthonormal KPDO basis. In Matlab calculate the condition number of this Vandermonde basis as a function of p.

1

1 1

2 2

2 1 2 2 2

s

ik jlij kl drds i j i

0

nmn m p

Page 28: MA557/MA578/CS557 Lecture 21

28

HW7 cont

Q3cont) Use the lower left triangle of points:

Page 29: MA557/MA578/CS557 Lecture 21

29

HW7 cont

Q3cont) The Vandermonde matrix V will be have (p+1)(p+2)/2 rows and columns.

Q4) Extra credit: repeat 3 using half of the tensor product of the one-dimensional Chebychev nodes.

For Q3 and (Q4) plot the polynomial order on the horizontal axis and cond(V) on the vertical axis

1 2, where 1 and 0 n,m;n+m p

2i ii nm nm

p pr s i

V

Page 30: MA557/MA578/CS557 Lecture 21

30

HW7 cont

Q4cont) Use the lower left triangle of points:

Page 31: MA557/MA578/CS557 Lecture 21

31

Next Class

• We will create the derivative and surface matrices used in the DG scheme.

• We will transform the modal scheme into a nodal scheme.

• We will use a better set of nodes (improve the condition number of the Vandermonde matrix).

• Time permitting we will prove consistency.

• For more info on Jacobi polynomials:

http://mathworld.wolfram.com/JacobiPolynomial.html