Comparing Truncation Error to Partial Differential Equation Solution ...

8 downloads 0 Views 73KB Size Report
Feb 9, 2003 - knowledge of the truncation error in each of the individual equations. ..... D. A, J. B. Drake, J. J. Hack, R. Jacob, P. N. Swarztrauber, 1992: A ...
February 9, 2003 8:48 pm

Comparing Truncation Error to Partial Differential Equation Solution Error on Spherical Voronoi Tesselations

Todd D. Ringler

Department of Atmospheric Science Colorado State University Fort Collins, CO 80523

January 31, 2003

copyright 2003 Todd Ringler

February 9, 2003

Abstract

This paper analyzes the properties of the Poisson equation described on Spherical Voronoi Tesselations (SVTs). Analysis of the truncation error and solution error is conducted and the relationship between these two types of error is explored. We find, as others have, that the truncation error provides an upper bound to the solution error in terms of convergence rate. This implies that while a standard truncation error analysis of the basic discrete operators is useful, it is not sufficient to fully understand the properties of the discrete PDE system. In the conclusions we discuss the implications of this finding and argue two points. First, the properties of the PDE solution error can not, in general, be ascertained by knowledge of the truncation error in each of the individual equations. And second, that minimizing –1

solution error will be accomplished by minimizing L ( τ ) , where L and τ is the truncation error.

1

–1

is the inverse of the PDE operator

February 9, 2003

1.

Introduction The use of quasi-uniform tessellations of the sphere is gaining popularity in the climate modeling

community. Several modeling groups are developing models based on grids derived from an icosahedron inscribed in a unit sphere. These “unstructured” grids have necessarily required the development of new discrete operators to approximate the div , curl , grad , and Laplacian operators. When these new operators are tested using standard truncation error analysis techniques, it is not uncommon to find that certain error norms fail to converge with increasing resolution (see, for example, Heikes and Randall 1995). This is reason for both concern and further investigation. The situation becomes more perplexing when we realize that these same grids which do not converge in a truncation error analysis yield convergent solutions to the nonlinear shallow-water test cases developed by Williamson et al. (1992). We are, of course, talking about two different things when we discuss truncation error and partial differential equation (PDE) solution error. The purpose of this paper is to discuss the relationship between truncation error and solution error for a prototypical PDE described on Spherical Voronoi Tessellations (SVTs).

Section 2 reviews the mathematical relationship between truncation error and PDE solution error. Nothing in Section 2 is new; the somewhat strange relationship between these two errors is apparently widely known in the applied mathematics field. Section 3 develops the definition of SVTs and introduces four such grids for analysis. Section 4 develops the PDE to be analyzed and provides two exact solutions of this PDE for comparison. The results of the truncation error and solution error analysis are presented in Section 5. Conclusions are drawn in Section 6.

2.

Relating truncation error to PDE solution error Suppose we have a PDE of the form

2

February 9, 2003

L(u) = f

(1)

where L is the continuous operator, u is the continuous solution to the PDE, and f is the right-hand side (RHS) forcing. The discrete analog to (1) is defined as

Lˆ ( uˆ ) = f

(2)

where ( ˆ ) denotes discrete approximation as follows: Lˆ represents a finite-difference approximation to L and uˆ is the discrete solution of (2). The overbar always denotes the sampling of a continuous function at discrete locations on the grid. If we have a known solution to (1), i.e, u and f are known, then a truncation error analysis of the PDE operator, L , can be carried out as

Lˆ ( u ) – f = τˆ

(3)

where τˆ is the truncation error. In this truncation error analysis we apply the discrete operator, Lˆ , to a sampled function, u , and compare the result to the sampled RHS function, f . While the truncation error is of great interest, we are generally more interested in the accuracy in which we solve the PDE, i.e., the extent to which uˆ differs from u . The truncation error analysis tells us nothing about how uˆ differs from

u . We can get an estimate of this error by using (1) and (3) to obtain

Lˆ ( u ) – Lˆ ( uˆ ) = τˆ

(4)

If we assume that L is linear, then we can rewrite (4) as

Lˆ ( u – uˆ ) = τˆ 3

(5)

February 9, 2003

and our estimate of the error in solving the PDE is

–1 u – uˆ = Lˆ ( τˆ )

(6)

–1 where Lˆ denotes the inverse of Lˆ . Equation (6) states that the error in solving the PDE is related to the

truncation error via the inverse of the PDE operator. Assuming that our scheme is stable, we know that we can invert the PDE operator and have

–1 ≤c Lˆ

where c is some constant and

(7)

is the norm of our choice. If we apply this norm to (6), we obtain

–1 –1 u – uˆ = Lˆ ( τˆ ) ≤ Lˆ τˆ .

(8)

u – uˆ ≤ c τˆ .

(9)

Substituting (7) into (8) we find

Equation (9) states that the truncation error, τˆ , provides an upper-bound to the PDE solution error, u – uˆ , α

in terms of convergence rate. If we can show that the truncation error is O ( h ) , where h is a measure of the grid spacing and α is some positive constant, then we are guaranteed that the PDE solution error, α

α

u – uˆ , will be at worst O ( h ) . In some cases, the PDE solution error can be better than O ( h ) . This fact has been long known; Manteuffel and White (1986) demonstrated this to be true and state “certain commonly used finite-difference schemes yield second-order accurate solutions despite the fact that their truncation error is of lower order.” 4

February 9, 2003

3.

Spherical Voronoi Tesselations In this study we will analyze the truncation error and solution error for discrete systems situated on n

Spherical Voronoi Tesselations (SVTs). Given the vector positions of a set of points, { p˜ } i = 1 , that lie on the unit sphere, we define for each p˜ i a corresponding Voronoi region, V i , as the set of all points on the n

sphere that lie closer to p˜ i than p˜ j for all j ≠ i . The collection of all of these Voronoi regions, { V } i = 1 , n

completely covers the surface of the sphere with no overlap. We will refer to { p˜ } i = 1 as the generating points or generators since these points are used to generate the Voronoi tesselation. It will also be useful to

˜ contain the list of the define for each p˜ i a vector list of its 1-ring, or immediate, neighbors; let Q i neighbor locations for the generator location i .

One common method to generate a SVT is to begin with an icosahedron inscribed in a unit sphere. The location of the twelve vertices of the icosahedron can serve as SVT generators. With only twelve Voronoi regions covering the sphere, the tesselation is extremely coarse and not particularly useful. If one bisects the vertices of the icosahedron and projects those points to the unit sphere, the number of generating points increases from 12 to 42. The process of bisection and projection can be continued as many times as necessary. This leads to a string of generators with the sequence of 12, 42, 162, 642, 2562, 10242, 40962, 163842, 655362, and so on. The total number of generating points, N , can be written as

N = 5⋅2

2G + 1

+2

(10)

where G is the level of recursion starting with a value of 0. Following Tomita et al. (2001), we can refer to

5

February 9, 2003

the grid by its “glevel.” For example, a grid with 10242 generators is referred to as glevel(05). If the grid is generated by the recursive bisection-projection algorithm applied to the icosahedron and has no other modifications, then we refer to that grid as “unmodified.” So, for example, glevel(06)-unmodified refers to a SVT with 40962 generators and the location of those generators are obtained by the recursive bisectionprojection algorithm.

We look at three variations of the unmodified SVT. The first of these has been analyzed before in Heikes and Randall (1995). In that paper the authors find the L fails to converge with increasing resolution. The L

L

inf

inf

inf

norm of the discrete Laplacian operator

norm is defined as

( qˆ ) = max [ qˆ i – q i ]

N i=1

(11)

where qˆ is the discrete solution, q is the exact solution sampled at the grid points. In order to correct this shortcoming in the unmodified grid, the authors slightly modify the location of the generating points. The purpose of this modification is to force the line segment that connects two neighboring generating points and the line segment that connects the shared Voronoi corners to bisect each other (see Heikes and Randall, 1995, Figure 1). This modified grid is referred to as “HR95.”

The second variation of the unmodified grid is referred to as TSTT. Patrick Knupp and colleagues at Sandia National Laboratory have developed a robust grid generation and grid optimization program call MESQUITE. We have used MESQUITE to generate numerous SVTs, but only one of the grids is discussed here. The unmodified grid is provided as input to MESQUITE and the grid is optimized with respect to the area-ratio metric. This metric leads to smoothly varying distribution of generating points.

The last variations of the unmodified grid is referred to as “centroid.” In this grid system a generator is also the centroid of its corresponding Voronoi region. Du et al. (1999) explore the use of 6

February 9, 2003

centroidal Voronoi tessellations on the plane. They show that in many cases, centroidal Voronoi tesselations are “optimal” choices. Centroidal SVTs are easily generated by beginning with the unmodified grid at any level of recursion, glevel(??)-unmodified, and moving the generating points to the centroids of their corresponding Voronoi region. With the new set of generators, the Voronoi regions are recomputed and the generators are moved, again, to the centroid of the new Voronoi regions. This iterative algorithm is called Lloyd’s method.

Note that we do not have all grids at all resolutions. We have the unmodified grid and centroid grid up to glevel(08). We have the HR95 grid up glevel(06) and the TSTT grids from glevel(05) through glevel(07).

Before we carry out the truncation error analysis and solution error analysis, it is useful to compare the global and local properties of these four SVTs. For the sake of conciseness, we will focus on geodesic distance between generating points as the metric measuring global and local uniformity. For each generator

˜ , as location, i , define a min and max geodesic distance between p˜ i and its 1-ring neighbors, Q i

min

σi

˜ ] = min [ p˜ i – Q j

# neighbors j=1

,

max

σi

˜ ] = max [ p˜ i – Q j

# neighbors j=1

.

(12)

Furthermore, for the entire grid define similar quantities as

ω

min

min

= min [ σ i

The quantity R1 = ω

min

Úω

N

]

max

i=1

,

ω

max

max

= max [ σ i

N

]

i=1

.

(13)

is a measure of the global uniformity of the grid, while the

N

min max 1 quantity R2 = ---- ∑ σ i Ú σ i is a measure of the average local uniformity of the grid. With all other N i=1

7

February 9, 2003

things being equal, we strive for grids that are both globally uniform and locally uniform. Table 1 summarizes the uniformity of these four grids at various resolutions.

R1

R1

R1

R1

R2

R2

R2

R2

unmod

HR1995

TSTT

Centroid

unmod

HR1995

TSTT

Centroid

glevel05

0.837

0.788

0.589

0.784

0.887

0.884

0.956

0.920

glevel06

0.834

0.787

0.545

0.772

0.893

0.885

0.967

0.916

glevel07

0.834

n/a

0.460

0.741

0.896

n/a

0.969

0.917

Table 1:

R1 measures the global uniformity, while R2 measures the local uniformity.

We note that the TSTT grid was specifically designed to be very smooth in local measures. It accomplishes this goal at the price of reduced global uniformity. The remaining grids show similar amounts of local and global uniformity with the centroid grids being only slightly more locally uniform than the unmodified or HR95 grids.

4.

Prototype PDE for analysis For this analysis we choose the prototypical PDE of the form

2

∇ u = f

(14)

for analysis. The continuous form of the Laplacian along the surface of a sphere of unit radius can be written as

8

February 9, 2003 2

1 ∂u 1  ∂ u ∂ ∇ u = ------------   cos φ   + -------------------   cos φ  ∂ φ  ∂ φ  ( cos φ ) 2  ∂ λ  2

(15)

where φ is latitude and λ is longitude.

The discrete approximation of the Laplacian operator used in this work can be found in Appendix A. A full derivation of the suite of finite-difference operators can be found in Ringler and Randall (2002).

We will analyze two exact solutions to this equation. The first exact solution has the form

u = sin θ

(16)

f = – 2 sin θ We refer to (16) as “exact solution #1.”

Following Heikes and Randall (1995) and Tomita et al. (2001), we chose a second exact solution of the form

u = cos ( mφ ) [ cos ( nθ ) ]

2

4

(17)

4

2 2 2 1 – m [ cos ( nθ ) ] f = -------------------------------------- – 2n cos ( mφ ) [ cos ( nθ ) ] n [ cos ( nθ ) ] – 3n[ sin ( nθ ) ] – --- sin ( 2nθ ) tan ( θ )   2 2 [ cos ( θ ) ]

we refer to this solution as “exact solution #2.” Both n and m are arbitrary constants. Here we chose

n = m = 3.

In the next section, we carry out both a truncation error analysis and a solution error analysis on 9

February 9, 2003

(16) and (17). For the truncation error analysis we will follow (3) and apply the discrete operator to u and compare the discrete solution, ˆf , to f . In the solution error analysis, we follow (6) and provide the system with f and invert the discrete Laplacian to solve for uˆ . We then compare uˆ to u .

5.

Results Fig. 1a,b shows the truncation error and solution error, respectively, using exact solution #1. The

respective errors are plotted along the y-axis for a variety of resolutions that are plotted along the x-axis. The different grids are distinguished using different symbols as follows: unmodified = closed circle, HR1995 = closed square, TSTT = closed diamond, centroid = open circle. In many cases the results fall on top of each other and the symbols can not be clearly distinguished. The plots show results using two error norms: L

inf

2

plotted in red and L plotted in green. Each plot also includes a thick black line denoting a

convergence rate of – 2 .

Beginning with Fig. 1a, the results for the unmodified, HR95, and TSTT grids are all grouped together. The L

inf

2

norms have slopes near – 1 and the L norms have slopes near – 2 . The HR95 and

TSTT results fall on top of each other and are, in general, about a factor of 5 more accurate than the unmodified grid. For this exact solution, the centroid grid is about 4 orders of magnitude more accurate than any of the other grids. The rate of convergence of the centroid is unsteady, but averages out to about

– 2 over the four test resolutions.

Moving to Fig. 1b, we see that the unmodified and HR95 grids show steady convergence of both norms at a rate of – 2 . The TSTT grid also converges at a rate of – 2 , but in a less steady manner. Note that

10

February 9, 2003

10 10

log10(Error Norms)

10 10 10 10 10 10 10 10 10

-2 -3 -4 -5 -6 -7 -8 -9

-10 -11 -12

10

10 10

log10(Error Norms)

10 10 10 10 10 10 10 10 10

4

5

4

5

10 10 Number of Grid Points

10

6

-2 -3 -4 -5 -6 -7 -8 -9

-10 -11 -12

10

Figure 1:

3

3

10 10 Number of Grid Points

10

6

Exact Solution #1: Truncation error (top) and solution error (bottom) are plotted along the y-axis for a variety of resolutions that are plotted along the x-axis. L inf

2

norm in green and L norm in red. Black line denotes a slope of – 2 . The different grids are distinguished using different symbols as follows: unmodified = closed circle, HR1995 = closed square, TSTT = closed diamond, centroid = open circle.

11

February 9, 2003

in the analysis of the solution error, the unmodified grid and HR95 grid results are very similar and are more accurate than the TSTT grid. We see that the rate of convergence of the solution error is bounded from above by the rate of convergence of the truncation error.

Fig. 2a,b shows the truncation error and solution error, respectively, using exact solution #2. The 2

symbols, colors, and reference slope remain the same as in Fig. 1. In Fig. 2a we see that the L norm converges at a rate near – 2 . At glevel(08), the centroid grid is about a factor of 5 more accurate than the unmodified grid. In terms of the L

inf

norm, we see that the unmodified, TSTT, and centroid grids fail to

converge. The unmodified grid fails to converge beyond glevel(05), whereas the TSTT grid and centroid grid fail to converge beyond glevel(07). The location on the grid where the L

inf

norm is found is always in

the vicinity of one of the twelve pentagons that exist on the grid. The vicinity of the pentagons is a region of distortion as the shape of the Voronoi regions changes from regular hexagons to distorted hexagons to a pentagon. The HR95 grid shows uniform converge of the L

inf

norm up to glevel(06). At this time, the

HR95 grid is only available up to glevel(06), so we can not say if that grid will show better convergence rates in the L

inf

norm than the other grids.

The analysis of the solution error in Fig. 2b shows a completely different picture. All of the grids produce nearly identical results. Both the L

inf

2

norm and the L norm show a steady convergence rate of

– 2 . As in Fig. 1, the convergence rates of the solution error are bounded from above by the convergence rates of the truncation error.

12

February 9, 2003 10

log10(Error Norms)

1

0.1

0.01

0.001

0.0001 10

3

4

5

4

5

10 10 Number of Grid Points

10

6

10

log10(Error Norms)

1

0.1

0.01

0.001

0.0001 10

Figure 2:

3

10 10 Number of Grid Points

10

6

Exact Solution #2: Truncation error (top) and solution error (bottom) are plotted along the y-axis for a variety of resolutions that are plotted along the x-axis. L inf

2

norm in green and L norm in red. Black line denotes a slope of – 2 . The different grids are distinguished using different symbols as follows: unmodified = closed circle, HR1995 = closed square, TSTT = closed diamond, centroid = open circle.

13

February 9, 2003

6.

Conclusions In agreement with the previous work, we find that the truncation error provides an upper bound to

the solution error in terms of convergence rate. The practical implication of this is that for SVTs, a truncation error analysis is not sufficient to describe the behavior of the PDE solution error.

To minimize the solution error, we want to focus on (6) which is rewritten here as

–1 u – uˆ = Lˆ ( τˆ ) .

(18)

–1 Recall that u is the exact solution, uˆ is the discrete solution, Lˆ is the inverse of the discrete PDE

operator, and τˆ is the discrete truncation error. Obviously, we can minimize the solution error by –1 minimizing the RHS of (18). Depending upon how Lˆ acts upon τˆ , a large truncation errors may or may

not translate to a large solution errors. Note that in Fig. 1 the TSST grid shows a smaller truncation error than the unmodified grid, but the TSTT grid has a larger solution error than the unmodified grid.

Equation (18) suggests an intriguing, but probably expensive, way to minimize solution error in an adaptive manner. During the integration of the shallow-water equations we can, in general, get some estimate of the truncation error. Furthermore. we could construct Lˆ

–1

at any time during the integration.

–1 The construction of Lˆ could account for the spatially-varying flow if we desired. Given our estimates of –1 Lˆ and τˆ , we could attempt to minimize the RHS of (18) by a judicious repositioning of the generating

points.

Another implication of this work is that when we are working with a system of PDEs, we should remain focused on the solution error of the system and not the error in the individual PDEs. Stated alternatively, when working with a system of PDEs we have the opportunity to reduce the system to a 14

February 9, 2003

single PDE. The analysis of this single PDE will provide the most insight into the properties of the solution error. Note that we do not necessarily have to explicitly make use of this single PDE in our models, but we must be able to derive this single PDE from the system of PDEs even in our discrete system.

The complexity of reducing the solution error will make it difficult to choose one SVT over another. Given the results in this paper, it appears that the centroidal SVT may be a safe choice. Obviously the results in Fig. 1 are interesting, but since these extraordinary results do not carry over to Figure 2:, the differences are not compelling. Theoretical evidence does suggest that centroidal SVTs are close to optimal in providing a uniform tesselation based on distance between generating points (Du et al., unpublished manuscript). From a more practical perspective, the centroidal SVTs are extremely easy to generate. And finally, while we have concentrated on producing uniform grids, one aspect of the centroidal SVTs that has not been discussed here is their ability to focus resolution in specific areas in a smoothly varying manner. If the generation of adaptive grids is important, then the centroidal SVTs are an easy choice.

References

Du Q., V. Faber, and M. Gunzburger, 1999: Centroidal Voronoi Tessellations: Applications and Algorithms, SIAM Rev., 41, 637-676. Heikes, R. and D. A. Randall, 1995: Numerical integration of the shallow-water equations on a twisted icosahedral grid. Part II: A detailed description of the grid and an analysis of numerical accuracy. Mon. Wea. Rev., 123, 1881-1887. Manteuffel, T. A. and A. B. White, 1986: The numerical solution of second-order boundary value problems on nonuniform meshes. Math. Comp., 47, 551-535.

15

February 9, 2003

Ringler, T.D., and D.A. Randall, 2002: A Potential Enstrophy and Energy Conserving Numerical Scheme For Solution of the Shallow-Water Equations on a Geodesic Grid. Mon. Wea. Rev., 130, 13971410. Tomita, H., M. Tsugawa, M. Satoh, and K. Goto, 2001: Shallow water model on a modified icosahedral geodesic grid by using spring dynamics. J. Comp. Phys, 174, 579-613. Williamson, D. A, J. B. Drake, J. J. Hack, R. Jacob, P. N. Swarztrauber, 1992: A standard test cases for the numerical approximations of the shallow-water equations in a spherical geometry. J. Comp. Phys, 102, 221-224.

Acknowledgments

The relationship between truncation error and solution error was pointed out the me by Max Gunzburger. I have greatly enjoyed the numerous discussions with Professor Gunzburger over the past month. Patrick Knupp has been very gracious in helping with the grid optimization. The many fruitful discussions with Professor David Randall and Dr. Ross Heikes are also appreciated.

Appendix A: The discrete Laplacian Operator

In Ringler and Randall (2002) the Laplacian operator is derived as the divergence of the gradient operator. This operator is valid for any spherical Voronoi tesselation in which the vertices are tri variate. Referring to Fig. 3, the resulting Laplacian operator centered at cell i can be written as a sum over it 1-ring neighbors as

16

February 9, 2003 # neighbors

L ( qi ) =

∑ j=1

ei c ij -----------q j – ----- q i A i d ij Ai

(19)

where A i is the area of Voronoi region i , c ij is the distance of the cell wall shared by cells i and j , d ij is the distance between cells i and j , and e i is the defined as

# neighbors



ei = –

j=1

c -----ij- . d ij

(20)

2

Figure 3: The discrete Laplacian operator based at the cell labeled “0” is a function of cells 0

d 02 3

c 02

through 6. Let

1

distance between cell 0 and cell X. Let c 0X denote the length of the cell segment shared by cell 0 and cell X. The equation for the Laplacian is then given by (19).

0

4

d 0X denote the

6

5

17

Suggest Documents