Discontinuous Galerkin Finite Element Methods for Shallow Water

Discontinuous Galerkin Finite Element Methods for
Shallow Water Flow:
Developing a Computational Infrastructure for
Mixed Element Meshes
A Thesis
Presented in Partial Fulfillment of the Requirements for
the Degree Master of Science in the
Graduate School of The Ohio State University
By
Ashley L. Maggi, B.S.
Graduate Program in Civil Engineering
The Ohio State University
2011
Master’s Examination Committee:
Ethan J. Kubatko, Advisor
Gil Bohrer
Shive Chaturvedi
c Copyright by
Ashley L. Maggi
2011
ABSTRACT
Discontinuous Galerkin finite element methods (DG FEM) for the shallow water
equations using mixed element meshes that consist of triangular and quadrilateral elements in two–dimensions and triangular prisms and hexahedra in three–dimensions
are developed, implemented, and tested. The main motivation behind this work is to
gain more insight on whether the use of quadrilateral/hexahedral elements improves
the efficiency of DG methods in a setting in which two (adjacent) triangular/triangular
prism elements are merged to form a single quadrilateral/hexahedral element. The
elements that are used in this study are constructed from a set of orthogonal, modal
basis functions formed from products of Legendre and Jacobi polynomials. Given
the fact that DG methods do not require continuity of the approximate solution
between elements, quadrilateral and hexahedral element basis functions may be developed that exclude the usual cross-terms that are present in standard C 0 elements,
e.g., a linear quadrilateral element may be used instead of a bilinear quadrilateral
element. The performance of the developed DG methods on triangular meshes and
quadrilateral meshes of arbitrary polynomial order p is evaluated in terms of accuracy
and computational time on a set of analytic test cases for the linear shallow water
equations. The numerical results provide evidence that there is substantial benefit
in using quadrilateral elements, and it is expected that the hexahedral elements will
offer similar computational savings over the triangular prism elements.
ii
This work also focuses on improving the computational efficiency of the existing
triangular prism elements. FEM is rapidly progressing in multi–dimensional and
multi–regional domains in which a crucial point in computing the FEM solutions is
the evaluation of the domain integrals arising over the master element. Previously,
nonproduct rules have not been developed specifically for the triangular prism, as
they have for many other commonly used shapes. Shape–specific nonproduct rules
for numerical integration over the triangular prism domain are derived in this work,
which result in, on average, a 27% computational savings over each element for each
time step of the problem.
This research has laid the groundwork for a robust computational infrastructure in
the context of DG FEM that will significantly cut computational cost by applying fast
and efficient state–of–the–art algorithms. The promising results provide motivation
for future model development within the framework of a mixed element approach as
well as the derivation of higher order numerical integration rules for triangular prism
domains.
iii
In loving memory of my papa
iv
ACKNOWLEDGMENTS
I would like to express my sincerest gratitude to my advisor, Professor Ethan
Kubatko, for his encouragement to pursue a graduate degree and the wonderful opportunity he has provided me. In addition, I am grateful of his limitless guidance,
patience and support throughout the course of this research.
I would also like to thank my family for their love and unconditional support to
pursue my dreams, whatever they may be.
v
VITA
June 2004 — Thomas Worthington High School
June 2010 — B.S. Civil Engineering, The Ohio State University
vi
TABLE OF CONTENTS
Page
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ii
Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iv
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
v
Vita . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
vi
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ix
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xi
Chapters:
1.
2.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1.1
1.2
1.3
Motivation & Objectives . . . . . . . . . . . . . . . . . . . . . . . .
Prior Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Thesis Organization . . . . . . . . . . . . . . . . . . . . . . . . . .
6
6
8
Mathematical Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . .
9
2.1
2.2
3.
Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . .
Discontinuous Galerkin Formulation . . . . . . . . . . . . . . . . .
9
12
The Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
3.1
17
18
22
26
3.2
2D Elements . . . . . . . . .
3.1.1 Triangular Elements .
3.1.2 Rectangular Elements
3D Elements . . . . . . . . .
.
.
.
.
vii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3.2.1 Triangular Prism Element . . . . . . . . . . . . . . . . . . .
3.2.2 Rectangular Hexahedron Elements . . . . . . . . . . . . . .
Element Basis Function Subroutine . . . . . . . . . . . . . . . . . .
28
34
37
Numerical Quadrature and Cubature . . . . . . . . . . . . . . . . . . . .
40
4.1
4.2
4.3
.
.
.
.
.
.
.
.
.
43
46
46
50
52
55
60
60
65
Numerical Testing & Results . . . . . . . . . . . . . . . . . . . . . . . . .
70
5.1
5.2
Analytic Test Case . . . . . . . . . . . . . . . . . . . . . . . . . . .
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70
73
Conclusions and Future Work . . . . . . . . . . . . . . . . . . . . . . . .
88
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
90
3.3
4.
4.4
4.5
5.
6.
Triangle Quadrature Rules . . . . . . . . . . . . . . . .
Square Quadrature Rules . . . . . . . . . . . . . . . .
Triangular Prism Cubature Rules . . . . . . . . . . . .
4.3.1 Method of Construction . . . . . . . . . . . . .
4.3.2 Symmetry groups . . . . . . . . . . . . . . . . .
4.3.3 Solution of System of Equations . . . . . . . .
4.3.4 Some Cubature Formulas for Triangular Prisms
Cube Cubature Rules . . . . . . . . . . . . . . . . . .
Quadrature Subroutine . . . . . . . . . . . . . . . . . .
viii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
LIST OF TABLES
Table
Page
4.1
Number of Quadrature Points: Triangle . . . . . . . . . . . . . . . . .
44
4.2
Number of Quadrature Points: Square . . . . . . . . . . . . . . . . .
48
4.3
Number of Cubature Points: Triangular Prism . . . . . . . . . . . . .
49
4.4
Distribution of points and unknowns for symmetry groups. . . . . . .
54
4.5
Triangular Prism Cubature Rule: p = 1. . . . . . . . . . . . . . . . .
60
4.6
Triangular Prism Cubature Rule: p = 2 a. . . . . . . . . . . . . . . .
61
4.7
Triangular Prism Cubature Rule: p = 2 b. . . . . . . . . . . . . . . .
61
4.8
Triangular Prism Cubature Rule: p = 3 a. . . . . . . . . . . . . . . .
61
4.9
Triangular Prism Cubature Rule: p = 3 b. . . . . . . . . . . . . . . .
62
4.10 Triangular Prism Cubature Rule: p = 4. . . . . . . . . . . . . . . . .
62
4.11 Triangular Prism Cubature Rule: p = 5. . . . . . . . . . . . . . . . .
64
4.12 Number of Cubature Points: Cube . . . . . . . . . . . . . . . . . . .
65
5.1
Test Case Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
5.2
Mesh Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
5.3
L∞ Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77
ix
5.4
L2 Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
78
5.5
Rate of h-Convergence . . . . . . . . . . . . . . . . . . . . . . . . . .
80
5.6
Ratio of CPU Time . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86
x
LIST OF FIGURES
Figure
Page
1.1
Unstructured Mesh Representation . . . . . . . . . . . . . . . . . . .
4
1.2
Structured Mesh Representation . . . . . . . . . . . . . . . . . . . . .
4
1.3
Mixed Element Mesh Representation . . . . . . . . . . . . . . . . . .
5
2.1
Shallow Water Assumption . . . . . . . . . . . . . . . . . . . . . . . .
10
2.2
Shallow Water Diagram . . . . . . . . . . . . . . . . . . . . . . . . .
11
2.3
Finite Element Partition of Domain . . . . . . . . . . . . . . . . . . .
12
2.4
Piecewise Discontinuous Subspace . . . . . . . . . . . . . . . . . . . .
13
3.1
Bilinear vs. Linear Functions
. . . . . . . . . . . . . . . . . . . . . .
16
3.2
Master Triangular Element . . . . . . . . . . . . . . . . . . . . . . . .
18
3.3
Master Triangular Element Transformation . . . . . . . . . . . . . . .
19
3.4
Mapping of Triangular Master Element to Quadrilateral
. . . . . . .
21
3.5
Triangular Hierarchical Basis Functions . . . . . . . . . . . . . . . . .
22
3.6
Master Rectangular Element . . . . . . . . . . . . . . . . . . . . . . .
23
3.7
Master Rectangular Element Transformation . . . . . . . . . . . . . .
24
3.8
Rectangular Hierarchical Basis Functions . . . . . . . . . . . . . . . .
27
xi
3.9
Staircase Boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
3.10 Sigma-Coordinate Transformation . . . . . . . . . . . . . . . . . . . .
29
3.11 Master Triangular Prism Element . . . . . . . . . . . . . . . . . . . .
30
3.12 Mapping of Triangular Prism Element to Hexahedral . . . . . . . . .
33
3.13 Master Cubic Element . . . . . . . . . . . . . . . . . . . . . . . . . .
35
3.14 Pseudo Code of Orthogonal basis.f . . . . . . . . . . . . . . . . . . .
39
4.1
Quadrature rules for the triangle. . . . . . . . . . . . . . . . . . . . .
45
4.2
Quadrature rules for the square. . . . . . . . . . . . . . . . . . . . . .
47
4.3
Reference Triangular Prism . . . . . . . . . . . . . . . . . . . . . . .
50
4.4
Symmetry groups used for the triangular prism . . . . . . . . . . . .
53
4.5
Quadrature rules for the triangular prism. . . . . . . . . . . . . . . .
63
4.6
Quadrature rules for the cube . . . . . . . . . . . . . . . . . . . . . .
66
4.7
Schematic of quadrature subroutine . . . . . . . . . . . . . . . . . . .
69
5.1
Test Case Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72
5.2
Test Case Bathymetry . . . . . . . . . . . . . . . . . . . . . . . . . .
73
5.3
Test Case for Simulation . . . . . . . . . . . . . . . . . . . . . . . . .
74
5.4
h-convergence: Quadrilateral Elements . . . . . . . . . . . . . . . . .
81
5.5
h-convergence: Triangular Elements . . . . . . . . . . . . . . . . . . .
82
5.6
h-convergence: Both Element Types . . . . . . . . . . . . . . . . . . .
83
5.7
p-convergence: Surface Elevation . . . . . . . . . . . . . . . . . . . .
84
5.8
p-convergence: Velocity . . . . . . . . . . . . . . . . . . . . . . . . . .
85
xii
5.9
Ratio of CPU Time . . . . . . . . . . . . . . . . . . . . . . . . . . . .
xiii
87
CHAPTER 1
INTRODUCTION
The development of computational tools that can provide reliable and efficient
approximations to solutions of partial differential equations (PDEs) is an important
focus of the scientific and engineering community. These types of computational
models are used to simulate a wide range of physical phenomena — such as flow
dynamics in the atmosphere and ocean, the deformation of structures, the advection
of contaminants in natural systems, etc. — and with continuous advances in computational power, applied mathematics, and the availability of physical data (e.g.,
lidar–based data), they are being applied to problems of greater and greater complexity. While this situation creates an opportunity to solve problems that were
thought to be intractable only a few years ago, it also creates a need to continually
update the algorithms and tools used by these models so that they can continue to
provide accurate and reliable data in an efficient manner.
This thesis specifically addresses the continued development of a computational
tool that is used for solving time–dependent free surface flow and transport problems
in two– and three–dimensions. The shallow water equations, a set of hyperbolic PDEs,
are used to model free surface flow in the deep ocean, coastal ocean, estuaries, rivers,
open channels, and coastal floodplains. Many flow processes are described by these
1
equations including tides, the propagation of flood waves in rivers, tsunami waves,
and storm surges associated with hurricanes. The last two examples are indicative of
the kinds of applications that require efficient codes and quick “turn–around time”
in performing simulations so that crucial information can be provided to emergency
managers and first time responders as storms approach landfall.
In many practical applications, like the one shown in Figure 1.1, the physical domains over which the shallow water equations are solved are geometrically complex,
which is introduced by the complicated vertical and horizontal boundaries arising
along the coastline and the bottom surface. Additionally, there is generally a large
range of scales present in the problems, from the relatively quiet waters of the deep
ocean to the more dynamic flows found in the coastal area. The geometry and the
range of scales of the given problem must be adequately represented by a so-called
computational mesh in order for the computational model to provide accurate solutions. The computational mesh consists of a collection of nodes and/or elements over
which problem data is specified and approximate solutions are sought. Computational
meshes fall into one of two main categories:
1. Unstructured meshes, which spatially vary the density or resolution of nodes
and elements throughout the domain. These types of meshes can be used to
easily fit the complicated boundaries as well as allow for varying element size to
capture the different scales of the problem efficiently. Finite element methods
(FEM) make use of unstructured meshes and thus are particularly advantageous
for the types of problems considered here. Figure 1.1 shows an example of part
of an unstructured mesh that is used for simulating hurricane storm surge in
2
Southern Louisiana. The contour colors indicate element size, which varies from
5 km in the deep ocean to less than 50 m nearshore.
2. Structured meshes, which utilize an equal–density (resolution), or spatially nonvarying, distribution of nodes throughout the domain. Finite difference methods
typically use these types of meshes. With structured meshes it is not as easy
to fit complicated boundaries while simultaneously capturing the varying scales
of the problem in an efficient way. The structured mesh shown in Figure 1.2
demonstrates, in a simple way, how difficulties can arise in trying to fit complicated boundaries using a fairly coarse structured mesh, which results in a
staircase effect along the boundary. This complicated boundary could be resolved using a much finer structured mesh, however, this would result in a large
computational overhead as the larger scales of the problem would no longer be
economically captured.
Of course both of the above mentioned mesh types have their advantages and
disadvantages. While unstructured meshes can easily fit the complicated boundaries
and allow for varying element size, they can be very costly and time consuming to
generate as well as present challenges during numerical implementation. On the other
hand, structured meshes are much easier to create and from a numerical perspective
are simpler and more efficient to implement. These facts lead to the investigation
of creating a computational infrastructure in the context of FEM which utilizes the
advantages of both mesh types—specifically, the consideration of a mixed element
mesh approach. Mixed element meshes attempt to tailor the amount of work involved
to obtain approximations to the problem being solved, using, for example, a having
a finer unstructured mesh where the solution and/or geometry varies rapidly and a
3
Figure 1.1: This particular unstructured mesh is of Southern Louisiana and is part
of a larger mesh used in hurricane simulations.
Figure 1.2: Structured mesh representation of complicated boundary (solid dark line).
4
Figure 1.3: Mixed Element Mesh Representation
coarser simple structured mesh where the solution and/or geometry does not vary as
much.
This thesis addresses implementation of mixed element meshes for a specific variant of FEM called the discontinuous Galerkin (DG) method. Briefly, the DG method
differs from the standard, continuous Galerkin FEM in that continuity constraints are
not imposed on quantities on the interelement boundaries, thus resulting in an approximate solution which is composed of piecewise continuous functions with possible
jump discontinuities along the element edges. This thesis contains a mix of mathematical theory and numerical implementation detail, all directed toward obtaining
more efficient approximations to the representative shallow water equations utilizing
DG FEM.
5
1.1
Motivation & Objectives
The specific form of the discrete equations that arise from the DG formulation
depend on the particular element type employed. The current version of the code
uses triangular elements in 2D and triangular prism elements in 3D. A profile of the
code revealed that nearly two-thirds of the computational time was spent on element
calculations. This obviously indicates that the particular type of element type chosen
greatly affects the efficiency of the code.
This fact serves as one of the main motivations for the investigation of different
element types and the proposed mixed element mesh approach. To this end, this
thesis work is focused on three main tasks:
1. Implement new quadrilateral (2D) and hexahedral (3D) elements and compare
their efficiency to the existing triangular and triangular prism elements.
2. Modify the code to accommodate the use of both element types in a single mesh.
3. Work on improving the efficiency of the existing triangular prism elements.
1.2
Prior Work
The use of mixed element meshes within the framework of DG methods has been
limited, and to the author’s knowledge nonexistent in the application of models involving the shallow water equations. There has been work done by [2], in which
a numerical analysis is extended from traditionally studied and used triangular element meshes to quadrilateral element meshes in the context of viscoelastic flow.
After a detailed mathematical application of DG methods to the transport equation
6
on a quadrilateral mesh, the work concludes that the error in the approximation is
sufficiently small and converges in the energy norm for the unknowns.
In the discipline of so-called non-conforming meshes (i.e., meshes where the location of the neighboring element vertices do not necessarily match up), a mixed
element mesh approach has been taken by [16] to compute 2D seismic wave propagation. The scheme was formulated to achieve the same approximation order in
space and time and to avoid numerical inconsistencies due to non-conforming mesh
transitions or the change of the element types. The performance of the new scheme
was verified by numerical convergence tests and experiments with comparisons to
independent reference solutions obtained by previous all triangular element schemes.
The findings concluded that the scheme reduced the computational cost in the sense
of memory and run-time requirements and the authors suggested similar behavior
would be observed for an extension to three space dimensions.
The most relevant work previously conducted in this specific area of research has
been done by [28], in which a performance comparison of nodal DG methods on triangles and quadrilaterals was applied to hyperbolic conservation laws. The performance
of the two element types was assessed by applying each mesh to a linear advecting
rotating plume transport problem. The test cases concluded that the computation
time needed for the quadrilateral elements was shorter than that for the triangular
elements. The numerical results also revealed that the quadrilateral elements yield
higher computational efficiency in terms of cost to achieve similar accuracy. The
promising findings of [28] initiated in part, the motivation for this work.
7
1.3
Thesis Organization
This thesis is organized as follows. Chapter 2 provides the background details
of the mathematical model and introduces the governing equations for the physical
processes we are trying to model. The numerical solution of these equations using the
DG method is then discussed, and an outline of the DG formulation is provided. Following this, in Chapter 3, some specific implementation details of the elements chosen
in both 2D and 3D are described. This includes their definition and transformation
to a master element, the set of basis functions chosen to approximate the solution
over each element, and a schematic of the subroutine implemented in the model. In
Chapter 4, quadrature points and weights for numerically evaluating integrals over
the elements are defined. Included in this chapter is the derivation of a set of novel
rules for integrating over the triangular prism domain in three dimensions. Chapter 5 gives the results of the numerical testing performed with the modified code,
while Chapter 6 draws some conclusions, gives the future directions of this work, and
touches on some of the challenges that lie ahead.
8
CHAPTER 2
MATHEMATICAL PRELIMINARIES
This chapter provides the basic information required to describe the implementation of the computational model described in later chapters.
2.1
Governing Equations
The governing equations for shallow water hydrodynamics arise from the NavierStokes equations, which are the general equations for fluid motion, under the assumption that the vertical length scale of the problem is much smaller, or “shallower”,
compared to the horizontal length scale. For example, if H is the depth of the ocean
and L is a typical wave length, the shallow water assumption says H/L is much less
than 1. In this case, the balance of momentum in the vertical z direction reduces to
the hydrostatic approximation for the pressure, i.e.,
p = p0 + ρg(ζ − z).
The remaining horizontal momentum equations, together with the conservation of
mass or continuity equation, form what are sometimes referred to as the three dimensional shallow water equations. If we then integrate these equations over the depth,
we arrive at the depth-integrated or depth-averaged shallow water equations, often
9
L
H
The shallow water assumption:
H
L
<< 1
Figure 2.1: Shallow Water Assumption
just referred to as the shallow water equations
∂
∂
∂ζ
+
(Hu) +
(Hv) = 0
∂t
∂x
∂y
1
∂
∂
∂
2
2
2
Hu + g(H − h ) +
(Hu) +
(Huv)
∂t
∂x
2
∂y
∂
∂
∂
(Hv) +
(Huv) +
∂t
∂x
∂y
1
Hv + g(H 2 − h2 )
2
2
= gζ
∂h
+ Fx
∂x
= gζ
∂h
+ Fy .
∂y
(2.1)
This set of hyperbolic PDEs is begin solved for the height of the free surface, ζ, and
the depth-integrated horizontal velocities, u and v over some domain Ω. The datum
is typically set at the still water level, h is the bathymetric depth measured from this
datum, H is total height of the water column, g is the acceleration due to gravity, and
Fx and Fy account for additional terms such as Coriolis force, tidal potential force,
and wind or wave radiation stress, that may be present. A schematic of the shallow
water model is given in Figure 2.2.
Like any set of differential equations, suitable boundary and initial conditions
need to be specified. Typical boundary conditions include the specification of the
free surface elevation and or the flow condition along the boundary of the domain,
10
Free surface
ζ(x, y, t)
u(x, y, t)
Datum ζ = 0
h(x, y)
H(x, y, t)
Bottom boundary
Figure 2.2: Shallow Water Diagram
and the initial conditions are the given by the initial state of the free surface and the
initial velocities.
In solving hydrodynamic problems, sometimes we are only looking for the flow
conditions, but often we use the flow to drive another process we want to model,
i.e., contaminant transport, sedimentation, salinity, etc. These processes, as well as
the above shallow water equations, all fall into the general form of time-dependent
conservation laws where the time rate of change of some quantity is being balanced
by the divergence of the flux of that quantity and some set of source or sink terms, s
∂ui
+ ∇ · Fi = si .
∂t
This is the preferred form of the equations for applying the DG method which
will be presented in the section to follow.
11
Th = {Ωe }
⇒
Ω
Figure 2.3: Example of a finite element partition of a domain Ω
2.2
Discontinuous Galerkin Formulation
As stated in the introduction, DG methods are finite element methods, which use
a weak or variational form of the problem. To arrive at this form starting from the
PDE model and a finite element partition Th of the domain Ω, first multiply by a
sufficiently smooth test function v and integrate over each element,
Z
Ωe
∂u
v dΩ +
∂t
Z
Ωe
∇ · F v dΩ =
Z
s v dΩ.
(2.2)
Ωe
Then the divergence term of Equation (2.2) is integrated by parts,
Z
Ωe
∂u
v dΩ −
∂t
Z
Ωe
F · ∇ v dΩ +
Z
Ωe
F · n v ds =
Z
s v dΩ,
Ωe
u, v ∈ W
which removes the derivatives off of the flux function F and onto the test function
v, while also creating a boundary flux term, which is essentially how the elements
communicate in DG methods.
The true solution u and the test function v belong to some space of functions
W , but we look for an approximate solution that is in some subspace of W denoted
12
vh
p=1
p=2
Figure 2.4: An example of piecewise discontinuous elements in the subspace P k (Ωe )
by Wh , that is spanned by a basis of {φ}; that is, any function W in Wh can be
represented by a sum of the form
W =
X
w i φi
where {wi } is a set of coefficients and {φi } is the basis of the space. We then approximate the true solution u by uh ∈ Wh , that is
u ≈ uh =
N
X
ui (t) φi (x, y)
i=1
For example, we could choose the subspace to be P k (Ωe ), the set of piecewise polynomials of degree k defined over each element, that is,
Wh = w : w |Ωe ∈ P k (Ωe ) ∀Ωe ∈ Th
and then we replace the u and v by their approximations uh and vh in the weak form.
This process leads to the discrete weak form of the problem which consists of a
set of integral equations for each element,
13
for i = 1, 2, . . . , N
Z
Ωe
∀Ωe ∈ Te
∂uh
φi dΩ −
∂t
Z
Ωe
(F · ∇φi + sφi ) dΩ +
Z
Ωe
F · nφi ds = 0,
(2.3)
the number of which N depends on the order of approximation that is being used;
for example, linear, quadratic, etc.
Thus, the problem is converted to a system of ordinary differential equations
(ODEs) of the form
.
M u = L (u) ,
 R
φ φ dΩe
Ωe 1 1
R
φ φ dΩe
Ωe 2 1
...
R
φ φ dΩe
Ωe N 1

 R
R
R

φ φ dΩe . . . Ωe φN φ2 dΩe
 Ωe φ1 φ2 dΩe
Ωe 2 2

M=

..
..
..
...

.
.
.


R
R
R
φ φ dΩe Ωe φ2 φN dΩe . . . Ωe φN φN dΩe
Ωe 1 N






,









.

u= 




.
u1







.. 
. 


.
uN
.
u2
.
where M is the mass matrix, L is the DG operator, and u is the vector of time
derivatives of the unknown coefficients ui . This system of ODEs is then solved in
time using Runge-Kutta methods.
14
CHAPTER 3
THE ELEMENTS
In this work, an element class is defined by three main concepts: (i) a geometric
mapping or transformation from the physical element, Ωe , to a reference or master
element, Ω̂, (ii) a set of basis functions, {φi }, and their corresponding degrees of
freedom, that define the subspace of the approximate solution over the element, and
(iii) a set of quadrature (2D) or cubature (3D) points and weights for numerically
evaluating the integrals over the element domain, i.e., the integrals appearing in the
discrete weak form are replaced by a weighted sum of functions evaluations. The
first two items are discussed in this Chapter, while the discussion of the numerical
evaluation of the integrals is contained in Chapter 4.
Without the constraint of maintaining C 0 continuity of the approximate solution
between elements in the DG method, there exists a greater freedom in the choice of
elements that may be used, especially in the choice of basis functions. This fact is
particularly relevant in the case of the new quadrilateral and hexahedral elements
that are implemented in this work. For example, in constructing continuous basis
functions over quadrilateral elements for the standard continuous Galerkin FEM, it
is necessary to use bipolynomial functions in order to maintain continuity between
elements. This idea is illustrated in Figure (3), which compares the form of a bilinear
15
Bilinear function
Linear function
f (x, y) = a + bx + cy + dxy
f (x, y) = a + bx + cy
Figure 3.1: A comparison of bilinear (left) and a linear (right) functions defined over
a quadrilateral element.
and a linear function over a quadrilateral element. The bilinear function contains
an additional quadratic “cross–term”, xy, that is required to maintain continuity between elements. These extra cross–terms that appear in the bipolynomial functions
introduce additional degrees of freedom (and computational cost) and are solely required in order to generate continuous approximate solutions. They do not contribute
to the asymptotic rate of convergence of the element interpolation error [3]. Therefore
in this work, we focus on constructing quadrilateral and hexahedral elements that use
simple polynomial basis functions instead of the usual bipolynomial functions used in
standard FEM. This results in a set of simpler and more efficient quadrilateral and
hexahedral elements.
16
Along these same lines, each element class discussed here also uses a set of
orthogonal basis functions; that is, they have the property

Z
 Cij if i = j
φi φj dΩ̂ =

Ω̂
0 if i 6= j
where Cij is a constant that varies by element type and degree. This results in a
diagonal mass matrix, that is,

C11


 0


M=
 ..
 .


0
0
C22
..
.
0
...
0



... 0 


,
.. 
...
. 


. . . Cnn
(3.1)
which requires no matrix inversion and results in increased computational efficiency.
Additionally, each set of basis of functions that is used is also hierarchical, meaning that the set of basis functions of degree p is a subset of the set of basis functions
of degree p + 1, which is a subset of the set of basis functions of degree p + 2, etc.
This property is especially convenient and computationally efficient when implementing dynamic element order adaptation. Lagrange basis functions that are used in
standard FEM do not possess this property.
3.1
2D Elements
We begin with a description of the 2D elements that have been implemented
in the code — namely, the existing triangular elements and the newly constructed
rectangular elements. In each case, a description of the master element geometry,
including relevant mappings or transformations, and the set of basis functions is
described.
17
ξ2
(−1, 1)
Edge 1
3
Edge 2
ξ1
Ω̂
(−1, −1)
1
2
(1, −1)
Edge 3
Figure 3.2: Master Triangular Element
3.1.1
Triangular Elements
Master Triangular Element
A reference or master triangular element Ω̂ is defined using a local Cartesian
coordinate system, (ξ1 , ξ2 ) ∈ [−1, 1], as defined in Figure 3.2. The vertices of the
master element are numbered in a counter-clockwise manner, and edge number i is
defined as that edge opposite vertex i (circled numbers).
A physical element Ωe in the (x, y) coordinates can be defined as the image of this
master element under the affine transformation Te : Ω̂ → Ωe defined by
1
x = −
2
1
y = −
2
ξ 1 + ξ 2 x1 − 1 + ξ 1 x2 − 1 + ξ 2 x3
ξ 1 + ξ 2 y1 − 1 + ξ 1 y2 − 1 + ξ 2 y3
18
Te : (x, y) → (ξ1 , ξ2 )
(x3 , y3 )
ξ2
(−1, 1)
Ωe
(x2 , y2 )
y
ξ1
Ω̂
(x1 , y1 )
(−1, −1)
(1, −1)
x
Figure 3.3: Master Triangular Element Transformation
where (x1 , y1 ), (x2 , y2 ), and (x3 , y3 ) are the physical coordinates of the vertices of Ωe ,
numbered locally in a counter-clockwise manner. The Jacobian of this transformation
is
∂(x, y)
1
J =
=
∂(ξ1 , ξ2 )
2
(△)
where Ae
x2 − x1 , x3 − x1
y2 − y1 , y3 − y1
(△)
⇒
Ae
|J| =
,
2
is the area of Ωe .
The inverse of the transformation Te−1 : Ωe → Ω̂ is given by
ξ1
1
=
Ae
ξ2
1
=
Ae
y3 − y1
y1 − y2
1
1
x − x2 + x3 + x1 − x3 y − y2 + y3
2
2
1
1
x − x2 + x3 + x2 − x1 y − y2 + y3
.
2
2
19
Given these transformations, the area integrals over the physcial element in (x, y)
coordinates can be related to the area integrals over the master element in local
coordinates (ξ1 , ξ2 ). Specifically the relationship is given by
Z
(△)
Ae
f dA =
2
Ωe
Z
f dÂ.
Ω̂
Triangular Basis
An orthogonal basis for the triangle can be constructed as a generalized (or
warped, see [7]) tensor product of the so-called principal functions defined as
(1)
ψi
(α,β)
where Pn
=
(0,0)
Pi (η1 ),
(2)
ψij
=
1 − η2
2
i
(2i+1,0)
Pj
(η2 ),
is the n-th order Jacobi polynomial of weights α and β, and η1 and η2
are a coordinate system defined by the transformation
η1 = 2
1 + ξ1
1 − ξ2
− 1,
η2 = ξ 2 .
This transformation effectively maps the triangular master element into a quadrilateral one as shown in Figure 3.4 . The η-coordinate system, as viewed within the
ξ-coordinate system, can be interpreted as a so-called “collapsed” coordinate system.
It can be noted that there is a singularity in this transformation at ξ2 = 1; however,
this singularity does not appear in the final form of the basis functions.
(1)
With the definitions of the principal functions ψi
(2)
and ψij , the triangular basis
functions are now constructed as their tensor product
(1)
(2)
φ̃ij (ξ1 , ξ2 ) = ψi (η1 ) ψij (η2 ).
20
(3.2)
η2
ξ2
(−1, 1)
η1 = 2
1 + ξ1
1 − ξ2
!
−1
(−1, 1)
(1, 1)
ξ1
η1
Ω̂
Ω̂
η = −1
η2 = ξ 2
(1, −1)
(−1, −1)
η=0
(−1, −1)
(1, −1)
η=1
Figure 3.4: Mapping of Triangular Master Element to Quadrilateral
The orthogonality of this basis over the domain of the master triangular element
can easily be demonstrated using the orthogonal properties of the Jacobi polynomials
(α,β)
Pn
that are used to construct the principal functions ψi and ψij of the basis. This
orthogonality property, of course, leads to a diagonal mass matrix, which can be
trivially inverted. Specifically, the orthogonality relation can be shown as
Z
φ̃ij φ̃kl d = =
Ω̂




2
if i = k and j = l
(2i + 1)(i + j + 1)



0
(3.3)
otherwise.
These can be ordered hierarchically, e.g., constant function, linear functions,
quadratic functions, etc., as follows
φ△
1 = φ̄00
φ△
φ△
2 = φ̄01
3 = φ̄10
△
△
φ4 = φ̄02
φ5 = φ̄11 φ△
6 = φ̄20
△
φ(k+1)(k+2)/2−k = φ̄0k · · ·
φ△
(k+1)(k+2)/2 = φ̄k0
(3.4)
A p =1 or linear element is obtained by using the first three functions, a p = 2 or
quadratic element by using the first six, and so on. The first ten basis functions as
defined by equation 3.2 are shown in figure 3.5.
21
Figure 3.5: Triangular Hierarchical Basis Functions
3.1.2
Rectangular Elements
Master Rectangular Element
Similar to the triangular case, a reference or master rectangular element Ω̂ is defined using a local Cartesian coordinate system, (η1 , η2 ) ∈ [−1, 1] as defined in Figure
3.6. The vertices of the master element are numbered in a counter-clockwise manner,
and edge number i is defined as in figure 3.6.
22
η2
Edge 1
(−1, 1)
3
4
(1, 1)
Edge 2
η1
Ω̂
(−1, −1)
1
Edge 4
2
(1, −1)
Edge 3
Figure 3.6: Master Rectangular Element
A physical element in the (x, y) coordinates can be defined as the image of this master
element under the affine transformation Te : Ω̂ → Ωe defined by
1
x =
2
1
y =
2
1 − η1 x1 + 1 + η1 x2
1 − η2 y1 + 1 + η2 y4
where (x1 , y1 ), (x2 , y2 ), (x3 , y3 ), and (x4 , y4 ) are the physical coordinates of the vertices of Ωe numbered locally in a counter-clockwise manner. The Jacobian of this
transformation is
1
∂(x, y)
=
J =
∂(η1 , η2 )
2
()
where Ae
x2 − x1 ,
0
0,
y4 − y1
()
⇒
Ae
|J| =
,
4
is the area of Ωe .
The inverse of the transformation Te−1 : Ωe → Ω̂ is given by
η1 (x) =
1
2x − x1 − x2
∆x
η2 (y) =
1
2y − y1 − y4
∆y
23
R : (x, y) → (η1 , η2 )
η2
(x3 , y3 )
(x4 , y4 )
(−1, 1)
(1, 1)
Ωe
η1
y
(x1 , y1 )
Ω̂
(x2 , y2 )
(−1, −1)
(1, −1)
x
Figure 3.7: Master Rectangular Element Transformation
where ∆x = x2 − x1 and ∆y = y4 − y1 .
It should be noted that the Jacobian for a general quadrilateral element is not
constant, e.g., it is a function of η1 and η2 . This means the value of the Jacobian
would need to be computed and stored at each quadrature point when evaluating the
integrals, which leads to an extremely large data storage requirement. A non-constant
Jacobian also increases the order of quadrature rule that needs to be used to obtain
exact integration over the master element. For these two unfavorable reasons, the
choice in this work is limited to rectangular elements, where the Jacobian remains
constant. To combat the errors that would result where non-rectangular shapes are
needed, e.g., to fit complicated boundaries, triangular elements are used, hence the
concept of a mixed element mesh.
24
Given these transformations the area integrals over the physical element in (x, y)
coordinates can be related to the area integrals over the master element in local
coordinates (η1 , η2 ). Specifically the relationship is given by
Z
()
Ae
f dA =
4
Ωe
Z
f dÂ,
Ω̂
where it can be seen that due to the choice of rectangular elements, instead of general
quadrilaterals, the constant Jacobian can be pulled out of the integral.
Rectangular Basis
An orthogonal basis for the rectangle can be constructed as a tensor product of
the so-called principal functions defined as
(1)
ψi
(α,β)
where Pn
(0,0)
= Pi
(0,0)
(2)
ψj = Pj
(η1 ),
(η2 ).
is the n-th order Jacobi polynomial of weights α and β, where in this case
α = β = 0, which results in the Legendre polynomials, i.e., the Legendre polynomials
are a special subset of the Jacobi polynomials.
(1)
With the definitions of the principal functions ψi
(2)
and ψj , the rectangular basis
functions are now constructed as their tensor product
(1)
(2)
φ̃ij (η1 , η2 ) = ψi (η1 ) ψj (η2 ).
(3.5)
As mentioned earlier, given the fact that DG methods do not require continuity
of the approximate solution between elements, quadrilateral element basis functions
may be developed that exclude the usual cross-terms that are present in standard
25
C 0 elements, e.g., a linear quadrilateral element may be used instead of a bilinear
quadrilateral element.
The orthogonality of this basis over the domain of the master rectangular element
can easily be demonstrated using the orthogonal properties of the Legendre polyno(0,0)
mials Pn
that are used to construct the principal functions ψi and ψj of the basis.
This orthogonality property, again, leads to a diagonal mass matrix, which can be
trivially inverted. Specifically, the orthogonality relation can be shown as
Z
φ̃ij φ̃kl d = =
Ω̂




4
if i = k and j = l
(2i + 1)(2j + 1)



0
(3.6)
otherwise.
As in the case of the triangle, these also can be ordered hierarchically, e.g., constant
function, linear functions, quadratic functions, etc., as follows
φ
1 = φ̄00
φ
φ
3 = φ̄10
2 = φ̄01
φ
φ4 = φ̄02
5 = φ̄11 φ6 = φ̄20
φ
φ
(k+1)(k+2)/2−k = φ̄0k · · ·
(k+1)(k+2)/2 = φ̄k0.
(3.7)
The first ten basis functions as defined by equation 3.5 are shown in figure 3.8.
3.2
3D Elements
In going from two–dimensions to three–dimensions many of the elemental properties remain the same in (x, y) with just the addition of a parameter or function
in the vertical direction, e.g., the master element transformations, the inverse transformations, basis functions, etc. With regard to domain discretization, the vertical
parameter can lead to some difficulties in using DG methods for free surface flow.
A key feature of the developed DG methods is the discretization of all the primary
variables using discontinuous polynomial spaces of arbitrary order, including the free
26
Figure 3.8: Rectangular Hierarchical Basis Functions
surface elevation. In a standard Cartesian-coordinate system, this results in elements
in the surface layer having mismatched lateral faces, i.e., a staircase boundary as seen
in figure 3.9, which requires the use of some form of “mesh smoothing” [6].
This difficulty will be avoided by employing a so-called sigma-coordinate system
in the vertical, which transforms both the free surface and bottom boundaries into
coordinate surfaces. The top sigma-coordinate surface, which corresponds to the
free surface, will be discretized using two-dimensional meshes consisting of triangular
and/or quadrilateral elements, as seen in section 3.1. This two–dimensional mesh is
then extended in the vertical direction to produce a three-dimensional mesh of one or
more layers, N , of triangular prismatic and hexahedral elements. The mapping from
Cartesian to sigma-coordinates is shown in Figure 3.10. With the sigma-coordinate
27
(+)
z̃ = ζh (x, y, t)
(−)
z̃ = ζh (x, y, t)
z̃ = 0
h(x, y)
Figure 3.9: Staircase boundary introduced by the use of a standard Cartesian coordinate system.
transformation in place, it can be seen in the subsections to follow that the elemental
implementation in three-dimensions is rather straightforward.
3.2.1
Triangular Prism Element
Master Triangular Prism Element
A reference or master triangular prism domain Ω̂ is defined using a local Cartesian
coordinate system, (ξ1 , ξ2 , ξ3 ) ∈ [−1, 1] with ξ1 + ξ2 ≤ 0, i.e., half of the unit cube, as
defined in Figure 3.11.
28
z̃
z̃ = ζ(x̃, ỹ)
x̃
z̃ = 0
σ=0
z̃ = h(x̃, ỹ)
σ = −1
x = x̃,
y = ỹ,
σ=
z̃ − ζ
,
h+ζ
t = t̃
σ
x
σ=0
σ = −1
Figure 3.10: Sigma-Coordinate Transformation
29
ξ3
(−1, 1, 1)
3
ξ2
(1, −1, 1)
2
ξ1
1
(−1, −1, 1)
(−1, 1, −1)
6
5
(1, −1, −1)
4
(−1, −1, −1)
Figure 3.11: Master Triangular Prism Element
A physical element in the (x, y, σ) coordinates can be defined as the image of this
master element under the affine transformation Te : Ωe → Ω̂ defined by
1
x = −
2
1
y = −
2
ξ 1 + ξ 2 x1 − 1 + ξ 1 x2 − 1 + ξ 2 x3
ξ 1 + ξ 2 y1 − 1 + ξ 1 y2 − 1 + ξ 2 y3
1
1 − 2n + ξ3
σ =
2N
where (x1 , y1 ), (x2 , y2 ), and (x3 , y3 ) are the physical coordinates of the vertices of Ωe
on the top face numbered locally in a counter-clockwise manner, N is the number of
σ-layers, and n refers to the nth σ-layer in Ωe .
30
The Jacobian of this transformation is

x2 − x1 , x3 − x1 , 0
1
∂(x, y, σ)
0 
=  y2 − y1 , y3 − y1 ,
J =
∂(ξ1 , ξ2 , ξ3 )
2
0,
0,
1/N

(△)
⇒
|J| =
(△)
Ae
Ve
=
4N
4
(△)
is the volume of Ωe , which is the product of the area Ae = 21 x1 y2 +x2 y3 +
x3 y1 − x1 y3 − x2 y1 − x3 y2 of the top (or bottom) face of Ωe and the thickness, 1/N ,
where Ve
of each σ-layer.
The inverse of the transformation Te−1 : Ω̂ → Ωe is given by
ξ1
1
=
Ae
ξ2
1
=
Ae
y3 − y1
y1 − y2
1
1
x − x2 + x3 + x1 − x3 y − y2 + y3
2
2
1
1
x − x2 + x3 + x2 − x1 y − y2 + y3
2
2
(3.8)
ξ3 = 2N σ + 2n − 1.
With these transformations in place, integrations performed over the volume of
Ωe can be computed over Ω̂ via
Z
(△)
Ve
f dV =
4
Ωe
Z
f dV̂ .
Ω̂e
For area integrations over the faces of Ωe , we have
|
Z
()
Ae
f dA =
4
∂l Ωe
{z
Z
f dÂ
∂l Ω̂
lateral (side) f aces
,
}
|
31
Z
(△)
Ae
f dA =
2
∂xy Ωe
{z
Z
.
f dÂ
∂xy Ω̂
top and bottom f aces
}
Triangular Prism Basis
An orthogonal basis for the triangular prism can be constructed as a product of
the set of 2D triangular basis functions and Legendre polynomials in the vertical. In
terms of the so-called principal functions they are defined as
(1)
ψi
=
(α,β)
where Pn
(0,0)
Pi (η1 ),
(2)
ψij
=
1 − η2
2
i
(2i+1,0)
Pj
(η2 ),
(3)
(0,0)
ψk = Pk
(η3 ).
is the n-th order Jacobi polynomial of weights α and β, and η1 , η2 , η3 are
a coordinate system transformation defined over a suitably defined reference element
which can be seen in figure 3.12.
(2)
(1)
(3)
With the definitions of the principal functions ψi , ψij , and ψk the triangular
prism basis functions are now constructed as their tensor product
(1)
(2)
(3)
φ̃ijk (ξ1 , ξ2 , ξ3 ) = ψi (η1 ) ψij (η2 ) ψk (η3 ),
which can be written more suitably as a function of two-dimensional basis functions
as
n
φ△
3D
o
k
=
n
φ△
2D
o
(0,0)
Pk
(η3 ).
The use of these basis functions results in several desirable properties in terms of
numerical implementation. Like in 2D, these basis function are orthogonal over the
domain of the master triangular prism element, which leads to a diagonal mass matrix,
32
η3
η2
η1
ξ1 =
(1+η1 )(1−η2 )
2
−1
ξ2 = η2 , ξ3 = η3
ξ3
η1 = 2
1+ξ1
1−ξ2
−1
η2 = ξ2 , η3 = ξ3
ξ2
ξ1
Figure 3.12: Mapping of Triangular Prism Element to Hexahedral
33
or what is known as a matrix free implementation. Specifically, the orthogonality
relation can be shown as
Z
φ̃ijk φ̃lmn dV̂ = =
Ω̂




8
if ijk = lmn
(2i + 1)(2i + 2j + 2)(2k + 1)



0
(3.9)
otherwise.
The basis functions are also hierarchical as in the 2D case.
3.2.2
Rectangular Hexahedron Elements
Master Cubic Element
A reference or master cubic element Ω̂ is defined using a local Cartesian coordinate
system, (η1 , η2 , η3 ) ∈ [−1, 1] as defined in Figure 3.13 with the vertices of the master
element numbered in a counter-clockwise manner.
A physical element in the (x, y, σ) coordinates can be defined as the image of this
master element under the affine transformation Te : Ω̂ → Ωe defined by
1
x =
2
1
y =
2
1 − η1 x1 + 1 + η1 x2
1 − η2 y1 + 1 + η2 y4
1
σ =
1 − 2n + η3
2N
where (x1 , y1 ), (x2 , y2 ), (x3 , y3 ), and (x4 , y4 ) are the physical coordinates of the vertices
of Ωe numbered locally in a counter-clockwise manner, N is the number of σ-layers,
and n refers to the nth σ-layer in Ωe .
34
η3
3
(1, 1, 1)
(−1, 1, 1)
4
η2
2 (1, −1, 1)
1
η1
(−1, −1, 1)
8 (1, 1, −1)
(−1, 1, −1)
5
7
(1, −1, −1)
6
(−1, −1, −1)
Figure 3.13: Master Cubic Element
The Jacobian of this transformation is

x2 − x1 ,
0,
0
∂(x, y, σ)
1
0,
y4 − y1 , 0 
J =
= 
∂(η1 , η2 , η3 )
2
0,
0,
1/N

()
where Ve
()
⇒
Ve
|J| =
8
is the volume of Ωe , which is the product of the area Ae of the top (or
bottom) face of Ωe and the thickness, 1/N , of each σ-layer.
The inverse of the transformation Te−1 : Ωe → Ω̂ is given by
η1 (x) =
1
2x − x1 − x2
∆x
η2 (y) =
1
2y − y1 − y4
∆y
η3 (σ) = 2N σ + 2n − 1
35
where ∆x = x2 − x1 and ∆y = y4 − y1 .
With these transformations in place, integrations performed over the volume of
Ωe can be computed over Ω̂ via
Z
()
Ve
f dV =
8
Ωe
Z
f dV̂ .
Ω̂e
Cubic Basis
An orthogonal basis for the cube can also be constructed as a product of the set
of 2D basis functions, in this case the rectangular set, with the Legendre polynomials
in the vertical. In terms of the so-called principal functions they are defined as
(1)
ψi
(α,β)
where Pn
(0,0)
= Pi
(η1 ),
(0,0)
(2)
ψj = Pi
(3)
(η2 ),
(0,0)
ψk = Pk
(η3 ).
is the n-th order Jacobi polynomial of weights α and β, which in the
case of the cube α = β = 0 for all principal functions resulting in the special case of
Legendre polynomials.
(1)
(2)
(3)
With the definitions of the principal functions ψi , ψj , and ψk the triangular
prism basis functions are now constructed as their tensor product
(1)
(2)
(3)
φ̃ijk (η1 , η2 , η3 ) = ψi (η1 ) ψj (η2 ) ψk (η3 ).
which can be written more suitably as a function of two-dimensional basis functions
as
φ
3D
k
=
(0,0)
φ
(η3 ).
2D Pk
36
As in the prismatic case, the use of these basis functions results in several desirable
properties in terms of numerical implementation. Like in 2D, these basis function are
orthogonal over the domain of the master cubic element which leads to a diagonal
mass matrix. Specifically, the orthogonality relation can be shown as
Z
φ̃ijk φ̃lmn dV̂ = =
Ω̂




8
if ijk = lmn
(2i + 1)(2j + 1)(2k + 1)



0
(3.10)
otherwise.
The basis functions are also hierarchical as in the 2D case.
3.3
Element Basis Function Subroutine
The Fortran subroutine developed for this work, orthogonal basis.f, evaluates the
orthogonal basis functions (as described in sections 3.1.1, 3.1.2, 3.2.1, 3.2.2) and their
derivatives at a given point, i.e., a quadrature point, for a 2D triangle, a 3D triangular
prism, a 2D quadrilateral, or a 3D hexahedral.
The subroutine takes the following inputs:
DEFINITION
VARIABLE NAME
INPUT CHOICES
Element Type:
ELEM
Triangle or Quadrilateral
Dimension:
DIM
2 or 3
Polynomial Degree of Basis:
D
Positive Integer
Coordinate Point:
PT
Size DIM
and outputs two matrices, BASIS and DBASIS, of size
(D+2)(D+1)(DIM −1)
2
(D+2)(D+1)(DIM −1)
2
× 1 and
× DIM , respectively, containing the basis functions and the gradi-
ents of the basis functions evaluated at the coordinate point, respectively.
37
The defined basis functions and their derivatives can be constructed using a combination of standard recurrence relations and identities for Jacobi polynomials; see,
for example, [1]. These relations can then be used to numerically evaluate the basis
functions at a particular point, e.g., (ξ1 , ξ2 ), within the element needed for computation. However, in the case of the triangle and triangular prism, even though the
basis functions are polynomials in terms of the ξ coordinates, the recurrence relations will have a coordinate singularity, making their numerical evaluation difficult.
This difficulty can be avoided by employing the singularity-free recurrence relations
developed in [20], which work directly in the original ξ coordinates of the triangular
element rather than the collapsed η coordinates that are used in the approach that
works directly with the Jacobi polynomials. Singularity-free recurrence relations for
the prism elements can be obtained by using the relations developed in [20] for the
triangular elements in (ξ1 , ξ2 ) along with standard Legendre polynomial recurrence
relations in ξ3 .
After the basis functions and their derivatives are calculated by the recurrence
relations, they are then reordered hierarchically before being output into the BASIS
and DBASIS matrices. Pseudo code of the subroutine can be seen in figure 3.14.
38
SUBROUTINE ORTHOGONAL BASIS. Algorithm for returning
basis functions and gradients of basis functions evaluated at a coordinate
point for triangle, triangular prisms, quadrilaterals, and hexahedrals.
IF Element equals triangle or quadrilateral
IF Coordinate point is contained within element
DO Appropriate recurrence relation in each variable
ENDDO
IF Dimension equals 2
DO Reorder hierarchally and output matrix
ENDDO
ELSEIF Dimension equals 3
DO Apply recurrence relation in third dimension, then reorder hierarchally and output matrix
ENDIF
ELSE Output error message
END SUBROUTINE ORTHOGONAL BASIS
Figure 3.14: Pseudo Code of Orthogonal basis.f
39
CHAPTER 4
NUMERICAL QUADRATURE AND CUBATURE
As the development of computational methods and algorithms continues to evolve,
the necessity of performing multi–dimensional integration over a variety of domains
appears more commonly. FEM is rapidly progressing in multi–dimensional and multi–
regional domains with the use of triangle, square, tetrahedra, hexahedra and triangular prism elements. As noted in the previous chapters, a crucial point in computing these FEM solutions is the evaluation of the domain integrals arising over
the master element in the discrete local weak form of the governing PDEs, which in
two–dimensions take the form
I f 2D ≡
Z Z
b
f (ξ, η) dA
Ω̂
and in three–dimensions
I f 3D ≡ =
Z Z Z
Ω̂
f (ξ, η, ζ) dVb .
(4.1)
(4.2)
Numerical integration formulas, more commonly known as numerical quadrature
(in 1D or 2D) or cubature (in 3D) rules, are frequently used in computational mathematics to approximate the definite integral of a function f over a region Ω̂ via a
weighted sum of function evaluations, i.e.,
Z
N
X
f dΩ̂ ≈
wi f (xi )
Ω̂
i=1
40
(4.3)
where wi are the quadrature or cubature weights and xi are the quadrature or cubature
points at which the function f is evaluated. In the case of integrating polynomials,
the “approximately equals”, ≈, in the formula above can be replaced by an equality,
=, i.e., the numerical integration can be made exact, if a sufficient number of weights
and points are used. A numerical integration formula is said to be of degree p if it
integrates all polynomials of degree ≤ p exactly.
In one–dimension, numerical quadrature rules are well developed and understood,
where an N -point Gauss–Legendre rule is exact for all polynomials of orders up to
and including 2N − 1. In one-dimension, the Gauss–Legendre rules are the optimal
rules, meaning the number of points used is the theoretical lower bound to integrate
a polynomial exactly. However, no general theory regarding the optimal number of
quadrature points in two– and three–dimensions is known. In fact, the situation in
multiple dimensions is considerably more complex. While the interval is the only
connected compact subset of R1 , regions of R2 and R3 come in an infinite variety
of shapes, each with its own topological features. These complexities lead to the
necessity that each shape will require a different set of numerical integration formula
and will have its own theories regarding optimality.
Following [26], p degree integration formulas in more than one–dimension can be
classified into two broad categories: product and nonproduct formulas. For “nice” regions in n–dimensions (e.g., the n–simplex, the n–cube, various pyramids and prisms,
etc) product formulas can be constructed using combinations, or products, of formulas developed for regions of dimension < n. These types of rules include, for example,
double and triple product rules for the square and the cube, respectively, which use
one–dimensional Gauss formulas in each direction. A similar approach can also be
41
used for the triangle, the tetrahedron, and the triangular prism after using appropriate Duffy–type transformations [8] to map the shapes to the n–cube. While the use of
product rules is straightforward and easily allows for the construction of integration
formula of degree p in multiple dimensions, the resulting rules are inefficient in that
they use a far greater number of function evaluation points than necessary to evaluate
the integral of a polynomial of degree p exactly, especially as n and p increase.
Shape–specific nonproduct formulas, on the other hand, offer an efficient alternative to the use of product rules for calculating integrals in multiple dimensions. These
types of rules can be developed using, for example, the general method of polynomial
moment fitting as described in detail in section 4.3. For example, in two–dimensions,
efficient nonproduct rules have been developed for both the triangle [9, 17, 25] and
the square [5, 11, 27], and in three–dimensions, efficient nonproduct rules have been
developed for the tetrahedron [14, 18, 25, 30, 26] and the cube [4, 10, 12, 19, 26].
A lower bound for the number of points N required for an even p = 2k degree
rule for a region in Rn is given by [26]; specifically,
Theorem 1 If p = 2k is even, then a formula of degree p contains at least
N=
(n + k)!
n!k!
(4.4)
points where n is the dimension.
Now consider p odd, p = 2k + 1. It is clear that Theorem 1 implies
Nodd ≥ Neven .
(4.5)
Other than this implication there has been no other generalization for when p is odd
for general shapes in Rn .
42
In an effort to gain efficiency in the two– and three–dimensional DG FEM codes, an
extensive literature search was conducted to identify the best available shape-specific,
nonproduct rules for the triangle, square, and the cube, i.e., rules with a number of
points N as close to the lower bounds presented above. The results of this search
are presented in the tables in the following sections, which compare the number of
quadrature/cubature points N needed for p degree product and nonproduct rules for
the triangle, square, triangular prism, and cube. In each case, the nonproduct rules
result in fewer points than the product approaches (with exceptions occurring when
the rules result in the same formula for all approaches) with many of the formulas
resulting in optimal or close to optimal rules. The efficiency is a representation of the
percent more efficient the nonproduct rule is over the product.
In the course of this literature search, it was discovered that no such nonproduct
rules existed for the triangular prism domain. Thus, in an effort to gain efficiency
in the three–dimensional DG FEM code when using triangular prism elements, a set
of nonproduct rules specifically for the triangular prism have been developed here.
Again, to the author’s knowledge, there have been no such nonproduct rules developed
specifically for the triangular prism. These types of rules are derived and presented
in detail in Section 4.3.
4.1
Triangle Quadrature Rules
The efficient nonproduct rules utilized in the code for area integrations over triangular elements have been obtained from an extensive search of the quadrature
literature; see, for example, [9, 17, 23, 25]. These nonproduct rules range in efficiency
from 22% – 39% compared to the use of double product rules, which again are the
43
Polynomial
Degree
p
1
2
3
4
5
6
7
8
9
10
11
12
Double
Product
Rule
1
4
4
9
9
16
16
25
25
36
36
49
Triangular
Non-Product
Rule
1* [9]
3* [9]
4* [17]
6* [30]
7* [9]
12 [9]
12* [13]
16 [9]
19 [9]
25 [30]
28 [30]
33 [30]
Efficiency
Quality
–
25.00%
–
33.33%
22.22%
25.00%
25.00%
36.00%
24.00%
30.56%
22.22%
32.65%
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
Table 4.1: Number of N points for various rules over the triangle.
lower bound.
∗
Denotes optimal
successive application of one–dimensional Gauss rules after applying a Duffy transformation that maps the triangle to a square (see Chapter 3). The triangle is one of
the most common shapes in finite element meshes, which has lead to many studies
searching for quadrature rules, both numerically and analytically. As a result, very
high–order rules exist, up to p = 30, though only those up to p = 25 are considered
for the finite element work presented here. All triangular rules which are made use of
are so-called PI quality — P indicating that all weights are positive and I indicating
that all points are inside the reference domain. A summary of the number of points
up to degree 12 is presented in Table 4.1 and even degree rules are shown in Figure
4.1, where the symmetry of the rules, which simplifies their derivation, can be noted.
44
(a) p = 2
(b) p = 4
(c) p = 6
(d) p = 8
(e) p = 10
(f) p = 12
Figure 4.1: Quadrature rules for the triangle.
45
4.2
Square Quadrature Rules
The implementation of square elements in the DG FEM code was a foundational
part of the work developed here. A comprehensive search of square quadrature literature was conducted to obtain the most efficient, while still maintaining PI quality,
nonproduct rules; see, for example, [5, 11, 27] . The quality standard was achieved
for all rules except p = 23, in which the only nonproduct rule that currently exists
is NI — N indicating one or more of the weights are negative. Though not PI, this
rule is still worthy of consideration over a double product rule due to the facts that
only one weight is negative, all the points are still inside the domain, and it yields
a 22.22% efficiency savings. The overall range of efficiency savings is between 22%
– 39% compared to the use of double product Gauss rules. Square elements are less
commonly used in FEM than triangular elements, however a substantial amount of
research exists on the development of their quadrature rules. While not as complete
as triangles, there still have been high order rules developed (up to p = 31), although
there are quite a few missing degrees in between. For the scope of this work, rules
up to p = 23 were included. A summary of the number of points up to degree 12
is presented in Table 4.2 and even degree rules are shown in Figure 4.2, where the
symmetry of the rules, which simplifies their derivation, can be noted.
4.3
Triangular Prism Cubature Rules
As noted previously, prior to this work no such nonproduct rules have been developed specifically for the triangular prism. These types of rules are derived and
presented in detail in this section.
46
(a) p = 2
(b) p = 4
(c) p = 6
(d) p = 8
(e) p = 10
(f) p = 12
Figure 4.2: Quadrature rules for the square.
47
Polynomial
Degree
p
1
2
3
4
5
6
7
8
9
10
11
12
Double
Product
Rule
1
4
4
9
9
16
16
25
25
36
36
49
Square
Non-Product
Rule
1* [26]
3 [26]
4* [26]
6* [29]
7* [26]
10* [29]
12* [15]
16 [29]
17* [24]
22 [27]
24* [24]
31 [27]
Efficiency
Quality
–
25.00%
–
33.33%
22.22%
37.50%
25.00%
36.00%
32.00%
38.89%
33.33%
36.74%
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
Table 4.2: Number of N points for various rules over the square.
lower bound.
∗
Denotes optimal
Table (4.3) compares the number of cubature points N needed for p degree rules
for the triangular prism for p = 1 through p = 5 for two types of product rules,
the nonproduct rules for the triangular prism developed here, and the lower bound
for a formula of degree p (given by Theorem 1). The triple product rules listed use
the above–mentioned approach of transforming the triangular prism to the cube and
then applying one–dimensional Gauss formulas in each of the three directions. This
approach is the least efficient method for numerically integrating over the triangular
prism. The double product approach listed uses a combination of the best available
nonproduct rules from the literature for triangles in conjunction with one–dimensional
Gauss rules in the remaining direction. While this approach is more efficient than
using the triple product formulas, it still results in a greater number of evaluation
points than required. Finally, these two types of product rules are compared to the
48
Polynomial
Degree
p
1
2
2
3
3
4
5
Triple
Product
Rule
1
8
8
8
8
27
27
Double
Product
Rule
1
6
6
8
8
18
21
Triangular Prism
Non-Product
Rule
1* [21]
4* [21]
5 [21]
6* [21]
8 [21]
11 [21]
17 [21]
Efficiency
Quality
–
33.33%
16.67%
25.00%
–
38.89%
19.04%
PI
PI
PI
NI
PI
PI
PI
Table 4.3: Number of N points for various rules over the triangular prism.
optimal lower bound
∗
Denotes
number of cubature points N required for the nonproduct rules developed here. In
each case, the nonproduct rules result in fewer points than the triple and double
product approaches (with the exception of p = 1, which results in the same formula
for all three approaches) with some of the formulas resulting in optimal or close to
optimal rules. On average, the triple product rules require nearly twice as many
function evaluation points and weights as the new triangular prism rules, and the
best available double product rules require, on average, nearly one and a half times
as many points and weights.
The development of the newly created rules is organized in the next section as
follows: In section 4.3.1, the method of construction by use of polynomial moment
fitting and the newly created symmetry groups used in the derivation of the cubature
rules are presented; section 4.3.3 presents an example derivation of a low–order cubature rule using the method of polynomial moment fitting; and section 4.3.4 contains
the triangular prism cubature formulae developed for polynomial degrees 1 through
5 as well as figures of the cubature rules.
49
ζ
(−1, 1, 1)
η
(1, −1, 1)
ξ
(−1, −1, 1)
(−1, 1, −1)
(1, −1, −1)
(−1, −1, −1)
Figure 4.3: Reference Triangular Prism
4.3.1
Method of Construction
To begin, a reference triangular prism domain Ω is defined using a Cartesian
coordinate system (ξ, η, ζ) ∈ [−1, 1], ξ + η ≤ 0, i.e., half of the unit cube, as defined
in Chapter 3 and as shown again in Figure 4.3.
We consider the volume integral of a complete polynomial f = f (ξ, η, ζ) of degree
p over this domain, that is,
I f 3D ≡
Z
f (ξ, η, ζ) dξ dη dζ
Ω
where
f (ξ, η, ζ) =
X
aijk ξ i η j ζ k
i,j,k
50
for i + j + k ≤ p,
(4.6)
with the polynomial coefficients aijk being arbitrary and the number of terms being
M=
(p + 1)(p + 2)(p + 3)
.
6
Calculating the integral of this polynomial over the prism gives us the so-called
moments used in the derivation of the cubature formula. For example, the first
few moments would be
4
4
4
+ ...,
I f = a1 4 + a2 − + a3 − + a4 0 + a5
3
3
3
(4.7)
where the arbitrary coefficients a have been conveniently redefined using a single
index.
Now a cubature rule of degree p computes the integral of all polynomials of degree
≤ p exactly via a weighted sum of functions evaluations at N points, that is,
N
X
I f =
wi f (ξi , ηi , ζi )
i
= a1
+ a4
N
X
i
N
X
w i + a2
N
X
w i ζ i + a3
i
w i η i + a5
N
X
N
X
w i ζi
i
wi ξi2 + . . .
(4.8)
i
i
Given that the coefficients ai are arbitrary, the following set of M nonlinear equations, which are obtained by setting a given moment of equation (4.7) to the corrersponding sum of equation (4.8), must be satisified for the cubature rule to be
51
exact
a1 :
N
X
wi = 4,
N
X
4
w i ηi = − ,
3
a4 :
N
X
4
wi ξi2 = − ,
3
···
a2 :
i=1
a3 :
i=1
a5 :
i=1
N
X
w i ξi = −
N
X
w i ζi = 0
i=1
4
3
i=1
.
These are the so-called moment equations, which are functions of the unknown cubature points, (ξi , ηi , ζi ), and their respective weights, wi . This general procedure
for deriving cubature rules is known as the method of polynomial moment fitting.
It has been successfully used to derive nonproduct rules for a variety of two– and
three–dimensional shapes.
4.3.2
Symmetry groups
Enforcing some level of symmetry on the location of the cubature points greatly
simplifies the task of solving the system of M nonlinear moment equations. For this
reason, we are interested in deriving symmetric rules for the triangular prism. One
exception occurs for the optimal rule found for p = 2, which is a nonsymmetric
rule that was derived using a procedure described in [26] for optimal second degree
formulas for arbitrary regions of dimension n.
We construct six symmetry groups over the triangular prism. Each cubature point
in a given group carries the same weight wi . The first group, n1 , consists of just one
point, the centroid of the reference triangular prism. Obviously, there can be at most
one of these per cubature rule. Group n2 has two distinct points at ±ζ where ζ 6= 0
along the vertical centerline of the reference prism (i.e., ξ = η = −1/3). Group n3
has three symmetric points all lying on the medians of the triangle in the plane ζ = 0.
52
Group n4 is similar to group n3 except it has two sets of points at ±ζ where ζ 6= 0,
giving it six distinct points. Group n5 includes six symmetric points in the ζ = 0
plane, none of which are on the medians. Lastly, group n6 is the same as group n5
except it has two sets of points at ±ζ where ζ 6= 0, giving it twelve distinct points.
The symmetry groups are illustrated in Figure 4.4 and a summary of the groups of
points, weights, and number of unknowns per group is shown in Table 4.4.
n2
n1
+ζ
ζ=0
n3
n4
−ζ
n5
n6
Figure 4.4: Symmetry groups used for the triangular prism
Due to the points lying on the median in symmetry groups n3 and n4 , ξ and η can
be parameterized as a function of one variable, say a, and in a similar way groups n5
and n6 can be parameterized as a function of two variables, say b and c. The outcome
53
is a significantly reduced set of unknowns which therefore leads to simplifications in
solving the system of equations.
Symmetry
Group
nj
n1
n2
n3
n4
n5
n6
Number of
Points per
Group
1
2
3
6
6
12
Number of
Unknowns per
Group
1
2
2
3
3
4
Unknowns
per
Group
w
w, ζ
w, a
w, a, ζ
w, b, c
w, b, c, ζ
Table 4.4: Distribution of points and unknowns for symmetry groups.
The use of the above symmetry groups leads to another very important simplification. A rule which is symmetrical about the centerline will integrate all terms, despite
their order, which are antisymmetrical about that axis. In others words, equations
need not to be considered which correspond to terms in which the exponent of ζi
is odd. It should be pointed out that these equations should not be discarded, but
are just not considered due to the symmetry requirements. The advantageous result
is a reduced number of independent simultaneous nonlinear moment equations for
which a solution must be found. This becomes particularly important as the degree
p increases due to the simplification of the number of M equations it provides.
The permutation of groups which results in the number of points, N , resulting
from a given rule is often referred to as the structure of the cubature rule. Let Ki be
the number of permutations of symmetry group of type j, then the number of points
54
produced by a rule can be determined by,
N = K1 + 2K2 + 3K3 + 6K4 + 6K5 + 12K6
(4.9)
And the number of n unknowns is,
n = K1 + 2K2 + 2K3 + 3K4 + 3K5 + 4K6
(4.10)
With the simplification that symmetry and structure provide all that remains is to
determine the combination of groups n1 through n6 with the smallest number of points
for which a solution can be obtained for the system. There are several problematic
outcomes that can occur when solving the remaining system of nonlinear equations
1. The system may be found to be inconsistent (i.e. no solution)
2. The solution may consist of imaginary numbers
If neither of these instances result, then the solution of points and weights is categorized as PI, PO, NI, or NO (O indicates some points are outside the reference
domain). In our derivations we strive to find optimal PI rules.
4.3.3
Solution of System of Equations
In this subsection, an example of the derivation of a low order cubature rule for
the triangular prism is presented. We begin by constructing a complete polynomial
function f of degree p = 2 in three dimensions using the definition given by equation
(4.6),
f (ξ, η, ζ) = [1 ξ η ζ ξ 2 ξη η 2 ξζ ηζ ζ 2 ] {a}
The volume integral of f over the triangular prism domain is
55
Z
1
ζ=−1
Z
1
η=−1
Z
−η
4
4
4
f (ξ, η, ζ)dξdηdζ = [4]a1 − [ ]a2 − [ ]a3 + [0]a4 + [ ]a5 + [0]a6
3
3
3
ξ=−1
4
4
+[ ]a7 + [0]a8 + [0]a9 + [ ]a10
3
3
(4.11)
The integration of f by a cubature rule having N points is,
N
X
i−1
wi f (ξi , ηi , ζi ) = [w1 f (ξ1 , η1 , ζ1 ) + . . . + wi f (ξi , ηi , ζi ) + . . . + wN f (ξN , ηN , ζN )] {a}
= a1
N
X
w i + a2
i=1
N
X
wi ξi + . . . + a10
i=1
N
X
wi ζi2
(4.12)
i=1
Using the definition given in (4.3) and equating the right hand side of (4.11) and
(4.12) and also noting that the coefficients ai are arbitrary leads to the following
system of M = 10 nonlinear equations,
a1 :
a2 :
N
X
i=1
N
X
i=1
a3 :
a4 :
a5 :
N
X
i=1
N
X
i=1
N
X
i=1
wi = 4
a6 :
w i ξi = −
w i ηi = −
4
3
a7 :
i=1
N
X
w i ξ i ηi = 0
wi ηi2 =
i=1
4
3
a8 :
w i ζi = 0
wi ξi2 =
N
X
a9 :
4
3
a10 :
N
X
i=1
N
X
i=1
N
X
i=1
56
4
3
w i ξi ζi = 0
w i ηi ζ i = 0
wi ζi2 =
4
3
Based on the simplification that the symmetry of the ζ coordinate provides, the
system of equations simplifies to
a1 :
N
X
wi = 4
a6 :
i=1
a2 :
N
X
i=1
a3 :
N
X
i=1
a5 :
N
X
N
X
w i ξ i ηi = 0
i=1
4
a7 :
w i ξi = −
3
N
X
wi ηi2 =
i=1
4
3
N
X
4
4
a10 :
wi ζi2 =
w i ηi = −
3
3
i=1
wi ξi2 =
i=1
4
3
The optimal lower bound of N points is given by (4.9)
p = 2∴k=1
N =
(3 + 1)!
= 4.
3!1!
The next step is to find a combination of groups n1 through n6 that gives N = 4
points and a solution exists. We begin by trying 1 n1 group and 1 n3 group, which
by using equations (4.9) and (4.10) leads to
N = 1(1) + 3(1) = 4 points
n = 1(1) + 2(1) = 3 unknowns; w1 , w2 , a.
By inspection it can immediately be seen that this permutation will give an inconsistent set of equations, that is,
a10 :
N
X
wi ζi2 =
i=1
4
4
⇒ 0 6=
3
3
We move on to the only other combination which could lead to a symmetric solution
with 4 points which consists of 2 n2 groups. Using equations (4.9) and (4.10) leads
57
to,
N = 2(2) = 4 points
n = 2(2) = 4 unknowns; w1 , w2 , ζ1 , ζ2
Equations a1 ,a2 ,and a3 yield,
a1 : w 1 + w 2 = 2
a2 : w 1 + w 2 = 2
a3 : w 1 + w 2 = 2
Since a1 ,a2 ,and a3 are linearly dependant, only one equation needs to be retained, we
will retain a1 . Now solving equation a5 yields,
a5 : w 1 + w 2 = 6
It can now be seen that this combination also leads to an inconsistent set of equations,
i.e.,
w1 + w2 = 2
6=
w1 + w2 = 6
Since a symmetric solution for the optimal number of points can not be found, we
now try to find a combination of groups n1 through n6 that gives N = 5 points and a
solution exists. Before we proceed it should be noted that a nonsymmetrical optimal
PI solution was obtained for the triangular prism using the method outlined in [26].
The results of this cubature rule are presented later.
58
The first permutation for 5 points we will try is 1 n2 group and 1 n3 group, which
by using equations (4.9) and (4.10) leads to,
N = 2(1) + 3(1) = 5 points
n = 2(1) + 2(1) = 5 unknowns; w1 , w2 , ζ1 , a
This grouping generates the following system of equations,
a1 : 2w1 + 3w2 = 4
4
2
a2 : w1 (− ) − w2 = −
3
3
2
4
a3 : w1 (− ) − w2 = −
3
3
4
2
a5 : w1 ( ) − w2 (6a2 + 4a + 1) =
9
3
2
a6 : w1 ( ) − w2 (3a2 + 2a) = 0
9
2
4
a7 : w1 ( ) − w2 (6a2 + 4a + 1) =
9
3
4
a10 : 2w1 (ζ 2 ) =
3
We only need to retain equations which are independent from one and other, which
from this system are a1 , a5 , a6 , and a10 . The solution of m independent nonlinear
equations requires that at least as many n unknowns are provided, given m ≤ n.
This leaves a nonlinear system of m = 4 equations and n = 4 unknowns, so we can
proceed onward to finding a solution. Solving the system results in,
1
1
1
3
4
4
2 +
2
± ζ = a(
)
(
)
2 27a2 + 18a
2 27a2 + 18a
18a2 + 12a
w1 = 2
9a + 6a + 1
4
w2 =
2
27a + 18a + 3
Where a turns out to be a free parameter giving the system infinitely many solutions.
Based on the parameterization done a ∈ [-1,0], so choosing any value within a′ s
59
p = 1,
N = 1,
error = 0,
quality, = PI
Weight
ξ
η
4.000000000000000 −0.333333333333333 −0.333333333333333
N otes: OPTIMAL
ζ
0.000000000000000
Table 4.5: Triangular Prism Cubature Rule: p = 1.
domain will result in a symmetric PI cubature rule. In the results presented here we
choose a to be -1, which gives the following 5 point PI symmetric cubature rule for
p = 2,
3
2
2
ζ=±
3
w1 =
4.3.4
w2 =
1
3
a = −1.
Some Cubature Formulas for Triangular Prisms
Presented in Tables 4.5 – 4.11 are the cubature rules derived over the triangular
prism for degrees p = 1 through p = 5 where the specific rules can been seen in Figure
4.5. The notation used in the tables is as follows:
• p = Highest degree polynomial for which quadrature rule is precise
• N = Number of quadrature points and weights
• error = The largest relative error between exact and numerical integration
• quality = Quality of the cubature rule (i.e. PI, PO, NI or NO)
4.4
Cube Cubature Rules
The novel implementation of square elements in two-dimensions was extended in
three-dimensions to the cube for use in the DG FEM code. A wide-ranging search
60
p = 2,
N = 4,
error = −0.270703903324999e − 15,
quality = PI
Weight
ξ
η
ζ
1.333333333333333
0.244016935856292
0.333333333333333
0.000000000000000
1.333333333333333 −0.910683602522959
0.244016935856292
0.000000000000000
0.666666666666667 −0.333333333333333
0.910683602522959
1.000000000000000
0.666666666666667 −0.333333333333333 −0.910683602522959 −1.000000000000000
N otes: OPTIMAL – Antisymmetric
Table 4.6: Triangular Prism Cubature Rule: p = 2 a.
p = 2,
N = 5,
error = 0,
quality = PI
Weight
ξ
η
1.500000000000000 −0.333333333333333 −0.333333333333333
1.500000000000000 −0.333333333333333 −0.333333333333333
0.333333333333333 −1.000000000000000 −1.000000000000000
0.333333333333333 −1.000000000000000
1.000000000000000
0.333333333333333
1.000000000000000 −1.000000000000000
ζ
0.666666666666667
−0.666666666666667
0.000000000000000
0.000000000000000
0.000000000000000
Table 4.7: Triangular Prism Cubature Rule: p = 2 b.
p = 3,
N = 6,
error = 0,
quality =
Weight
ξ
−6.250000000000000 −0.333333333333333
2.000000000000000 −0.333333333333333
2.000000000000000 −0.333333333333333
2.083333333333334 −0.600000000000000
2.083333333333334 −0.600000000000000
2.083333333333334
0.200000000000000
N otes: OPTIMAL
NI
η
−0.333333333333333
−0.333333333333333
−0.333333333333333
−0.600000000000000
0.200000000000000
−0.600000000000000
ζ
0.000000000000000
0.577350269189626
−0.577350269189626
0.000000000000000
0.000000000000000
0.000000000000000
Table 4.8: Triangular Prism Cubature Rule: p = 3 a.
61
p = 3,
N = 8,
error = 0.445897755101468e − 14,
quality = PI
Weight
ξ
η
ζ
0.666666666666667 −0.333333333333333 −0.333333333333333
1.000000000000000
0.666666666666667 −0.333333333333333 −0.333333333333333 −1.000000000000000
0.444444444444444 −0.525248027124695 −0.924672547414225
0.000000000000000
0.444444444444444
0.449920574538920 −0.924672547414225
0.000000000000000
0.449920574538920 −0.525248027124695
0.000000000000000
0.444444444444444
0.444444444444444 −0.525248027124695
0.449920574538920
0.000000000000000
0.444444444444444 −0.924672547414225
0.449920574538920
0.000000000000000
0.444444444444444 −0.924672547414225 −0.525248027124695
0.000000000000000
Table 4.9: Triangular Prism Cubature Rule: p = 3 b.
p = 4,
N = 11,
error = −0.300870439673417e − 13,
quality
Weight
ξ
η
0.431647899262130 −0.333333333333333 −0.333333333333333
0.431647899262130 −0.333333333333333 −0.333333333333333
0.545658450421910 −0.062688380276010 −0.062688380276010
0.545658450421910 −0.062688380276010 −0.874623239447980
0.545658450421910 −0.874623239447980 −0.062688380276010
0.249954808368330 −0.798519188402180 −0.798519188402180
0.249954808368330 −0.798519188402180
0.597038376804360
0.249954808368330
0.597038376804360 −0.798519188402180
0.249954808368330 −0.798519188402180 −0.798519188402180
0.597038376804360
0.249954808368330 −0.798519188402180
0.249954808368330
0.597038376804360 −0.798519188402180
= PI
ζ
0.866861974009030
−0.866861974009030
0.000000000000000
0.000000000000000
0.000000000000000
0.675639823682260
0.675639823682260
0.675639823682260
−0.675639823682260
−0.675639823682260
−0.675639823682260
Table 4.10: Triangular Prism Cubature Rule: p = 4.
62
(a) p = 1
(b) p = 2 unsymmetric
(c) p = 2 symmetric
(d) p = 3
(e) p = 4
(f) p = 5
Figure 4.5: Quadrature rules for the triangular prism.
63
p = 5,
N = 17,
error = 0.492106355665101e − 13,
quality = PI
Weight
ξ
η
ζ
0.459247994249093 −0.333333333333333 −0.333333333333333 −0.522258750798862
0.522258750798862
0.459247994249093 −0.333333333333333 −0.333333333333333
0.282299073600939 −0.821666631129325 −0.821666631129325
0.000000000000000
0.282299073600939 −0.821666631129325
0.643333262258651
0.000000000000000
0.282299073600939
0.643333262258651 −0.821666631129325
0.000000000000000
0.251771967965784 −0.055276673289390 −0.055276673289390 −0.523329465761016
0.251771967965784 −0.055276673289390 −0.889446653421219 −0.523329465761016
0.251771967965784 −0.889446653421219 −0.055276673289390 −0.523329465761016
0.251771967965784 −0.055276673289390 −0.055276673289390
0.523329465761016
0.251771967965784 −0.055276673289390 −0.889446653421219
0.523329465761016
0.523329465761016
0.251771967965784 −0.889446653421219 −0.055276673289390
0.120662497150724 −0.750000000000000 −0.750000000000000
0.961345774324284
0.120662497150724 −0.750000000000000
0.500000000000000
0.961345774324284
0.120662497150724
0.500000000000000 −0.750000000000000
0.961345774324284
0.120662497150724 −0.750000000000000 −0.750000000000000 −0.961345774324284
0.500000000000000 −0.961345774324284
0.120662497150724 −0.750000000000000
0.120662497150724
0.500000000000000 −0.750000000000000 −0.961345774324284
Table 4.11: Triangular Prism Cubature Rule: p = 5.
of cube quadrature literature was carried out to obtain the most efficient nonproduct
rules; see, for example, [4, 10, 12, 19, 26] . A best attempt has been made to find rules
that have positive weights with all points located inside the cube, however for some
of the higher degrees there have been no such rules developed, consequently some
have negative weights and/or points outside the unit cube. In choosing which rule to
use, PI rules took precedence over rules which had a lower number of points which
were not PI. Rules in which a point lay outside the unit cube were only considered if
the point was slightly outside, i.e., rule p = 12, ξ = 1.012782207207705 ≥ 1, which is
only slightly outside of the domain. The overall range of efficiency savings is between
5% – 40% compared to the use of triple and double product rules. A summary of
the number of points up to degree 12 is presented in Table 4.12 and even degree
64
Polynomial
Degree
p
1
2
3
4
5
6
7
8
9
10
11
12
Triple
Product
Rule
1
8
8
27
27
64
64
125
125
216
216
343
Double
Product
Rule
1
6
8
18
21
40
48
80
85
132
144
217
Cube
Non-Product
Rule
1* [10]
6 [10]
6* [10]
14 [10]
14 [10]
38 [19]
38 [19]
58 [12]
58 [12]
90 [12]
90 [12]
151 [10]
Efficiency
Quality
–
–
25.00%
22.22%
33.33%
5.00%
20.83%
27.50%
27.50%
31.82%
37.50%
30.41%
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
PI
NO
Table 4.12: Number of N points for various rules over the cube.
lower bound.
∗
Denotes optimal
rules are shown in Figure 4.6, where the symmetry of the rules, which simplifies their
derivation, can be noted.
4.5
Quadrature Subroutine
The Fortran subroutine developed for this work, quadrature.f, takes a user input
of p, the polynomial degree of the rule, and region, and returns the individual points
and weights of the p degree quadrature rule for the given region as well as the total
number of points, N . Regions are denoted as edge, triangle, square, triangular prism
(triprism), or cube. Regions, the domain on which they are defined, and the highest
degree of polynomial for which a quadrature rule exists in the subroutine is as follows:
65
(a) p = 2
(b) p = 4
(c) p = 6
(d) p = 8
(e) p = 10
(f) p = 12
Figure 4.6: Quadrature rules for the cube
66
REGION
DOMAIN
p
EDGE:
−1 ≤ X ≤ 1
25
TRIANGLE:
−1 ≤ X ≤ 1, −1 ≤ Y < 1, X +Y ≤ 0
21
SQUARE:
−1 ≤ X ≤ 1, − 1 ≤ Y < 1
23
TRIPRISM:
−1 ≤ X ≤ 1, −1 ≤ Y ≤ 1, −1 ≤ Z ≤ 1, X +Y ≤ 0
CUBE:
−1 ≤ X ≤ 1, − 1 ≤ Y ≤ 1, − 1 ≤ Z ≤ 1
5
19
Edge rules are the standard one–dimensional Gauss-Legendre rules, while the remaining rules are region specific non-product rules obtained from a number of sources
noted in the above tables as well as in the bibliography. Most of the points are represented with a multiplicity, due to the symmetry imposed, which relates the unique
permutations occurring from each set of points. The use of multiplicity purely simplifies the subroutine in that each unique combination need not be entered, but can
rather be accumulated within a nested loop, e.g., for a p = 19 cube only 24 coordinate pairs need to be entered versus 151. Upon the completion of accessing the
set of points for the user inputted region and degree, the routine sums up the total
number of points N based on the multiplicity, then performs the appropriate multiplicity permutations on the group of points (which is region specific). In the case
of the triangular region the quadrature points obtained from the listed sources need
to be transformed from so-called area or barycentric coordinates to the master element coordinates so they are represented within the correct domain (see Chapter
3). This task is done simultaneously within the loops for the triangular multiplicity
requirements. The output array of quadrature/cubature points is of size N by DIM ,
where N is the number of points for a given rule and DIM is 1, 2 or 3 based on the
67
dimension of the region. The array of weights is of size N by 1. A schematic of the
subroutine can be seen in Figure 4.7.
68
SUBROUTINE QUADRATURE. Algorithm for returning points and weights of a p degree quadrature rule
and region.
IF region equals EDGE, TRIANGLE, SQUARE,
TRIPRISM or CUBE
IF p is less than or equal to the highest degree of polynomial for which a quadrature rule exists in the subroutine
Obtain multiplicity, points and weights
ELSE output error message
ENDIF
DO sum up total numer of quadrature points
based on the multiplicity
ENDDO
DO accumulate points based on multiplicity
IF apply appropriate multiplicity to each set of
points and transform to master element coordinates
if necessary
ENDIF
ENDDO
ELSE output error message
END SUBROUTINE QUADRATURE
Figure 4.7: Schematic of quadrature subroutine
69
CHAPTER 5
NUMERICAL TESTING & RESULTS
As a first step in verifying the new modeling approach, both triangular and quadrilateral meshes were applied to a problem with an analytic solution. The models were
applied using a range of mesh refinements and polynomial orders in order to verify
that the approximate DG solutions were converging to the exact solutions. Before
any comparisons of the different element types could be made, verification that the
new quadrilateral elements were implemented properly was checked by performing
convergence studies.
5.1
Analytic Test Case
Lynch and Gray [22] derive a number of analytic solutions to the two-dimensional,
linear shallow water equations (SWE) that provide a systematic and rigorous means
of verifying numerical models for the SWE. The problems considered incorporate
several features that make them challenging test cases, including time periodic open
boundary forcing, bottom friction, wind stress, spatially varying bathymetry, and
both Cartesian and polar geometry domains.
70
There is a wide variety of combinations of the test cases, so a specific case suitable
for verifying the new code was chosen, which will be described herein and represents
the results presented in section 5.2.
To begin, the domain of the Cartesian geometry test case is shown in Figure
5.1. No-normal flow conditions (solid wall or land boundaries) are specified along the
boundaries of the domain at x = x1 , y = 0, and y = L. A surface elevation is specified
along the open ocean boundary along x = x2 , which is described by a periodic tidal
forcing function of the general form:
ζ(x2 , y, t) = Re ζ0 (y)eiωt
(5.1)
where ζ0 is, in general, a complex function representing the tidal forcing amplitude
√
and phase, ω is the frequency of the tidal forcing function, and i = −1.
To complete the description of the domains, the bathymetry along constant values
of y is given by the following power law:
H(x) = H0 xn
where H0 is a specified real positive constant and n, also specified, is a real constant that is not necessarily an integer. In Figure 5.2, a cross sections of the chosen
bathymetry (n = 0) for this test case along constant values of y is shown.
In general, the solutions for these test cases involve the evaluation of an infinite
series. However, in the case that ζ0 of Equation 5.1 is independent of y, the analytic
solutions are greatly simplified — all the terms except the first in the infinite series
being zero. For this special case, Lynch and Gray give complete solutions for various
bathymetry profiles, with the exact solution for the chosen flat bathymetry case given
71
Figure 5.1: Plan view of the domain of the Cartesian geometry test case of Lynch
and Gray
72
Figure 5.2: Cross sectional view of the bathymetry along constant values of y for the
test case of Lynch and Gray for n = 0.
as:
cos [β(x − x1 )] iωt
e
ζ(x, t) = Re ζ0
cos [β(x2 − x1 )]
sin [β(x − x1 )] iω iωt
u(x, t) = Re −ζ0
.
e
cos [β(x2 − x1 )] βH0
where β 2 =
ω 2 −iωτ
.
gH0
A cross sectional view of the entire problem is shown in Figure
5.3 and the specific problem dimensions, constants, and simulation times are given in
Table 5.1.
5.2
Results
Verification that the numerical method was implemented correctly is a crucial step
in the analysis of the results. This involves checking that the approximate solution uh
provides a “good” estimate of the true solution u, in the sense that the error in the
approximate solution tends to 0 as the mesh is refined and/or the polynomial order
73
y = L = 45 km
No-normal flow boundaries
y = 0 km
Open ocean boundary
Tidal forcing
h(x, y) = const = 3 m
x1 = 60 km
x2 = 150 km
Figure 5.3: Cross sectional view of the specific test case of Lynch and Gray chosen.
Variable
x1
x2
y1
y2
h
Simulation Run Time
Time Step
Tidal Amplitude ζ0 (y)
Tidal Frequency ω
Value
60 km
150 km
0 km
45 km
3m
1 day
1 second
0.5 m
M2 Tide = 0.0001405189*
Table 5.1: Specific values chosen for simulation.
12 hr 25.2 min
74
Note: ω =
2π
, where
T
T =
Mesh Size
Mesh Spacing (m)
Mesh 1
15,000
Mesh 2
7,500
Mesh 3
3,750
Mesh 4
1,875
Element Type
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Number of Elements
18
36
72
144
288
576
1152
2304
Number of Edges
45
63
162
234
612
900
2376
3528
Table 5.2: Mesh Data
is increased, i.e., does uh converge to u as h → 0, and/or p → ∞. It is also of interest
at what rate uh converges to u as h is decreased and/or p is increased.
To begin, verification of the new code, four different meshes for each element type
were defined, with the mesh data presented in Table 5.2. It should be noticed that the
quadrilateral meshes, which have the same mesh spacing as the triangular element
meshes, have half as many elements and approximately two-thirds as many edges.
This will be an important fact in the comparison of the results in the later part of
this section.
To easily quantify the error, it is usually preferable to use a measure that provides
a single number, so for these purposes we make use of what is called a norm. A norm
is an operation that takes an object u and returns a single, real number kuk. To see
if the solutions were converging to the exact solution the errors were computed using
two different types of error norms, an infinity error norm (L∞ ) and a mean square
error norm (L2 ).
75
An L∞ norm is defined as the maximum difference (in absolute value) between u
and uh :
ku − uh k∞ ≡ max0≤x≤l (|u (x) − uh (x)|)
Such a measure tells us that the difference between u and uh does not exceed
some number δ = ku − uh k∞ at any point in the domain. If δ is small, then it can be
said that uh is uniformly close to u. Though very simple to define, this type of error
norm is not always the most appropriate way to measure the “closeness” of u and
uh . It might be the case that the difference between u and uh , while small in general,
is significant over certain regions of the domain, so it is also beneficial to look at a
measure to gage if the difference is small on average over the domain. In this way, we
can look at the root mean square of the difference between u and uh , which is known
as the mean square or L2 error norm:
ku − uh k2 ≡
Z
l
0
(u − uh )
2
21
.
Note that a small value of the L2 norm does not imply that (u − uh )2 is small
everywhere over the domain, but rather that (u − uh )2 is small on average over the
domain.
Tables 5.3 and 5.4 show the calculated L∞ and L2 error norms for both element
types for the analytic test case for both the surface elevation and the velocity, respectively. Two main points should be taken away from these tables. First, it can be seen
that for both mesh types the error is decreasing with both mesh refinement and polynomial enrichment (i.e., the error is decreasing as the mesh spacing is decreased as
well as when the polynomial order is increased). Second, both the quadrilateral and
76
Mesh
Size
Mesh 1
Mesh 2
Mesh 3
Mesh 4
Mesh 1
Mesh 2
Mesh 3
Mesh 4
Element
Type
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Surface Elevation ζ
p=1
p=2
1.25e-002 1.10e-002
1.05e-002 7.23e-004
3.40e-002 1.46e-004
2.90e-002 8.83e-005
8.19e-004 1.84e-005
7.81e-004 1.11e-005
1.88e-004 2.32e-006
2.03e-004 1.36e-006
Velocity u
p=1
p=2
5.33e-002 7.17e-004
4.03e-002 8.49e-004
1.36e-002 9.66e-005
1.00e-002 1.08e-004
3.40e-002 1.20e-005
2.50e-002 1.40e-005
8.53e-004 1.50e-006
6.10e-004 1.71e-006
p=3
1.57e-005
8.07e-006
8.65e-007
5.65e-007
5.01e-008
3.97e-008
3.01e-009
2.57e-009
p=4
6.57e-007
3.50e-007
2.14e-008
1.13e-008
p=3
5.71e-005
4.16e-005
3.62e-006
2.67e-006
2.26e-007
1.68e-007
1.41e-008
1.05e-008
p=4
3.72e-007
5.33e-007
1.28e-008
1.54e-008
Table 5.3: L∞ Error
the triangular element meshes display nearly the same error levels, which means the
new elements were implemented correctly and are obtaining nearly the same accuracy
as the already existing triangular elements.
For most problems that we are interested in solving, the exact solution is not
known. Therefore, the error can not be computed directly, and we have to rely on
error estimates. A priori error estimates can be made prior to any calculations and
do not require any information from the computed solution uh . They are derived
from purely theoretical considerations, and are generally of the form:
ku − uh k ≤ Chr(p)
77
Mesh
Size
Mesh 1
Mesh 2
Mesh 3
Mesh 4
Mesh 1
Mesh 2
Mesh 3
Mesh 4
Element
Type
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Quadrilateral
Triangle
Surface Elevation ζ
p=1
p=2
893.7579 71.8162
206.3773 26.0065
183.1962
9.2979
60.4216
3.2733
41.8218
1.1772
16.0843
0.4094
10.0114
0.1479
4.1477
0.0511
Velocity u
p=1
p=2
3.64e+003 39.8692
1.30e+003 32.0002
946.5941
4.0240
331.4433
3.5230
239.4235
0.4869
83.5657
0.4117
60.1535
0.0616
20.9852
0.0497
Table 5.4: L2 Error
78
p=3
0.9267
0.1924
0.0472
0.0140
0.0026
9.53e-004
1.56e-004
6.22e-005
p=4
0.0428
0.0156
0.0014
4.88e-004
p=3
4.0488
1.3477
0.2571
0.0869
0.0161
0.0055
0.0010
3.46e-004
p=4
0.0207
0.0187
5.05e-004
5.06e-004
where C is a constant that depends on the data of the problem (but not on h) and
r is a positive constant that depends on the degree of the polynomial used for the
approximation. This estimate implies that the error of the finite element approximation can be made arbitrarily small by refining the mesh. These estimates are “sharp”;
that is, the “less than or equal” (≤) can be replaced by “approximately equal” (≈)
for sufficiently small h, that is,
kerrork ≈ Chr(p) .
Taking the log of both sides we have
log kerrork = r log h + log C
For sufficiently small h, a plot of log(error) versus log h will produce a straight line
with a slope of r. The slope of the line r is called the rate of convergence, which
tells us the rate at which the error will drop as we refine the mesh. This is generally
referred to as h-convergence. The following a priori error estimates (L∞ and L2 ) hold
for smooth solutions for a range of piecewise polynomial approximations of degree p,
kerrork ≤ C1 hp+1 .
For example, in the case of the maximum error norm a piecewise linear (p = 1)
approximation would optimally give a rate of convergence of r = 2 for sufficiently
small h.
The log(L∞ ) error versus log(h) in the surface elevation and velocity for both the
quadrilateral and triangular element meshes can been seen in Figures 5.4, 5.5 and
5.6. From the figures, the slope r of each polynomial approximation (also given in
79
Element
Type
Quadrilateral
Triangle
Quadrilateral
Triangle
Rate of h-Convergence ζ
p=1 p=2
p=3
2.16
2.97
4.18
1.88
3.00
3.86
Rate of h-Convergence u
p=1 p=2
p=3
1.97
3.11
3.99
1.99
3.11
3.98
Table 5.5: Rate of h-Convergence
Table 5.5) is nearly the theoretical optimal rate of convergence for both element types,
meaning that the approximate solution is in fact converging to the exact solution at
the proper rate.
With h-convergence now defined, we now define p-convergence as a process in
which the finite element mesh spacing, h, is fixed and the order of the polynomial
functions, p, is increased either uniformly or selectively over the finite elements. The
approximate solution uh should optimally converge exponentially to u as p is increased. That is and often referred to as spectral convergence. It has been established that whenever h-convergence occurs, p-convergence will also occur, though
error bounds for p-convergent approximations have not been established. Figures 5.7
and 5.8 illustrate the spectral convergent properties of both element types for a range
of polynomial orders versus the log (L∞ ) error. For both element types the errors
are decreasing exponentially and have approximately the same error levels, with the
quadrilateral elements doing better than the triangular in some cases.
80
Surface Elevation
3
Velocity
4
10
10
p = 1
p = 1
2
3
10
10
p = 2
1
2
10
10
p = 2
0
1
10
10
L∞ Error
∞
L Error
p = 3
−1
0
10
10
−2
−1
10
10
−3
−2
10
10
−4
10
p = 3
−3
3
10
4
10
5
10
h
10
3
10
4
10
5
10
h
Figure 5.4: h-convergence for Quadrilateral Elements - Surface Elevation & Velocity
81
Surface Elevation
3
Velocity
4
10
10
p = 1
2
10
3
10
p = 2
1
p = 1
2
10
10
p = 2
0
1
L Error
10
p = 3
−1
0
10
p = 3
∞
10
∞
L Error
10
−2
−1
10
10
−3
−2
10
10
−4
−3
10
10
−5
10
−4
3
10
4
10
10
5
10
3
10
4
10
5
10
h
h
Figure 5.5: h-convergence for Triangular Elements - Surface Elevation & Velocity
82
Surface Elevation
3
Velocity
4
10
10
p = 1
p = 1
2
3
10
10
p = 2
1
2
10
10
p = 2
0
1
10
10
L Error
−1
p = 3
0
10
∞
10
∞
L Error
p = 3
−2
−1
10
10
−3
−2
10
10
−4
−3
10
10
−5
10
−4
3
10
4
10
10
5
10
3
10
4
10
5
10
h
h
Figure 5.6: h-convergence for Both Element Types - Surface Elevation & Velocity
83
= QUAD. ELEMENTS
= TRIANGULAR ELEMENTS
Figure 5.7: p-convergence for Both Element Types - Surface Elevation
84
= QUAD. ELEMENTS
= TRIANGULAR ELEMENTS
Figure 5.8: p-convergence for Both Element Types - Velocity
85
Mesh
Size
Mesh 1
Mesh 2
Mesh 3
Mesh 4
Ratio of CPU
p=1
p=2
0.7126 0.7787
0.7840 0.6385
0.5874 0.5791
0.6319 0.5966
Time
p=3
0.6275
0.6158
0.5660
0.5483
CP U T ime
△ CP U T ime
p=4
0.5979
0.5622
0.4189
0.4320
Table 5.6: Ratio of CPU Time
With convergence of the new elements verified we can now do an appropriate
comparison of the two element types. We do that by computing the ratio of quadrilateral element run times to triangular run times, which are the numbers presented
in Table 5.6. Note that all the values are less than one which indicates that, in fact,
the quadrilateral elements are running more efficiently than the triangular elements,
while achieving similar error levels. On average, for a range of mesh and polynomial refinements, the quadrilateral meshes run in about 60% of the CPU time as the
triangular element meshes.
An illustration which includes the mesh refinements, polynomial orders and run
times for both elements can be seen in Figure 5.9.
86
p =1
p =2
p =3
p =4
0.7126
0.7787
0.6275
0.5979
CPU Time
CPU Time
0.6840
0.6385
0.6158
0.5622
0.5874
0.5791
0.5860
0.4169
0.6319
0.5966
0.5483
0.4320
Figure 5.9: Ratio of CPU time for the range of mesh refinements and polynomial
orders
87
CHAPTER 6
CONCLUSIONS AND FUTURE WORK
This research has revealed that the use of quadrilateral elements in the context
of a DG FEM environment has many appealing features from both a theoretical and
computational point of view. The fact that there are no continuity constraints as
those that exist in standard continuous Galerkin FEM approximations implies that
one has more flexibility in how the individual elements are defined. The choice to
limit the quadrilateral implementation to rectangular elements, while also choosing
a set of orthogonal polynomials to define the basis over each element lead to, on
average, a 60% savings in computational time compared to triangular elements. The
quadrilateral elements are not only as accurate and reliable as the existing triangular
elements, but effectively provide a means to utilize computational resources efficiently.
The promising results obtained from this work have opened the door for additional work to be undertaken in this area. In 3D, the model implementation of both
element types is complete, but a critical next step in moving forward with the 3D
code is performing convergence studies on an analytic test case. It is expected that
the 3D hexahedral elements will offer a computational savings over the triangular
prism elements that is similar, if not better, than what was observed in 2D for the
quadrilateral and triangular elements. Once complete, the next step in creating this
88
computational infrastructure is a full mixed element approach. The coding during
this work has enabled for this to take place with ease, i.e., each element is flagged
with its respective element type. All that remains is the creation of a tool in which to
generate a mixed element mesh. Once this is in place, a full scale simulation can be
preformed, in which the quadrilateral/hexahedral elements would exist where the resolution obtainable from triangular/triangular prism elements is not necessary. From
the promising preliminary results of an all quadrilateral mesh, one would expect to
see similar computational savings when moving to a mixed element mesh.
As demonstrated in great detail in Chapter 4, the derivation of shape–specific
nonproduct rules over the triangular prism are well underway. The work completed
here found rules up to degree p = 5, which resulted in significant computational
savings. For example in the case when p = 4, the newly derived rule results in a
38.89% computational savings over each element for each time step of the problem.
The investigation of higher order rules is ongoing, where the current search for p = 6
consists of solving 84 nonlinear equations simultaneously with a known lower bound
of 20 points and the best available double product rule using 40 points.
In conclusion, this research has laid the groundwork for a robust computational
infrastructure in the context of DG FEM that will significantly cut computational
cost by applying fast and efficient state–of–the–art algorithms. The promising results
provide motivation for future model development within the framework of a mixed
element approach, with an end goal of creating a platform which can be used in
“operational” mode for real world applications.
89
BIBLIOGRAPHY
[1] M. Abramowitz and I.A. Stegun 1964 Handbook of mathematical functions with
formulas, graphs, and mathematical tables, National Bureau of Standards Applied Mathematics Series 55 1964.
[2] A. Bahhar, J. Baranger, and D. Sandril Galerkin Discontinuous Approximation
of the Transport Equation and Viscoelastic Fluid Flow on Quadrilaterals, Numerical Methods Partial Differential Eq 14 1998 97–114.
[3] E.B. Becker, G.F. Carey, and J.T. Oden, Finite Elements: An Introduction,
Volume 1, Prentice-Hall, Englewood Cliffs, NJ (1981).
[4] R. Cools and K.J. Kim, Rotation invariant cubature formulas over the ndimensional unit cube, Journal of Computational and Applied Mathematics 132
(2001) 15–32.
[5] R. Cools and A. Haegemans, Another Step Forward in Searching for Cubature
Formulae with a Minimal Number of Knots for the Square, Computing 40 1988
139–146.
[6] C. Dawson ans V. Aizinger, A Discontinuous Galerkin Method for ThreeDimensional Shallow Water Equations, Journal of Scientific Computing 22-23
2005 245–267.
[7] M. Dubiner, Spectral Methods on Triangles and Other Domains, Journal of Scientific Computing 6 1991 345–390.
[8] M.G. Duffy, Quadrature over a pyramid or cube of integrands with a singularity
at a vertex, SIAM Journal of Numerical Analysis 19 (1982) 1260–1262.
[9] D.A. Dunavant, High Degree Efficient Symmetrical Gaussian Quadrature Rules
for the Triangle, International Journal for Numerical Methods in Engineering 21
1985 1129–1148.
[10] D.A. Dunavant, Efficient symmetrical cubature rules for complete polynomials of
high degree over the unit cube, International Journal for Numerical Methods in
Engineering 23 (1986) 397–407.
90
[11] D.A. Dunavant, Economical symmetrical quadrature rules for complete polynomials over a square domain, International Journal for Numerical Methods in
Engineering 21 (1985) 1777–1784.
[12] T.O. Espelid, On the construction of good fully symmetric integration rules,
SIAM Journal of Numerical Analysis 24 (1987) 855–881.
[13] K. Gatermann, The construction of symmetric cubature formulas for the square
and the triangle, Computing 40 1988 229–240.
[14] M. Gellert and R. Harbord, Moderate degree cubature formulas for 3-D tetrahedral finite element approximations, Communications in Applied Numerical Methods 7 (1991) 487–495.
[15] A. Haegemans and R. Diessens, Construction of Cubature Formulas of Degree
Seven and Nine Using Symmetric Planar Regions, Using Orthogonal Polynmials,
SIAM Journal on Numerical Analysis 14 1977 492–508.
[16] V. Hermann, M. Kaser and C.E. Castro, Non-conforming hybrid meshes for efficient 2-D wave propagation using the Discontinuous Galerkin Method, Geophys.
J. Int. 184 2011 746-758.
[17] P. Hillion, Numerical integration on a triangle, International Journal for Numerical Methods in Engineering 11 1977 797–815.
[18] P. Keast, Moderate-degree tetrahedral quadrature-formulas, Computer Methods
in Applied Mechanics and Engineering 55 (1986) 339–348.
[19] K.J. Kim and M.S. Song. Invariant cubature formulas over a unit cube, Comm.
Korean Math Soc 13 No. 4 1988 913–931.
[20] R.C. Kirby. Singularity-free evaluation of collapsed-coordinate orthogonal polynomials, ACM Transactions on Mathematical Software 37 No. 1 Article 5 2010
16 pages.
[21] E.J. Kubatko and A.L Maggi, Efficient cubature rules for the triangular prism,
to be submitted.
[22] D.R. Lynch and W.G. Gray, Analytic solutions for computer flow model testing,
Journal of the Hydraulics Division 104 1978 1409–1428.
[23] J.N. Lyness and R. Cools, A Survey of numerical cubature over tirangles, Mathematics and Computer Science Division, Argonne National Laboratory, Argonne,
IL 1994.
91
[24] H.M. Moller, Minimum-Point Cubature Formula, Numerische Mathematik 25
1976 185–200.
[25] J.S. Savage, A.F. Peterson, Quadrature rules for numerical integration over triangles and tetrahedra, IEEE Antennas and Propagation Magazine 38 (1996) 100–
102.
[26] A.H. Stroud, Approximate calculation of multiple integrals, Prentice-Hall, Englewood Cliffs, NJ (1971).
[27] M.A. Taylor, Asymmetric cubature formulas for polynomial integration in the
triangle and square, Journal of Computational and Applied Mathematics 218
2008 184–191.
[28] D. Wirasaet, S. Tanaka, E.J. Kubatko, J.J. Westerink, and C. Dawson, A performance comparison of nodal discontinuous Galerkin methods on triangles and
quadrilaterals, Int. Journal Numer. Meth. Fluids 64 20101336-1362.
[29] J.W. Wissman and T. Becker, Partially Symmetric Cubature Formulas for Even
Degrees of Exactness, SIAM Journal on Numerical Analysis 23 1986 676–685.
[30] L.B. Zhang, T. Cui, H. Liu, A set of symmetric quadrature rules on triangles
and tetrahedra, Journal of Computational Mathematics 27 (2009) 86–96.
92