Upload
bucky83
View
215
Download
0
Embed Size (px)
Citation preview
7/27/2019 Node Pairs Report
1/185
High-resolution unstructured finite-volume
methods for conservation laws
A. Guar done 1 L. Quartapelle
1Politecnico di Milano, Dipartimento di Ingegneria Aerospaziale, Via La Masa 34,
20158 Milano, Italy. e-mail: [email protected]
7/27/2019 Node Pairs Report
2/185
.
7/27/2019 Node Pairs Report
3/185
Abstract
The node-pairs representation of Galerkin and Finite-Volume methods for solving
conservation laws over unstructured multidimensional grids is described. This ap-
proach allows for the factorization of the grid-dependent metric quantities in the
computation of the finite-element integrals, thus leading to very efficient high-
resolution methods for simulating compressible flows in domains of arbitrary
shape. A procedure for imposing the boundary conditions in nonlinear hyper-
bolic systems within the assumed discretization framework is also presented. The
node-pair representation of second-order spatial derivative terms required to im-
plement LaxWendroff and TaylorGalerkin schemes is also described. The high-
resolution Galerkin andFinite-Volume formulationsarefirst developed for a scalar
conservation law and then extended to nonlinear systems of hyperbolic equations.Finally, an original TaylorGalerkin scheme for the mass conservation law over an
arbitrary velocity field is derived in both standard and node-pair formulations.
7/27/2019 Node Pairs Report
4/185
.
7/27/2019 Node Pairs Report
5/185
Contents
1 Introduction 1
1.1 Scalar conservation law . . . . . . . . . . . . . . . . . . . . . . . 4
2 Finite element method 6
2.1 Scalar conservation law . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Spatially discrete form of the equations . . . . . . . . . . . . . . 13
2.4 Approximation of a diffusion term . . . . . . . . . . . . . . . . . 13
2.4.1 Basic property of diagonal stiffness elements . . . . . . . 15
3 Flux reinterpolation 17
3.1 Scalar conservation law . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Treatment of boundary conditions . . . . . . . . . . . . . . . . . 19
3.3 Spatially discrete form of the equations . . . . . . . . . . . . . . 21
4 Node-pair representation 23
4.1 Node-pairs and metric vectors of interaction . . . . . . . . . . . . 23
4.2 Proof of the split of domain and boundary contributions . . . . . . 25
4.2.1 Proof of the domain integral indentity . . . . . . . . . . . 25
4.2.2 Final transformation of the boundary term . . . . . . . . . 28
4.3 Node-pair form of the discrete equations . . . . . . . . . . . . . . 30
4.4 Treatment of boundary conditions . . . . . . . . . . . . . . . . . 31
4.4.1 Duplication and augmentation of boundary nodes . . . . . 314.4.2 Duplication of boundary edges in 3D problems . . . . . . 33
4.5 Diffusion term in node-pair form . . . . . . . . . . . . . . . . . . 35
5 Finite-Volume method on nonstructured meshes 38
5.1 Finite-Volume spatial discretization . . . . . . . . . . . . . . . . 38
5.2 Upwind Finite-Volume scheme . . . . . . . . . . . . . . . . . . . 40
5.3 The bridge between finite volumes and finite elements . . . . . . . 44
1
7/27/2019 Node Pairs Report
6/185
6 Taylor-series-based integration schemes 47
6.1 Nonlinear scalar conservation law . . . . . . . . . . . . . . . . . 476.2 The fully discrete form of the equations . . . . . . . . . . . . . . 49
6.3 TaylorGalerkin scheme in node-pair form . . . . . . . . . . . . . 49
6.3.1 The bulk TG term . . . . . . . . . . . . . . . . . . . . . . 50
6.3.2 The boundary TG term . . . . . . . . . . . . . . . . . . . 52
6.3.3 Node-pair TaylorGalerkin scheme . . . . . . . . . . . . 54
6.4 Linear flux function . . . . . . . . . . . . . . . . . . . . . . . . . 54
7 High-resolution scheme in node-pair form 59
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.2 Extended node-pairs . . . . . . . . . . . . . . . . . . . . . . . . 617.3 High-resolution scheme for steady solutions . . . . . . . . . . . . 62
7.4 High-resolution scheme for unsteady solutions . . . . . . . . . . . 64
7.5 Limiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8 Thermodynamics of gases 68
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.2 Definition of the gas properties . . . . . . . . . . . . . . . . . . . 69
8.3 Polytropic and nonpolytropic behaviour . . . . . . . . . . . . . . 74
8.4 Pressure function of the conservative variables . . . . . . . . . . . 78
8.5 Speed of sound . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
8.6 Some particular gas models . . . . . . . . . . . . . . . . . . . . . 818.6.1 Polytropic ideal gas . . . . . . . . . . . . . . . . . . . . . 81
8.6.2 Nonpolytropic ideal gas . . . . . . . . . . . . . . . . . . 82
8.6.3 Polytropic van der Waals gas . . . . . . . . . . . . . . . . 82
8.6.4 Nonpolytropic van der Waals gas . . . . . . . . . . . . . 83
9 Euler equations of gasdynamics 85
9.1 Conservation laws of gasdynamics . . . . . . . . . . . . . . . . . 85
9.2 Euler equations in one dimension . . . . . . . . . . . . . . . . . . 86
9.2.1 Conservation variables . . . . . . . . . . . . . . . . . . . 86
9.2.2 Quasilinear form . . . . . . . . . . . . . . . . . . . . . . 879.2.3 Eigenstructure . . . . . . . . . . . . . . . . . . . . . . . 88
9.3 Euler equations in two dimensions . . . . . . . . . . . . . . . . . 89
10 Roe linearization of gasdynamic equations 92
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
10.2 Principles of Roe linearization . . . . . . . . . . . . . . . . . . . 93
10.2.1 Definition of Roe linearization . . . . . . . . . . . . . . . 93
10.2.2 General solution of Roe linearization . . . . . . . . . . . 95
2
7/27/2019 Node Pairs Report
7/185
10.2.3 Solution in Jacobian form . . . . . . . . . . . . . . . . . 95
10.3 Linearization of Euler equations . . . . . . . . . . . . . . . . . . 9610.4 Solution of Euler linearization . . . . . . . . . . . . . . . . . . . 97
10.5 Polytropic van der Waals fluid . . . . . . . . . . . . . . . . . . . 102
10.6 Ideal gases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
10.6.1 Flux functions homogeneous of degree one . . . . . . . . 107
10.6.2 Nonpolytropic ideal gas . . . . . . . . . . . . . . . . . . 108
10.6.3 Polytropic ideal gas . . . . . . . . . . . . . . . . . . . . . 110
11 High-resolution schemes for systems of conservation laws 113
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
11.2 Multidimensional upwind scheme for systems . . . . . . . . . . . 11411.3 Boundary conditions for system of conservation laws . . . . . . . 115
11.4 High-resolution scheme for steady solutions . . . . . . . . . . . . 118
11.5 A general limiter function for hyperbolic systems . . . . . . . . . 121
11.6 High-resolution scheme for unsteady solutions . . . . . . . . . . . 123
12 Boundary conditions in nonlinear hyperbolic systems 127
12.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
12.2 Conservative, characteristic and
physical variables . . . . . . . . . . . . . . . . . . . . . . . . . . 128
12.3 The boundary values for a scalar unknown . . . . . . . . . . . . . 130
12.4 Steps of the boundary procedure for a system . . . . . . . . . . . 13112.5 Alternative boundary procedure . . . . . . . . . . . . . . . . . . 134
A Discrete differential operators in node-pair weak form 140
B Nomenclature 142
C Algorithms 144
D Error analysis of the TaylorGalerkin method 152
D.1 Basic third-order TG scheme . . . . . . . . . . . . . . . . . . . . 152
D.2 Two-step third-order TG scheme . . . . . . . . . . . . . . . . . . 156
D.3 Two-step fourth-order TG schemes . . . . . . . . . . . . . . . . . 162
D.4 Vector advection equation . . . . . . . . . . . . . . . . . . . . . . 166
D.5 Mass conservation equation . . . . . . . . . . . . . . . . . . . . . 170
7/27/2019 Node Pairs Report
8/185
.
7/27/2019 Node Pairs Report
9/185
If you think we are moving pictures, he said,You ought to pay you know. Moving pictures are
not made to be looked at for nothing. Nohow!
Robert Gilmore Alice in Quantumland
7/27/2019 Node Pairs Report
10/185
.
7/27/2019 Node Pairs Report
11/185
Chapter 1
Introduction
The TaylorGalerkin scheme of Donea [3] has been proven successful for the
computation of unsteady hyperbolic problems and it has been used in a large
number of applications, ranging from multidimensional advection problems [5]
to the solution of the multidimensional shallow water equation [1]. Different
schemes have been proposed depending on the considered set of equations and on
theaimed-ataccuracy, but all rest on the same machineryfor the timediscretization
(by means of Taylor series) and for the space discretization (by means of finite
elements). As pointed out in [5], TaylorGalerkin schemes are to be considered
as the natural extension of LaxWendroff finite-difference schemes to the finite
element framework. In subsequent elaborations of the TaylorGalerkin approach,
Selmin [22] introduced a two-step procedure for time advancing. This lead to a
new class of schemes, in which, differently from the original ones, no modification
to the standard mass matrix is needed.
Although many applications of TaylorGalerkin schemes can be found in the
literature, the authors are not aware of any review work on the subject, the work of
different authors being mainlyfocusedon specializing the TaylorGalerkin scheme
to the problem under study. Moreover, the issue of the treatment of boundary
conditions for the hyperbolic problem in the TaylorGalerkin framework, in either
a strong or a weak sense, has received almost no attention in the literature.
A well known drawback of the TaylorGalerkin scheme lies in that it is builtupon finite element spaces of piecewise linear interpolations, so that this scheme
is not suitable for the computation of discontinuous or shocked solutions, as those
encountered, for instance, in the solution of the compressible Euler equations. To
overcome these difficulties, in [6] a two-step procedure that includes an artificial
dissipation operator was proposed. However, it is the authors opinion that this
issue is far from being clarified and deserves further attention.
The first part of the present work is intended as a review of the TaylorGalerkin
scheme for conservation laws; an error analysis of the scheme is also given in an
1
7/27/2019 Node Pairs Report
12/185
appendix. For completeness, the description of the finite element and of Taylor
Galerkin schemes includes also an original procedure for the imposition of theproper (in flow or inlet) boundary conditions in a weak form.
TaylorGalerkin schemes are presented for both a multidimensional nonlinear
conservation law governing a scalar unknown and for a linear advection equation
(withvariablecoefficients)over a given advectionfield,possiblynonsolenoidaland
time-dependent, as it is thecaseof themass conservationequation forcompressible
flows. An original TaylorGalerkin scheme is presented for the mass conservation
law. This particular scheme can be applied in the solution of the Navier-Stokes
equations in those formulations where the mass conservation equation is tackled
is a separate step from the momentum and energy equations, to determine the fluid
density at a given time level. The new density so calculated is then employed toadvance themomentum and the energy variables, using an explicit timeintegration
scheme; such an approach is taylored to deal with the incomplete parabolic charac-
ter of the compressible NavierStokes equations. Moreover, the Taylor-Galerkin
scheme for linear advection can also be applied to the solution of the advection
problem arising from one or two-equation turbulent models.
In the second part of the report, we review the node-pair representation of
the Galerkin finite element method introduced by Selmin [23]. In particular a
node-pair formulation of the TaylorGalerkin schemes is derived as a step towards
their use for the solution of Euler and Navier-Stokes equations for compressible
flows. Thanks to the factorization of all the geometry-dependent quantities in thecomputation of the finite element integrals, a great improvement in the overall
efficiency of the code is achieved over the standard finite-element assembling
procedures. As a consequence, the proposed node-pair-based TaylorGalerkin
schemes opens theway to theuseof standard finite volume stabilization techniques,
such as upwind schemes, high-resolution schemes andartificial viscosity methods.
Interestingly enough, the node-pair representation of finite element schemes and
TaylorGalerkin schemes is discovered to provide a bridge between finite volume
and LaxWendroff schemes in the context of unstructured spatial discretizations.
This report is organized as follows. In Chapter 2 the finite element approxima-
tion ofa nonlinear scalar conservation lawis presented,and thediscrete formulation
of inlet boundary conditions for a hyperbolic problem is described. The finite ele-
ment approximation of a diffusionterm andof a second-order directional derivative
is detailed to construct TaylorGalerkin schemes for nonlinear conservation law.
In Chapter 3, an approximate techniquefor evaluating thenonlinear terms based on
the reinterpolation of fluxes, using the same local basis functions of the unknown
variable, is introduced. This step is preliminary to the derivation, in Chapter 4,
of the node-pair representation of the discrete equations. Chapter 5 introduces
the Finite-Volume method in the context of unstructured spatial discretizations.
The node-pair formulation of the upwind scheme is described together with the
2
7/27/2019 Node Pairs Report
13/185
relationship between finite volumes and elements, as established in Selmins basic
work [22].Chapter 6 is devoted to the analysis of schemes based on the Taylor serie ex-
pansion in the time step, such as LaxWendroff and TaylorGalerkin schemes. In
particular the evaluation of the second-order directional derivative term is detailed
to build schemes of this kind for a nonlinear conservation law, both in the stan-
dard Galerkin form and in the node-pair representation. In Chapter 7 an original
implementation of high-resolution and TaylorGalerkin schemes for discontinu-
ous solutions over unstructured meshes is presented for a scalar conservation law.
Before describing the extension of the high resolution unstructured method to
the nonlinear hyperbolic system of the gasdynamic equations, some preparatory
material is introduced.Chapter 8 presents the thermodynamical properties of gases and describes the
gas models that will considered in the subsequent applications. The Euler equa-
tions of gasdynamics governing the motionof a compressible but invisicd fluid are
recalled in Chapter 9 for both one- and multidimensional flows; the eigenstructre
of these systems of nonlinear hyperbolic equations is derived. Chapter 10 presents
the idea of local linearization introducedby Roe to replace the Riemann problem at
each interface by an approximate linear problem that is equivalent from theconser-
vation viewpoint to the original nonlinear problem. In particular, the linearization
is sought for by determining an intermediate state such that the Jacobian matrix
satisfies Roes conservation conditions. The solution of the linearization problemis provided for Euler equations made complete by some ideal and nonideal gas
models.
All these physical and mathematical components are needed to develop the
high-resolution schemes for solving the multidimensional Euler equations which
are detailed in Chapter 11. The last Chapter provides a detailed account of the
original procedure for satisfying the boundary conditions in the simple case of
one-dimensional hyperbolic systems, whose multidimensional counterpart was
employed in the preceding chapter.
In theappendices, thenode-pair representationof differentialoperators in weak
form is summarized (Appendix A) and a short table of the nomenclature is given
(Appendix B). In Appendix C, an algorithm for the construction of the divergence
operator in node-pair format is detailed and, in Appendix D, the two-step Taylor
Galerkin schemes are recalled and an error analysis of these schemes is provided.
3
7/27/2019 Node Pairs Report
14/185
1.1 Scalar conservation law
We start byconsidering a multidimensional conservation lawfor thescalarquantity
u, written in the following divergence form
u
t+ f(u) = 0, (1.1)
where the flux f(u) Rd is a given vector function of the unknown u(x, t) R,x Rd, t [0, T] (see figure 1.1). Here, d = 2 or d = 3.
Figure 1.1: The domain and its boundary in two spatial dimensions.
The conservation law under consideration must be supplemented by proper initial
and inlet boundary conditions, so that the complete initial boundary value problem
(IBVP) reads (e.g. [20])
u
t+ f(u) = 0,
u(x, 0) = u0(x),u
|in
=a(s, t), s
in,
(1.2)
where u0(x) and a(s, t) are known functions, defined their respective domain
and in. The coordinate s over the boundary is indicated here as a scalar
variable with reference to problems in two dimensions, while it becomes a vector
(of dimension two) in the three-dimensional case. The inflow or inlet portion
in of the domain boundary is defined as (figure 1.2)
indef= x n(x) a(u(x, t)) < 0
4
7/27/2019 Node Pairs Report
15/185
a
out
in
Figure 1.2: The (local) direction of the advection field a with respect to the outwardnormal n identifies the inflow and outflow portions of the boundary.
with n(x) denoting the outward normal unit vector and with the advection velocity
defined by
a(u)def= d f(u)
du.
The remaining part of the boundary will be referred to as the ouflow portion of
and will be denoted by out, so that
= in
out. Note that the
definition of in is a function of the trace of the solution u(x, t) at a given time,so the inflow boundary is in general dependent on time and a more precise notation
for it would be tin, and similarly for tout
For a complete analysis of the well-posedness of the IBVP (1.2) including the
compatibility conditions on the data we refer to the monograph of Godlewski and
Raviart [9], chapter 5.
5
7/27/2019 Node Pairs Report
16/185
Chapter 2
Finite element method
In this chapter, the scalar conservation law (1.2) is discretized in space by means
of the standard finite element method (FEM). For later convenience, the FEM
approximation of the boundary terms is detailed, together with a procedure to
impose inlet boundary conditions in this framework.
Figure 2.1: Triangulation of the domain .
2.1 Scalar conservation law
The scalar conservation law (1.1) is recast in a weak or variational form by
applying the classical Galerkin finite element method. The weak form of the
equation is obtained (e.g. [20]) by multiplying the differential equation by test
6
7/27/2019 Node Pairs Report
17/185
functions belonging to a suitable1 space V
H1(), and integrating over the
domain as follows ,
u
t
+ , f(u) = 0,
where (, ) denotes the inner product in L2(). To simplify the presentation, thediscussion of how the boundary conditions are imposed is postponed to Chapter
2.2. An integration by parts gives
,
u
t
, f(u)
+
n f(u) = 0. (2.1)
Let us now moveto the discrete form of the equations above; if a finitedimensional
space Vh H1(), of weighting functions h of linear or bilinear Lagrangiantype is considered (figure 2.1) , we obtain
i
iu
t
i
(i ) f(u) +
i
i n f(u) = 0, (2.2)
where the shorthand notation i i has been introduced. In writingthe boundary integral, we have taken into account that the element basis function
i
Vh of each node i vanishes on the boundary i of its support i , but for
nodes on the domain boundary. The support i is the union of the sets e, edenoting the e-th finite element, which contain the node i (cf. figure 2.2 and 2.3).
i
i
i
Figure 2.2: The shape function i (x) in one spatial dimension and its support i .
1The introduction of the Sobolevspace H1( ) in the context of hyperbolicproblems cannot be
justified mathematically unless thesolution has a regularity typical of elliptic or parabolic (second-
order) problems.
7
7/27/2019 Node Pairs Report
18/185
i
Figure 2.3: The support i of the shape function i (x) in two spatial dimensions.
Let us assume that the solution u(x, t) is approximated by the function uh (x, t)
obtained by an expansion in the same space of the weighting functions h(x) as
follows,
u(x, t) uh (x, t) =
kNuk(t) k(x), (2.3)
where uk(t) is the value of the approximate solution at node kand at time t (figure
2.4) and N denotes the set of all nodes of the triangulation. The weak form of the
conservation law now readsi
iuh
t
i
(i ) f(uh ) +
i
i n f(uh ) = 0.
u
uh
Figure 2.4: The function uh(x, t) versus u(x, t) in one spatial dimension for linear La-grangian finite elements.
8
7/27/2019 Node Pairs Report
19/185
Substituting the expansion ofuh into the first term and transferring the other two
terms into the right-hand side giveskNi
ik
i k
duk
dt=
i
(i ) f(uh )
i
i n f(uh ).
By recalling the definition of the elements of the consistent mass matrix, namely,
Mi k =
ik
i k, (2.4)
the (Bubnov) Galerkin finite element approximation of the scalar conservation
law assumes thekNi
Mi kduk
dt=
i
(i ) f(uh)
i
i n f(uh). (2.5)
2.2 Boundary conditions
Let us recall thenonlinear conservation-law equation endowedwith inlet boundary
condition as in (1.2), namely,
u
t + f(u)
=0,
u|in = a(s, t) s in.Under this inlet condition the boundary integral of (2.1) can be split in the sum of
two integrals, as follows,
n f(u) =
out
n f(u) +
in
n f(a), (2.6)
where outdef= \ in and where the integrand function over the inlet part
in of the domain boundary has been evaluated by taking into account the pre-
scribed boundary condition u|in = a(s, t). We remind that the partition of theboundary in in and out depends on the advection field a and hence, in
the nonlinear case of interest here, the partition depends on the boundary value of
the unknown u, so that the inflow and outflow portions of may change with
time and ought to be denoted more appropriately as
tin and tout.
The type of boundary condition changes along the boundary and the points of
transition, where the sign ofn a changes, may fall, in general, inside a boundary
9
7/27/2019 Node Pairs Report
20/185
edge. This represents the most difficult occurrence, in which case the imposition
of the boundary condition for the hyperbolic equation is particularly critical andrequires an ad hoc special treatment, see below. By contrast, when the change of
the boundary condition type from inflow to ouflow occurs across two consecutive
edges, the account of the boundary condition less complicated.
The evaluation of the boundary integrals (2.6) of function n f(u) over the
solution-dependent domains in and out in the context of the finite element
method can be performed as follows. Let us introduce the finite element approxi-
mation of the unknown u and of the function a defined on the boundary,
u(x, t)| out
uouth (s, t)def
= kNout uk(t) k(s), s
out
a(s, t) ah (s, t) def=
kNinak(t)
k(s), s in
where k is the trace of the weight function k on , namely,
k(s)def= k(x(s)), x(s) ,
and Nout and Nin are the boundary nodes belonging to the outflow and inflow
portions of , respectively. The finite element approximation of the boundaryintegral (2.6) now readsout
i n f(u) +
in
i n f(a)
out
i n f(uouth ) +
in
i n f(ah ).
For completeness, we describe the numerical computation of the above integral by
means of approximate quadrature formulas. If a Gaussian numerical integration
is considered, the distinction between in and out pertains only to the Gauss
points, where the integrand is evaluated. The two contributions to the boundary
integral will be computed as followsout
i n f(u) +
in
i n f(a)
gGouti (xg)ng f
k uk
k(xg)
pg
+
gGini (xg)ng f
k ak
k(xg)
pg,
where the subscript g is used to denote Gauss integration points and pg is the
corresponding integration weight. The two sets of Gauss integration points Gout
10
7/27/2019 Node Pairs Report
21/185
Grid nodeGauss point
a
a
Gout
Gout
Gout
Gin
Gin
Gin
Figure 2.5: Gauss points (indicated with empty circles) belonging to Gout and Gin.
and Gin ofout and in, respectively, are defined as follows (figure 2.5)
Goutdef= g G ng ak uk k(xg) 0
Gindef= g G ng ak uk k(xg) < 0
In other words, at each Gauss integration point the (interpolated) value of the
unknown is used to evaluate the advection field, and, consequently, to determine
whether an inlet boundary condition has to be imposed or not.
The approximate integration procedure outlined above stems directly from
equation (2.6), in that the resulting algorithm retrieves first the partitions outand in and then performs the integration. This procedure is computationally
inefficient, since it can be either timeconsuming (the isoparametric transformation
of the whole boundary is to be performed twice) or memory consuming (the coor-
dinate of Gauss point and the value of the shape functions are to be stored for the
whole boundary at thesame time). In practice, since in theusual implementationof
the finiteelement method the computation of the integrals is performed by splitting
them into a sum of elemental contributions, the above procedure can be applied
on every element independently, without loss of efficiency. In the following, we
will write the boundary integrals in an alternative but equivalent form that is more
11
7/27/2019 Node Pairs Report
22/185
suitable for descriptive purposes and also to deal with different formulation of the
finite element method.First of all, we want to encompass the different definitions of the integral
over out and in within a uniform procedure. This can be accomplished by
introducing the function
u(s)def=
u if n(s) a(u(s)) 0a if n(s) a(u(s)) < 0 (2.7)where the binary operator | indicates the possible choice between u and a, depend-ing on the local direction of the advection field a(u) with respect to the outward
normal n(s), s , as shown in figure 2.6. It follows that the boundary term
u
a
u(s)
n a
Figure 2.6: The function u(s) in two spatial dimensions.
(2.6) of the weak equation can be written in the compact form
out n f(u) +
in n f(a) =
n f(u).
Coming now to the discrete representation of the unknown and of the prescribed
boundary value we have
n f(u)
i
i n f(uh (s)). (2.8)
Thus, in this formulation, the subdivision of the boundary into the sets inand out is obtained automatically through evaluating the integral of a function
of the unknown uh or of the datum ah over the whole boundary .
12
7/27/2019 Node Pairs Report
23/185
2.3 Spatially discrete form of the equations
For completeness, we summarize here the detailed form of the spatially discrete
counterpart of the conservation law (1.1) according to the standard finite element
approach. We havekNi
Mikduk
dt=
i
(i ) f(uh )
i
i n f(uh(s)), (2.9)
where we have introduced the following (semi-) discrete approximation of the
unknown
u(x, t) uh (x, t) = kNi uk(t) k(x).The function u is defined as
uh (s)def=
uh if n(s) a(uh ) 0ah if n(s) a(uh ) < 0in which the following expansion of the boundary datum has been considered
a(s, t) ah (s, t) = kNiak(t)
k(s), s in.
As well known [7], the finite element method described above suffers from a
deterioration of accuracy for increasing t in hyperbolic and advection problems.
In chapter 6, we shall recall the TaylorGalerkin scheme of Donea [3] which has
been devised to overcome these difficulties for the particular case of transient
solutions.
2.4 Approximation of a diffusion term
As a preliminary step in the derivation of the TG scheme for the scalar conservationlaw, the spatial discretization of a diffusion term is presented. Let us consider the
problem of approximating a term of the type
(u) (uh )
by means of the finite element method, where u is a scalar unknown, for example
the temperature or a velocity component, and is a (possibly variable) coefficient,
for example a thermal conductivity or a viscosity coefficient. Once expressed in
13
7/27/2019 Node Pairs Report
24/185
weak form byprojection onto a finite dimensional space Vh
H1() of weighting
functions h Vh of Lagrangian type, the viscous term integrated by parts readsi
i (uh ) =
i
(i ) uh +
i
i n uh . (2.10)
The evaluation of the boundary term in the expression above depends on the kind
of boundary conditions specified for u, as a consequence of the elliptic nature of
the term under examination: thus Dirichlet or Neumann boundary conditions are
usually prescribed on different parts of. Suppose that these conditions are
u
=a on D and
(u/n) n uh = b on N,(2.11)
where D N = . Then, the weighting functions are to be chosen in thespace H1D(), namely, such that i = 0 on D (see figure 2.7).
Dirichletboundary condition
Neumannboundary condition
xx0 x1
1
0
Figure 2.7: Shape functions belonging to the Sobolev space H1D([x0,x1]) in one spatialdimension. A Dirichlet boundary condition is to be imposed at x = x0, while a Neumannboundary condition is assumed at x = x1.
As a consequence, expression (2.10) becomesi
i (uh ) =
kNi
ik
(i ) k
uk +
iNi b. (2.12)
Moreover, if the viscositycoefficient is constant, thediffusionterm can be written
in the form i
i (uh ) =
kNiKik uk +
i N
i b (2.13)
14
7/27/2019 Node Pairs Report
25/185
where the elements Ki k of the stiffness matrix K are defined as follows
Ki kdef= i ,k =
ik
(i ) k (i = k), (2.14)
which is symmetric. Here, the usual symbol K for the stiffness matrix has been
retained, which should not be confused with the node index k or the calligraphic
letter N denoting node sets.
In conclusion, if an expansion of the Neumann boundary term into the finite
dimensional space of weighting function is considered, i.e.,
b(s, t)
kNN bk(t) k(s), s
N
where k is the trace of the k-th shape function k on defined in (2.2), and
NN is the set of the Neumann boundary nodes, we have, for a constant dissipative
coefficient ,i
i (U) =
kNiKik uk +
k(Ni NN)
ik
i k
bk,
where the shorthand notation
i k i
k
has been introduced.
Instead, for nonconstant , the discrete representation of the Laplacian term under
consideration readsi
i (uh) =
kNiKi k uk +
k(Ni NN)
ik
i k
bk, (2.15)
where we have introduced the more general stiffness matrix
Kikdef=
i , k
=
ik (i ) k. (2.16)
2.4.1 Fundamental property of diagonal elements
of the stiffness matrix
The diagonal elements of the stiffness matrix have an important property that
will prove very useful in the explicit matrix multiplication within the edge-based
organization of thespatiallydiscrete data that will be introduced in thenext chapter.
The diagonal element of each row of the stiffness matrix is the opposite of the sum
15
7/27/2019 Node Pairs Report
26/185
of all off-diagonal elements of the considered row, namely, the following relation
holdsKi i =
kNi,=
Kik. (2.17)
This identity is a simple consequence of the fact that the stiffness matrix is the
discrete representation of the (negative) Laplacian for the Neumann problem and
that the solution to this problem is defined up to an arbitrary additive constant.
This arbitrariness is possible in the discrete problem only provided that the sum of
all elements of each raw of the matrix vanishes.
The detailed proof the identity follows from the local support property of the
shape functions and the basic relationkNei
k(x) = 1, x e, e E,
over any finite element e of the triangulation. This relation implies that
i (x) = 1
kNei , k=ik(x) x e,
and hence
i (x)
= kNei , k=i k(x) x e.
From the definition of the diagonal element we have
Ki idef=
i
|i |2 =
eNei
e
|i |2.
Using the relation for the gradient just established, we have
Ki i =
eNei
e(i )
kNei , k=ik
=
eNei
kNei , k=i
e
(i ) k
=
kNi , k=i
ik
(i ) k =
kNi,=Kik.
16
7/27/2019 Node Pairs Report
27/185
Chapter 3
Flux reinterpolation
In the following sections, we shall introduce an approximation of the flux function
which makes the evaluation of the corresponding discrete terms much simpler and
more efficient than in theclassical Galerkin formulation. Suchan approximation is
based on reinterpolating the flux function f(uh ) using the flux values calculated at
the nodes and the same basis functions employed in the expansion of the unknown.
Theflux reinterpolationhas been frequently considered in the solution of problems
by means of the finite element method and it is known as group-representation
method or group approximation or under other names; see, for example, [18].
The interpolation of the flux is actually an exact representation in the particular
case of a linear flux function f(u) = a u, with a constant; on the contrary, for agiven arbitrary f(u) the reinterpolation introduces numericalerrors whose analysis
is beyond the scope of this work. Nevertheless, it would be worth investigating the
effects of using such an approximation especially in the case of Lagrangian finite
elements of order higher than one.
3.1 Scalar conservation law
Let us first examine the volume integral of (2.5) obtained by the integration by
parts of the divergence f(u) of the flux function, namely,i
i f(uh) =
i
i f
kN ukk
(3.1)
which constitutes the approximation of the corresponding integral under the con-
sidered Galerkin approach. We now reinterpolate the flux by means of the same
17
7/27/2019 Node Pairs Report
28/185
i ki k
Figure 3.1: The intersection ik of the supports i and k of nodes i and k.
basis functions h , i.e., we make the approximation
f(uh (x, t)) = f
kN uk(t)k(x)
kN
f(uk(t)) k(x) =kN
fk(t) k(x)
where fk(t)def
= f(uk(t)). Thus, the spatial integral (3.1) is approximated byi
f(uh ) i
i
i (x) kN
fk(t) k(x) =
kNifk(t)
i
k(x)i (x)
and also, denoting more precisely the actual integration domain (cf. figure 3.1),i
i f(uh )
kNifk
ik
ki (3.2)
In a similar way, let us now evaluate the boundary term provided by the integration
by parts. Resorting to the same reinterpolation of the fluxes, we have i
i n f(uh )
i
ikN
n f(uk) k =
i
i
kNin f(uk) k
=
kNifk
ik
i k n
where, again, fk = f(uk). The boundary integral will be different from zero onlyprovided that also the node k belongs to , so that, to indicate this, the range of
18
7/27/2019 Node Pairs Report
29/185
the summation index in the previous relation is restricted appropriately as followsi
i n f(uh )
kNifk
ik
i k n, (3.3)
where N represents the set of all boundary nodes.
In conclusions, once the approximation based on the reinterpolation of the flux
has been introduced, the discrete Galerkin formulation of the conservation law
reads
kNi Mikdu k
dt = kNi fk ikki kNi fk iki k n. (3.4)The introduction of the flux reinterpolation has allowed us to recast the integrals
in space involving the (time-dependent) flux function as the product of the time-
dependent nodal value fk(t) and fixed spatial integrals involving the shape func-
tions i and k. Therefore, the computationof the integrals dependent on the mesh
geometry appearing in the discrete equation can be performed once and for all at
the beginning of the computation, in a preprocessing phase. This leads to a strong
reduction in the CPU time requirements with respect to the standard Galerkin ap-
proach (cf. equation (2.5)). On the other hand, such an approximation introduces
an integration error whose analysis is beyond the scope of this work.
3.2 Treatment of boundary conditions
To simplify thederivationof expression(3.4) wedidnotconsider theproperbound-
aryconditionsfortheinitial boundaryvalueproblem (1.2). Moreover, in thederiva-
tion of (3.4), and in particular in (3.3), we assumed a constant flux function over
the intersection of the twosupport i and k of the nodes i and k. Wheneverthe
type of the boundary condition changes on a boundary element edge, as described
in Section 2.2, this approximation is no longer valid and the variable f cannot be
factorized anymore. In the following we exclude this occurrence and discuss thetheme of the imposition of the boundary conditions assuming that they can change
type only when passing across different boundary elements, as depicted in 3.2.
In this section, we address the problem of imposing the proper inlet boundary con-
ditions, and, more generally, of imposing boundary condition of different type in
this framework. Under the flux reinterpolation already introduced, we seek for
a suitable form of the boundary term which preserves the envisaged factorization
of the geometry-dependent part from the time-dependent one. The resulting for-
mulation is obtained without introducing any approximation other than the usual
19
7/27/2019 Node Pairs Report
30/185
aa
a
a
out
in
i km
j
n
n
n
Figure 3.2: Over the boundary k of the support k of node k boundary conditions ofdifferent kind are to be imposed: on k j an inlet boundary condition is required,while k i is an outflow region, that is, no boundary conditions are to be imposed.
group representation of the fluxes in the case of linear and bilinear Lagrangian
elements, and a first order approximation of the normal direction in the case of
elements of order p > 1.We perform the following reinterpolation of the flux function on the boundary
on which we impose
f(s, t)
kNfk(t)
k(s), (3.5)
where
fk(t)def= fu(sk, t). (3.6)
In the last expression, function u(s, t) is defined as in (2.7), namely:
u(s, t)def
= u(s, t) if n(s) a(u(s, t)) 0a(s, t) if n(s) a(u(s, t)) < 0 (3.7)where u(s, t) = u(x, t)| , that is the trace of the solution u on the boundary attime t. [Note that a is the boundary value prescribed on u and is not the intensity
of the advection velocity a.]
In the reinterpolation, the dependence of f(s, t) on the boundary coordinate s
cannot be dropped, as done for instance for the coefficient fk(t) of the reinterpo-
lation in the domain, for u here depends on s. By substituting (3.3) in (2.8), we
20
7/27/2019 Node Pairs Report
31/185
have i
i (s)n f(s, t) kNi
i
i (s) k(s)n(s) fk(t).
In the caseof linear or bilinear elements, the normaln is constant over theboundary
e belonging to the element e, so that we can define the outward normal of
element e as
nedef= n(s) = constant s e (3.8)
and the following restriction of f(u(s, t)) over the e-th element as (figure 3.3)
fe
k(t)def= f(u(sk, t)) s ek , (3.9)
which is a function of the time t only and can be factorized in the computation ofthe space integrals, as
i
i n f(u) eEi
kNi
fe
k(t)
ike
i k n. (3.10)
outout in
i km j
n a n a
f(um )
f(ui )
f(uk)
f(ak)
f(aj )
Figure 3.3: Flux reinterpolation at boundaries for the situation sketched in figure 3.2.
3.3 Spatially discrete form of the equations
For completeness, let us recall here the complete form of the spatially discretized
conservation law (1.1) under the hypothesis of flux reinterpolation. We havekNi
Mikduk
dt=
kNi
fk
ik
ki +eEi
kNi
fe
k
ike
i k n, (3.11)
21
7/27/2019 Node Pairs Report
32/185
where we have defined as usual
fk(t)def= f(uk(t)) (3.12)
and
fe
k(t)def= fu(sk, t), s i k e (3.13)
22
7/27/2019 Node Pairs Report
33/185
Chapter 4
Node-pair representation
In this chapter we introduce a more convenient way of writing the flux terms
of the discrete equations which has been proposed by Vittorio Selmin [23]. In
his formulation, these contributions are expressed as a summation over pairs of
interacting nodes in such a way quantities dependent on time are factorized out
from quantities dependent on the assumed spatial discretization. As a results, all
the quantities associated with geometrical features of the mesh can be evaluated
in a preprocessing phase of the computation. Moreover, the flux contributions are
found to be expressed in a quasi one-dimensional form that permits theexploitation
of all algorithmic tools developed for the solution of one-dimensional conservation
law equations and systems, as, for example, upwind schemes.
4.1 Node-pairs and metric vectors of interaction
Let us introduce the following metric vector quantities
ikdef=
ik
(ik ki ), (i = k) (4.1)
which are different from zero only if i k = 0, i.e., if the nodes i and kinteracts in the finite element sense. Each couple of such interacting nodes
is called node-pair (figure 4.1). In terms of these metric vectors, the discrete
counterpart of the considered scalar conservation law can be recast in the compact
form [23]kNi
Mikduk
dt=
kNi,=
fk + fi2
ik
+
kNi,=
fk fi2
ik
i k n
kNi,=fk
ik
i k n
(4.2)
23
7/27/2019 Node Pairs Report
34/185
i k
Figure 4.1: The node-pair i-k.
where the last two summations must be noticed to involve only boundary nodes.
Themetric vectors iks occurring in equation (4.2) above satisfy the following
fundamental properties [25]:
ik = ki , (antisymmetry) (4.3a)ii
=0 (4.3b)
kNiik = 0, for any internal point i (4.3c)
kNi
ik =
i
i n =
i
i n (4.3d)
Properties (4.3a) and (4.3b) are important for ensuring a conservative numerical
scheme, while properties (4.3c) and (4.3d) are a necessary consequence of the
fact that a constant flux must give a zero contribution to the change in uh at each
internal point. The properties listed above allow to identify the quantities ikas metric vectors which behave similarly to the integrated normal vectors of a
control volume in the finite volume approach. From this viewpoint, properties
(4.3c) and (4.3d) guarantees that the control volume is closed. In Selmin [23], an
equivalence theorem is given which relates the node-pair formulation of the finite
element method to the standard finite volume approach over suitable constructed
control volumes on triangular meshes. The equivalence holds for the discrete
equations associated with internal nodes, but it breaks down for those associated
with boundary nodes.
24
7/27/2019 Node Pairs Report
35/185
4.2 Proof of the split of domain and
boundary contributions
Equation (4.2) is proved starting form the discrete equation (3.4), which is repeated
here for convenience:kNi
Mi kduk
dt=
kNifk
ik
ki
kNifk
ik
i k n, (4.4)
and using the following identity
kNi fk ikki = kNi,=fk
+fi
2
ik + kNi,=
fk
fi
2 i i k n
(4.5)
which splits the domain integral into domain contributions and boundary contribu-
tions. Thedirect substitutionof (4.5) intoequation (4.4) gives (4.2). Theboundary
contributions in (4.2) are recast in a different more convenient form by means of a
second identity that will be discussed below.
4.2.1 Proof of the domain integral indentity
The standard method used in finite element schemes for computing the integral
on the left hand side of the relation above is to assemble the contributions coming
from each element e in the mesh, exploiting the local support property of the shape
functions, as followskNi
fk
ik
ki =eEi
kNe
fk
e
ki , (4.6)
where Ei is the set of the elements having the node i in common (bubble around
node i) and Ne is the set of the nodes of element e. The first summation on the
right-hand side is limited to the elements contained in the support i of node i ,
which are the only ones to give a nonzero contribution to integrals containing the
function i . In fact, if we indicate by e the subset of pertaining to the e-thelement ( = eE e) we have, by definition i = eEi e. Let us considerthe identity (gradient theorem)
e(i k) =
e
i k n (4.7)
valid for any continuous function i k, which gives the following relatione
ki =
eik +
e
i k n (4.8)
25
7/27/2019 Node Pairs Report
36/185
i k
e1
e2
e1i k
e2i k
ik
Figure 4.2: Elemental contributions to the metric vector ik.
By virtue of this identity one can deducese
ki =1
2
e
ki +1
2
e
ki
=1
2eki + 12 eik + ei k n=
ei k
2+ 1
2
e
i k n (4.9)
where in the last equality we have introduced the elemental contributions ei k to
the metric vectors i k, according to the definition (figure 4.2)
ei kdef=
ike(ik ki )
In terms of these elemental contributions the metric vector associated with the pairi -k can be expressed as
ik =
e(EiEk)ei k
Using (4.9), the integral (4.6) becomeskNi
fk
ik
ki = eEi
kNe
fk
eik2
12
e
i k n
(4.10)
26
7/27/2019 Node Pairs Report
37/185
On the other hand, from equation (4.9) it follows that
ei k = 2
eki +
e
i k n
and also, recalling (4.8),
ei k = 2
eik
e
i k n
Summing up this relation for all nodes k belonging to element e and using the
elementary property
kNe k(x) = 0, x e, we obtain
kNe eik + ei k n = 0
Summing up this relation for all elements belonging to Ei and multiplying the total
by the constant vector fi , we obtain the following relationeEi
kNe
fi
ei k +
e
i k n
= 0
Multiplying this relation by 1/2 and adding it to the right hand side of (4.10) we
obtain
kNi
fk ik
ki = eEi
kNe
fk + fi2
ei k+eEi
kNe
fk fi2
e
i k n.
By recalling that eik = 0 for e (Ei Ek) and ik =
e(EiEk) ei k and that
i i = 0, we can rearrange the right-hand side of the last relation so as to obtainkNi
fk
ik
ki =
kNi,=
fk + fi2
ik +
kNi,=
fk fi2
i
i k n,
where Ni,= denotes, as already specified, all mesh points belonging to i exceptfor the node i itself. Since i = 0 on i unless the node i belongs to , thelast term can be written as
kNi,=
fk fi2
ik
i k n
The boundary integral will be different from zero only provided that also the node
k belongs to , so that, to indicate this explicitly, the index of the summation is
rewritten as follows kNi,=
fk fi2
ik
i k n
27
7/27/2019 Node Pairs Report
38/185
Therefore the final result iskNi
fk
ik
ki =
kNi,=
fk + fi2
ik +
kNi,=
fk fi2
ik
i k n,
that is, the identity (4.5).
Exploiting the identity (4.5) just established, the starting equation (4.4) reduces
to equation (4.2) that will be written compactly askNi
Mikdu k
dt=
kNi,=
fk + fi2
ik + BTi , (4.11)
after having introduced the following notation for indicating together the two
boundary contribution terms
BTi =
kNi,=
fk fi2
ik
i k n
kNi,=
fk
ik
i k n. (4.12)
4.2.2 Final transformation of the boundary term
The two integrals contributing to expression (4.12) can be recast in an alternative
manner that involves theuseof metricvectors associated with node-pairs belonging
to the boundary as well as with the nodes of the boundary. The final form givesthe boundary terms where the boundary conditions can and must be enforced in
the Galerkin FE approache, in a weak form.
Initially, let us rewrite the second term (apart from its sign) of BTi by isolating
the contribution of the node i , as followskN
i
fk
ik
i k n =
kNi,=
fk
ik
i k n + fi
ik
i i n
We now add and subtract the term
kNi,=
fi
ik
i k n
to the relation above to obtainkNi
fk
ik
i k n
=
kNi,=( fk fi )
ik
i k n + fi
kNi
ik
i k n.
28
7/27/2019 Node Pairs Report
39/185
Byexploiting thelocal support propertyof theshapefunctions and thebasicrelationkNe
k(x) = 1, x e, e E,
we finally obtainkN
i
fk
ik
i k n =
kNi,=
( fk fi )
ik
i k n + fi
i
i n
By substituting this result into (4.12) we note that there are two equal terms but
with coefficients 1
2
and
1, so that the boundary contribution to the i -th discrete
equation assumes the following from:
BTi =
kNi,=
fk fi2
ik
i k n fi
i
i n, (4.13)
where the first integral is over the domain i k = ik , and therefore itexists only for i, k , with however i = ksince for i = kthe vector coefficientvanishes.
We are therefore led to introduce the following boundary metric vectors
i kdef=
ik
i k n, i, k N (i = k)
idef=
i
i n, i N
in terms of which the boundary contribution is written in the final form
BTi =
kNi,=
fk fi2
i k fi i . (4.14)
We note thatik is definedonly for i, k N andunder thecondition i k =. Moreover, i is similarly defined only for i N .
The symmetry property ik = ki can be contrasted with the antisymmetryproperty i k = ki . However, the coefficients in front of the two metric vectorsare respectively symmetricandantisymmetric, so that thetwocorresponding scalar
products share one and the same property of antisymmetry with respect to the
indices i and k. Stated in other words, the contribution of all node-pairs, both the
domain terms and the boundary ones, repects conservation exactly.
29
7/27/2019 Node Pairs Report
40/185
4.3 Node-pair form of the discrete equations
Let us now recall the conservation law (1.1) we started from, i.e.,
u
t+ f(u) = 0.
Once the metric vectors have been introduced, the complete final form of the
spatially discrete conservation law in the node-pair representation readskNi
Mi kduk
dt=
kNi,=
ik fi + fk
2
kNi,
=
i k fk fi
2 i fi ,(4.15)
where fidef= f(ui ). The last, nodal, contribution i fi is present only when node
i lies on the boundary : in other words, when i correponds to an internal point,
the respective equation does not contain any term of this form. This circumstance
is reminded by the superscript index appended to boundary metric vector i .
To summarize all elements of the node-pair formulation, we collect here the
definition of the mass matrix M and of the metric vectors , and , namely
Mik =
ik
i k,
ik =
ik
(ik ki ), (i = k)
ik =
ik
i k n, i, k N (i = k)
i =
i
i n, i N
Remarkably, all the geometrical information pertaining to the triangulation are
contained in the metric quantities above.
Furthermore, the evaluation of the summations in the right-hand side of the
discrete equations can be performed quite easily by processing sequentially the
list of node-pairs and accumulating the left and right contributions with the
proper sign according to their overall antisymmetry. More precisely, the list of
all interacting node-pairs involved by the domain contribution term is stored in a
suitable array whose entries contain the order numbers of two nodes of each node-
pair. This array contains therefore the connectivity information of the entire mesh
seen from the viewpoint of knowing the interaction between the nodes as brought
about by the overlapping of the their respective support. By means of this nod-pair
30
7/27/2019 Node Pairs Report
41/185
connectivity, the summation of the terms on the right-had side can be performed
explicitly by accounting for thecontributionof eachnode-pair term to thequantitiesof two nodes. A similar array for node-pair-to-nodes connectivity is memorized
for the set of node-pairs involved by the summation associated with the boundary.
The corresponding boundary connectivity information allows to account for the
boundary integral expressed in the node-pair format, similarly to what has been
explained for thedomain integral. Finally, thecontribution of thethird term is taken
into account by looping on the list of all boundary nodes. The latter must therefore
been memorized as another boundary information for the considered mesh. Thus,
the node-pair representation of the spatial triangulation comprises three differents
pieces of information for the mesh topology, one pertaining to the domain and
the other two associated with the boundary, while a FEM mesh is described byonly two connectivity element-to-nodes arrays, one for the domain elements and
the other for the boundary element. The resulting algorithm for performing the
explicit accumulation of the right-hand side in node-pair format is straight forward
and an example for a conservation law is given in appendix C.
4.4 Treatment of boundary conditions
For simplicity, the node-pair form of the spatially discrete equations has been de-
rived in the previous sections without considering the imposition of the boundary
conditions of the considered hyperbolic problem. In particular, the boundary inte-gral has been rearranged by assuming that a constant reinterpolated flux function
fi over the support i ofi . This assumption cannot be accepted when boundary
conditions change from inflow to outflow along the same element, as pointed out in
section 3.2. As a consequence, the envisaged factorization of the flux function in
theboundary integrals is notallowed and theformulation must be modified slightly
so as to include the possibility of imposing boundary conditions of different type.
Let us recall the form of the boundary integral which has been obtained under
the hypothesis of flux reinterpolation. We have
i n f(u) eEi
kNi
f
e
k ik ei k n (4.16)where
fe
k(t)def= fu(sk, t), s e (4.17)
4.4.1 Duplication and augmentation of boundary nodes
To simplify the analysis, let us assume that the partition of the boundary in its
inflow and outflow parts does not occurs inside any boundary elements. In
31
7/27/2019 Node Pairs Report
42/185
other words, we are assuming that the frontier between these two parts is precisely
located at points (in 2D) and along edges (in 3D) which are on the border of theboundary elements.
Under this assumption each boundary element can be associated either to the
inflow boundary or to the outflow boundary, according to the sign of n f,
where f is evaluated in the interior of the boundary element. This circumstance
allowstosplitthenodalterm i fi in itscontributionsdueto thedifferentboundary
elements. In 2D problems, there are always two distinct contributions, stemming
from the two boundary edges containing the boundary node i . Therefore one can
augment artificially the number of boundary nodes, by duplicating all of them,
so as to compute the term of the purely nodal contribution still as a single cycle
running on a double number of artificially augmented boundary node.On the contrary, in 3D problems there a few of boundary element containing
the boundary node i as one of their vertices, the typical number being around 5 or
6. In this case, it is necessary to known the number Ni of these boundary triangles
associated with theboundary node i . Then onecan augment artificially the number
of boundary nodes by replicating Ni times the surface node i .
By summarizing, while the numbering of domain nodes is left unchonged,
for each boundary node i one defines the set Ni of the two duplicated boundarynodes in two-dimensional problems or of the Ni -folded boundary nodes in three-
dimensional problems.
Considering nowthesurfacial node-pairterm
1
2
i k
( fk fi ) in three-dimensionalproblems, a difficulty with the imposition of boundary conditions changing frominfow to outflow type across the common edge of two boundary triangles is en-
countered, similar to that just discussedfor thenodal metricvectors. Thisdifficulty
requires to split the two elemental contributions of each boundary metric vector
ik (see figure 4.3). Accordingly, elemental boundary metric vectors could be
defined as follows:
,eik =
ik e
i k n, i, k N , e E (i = k)
,e
i = i ei n, i N , e EIn terms of these elemental contributions the complete boundary term could be
written as follows:
BTi =
kNi,=
eEik
,eik
fe
k fe
i
2eEi
,ei f
e
i (4.18)
The double summation appearing in the first (node-pair) term is retained here to
have an expression valid in general for both two and three-dimensional problems.
32
7/27/2019 Node Pairs Report
43/185
i
k
m
j
ne
nm
ei
mi
mj
ek
ik
i j
e
Figure 4.3: Boundary metric quantities for elements m and e in two spatial dimensions.
Thanks to the augmented set of boundary nodes just described, the elemental
contribution ,ei to the metric vector
i will be regarded as an independent nodal
metric vector and will be indicated by , to make explicit the fact that they belong
to the augmented set of boundary nodes. In this way, the term for the boundary
nodal contribution reduces to a summation over the artificially extended set of theduplicated (in 2D) or multiplicated (in 3D) boundary nodes, as follows:
eEi
,ei f
e
i Ni
f,
where are the boundary metric vectors duplicated (2D) or multiplicated (3D) in
conformity with the treatment of the boundary nodes. Note that with the assumed
notation the superscript e referring to the element becomes unnecessary.
4.4.2 Duplication of boundary edges in 3D problems
As anticipated, a similar treatment can be adopted also for the term associated
with the node-pair boundary contribution for three-dimensional equations. Each
boundary node-pair can be duplicated to account for the two boundary triangles
involved by the considered pair. The elemental contributions,e
i k are then consid-
ered as referring to an artificially doubled set of node-pairs on the boundary, that
will be indicated by N . (For the two dimensional equations N consists simplyof the set of all the node pairs on the boundary, whose number is equal to the
33
7/27/2019 Node Pairs Report
44/185
number of edges along the boundary.) Thus, by interpreting the first summation
over k Ni,= as running over theduplicted set of boundary node-pairs, the secondsummation over the elemental contribution is made to disappear as follows:
kNi,=
eEik
,ei k
fe
k fe
i
2
k Ni,=
k
fk f2
where the number of the boundary metric vectors k
is twice that of edges on the
domain boundary in three dimensions. Again we note that the assumed notation of
the extended set of metric vectors
k
eliminate the need to refer to the elements in
the flux evaluation: in fact the number of flux values on the boundary is equal to thenumber of the augmented boundary nodes. The expression above is the general
form of the boundary contribution due to the surfacial node-pairs valid for the
three-dimensional equation. In the two-dimensionalcase there is no duplication of
the boundary edeges, which are parts of the discretized curve delimining the plane
computational domain. Therefore in two dimensions, the considered boundary
contribuition would reduce to the simpler standard summation
kNi,=
eEik
,eik
fe
k fe
i
2
kNi,=
i k fk fi
22D only.
In the following, the previous more general expression of this term will be always
considered to obtain equations suitable for implementing the numerical schemes
also in the three-dimensional case.
Both treatments for the boundary terms allow a very convenient simplification
of the program, only at the expense of interpreting the boundary as if it were
composed of fully disconnected edges in 2D or fully disconnected triangles in 3D.
The boundary contribution to the discrete equations will be written as follows
BTi= k Ni,=
k
f
k f2 Ni
f
.
It is worth reminding that in 2D the set Ni has always two elements while in 3Dit contains a number of elements equal to the number of triangles over the surface
which contain the boundary node i . On the other hand, the set N in 2D isnothing but N while in 3D it always contains twice the number of the boundary
edges of the mesh.
For subsequent reference, the discrete conservation law with the boundary
34
7/27/2019 Node Pairs Report
45/185
terms expressed in the new form is written here explicitly:kNi
Mikduk
dt=
kNi,=
i k fi + fk
2
k Ni,=
k
fk f2
Ni
f.
(4.19)
Of course, the two terms associated with the boundary are present only when the
node i lies on the domain boundary: the absence of these terms for the discrete
equations associated to internal nodes is explicitly indicated by appending the
superscript to the boundary metric vectors k
and .It can be noted that the three summations in the right-hand side of the last
equation can be easily coded in the program by means of do-loops. The three
loops run on the three sets of all the node-pairs, all the (augmented) boundary
node-pairs and all the (augmented) boundary nodes, respectively. The superscript
e referring to the element is present in the two boundary terms simply due to the
fact that the flux on the boundary depends on the boundary value ofu, which in
turn depends on the inflow or outflow nature of each boundary element.
4.5 Diffusion term in node-pair formIn section 2.4, the finite element discretizationof a diffusion term has been derived;
in this section we address the problem of expressing the weak form of such a term
under the node-pair format. We anticipate that when the diffusion coefficient is
not constant, the resulting node-pair form can be achieved only at the expense of
introducing an additional error with respect to spatial discretization error of the
classical finite element procedure.
Let us now consider the weak form of the diffusion term. By integrating by
parts we have
i
i (uh ) = kNi
ik
(i ) k uk +
i
i b (4.20)
According to thestandard finite element methodthe twointegrals on the right-hand
side of this expression are computed by splitting them into a sum over the mesh
elements and a sum over the boundary sides, respectively. Let us examine how
these summations are evaluated by employing the same node-pair data structure
previously introduced.
35
7/27/2019 Node Pairs Report
46/185
By exploiting the property kNe k(x) = 0, x e, on each finiteelement e of the mesh, we may calculate(i ) uh = (i )
kNe
ukk
=
kNe(i ) k uk
=
kNei,=(i ) k uk + (i ) i ui , x e.
By subtracting the term ui
i kNe k, which sum up to zero, we obtain
(i ) uh =
kNei,=(i ) k uk ui i
kNei,=
k
=
kNei,=(i ) k (uk ui ), x e
Therefore, the volume integral on the right-hand side of expression (4.20) for the
second-derivative can be rewritten as
i
(i ) uh = eEi
e
(i ) uh
=eEi
kNei,=
e
(i ) k
(uk ui )
=
kNi,=
ik
(i ) k
(uk ui )
where in the last relation we have used the fact that the integral vanishes outside
ik. Therefore, the Galerkin discretization of the diffusion term (4.20) isi
i (uh) =
kNi,=
i , k
ik
(uk ui ) +
i Ni b (4.21)
in which the node-pairs data structure has been put into evidence.
If we now approximate |ik with a constant value i k for each node pair i -k,i.e., for example, by taking
|ik ik = 12 (i + k), (4.22)
36
7/27/2019 Node Pairs Report
47/185
we obtain the following approximationi
i (uh)
kNi,=iki ,k
ik
(uk ui ) +
i Ni b (4.23)
where the volume integral has been made independent from the function (x) and
thereforecan beevaluated once and forallat thebeginning of thecomputationas the
other metric vectors already introduced. Note that the considered approximation
preserves the symmetry of the stiffness matrix. Of course, for constant the
technique reduces to the exact finite element expression. Recalling the definition
(2.14) of the stiffness matrix element Ki k, the proposed approximation yieldsi
i (uh )
kNi,=ik Ki k (uk ui ) +
k(Ni NN)
ikN
i k
bk
(4.24)
where theboundary Neumann datumhas been replaced by its interpolant according
to the approximation
b(s, t)
k(Ni NN)bk(t)
k(s), s N. (4.25)
37
7/27/2019 Node Pairs Report
48/185
Chapter 5
Finite-Volume method
on nonstructured meshes
In this chapter we study the finite volume method for unstructured meshes. We
derive theupwindscheme based on this spatial discretization technique. Thesemi-
discrete equations are first expressed in the standard finite-volume format. Then,
thy are expressed in the node-pair format, using the data structure and metric quan-
tities already described in Chapter 4, by taking advantage of Selmins theorem of
equivalence between finite volumes and finite elements in node-pair representation
[23].
5.1 Finite-Volume spatial discretization
Let us write the standard finite volume scheme for the scalar conservation law
(1.1). As well know, the finite volume method moves from the conservation law
written in the following integral form
d
dt
C
u(x, t) =
C
n f(u), C ,
where n indicates the outward normal vector of the region C . Let us nowconsider the discrete counterpart of the above equation by considering a certain
number offinite volumes Ci , with boundary Ci , each of them surrounding a single
node i of the triangulation of (see figure 5.1), namely,
d
dt
Ci
u(x, t) =
Ci
n f(u), i N. (5.1)
In the following, we assume that the finite volumes Ci satisfy the constraints:
38
7/27/2019 Node Pairs Report
49/185
i Ci
Figure 5.1: Finite volume discretization of in two spatial dimensions. The underlyingFEM discretization using triangular meshes is shown (dashed lines).
Ci Ck = , i, k N, i = k, (5.2a)
kN
Ck = , i, k N, i = k, (5.2b)
i Ci i / Ck, i, k N, i = k. (5.2c)Condition (5.2a) assures that the open sets Ci , which are the internal parts of the
finite volumes Ci , are nonoverlapping, while condition (5.2c) implies that each
finite volume Ci is associated with a single node i . Alternatively, finite volumes
can be chosen to be coincident with the elements of the triangulation, that is,
Ce = e; the resulting scheme is said to be a cell-centred finite volume scheme,to be contrasted with the above node- or vertex-centred approach.
Over each finite volume Ci , the unknown u(x, t) is now approximated by itsspatial average as
u(x, t) ui (t) def= 1|Ci |Ci
u(x, t), x Ci . (5.3)
In other words, we consider the following piecewise constant approximation of
the unknown over (cf. figure 5.2), i.e.,
u(x, t) uh(x, t) def=kN
uk(t) Ik(x), (5.4)
39
7/27/2019 Node Pairs Report
50/185
u
uh
Figure 5.2: Piecewise constant approximation uh ofu in one spatial dimension.
where, borrowing the nomenclature of finite elements, the shape functions are
chosen to be the characteristic functions Ik(x)
Ik(x) =
1 x Ck0 x / Ck
Therefore, if the finite volume does not change in time, we can write
d
dt
Ci
u(x, t) |Ci | duidt
.
As a first step toward the node-pair representation, the right hand side of (5.1) is
rearranged so as to put into evidence the node-pair structure of the data, namely,Ci
n f(u) =
kNi,=
Cik
ni f(u) +
Ci
n f(u), (5.5)
where ni denotes the outward normal with respect to the volume Ci . We notice
that ni = nk over Cik = Ci Ck. In the finite volume jargon, the set Cik isoften referred to as the cell interface between the volumes Ci and Ck (figure 5.3).
5.2 Upwind Finite-Volume scheme
We can now consider the issue of imposing inlet boundary conditions for the
hyperbolic problem. By means of the same procedure detailed in section 2.2, the
boundary condition is enforced in a weak sense throught the boundary integral by
substituting the unknown u with the function u defined in equation (2.7), which is
repeated here for convenience,
u(s, t)def=
u(s, t) if n(s) a(u(s, t)) 0a(s, t) if n(s) a(u(s, t)) < 0
40
7/27/2019 Node Pairs Report
51/185
i kCi
CkCi k
ik
Figure 5.3: Cell interface Cik between the finite volumes Ci and Ck.
where a(u) = d f(u)/du and a(s, t) denotes the prescribed boundary value on theinlet portion in of the boundary. It should be reminded that a is the boundary
value prescribed on u and is not the intensity of the advection velocity a. This
boundary function is replaced by its piecewise constant approximation, as follows,
a(s, t) ah (s, t) =kN
ak(t) Ik (x),
where
Ik (s)def= Ik(x(s)), x(s) ,
denotes the trace of the shape function Ik over . The integral over the domainboundary in (5.5) is therefore evaluated as usual by the expression
Ci
n f =
Ci
n f(u). (5.6)
Due to the piecewise constant approximation considered, over Ci uh andah assume the constant values ui and ai , respectively, so that uh (s, t) is constant
over Ci as long as the outward normal n(s) is constant over Ci . Instandard finite volume discretizations, a constant (mean) normal is consideredover
Ci
, so that uh assumes a constant1 value and can therefore be factorized in
the computation of the boundary integral, namely,Ci
n f(uh(s)) fi (t)
Ci
n
with
fi (t)def= f(uh (s)) = constant s Ci .
1If a cell-centred volume is considered over a grid of linear elements, the normal n is indeed a
constant vector over Ce .
41
7/27/2019 Node Pairs Report
52/185
Here, by taking advantage of the analysis performed in section 3.2, we choose to
consider a nonconstant normal over Ci and split the boundary integral asfollows
Ci
n f(uh(s)) =eE
i
fi (t)
Cie
n (5.7)
where e is the subregion of corresponding to element e of the finite element
triangulation and where we have introduced the following vector quantity
fi (t)def= f(u(si )) = constant s Ci e . (5.8)
Let us consider now the finite volume approximation of the domain integral.
First, we notice that the integrals Cik
ni f(u), (5.9)
are undefined at cell interfaces in the finite volume framework due to the piecewise
constant approximation uh chosen for u; with the discrete unknown uh discontin-
uous across Ci k. Therefore we introduce a numerical flux fik, representing an
approximation of f(u) at the cell interface Ci k, so as to have
Cikni f(u)
Cikni fi k.
If we select a constant fi k over Ci k, the numerical flux can be factorized in the
computation of the above integral to obtainCik
ni f(u) fi k
Cik
ni = fik ik,
where
ikdef=
Cik
ni .
We notice in passing that ik = ki . As an example, a second order approxima-tion of (5.9) can be obtained by choosing the following centred approximation off(u) over Cik
fi k =f(ui ) + f(uk)
2.
To allow for the inclusion of a more general approximation of (5.9), it is prefer-
able to introduce an integrated numerical function qi k, which depends on ui and
uk as well as on the integrated normal ik and which provides the following ap-
proximation Cik
ni f(u) qi k = q(ui , uk, i k).
42
7/27/2019 Node Pairs Report
53/185
The integrated numerical flux qik is assumed to satisfy the following conditions:
q(ui , uk, i k) = q(uk, ui , ki ) (Conservation) (5.10a)q(u, u, i k) = f(u) i k (Consistency) (5.10b)
Condition (5.10a) is required to obtain a conservative scheme since it implies that
the integral of the flux computed at the cell interface Ci k is equal (up to the sign)
to the one computed at the cell interface Ck Ci . In terms of the numerical fluxfi k, the condition is
qik fik ik = fki ki qki ,
and it can be satisfied by selecting a symmetric numerical flux, namely, fik = fki ,since ik = ki .
The fully discrete form of (1.1) under the finite volume approximation is there-
fore,
|Ci | duidt
=
kNi,=q(ui , uk, ik)
eEi
,ei fi (t) (5.11)
where
,ei
def=
Ci en,
the functional form of the integrated numerical flux still remaining to be selected.
Consider now the following definition for the numerical flux
q(ui , uk, ik)def= ik
fi + fk2
12|ai k| (uk ui ) (5.12)
where a linearizationprojectedalong thedirection ik hasbeenintroduced, namely,
ai kdef=
i k fk fiuk ui
if uk = ui ,
i k d f(u)
du ui ukif uk = ui .
(5.13)
The integrated numerical flux (5.12) leads to well know first order (in space and
time) finite volume upwind scheme for the conservation law, namely,
|Ci |dui
dt=
kNi,=
ik
fi + fk2
12|ai k| (uk ui )
Ni
f, (5.14)
where the duplication or multiplication of the boundary nodes in 2D and 3D,
respectively, has been assumed to obtain the algorithmically more convenient rep-
resentation of the elemental contributions ,e
i to the averaged normal vectors.
43
7/27/2019 Node Pairs Report
54/185
5.3 The bridge between finite volumes
and finite elements
Let us assume that a finite volume discretization of a two-dimensional domain is
derived from the underlying grid of triangular elements in the following way:
Each element e of the grid is divided into three subelements delimited by
the medians of the triangle itself, as in figure 5.4. The sets i , k and jassociated with thevertices i , kand j of triangle e, respectively, aredelimited
by the two element sides from each node and the two segments that join the
middle of each element side to the center of gravity xg of the element, where
xgdef= 1|e|
e
x.
The finite volume Ci associated with node i is given by the union of all the
subelements having i as a vertex, namely,
Cidef=
eEi
i .
An example of a finite volumeC
i assembled following the above prescriptions isgiven in figure 5.4.
In [23], the following identities are given for metric quantities generated over
the finite volume dicretization described above:
|Ci | =
i
i =
kNiMi k = L i , (5.15a)
ik = ik, (5.15b)i = i . (5.15c)
The proof of the important relation (5.15a) is direct. It can be obtained by con-sidering a representative triangle of the mesh and focusing on that part of its area
contributing to the cell associated to one its vertex, the node i in relation (5.15a).
This portion of the triangle is defined by the medians and its area and can be cal-
culated geometricaly. On the other hand, the contribution to the mass elements
Mik coming from the integrals inside the considered triangle can be evaluated
analytically for linear interpolations.
For instance, let us consider the representative generic triangle with vertices
x1 = (0, 0), x2 = (a, 0) and x3 = (b, c), and let us takethe part inside this triangle
44
7/27/2019 Node Pairs Report
55/185
i
k
j
Ciei
e
k
ej
e
Figure 5.4: Construction of the finite volume Ci satisfying the finite elements/finite vol-umes equivalence requirements.
of cell around the node (0, 0) coincident with its first vertex. The intersection of
the medians of the triangle is easily find to be xm
=((a
+b)/3, c/3). Thus the
area A of the cell portion inside the triangle is made of two components and isgiven by
A = 12
a
2ym +
1
2
b2 + c2
2d
where d is the distance of xm to the triangle side oblique with respect to the
Cartesian axes. Since d = 13
ac/
b2 + c2, we obtain
A = ac12
+ ac12
= ac6
.
To evaluate (the contribution to) the mass elements M1,1, M1,2 and M1,3 the basis
functions over the considered triangle are needed. The three linear interpolation
functions are easily found to be
1(x, y) = 1 x
a
1 ba
yc
,
2(x, y) =x
a by
ac,
3(x, y) =y
c.
45
7/27/2019 Node Pairs Report
56/185
The integrals contributing to the mass elements are triangle
1k dx dy =c
0
d y
a+(b1)y/cby /c
1(x, y) k(x , y) d x.
By a change of variables y Y = y/c and x X = (x b)/a the threeintegrals give the mass contributions
M1,1 =ac
12, M1,2 =
ac
24, M1,3 =
ac
24,
which add to geometrical result A = ac/6, as required. This proof can beextended in three dimensions to tetrahedral elemenst with linear interpolations.
As a consequence, the upwind finite volume scheme (5.14) can be written in
terms of the finite element metric quantities introduced so far as
Lidui
dt=
kNi,=
i k
fi + fk2
12|aik| (uk ui )
Ni
f, (5.16)
where we recall the definition of the linearization projected along the direction ik
aik def= ik
fk fiuk
ui
if uk = ui
ik d f(u)
du
ui uk
if uk = ui .
It can be noticed that the above upwind finite volume method can be written in the
usual conservation form, i.e.,
L idui
dt=
kNi,=
qi k Ni
f,
by introducing the integrated numerical flux
qi k = i k fi + fk
2 1
2|aik| (uk ui ).
This result is importantbecause it shows that theunstructuredfinitevolume upwind
method presented here extends to multidimensional equations the schemes written
in conservation form for one-dimensional problems.
46
7/27/2019 Node Pairs Report
57/185
Chapter 6
Taylor-series-based integration
schemes
In this chapter we describe how to compute the terms occurring in LaxWendroff
scheme as well as in TaylorGalerkin scheme of Donea [3]. First, we examine
the second-order correction term arising from the Taylor expansion in time of the
multidimensional conservation law (1.1) for a scalar quantity u. Then, the Taylor
Galerkin scheme for a conservation law endowed with a linear flux function is
derived. In Appendix D, the numerical properties of the original TaylorGalerkin
scheme and of some two-step versions of it are recalled.
6.1 Nonlinear scalar conservation law
The TaylorGalerkin scheme is based on the idea of performing the discretization
in time before performing thediscretization in space; theformeris accomplished by
means of a Taylor expansion at time level n, while the latter is performed by means
of the standard Galerkin finite element method. More precisely, the unknown at
the new time level tn+1 is obtained by means of the following Taylor expansion attime tn
un+1 = un + ttun + 12 (t)2 2t un + 16 (t)3 3t un + O(t)4,where, with standard notation, the subscript indicates derivation with respect to
time. The terms involving the time derivative are obtained from the governing
equation, i.e.,
tu = f(u),
47
7/27/2019 Node Pairs Report
58/185
and by taking the time derivatives of the same equation to give,
2t u = t f =
t f = d f
dutu
=
d f
du( f)
= (a f),
where we have substituted for the advection velocity a = a(u) = d f(u)/du. Theweak form of the term (a f) is therefore easily found, using integration by
parts, in the form
, (a f)
=
, a f
+
n a f
= a , a u+ n a f,or, indicating explicitly the dependence on the unknown u,
, [a(u) f(u)]= a(u) , a(u) u+ n a(u) f(u). (6.1)
Thus, for the nonlinear conservation law tu + f(u) = 0, the second-orderterm of the TaylorGalerkin method gives a symmetric correction. This term is
the weak variational expression of the second-order directional derivative, along
the (local) direction of the advection field a(u).To simplify the exposition, the description of TG schemes considered so far
has not examined how to impose the boundary condition. We now discuss this
point and we distinguishbetween the case of a nonlinear conservation law and that
of a conservation law with a linear flux.
For the nonlinear conservation law, there is only one boundary term, namely, n a(u) a(u) u,
stemming from the integration by parts. Note that in this expression the vectoru
most be evaluated on the boundary where, in general, has a nonzero normal
component. The determination of this component involves also values ofu atinternal points of.
The semi-discrete equations for the TaylorGalerkin method for the scalar
conservation law reads
(, un+1 un)t
= , f(un)
n f(un)
t2
an, anun
+ t2
n an anun
48
7/27/2019 Node Pairs Report
59/185
6.2 The fully discrete form of the equations
Let us consider first the second-order TaylorGalerkin scheme (TG2 or L