Upload
milton
View
38
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
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.
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
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
5
Our Domain
6
Our Sub-region
7
Outward Normal n
n
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
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
10
In Component Form
• Assuming ubar is constant this becomes:
dCdV CdV
dt
u v CdVx y
u
u
v
x
x
u
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
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
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
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+
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
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
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)
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)
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.
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.
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
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
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
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
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
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
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
28
HW7 cont
Q3cont) Use the lower left triangle of points:
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
30
HW7 cont
Q4cont) Use the lower left triangle of points:
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