journal of computational physics...248 v. joshi, r.k. jaiman / journal of computational physics 339...

38
Journal of Computational Physics 339 (2017) 247–284 Contents lists available at ScienceDirect Journal of Computational Physics www.elsevier.com/locate/jcp A positivity preserving variational method for multi-dimensional convection–diffusion–reaction equation Vaibhav Joshi, Rajeev K. Jaiman Department of Mechanical Engineering, National University of Singapore, 119077, Singapore a r t i c l e i n f o a b s t r a c t Article history: Received 1 May 2016 Received in revised form 14 January 2017 Accepted 4 March 2017 Available online 9 March 2017 Keywords: Positivity Multi-dimension Galerkin/Least-Squares Subgrid Scale Discrete Upwind A new positivity preserving variational (PPV) procedure is proposed to solve the convection– diffusion–reaction (CDR) equation. Through the generalization of stabilized finite element methods, the present variational procedure offers minimal phase and amplitude errors for different regimes associated with convection, diffusion and reaction effects. By means of Fourier analysis, we first review the shortcomings of the Galerkin/Least-Squares (GLS) and the Subgrid Scale (SGS) methods during the change in sign of the reaction coefficient that motivates us for the present linear stabilization as a combined GLS-SGS methodology. Discrete upwind operator with a solution-dependent nonlinear term is then introduced in high gradient regions, which enables the positivity preserving property in the variational formulation. Direct extension to multi-dimensions is carried out by considering the principle streamline and crosswind directions. The efficacy of the method is demonstrated by the systematic accuracy and stability analyses in one- and two-dimensions. Results show the reduction of oscillations in the solution in one- and two-dimensional cases and a remarkable reduction in the phase error is observed for the cases with negative reaction coefficient. The proposed formulation provides a superior solution in the reaction- dominated as well as the convection-dominated regimes due to the minimization of spurious oscillations and accurate capturing of the high gradient regions. © 2017 Elsevier Inc. All rights reserved. 1. Introduction Convection–diffusion–reaction equation is a continuous partial differential equation found in a wide range of physical systems ranging from Navier–Stokes, Helmholtz, Cahn–Hilliard, heat and mass transfer to turbulence transport equations. Numerical discretization inevitably introduces errors in the solution since the discrete computational domain cannot capture all the effects of the continuous equation. Of particular interest of this work is a generic CDR equation: ∂φ t + u ·∇φ −∇· (kφ) + sφ = f , (1) where φ is the unknown scalar variable, u, k, s and f are the convection velocity, diffusivity tensor (k = kI for isotropic diffusion, k and I being the diffusion coefficient and identity tensor respectively), reaction coefficient and source respectively. The first-order spatial derivatives in the equation constitute the convection which transports any information along the characteristic curves with a certain velocity u, the second-order spatial derivatives represent the diffusion which spreads * Corresponding author. E-mail addresses: [email protected] (V. Joshi), [email protected] (R.K. Jaiman). http://dx.doi.org/10.1016/j.jcp.2017.03.005 0021-9991/© 2017 Elsevier Inc. All rights reserved.

Upload: others

Post on 21-Jan-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

Journal of Computational Physics 339 (2017) 247–284

Contents lists available at ScienceDirect

Journal of Computational Physics

www.elsevier.com/locate/jcp

A positivity preserving variational method for

multi-dimensional convection–diffusion–reaction equation

Vaibhav Joshi, Rajeev K. Jaiman ∗

Department of Mechanical Engineering, National University of Singapore, 119077, Singapore

a r t i c l e i n f o a b s t r a c t

Article history:Received 1 May 2016Received in revised form 14 January 2017Accepted 4 March 2017Available online 9 March 2017

Keywords:PositivityMulti-dimensionGalerkin/Least-SquaresSubgrid ScaleDiscrete Upwind

A new positivity preserving variational (PPV) procedure is proposed to solve the convection–diffusion–reaction (CDR) equation. Through the generalization of stabilized finite element methods, the present variational procedure offers minimal phase and amplitude errors for different regimes associated with convection, diffusion and reaction effects. By means of Fourier analysis, we first review the shortcomings of the Galerkin/Least-Squares (GLS) and the Subgrid Scale (SGS) methods during the change in sign of the reaction coefficient that motivates us for the present linear stabilization as a combined GLS-SGS methodology. Discrete upwind operator with a solution-dependent nonlinear term is then introduced in high gradient regions, which enables the positivity preserving property in the variational formulation. Direct extension to multi-dimensions is carried out by considering the principle streamline and crosswind directions. The efficacy of the method is demonstrated by the systematic accuracy and stability analyses in one- and two-dimensions. Results show the reduction of oscillations in the solution in one- and two-dimensional cases and a remarkable reduction in the phase error is observed for the cases with negative reaction coefficient. The proposed formulation provides a superior solution in the reaction-dominated as well as the convection-dominated regimes due to the minimization of spurious oscillations and accurate capturing of the high gradient regions.

© 2017 Elsevier Inc. All rights reserved.

1. Introduction

Convection–diffusion–reaction equation is a continuous partial differential equation found in a wide range of physical systems ranging from Navier–Stokes, Helmholtz, Cahn–Hilliard, heat and mass transfer to turbulence transport equations. Numerical discretization inevitably introduces errors in the solution since the discrete computational domain cannot capture all the effects of the continuous equation. Of particular interest of this work is a generic CDR equation:

∂φ

∂t+ u · ∇φ − ∇ · (k∇φ) + sφ = f , (1)

where φ is the unknown scalar variable, u, k, s and f are the convection velocity, diffusivity tensor (k = kI for isotropic diffusion, k and I being the diffusion coefficient and identity tensor respectively), reaction coefficient and source respectively. The first-order spatial derivatives in the equation constitute the convection which transports any information along the characteristic curves with a certain velocity u, the second-order spatial derivatives represent the diffusion which spreads

* Corresponding author.E-mail addresses: [email protected] (V. Joshi), [email protected] (R.K. Jaiman).

http://dx.doi.org/10.1016/j.jcp.2017.03.0050021-9991/© 2017 Elsevier Inc. All rights reserved.

Page 2: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

the information throughout the domain and the term sφ denotes the reaction effect, which produces or destructs the information. The exact solution of Eq. (1) in one-dimension can be characterized based on the roots of the characteristic polynomial (the sign of D = |u|2 +4ks), if D ≥ 0 it is said to fall under the exponential regime with production for s < 0, and dissipation (or destruction) with s ≥ 0, and for D < 0, the solution constitutes the propagation regime. After discretization, the numerical solution of the CDR problem exhibits distinctive properties depending upon which physical effect of the equation is dominant and may manifest a boundary layer-like behavior near the regions with high gradients. The layers formed along the outflow boundaries are known as exponential layers while those along the tangential boundaries to the flow direction are termed as parabolic or characteristic boundary layers. Moreover, such layers can also manifest close to any sharp discontinuity inside the computational domain, referred to as parabolic or characteristic internal layers [1].

It is known that the standard Galerkin method produces spurious node to node oscillations in the numerical solution when convection effects are dominant [2]. One of the reasons is the inability of the scheme to resolve the high gradient lay-ers, which manifests as numerical oscillations in the computational domain. Therefore, several methods have been proposed to stabilize the solution through the Petrov–Galerkin perturbation of the underlying variational formulation which tends to capture the crucial subscale physical phenomena missed by insufficient mesh resolution. The added term acts as an up-winding function by removing the influence of outflow boundary condition on the convection term. This upwinding causes excessive crosswind diffusion and hence, was limited in the streamline direction. A consistent Streamline Upwind Petrov–Galerkin (SUPG) method was developed in [3] which introduces upwinding of the convection, transient as well as source terms. In the generalization of the analysis from one- to two-dimensions, the streamline direction may not be the most appropriate upwind direction [4]. It is observed that SUPG method does not avert overshooting and undershooting in the vicinity of the sharp layers (boundary and internal layers) in multi-dimensions. Furthermore, due to the loss of conservation of physical quantities at the discrete level and discontinuities in the domain, the numerical solution may be oscillatory or unbounded. The discrete maximum principle (DMP) preserves this positivity by avoiding any maxima or minima inside the domain. The algorithm proposed in [4] focused on making the element matrix non-negative to satisfy the DMP condition, but was restricted only for linear triangular elements. Another effort towards monotone methods with conservation proper-ties was performed in [6] where element geometry and flow rates were interpolated to approximate the convection term. Unfortunately, the above method was also limited to bilinear quadrilateral elements.

Nonlinear methods depending on the solution and satisfying the DMP condition were put forward to circumvent the Go-dunov’s theorem for finite difference approximation, which restricts the accuracy of a linear monotone method to first order [7]. In the field of finite element method, one of the successful attempts to satisfy the DMP was achieved in [8] whereby a nonlinear discontinuity capturing term was added to the variational formulation acting in the direction of the solution gra-dient. Generalization of SUPG and the discontinuity capturing term to coupled multi-dimensional systems were performed in [9] and [10] respectively. The space–time formulation with error estimates for SUPG in multi-dimensions was performed in [11]. A further modification to the discontinuity capturing term was carried out in Consistent Approximate Upwind (CAU) method [12]. This method manifested excessive diffusion in the regions of regular solution. Improving the drawbacks of the CAU method, the Streamline Approximate Upwind Petrov–Galerkin (SAUPG) method was proposed in [13] which behaved as SUPG near the regular solution and as CAU in proximity to the boundary layers. To improve the stability and convergence properties while maintaining accuracy, the least-squares framework was introduced [14] such as Galerkin/Least-Squares (GLS) method. The Gradient Galerkin/Least-Squares (GGLS) method was proposed in [15] which considered the least-square form of the gradient of the Euler–Lagrange equation for the stabilization. In another study by [16], GLS with discontinuity capturing term was generalized to the Euler and Navier–Stokes equations with a simplified formula for the stabilization parameter. A need for crosswind diffusion rather than an isotropic diffusion for the discontinuity capturing term was sug-gested in [17], which provided relatively accurate results with improved convergence. A comprehensive analysis on the performance of linear stabilization methods such as SUPG, Space–time Galerkin/Least-Squares (ST-GLS), Subgrid Scale (SGS), Characteristic Galerkin (CG) and Taylor Galerkin (TG) was performed in [18].

The origin of the stabilization parameter, the intrinsic time scale, was reviewed in [19,20] using the subgrid scale phe-nomena. While the large scales are resolvable by the variational finite element method, the small unresolvable scales are modeled via Fourier representation of the Green’s function of the subscale problem. The Residual-based Variational multi-scale (RBVMS) concept arises from the same multi-scale phenomena described above. The details of the method and its application to the Navier–Stokes equations can be found in [21,22]. Another attempt in explaining the stabilization pa-rameter was carried out with the aid of Taylor series and the concept of flow balance in a finite domain, which derived expressions using the Finite Increment Calculus (FIC) method in [23–25]. FIC method was extended to multi-dimensional systems in [26]. Apart from the formulations presented above, the concept of flux-corrected schemes (FEM-FCT) and total variational diminishing schemes (FEM-TVD) pertaining to finite element method were proposed in [27,28,5] which captured the discontinuities and shocks by adding an anti-diffusive flux to the first-order accurate (excessively diffusive) method generated by the discrete upwinding of the scheme, which are generally referred to as high resolution methods for finite-difference/finite-volume approximations [29].

Extension of the finite element stabilization to the transport equation containing reaction effects was carried out in [30] by adding a term depending on the magnitude of the solution gradient, known as SUPG with diffusion for reaction-dominated regions (SUPG+DRD). This method performed well for standalone convection- and reaction-dominated regimes, but was inaccurate when both the effects were dominant. Solving the issue posed by the method above, SUPG with Centered Petrov–Galerkin (SU+C)PG was proposed in [31] which satisfied the DMP and added a separate term for reaction dominated

Page 3: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 249

problems. Furthermore, the Galerkin/least-squares/gradient least-squares (GLS/GLS) method for convection–diffusion equa-tion with production was presented in [32] and transient convection–diffusion equation was shown to behave in a similar way as the transport equation with reaction effects in [33]. The expression for the stabilization parameter (τ ) for the CDR equation was derived to satisfy the DMP in [18], however it was concluded that none of the compared methods therein gen-erated a non-negative matrix in multi-dimensions. With the advent of the subgrid scale phenomena explaining the origins of τ , methods based on this model were proposed for reaction-dominated regime like the algebraic Subgrid Scale method (SGS) [34], Unusual Stabilized Finite Element Method (USFEM) and its variants [35], and methods employing the Green’s function approach [36,37]. A comparison between the effects of the expression of τ derived using variational multiscale (VMS) strategy and τ proposed in [18,16] was performed in [38]. Generalization of the CDR equation for distorted meshes employing the VMS approach of adding diffusion to the direction of maximum instability (where the element Peclet and Damkohler numbers are large) was carried out in [39]. Some of the recent works in the stabilization of CDR equation has been studied in [40,41] which employed the discrete upwind operator to maintain positivity in the solution (DMP condition) and proposed a nonlinear method to stabilize the solution in most of the convection- and reaction-dominated regimes.

The key objective of this work is to present a generalized stabilization method, which preserves positivity in the numer-ical solution at the element matrix level and maintains accuracy in the convection- and reaction-dominated regimes. While the SGS method traces the variation in the exact solution without any phase and amplitude changes in the production regime (s < 0), it is too diffusive in the destruction regime (s ≥ 0) whereas the GLS method has a phase error when s < 0. We first study this behavior through a detailed Fourier analysis of SGS and GLS methods and propose a combined GLS-SGS linear stabilization strategy. We also present the two-dimensional Fourier analysis of the CDR equation which has not been studied in the literature. To maintain the positivity in the solution, we then employ the discrete upwind algebraic operator at the element matrix level. This algebraic operator can be seen as an addition of diffusion to the equation for reducing the spurious oscillations in the numerical solution near the internal and boundary layers. This added diffusion is regulated by a nonlinear solution-dependent term and the method is generalized to multi-dimensions. The present method also aims at providing a stabilization technique which can be utilized with any element topology. The main characteristics of the proposed method are positivity, minimal phase and amplitude errors in the production regime while maintaining the gen-eralization to any element topology. Error analysis in one dimension showed reduced non-dimensionalized L2 error for the method with varying non-dimensional numbers based on the considered equation namely, Damköhler number (Da = sh/u) for convection–reaction equation and ψ = sh2/k for diffusion–reaction equation, with u, k, s and h being the convection ve-locity, diffusion coefficient, reaction coefficient and characteristic element length in one-dimension respectively. Test results in one- and two-dimensions are presented to demonstrate the positivity preserving property of the method.

The layout of the paper is as follows. Section 2 describes the proposed method dealing with the variational formulation of the problem and concepts leading to the development of our positivity preserving variational method. Error, convergence and Fourier analyses are performed in Section 3 while the numerical test results in one-dimension and two-dimensions are presented in Sections 4.1 and 4.2, respectively. Test cases and insights about the performance of the new method using unstructured and anisotropic grids are presented in Section 4.3. Finally, we conclude the paper with some key results in Section 5.

2. Positivity preserving variational method

2.1. Problem definition

Before introducing the method, the CDR equation (with φ as the scalar variable) is summarized in strong form as

∂φ

∂t+ u · ∇φ − ∇ · (k∇φ) + sφ = f , (2)

where φ = φ(x, t) is the scalar unknown which depends on the spatial coordinates, x ∈ � ⊂ Rnsd , nsd is the number of

spatial dimensions and time, t ∈]0, T [, T > 0; u(x) is the convection velocity; k = k(x) is the diffusivity tensor, s(x) is the reaction coefficient and f (x) is the source term. It is assumed that the diffusivity tensor k is isotropic, i.e., k = kI, I being the identity tensor and k = k(x) is a scalar positive quantity defined as the diffusion of the problem. The boundary of the computational domain � is given by � and is partitioned as the boundary on which Dirichlet conditions are satisfied �D

and those where Neumann conditions are specified �N , such that

� = �D ∪ �N , (3)

∅ = �D ∩ �N , (4)

with the boundary conditions given as

φ(x, t) =φD(x, t), ∀x ∈ �D , t ∈]0, T [, (5)

n(x) · k∇φ(x, t) = g(x, t), ∀x ∈ �N , t ∈]0, T [, (6)

Page 4: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

250 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

where n(x) is the outward normal vector to the surface boundary, φD (x, t) and g(x, t) are the specified Dirichlet and Neumann boundary conditions respectively. The initial condition for the problem is specified as

φ(x,0) =φ0(x), ∀x ∈ �. (7)

Our objective is to solve Eq. (2) with the given boundary conditions Eqs. (5), (6) and (7) while ensuring that the solution is non-oscillatory and positivity preserving.

2.2. Review of variational formulation

For completeness, we review the variational formulation and fully discrete equation using the θ -family of methods:

φn+θ − φn

θt+ u · ∇φn+θ − ∇ · (k∇φn+θ ) + sφn+θ = f , (8)

where θ is a parameter defining the weightage of the implicit method, with θ = 0 given by forward Euler method, θ = 0.5for mid-point rule and θ = 1.0 for Euler backward method, t is the time discretization step size, and

φn+1 =1

θφn+θ + θ − 1

θφn. (9)

Eq. (8) can also be expressed as

u · ∇φn+θ − ∇ · (k∇φn+θ ) + (s + 1

θt

)φn+θ = (

f + 1

θtφn). (10)

The above equation can be considered as a steady state equation with modified reaction coefficient and source. Let the modified coefficients be given by u, k, s and f defined as

u =u, (11)

k =k, (12)

s =s + 1

θt, (13)

f = f + 1

θtφn. (14)

Hence, we will now discretize the following equation in the spatial domain:

u · ∇φn+θ − ∇ · (k∇φn+θ ) + sφn+θ = f in �. (15)

Discretization of the domain � into nel number of elements is performed such that � = ∪nele=1�

e and ∅ = ∩nele=1�

e and considering Sh to be the space of trial solution, the values of which equal the given boundary condition on �D and Vh be the space of test functions which vanish in �D , the variational form of the CDR problem will be: find φh(x, tn+θ ) ∈ Sh such that ∀wh ∈ Vh:∫

(wh(u · ∇φh) − wh∇ · (k∇φh) + whsφh

)d� =

∫�

wh f d�, (16)

∫�

whφh|t=0d� =∫�

whφ0d�. (17)

Using the divergence theorem and the fact that wh = 0 on �D , Eq. (16) becomes∫�

(wh(u · ∇φh) + ∇wh · (k∇φh) + whsφh

)d� =

∫�

wh f d� +∫�N

wh gd�, ∀ wh ∈ Vh. (18)

Since the Galerkin finite element method is prone to spurious global oscillations and is unstable for large convection and reaction effects, various stabilization methods have been proposed which were discussed in the introduction. Some of the most commonly used methods are SUPG and GLS. The test function is perturbed to bring the effect of upwinding into the solution. The standard variational formulation for such methods is: find φh(x, tn+θ ) ∈ Sh such that ∀wh ∈ Vh:

Page 5: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 251

Table 1Differential operators on the weighting function for linear stabilization methods.

Method Stabilization operator (Lm)

SUPG u · ∇GLS u · ∇ − ∇ · (k∇) + sSGS u · ∇ + ∇ · (k∇) − sPresent (PPV) u · ∇ − ∇ · (k∇) + |s|

∫�

(wh(u · ∇φh) + ∇wh · (k∇φh) + whsφh

)d� +

nel∑e=1

∫�e

Lm whτ (Lφh − f )d� =∫�

wh f d� +∫�N

wh gd�, (19)

∫�

whφh|t=0d� =∫�

whφ0d�, (20)

where Lm is the operator on the weighting function given in Table 1 and the expression for the stabilization parameter τis [16]

τ =[(

1

θt

)2

+ 9

(4k

h2

)2

+(

2|u|h

)2

+ s2]−1/2

, (21)

where h is the characteristic element length and |u| is the magnitude of the convection velocity. The expression for τ has been thoroughly studied in the past with several definitions and its dependence on the equation coefficients and the mesh size can be estimated through the error analysis. We will discuss about the generality of the expression in Section 2.6. The residual-based weighting function vanishes on the element boundary and thus, is discontinuous across the elements. In other words, the stabilization term is defined only for the element interiors to approximate the subscale effects via the residual based stabilization parameter. We consider the residual of the CDR equation as

R(φh) = u · ∇φh − ∇ · (k∇φh) + sφh − f = Lφh − f , (22)

where L is the differential operator related to the differential Eq. (15).

2.3. Linear stabilization

The reaction coefficient can become positive or negative depending on the destruction or production effects. The SGS method performs well in the regime when the reaction coefficient (s) is negative, however it loses accuracy when s >> 0due to excessive dissipation [36]. While GLS method is not as diffusive as SGS for s ≥ 0, it suffers with phase error when s < 0 (shown in the Fourier analysis done in Appendix B and Appendix C). Hence, we propose a combination of these two methods to tackle this difficulty. Since linear and multi-linear elements are employed in the study, the effect of the diffusion term is assumed negligible in the differential operators. The following residual stabilization term is used in the proposed variational method:

nel∑e=1

∫�e

Lwhτ (Lφh − f )d�, (23)

where

L = u · ∇ − ∇ · (k∇) + |s| (24)

Here, the absolute value function F(x) = |x| is defined as

F(x) =

⎧⎪⎪⎨⎪⎪⎩

x, if x > 0,

0, if x = 0,

−x, if x < 0.

(25)

The above method will behave as GLS method for s ≥ 0 and as SGS when s < 0. We next present the design of positivity condition and nonlinear stabilization of our variational procedure for the CDR equation.

Page 6: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

252 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

2.4. Positivity and nonlinear stabilization

Although SUPG and GLS methods are successful in preventing the spurious oscillations observed in the Galerkin method, some overshoots and undershoots are observed where the gradient of the solution is high or where a sharp discontinuity is present. This is because neither of the above two methods are monotone or positivity preserving [17]. Physical solutions in nature should maintain the sign of their neighbor, precluding such oscillations. Hence, we look into some of the key criteria to enforce this property at the discrete level.

2.4.1. Condition for positivityA numerical method for solving a differential equation can be expressed as a system of linear equations of the form

Aφ = b where A is the left-hand side matrix, b is the right-hand side vector or force vector and φ is the vector of unknowns. The positivity property can be imparted to the matrix A by making it an M-matrix. Although due to the asymmetric convection terms and nonlinearity in the continuous differential equation such as Navier–Stokes, this property is generally not exhibited by A. Hence, we take the help of the discrete upwind operator which when operated on a matrix, converts it into an M-matrix, preserving the positivity [5]. The sufficient condition for positivity preservation for a matrix A = {aij} is∑

j

ai j ≥ 0, (26)

aij ≤ 0, ∀ j �= i. (27)

The discrete upwind operator has the following properties [5]:

dij = d ji = −max{0,aij,a ji},dii = −

∑j �=i

di j, (28)

where dij represents the elements of the discrete upwind matrix and aij denote the elements of the matrix on which the operator is applied (A in this case).

Remark 1. Galerkin, SUPG and GLS are not positivity preserving methods [17]. We know that the Galerkin solution leads to spurious global oscillations in the convection dominated regime. Addition of the linear stabilization term in SUPG and GLS does not satisfy the conditions (26) and (27) and hence they are not positivity preserving methods. The proposed method takes the combined GLS-SGS approach as the linear stabilization (which is not positivity preserving) and adds a nonlinear stabilization term to impart the desired positivity preserving property (which is presented in Section 2.4.2).

2.4.2. Enforcement of positivity condition in one-dimensionConsider the steady CDR equation in one-dimension:

udφ

dx− k

d2φ

dx2+ sφ = f , u ≥ 0. (29)

For simplicity, assume that only Dirichlet boundary conditions are specified and f = 0. The variational formulation gives: find φh(x) ∈ Sh such that ∀wh ∈ Vh:

∫�

(whu

dφh

dx+ dwh

dxk

dφh

dx+ whsφh

)d� +

nel∑e=1

∫�e

Lwhτ (Lφh)d� = 0, (30)

where L is the differential operator of the proposed method, i.e. in one-dimension, L = u ddx +|s| (diffusion term is neglected

here pertaining to the linear finite elements), which gives

∫�

(whu

dφh

dx+ dwh

dxk

dφh

dx+ whsφh

)d� +

nel∑e=1

∫�e

(udwh

dx+ |s|wh)τ (u

dφh

dx+ sφh)d� = 0. (31)

The finite element discretization of the above equation will lead to a system of linear equations of the formAφ = b, where A, φ and b are the left hand side assembled matrix, the vector of unknowns and the right hand side force vector respectively. Let Ae

c = [aec{i j}], Ae

d = [aed{i j}] and Ae

r = [aer{i j}] be the local element matrices for the first three

terms in Eq. (31) corresponding to convection, diffusion and reaction effects respectively. Assuming that the elements em-ployed in the discretization are two-node linear elements and wi = Ni be the shape functions at the corresponding nodes of the finite element, the matrices can be written as

Page 7: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 253

aec{i j} =

∫�e

NiudN j

dxd�,

aed{i j} =

∫�e

dNi

dxk

dN j

dxd�,

aer{i j} =

∫�e

Ni sN jd�,

which are computed to be

Aec = u

2

[−1 1−1 1

], Ae

d = k

h

[1 −1

−1 1

], Ae

r = sh

6

[2 11 2

], (32)

where h is the characteristic length of the element. Similarly, we can write each expression in the matrix form. For Eq. (30), the element level matrix Ae is given by

Ae =[

− u2 + k

h + sh3 + τu2

h − uτ s2 − uτ |s|

2 + τ s|s|h3

u2 − k

h + sh6 − τu2

h − uτ s2 + uτ |s|

2 + τ s|s|h6

− u2 − k

h + sh6 − τu2

h + uτ s2 − uτ |s|

2 + τ s|s|h6

u2 + k

h + sh3 + τu2

h + uτ s2 + uτ |s|

2 + τ s|s|h3

]. (33)

For matrix Ae , the discrete upwind operator is expressed as

De =[

max{ |u−uτ s+uτ |s||2 − k+τu2

h + (s+τ s|s|)h6 ,0} −max{ |u−uτ s+uτ |s||

2 − k+τu2

h + (s+τ s|s|)h6 ,0}

−max{ |u−uτ s+uτ |s||2 − k+τu2

h + (s+τ s|s|)h6 ,0} max{ |u−uτ s+uτ |s||

2 − k+τu2

h + (s+τ s|s|)h6 ,0}

](34)

= kadd

h

[1 −1

−1 1

], (35)

where kadd is

kadd = max{ |u−τus+τu|s||h

2 − (k + τu2) + (s+τ s|s|)h2

6 ,0}

(36)

This matrix De , when added to Ae converts it into an M-matrix, imparting the positivity property. The addition of this matrix can be considered as extra diffusion to the linear stabilized form of the problem, whereby a simple example of this matrix construction is shown in Appendix A. To counteract the loss of accuracy due to the extra diffusion, there is a need for a nonlinear regulation of this diffusion to selective elements. This regulation is provided by a solution-dependent parameter which makes the method nonlinear, adding the diffusion only to those elements where non-regular solution is present in the high gradient regions. As a result, the loss of accuracy is avoided in the regions of smooth solution where the nonlinear term has a small contribution owing to the negligible residual.

In one-dimension, the proposed discrete formulation for steady CDR equation is: find φh(x) ∈ Sh such that ∀wh ∈ Vh:

∫�

(wh(u

dφh

dx) + k

dwh

dx

dφh

dx+ whsφh

)d� +

nel∑e=1

∫�e

Lwhτ (Lφh − f )d�

+nel∑

e=1

∫�e

χ|R(φh)||∇φh| kadd dwh

dx

dφh

dxd� =

∫�

wh f d� +∫�N

wh gd�, (37)

where R(φh) is the residual of the given equation and χ is an expression depending on the problem constants (u, k, s

and h) to be defined which non-dimensionalizes |R(φh)||∇φh | by scaling it. The above added expression has been the standard

canonical form to add nonlinearity or discontinuity capturing to the linear stabilized equation in the literature. To define the parameter χ , we need to look into the variation of |R(φh)|

|∇φh | with s, u, k and h inside a finite element. We adopt a similar approach as taken in [40]. Consider a pure-reaction problem (sφ = f ). When applying the discrete upwind operator to the left-hand side of the matrix system in this case, we obtain a lumped mass matrix. Moreover, Gibbs oscillations can be prevented by using the lumped mass technique to solve such problems. Therefore, we determine |R(φh)|

|∇φh | by assuming that the solution approaches its lumped mass matrix approach counterpart. For that purpose, we consider a canonical example by defining the source f (x) as a step function

Page 8: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

254 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

f (x) ={

0, ∀x ∈ [0,0.25 + ηh],q, elsewhere,

(38)

where h is the element length, η is the location of the discontinuity in the function f (x). The lumped mass matrix solution is then given by

� =(

q

s

){0, . . . ,0,

(1 − η)2

2,(2 − η2)

2,1, . . . ,1

}. (39)

Let us observe how |R(φh)||∇φh | behaves inside the element containing the discontinuity at η. For this particular element,

R(φh) = sφh − f = q

((1 − ξ)

2

(1 − η)2

2+ (1 + ξ)

2

(2 − η2)

2

)− f , (40)

∇φh = q

2sh(2η − 2η2 + 1), (41)

which gives

|R(φh)||∇φh| =

∣∣∣∣R(φh)

∇φh

∣∣∣∣ =∣∣∣∣ sh

2

(1 − ξ)(1 − η)2 + (1 + ξ)(2 − η2)

2η − 2η2 + 1− 2 f sh

q(2η − 2η2 + 1)

∣∣∣∣. (42)

Considering the above ratio for all the elements, it is observed that

|R(φh)||∇φh| = |sφh − f |

|∇φh| =∣∣∣∣ sh

2p(η, ξ)

∣∣∣∣, (43)

where p(η, ξ) is a function depending on the location of the discontinuity η inside an element and the natural coordinate ξ and is defined as

p(η, ξ) =

⎧⎪⎪⎪⎨⎪⎪⎪⎩

(1−ξ)(1−η)2+(1+ξ)(2−η2)

2η−2η2+1− 4 f

q(2η−2η2+1), elements containing discontinuity,

(1 + ξ) − 4 fq(1−η)2 , elements adjacent to discontinuity,

0, elsewhere.

(44)

The added positivity preserving integral can be expressed as∫�e

χ|R(φh)||∇φh| kadd dwh

dx

dφh

dxd� =

∫�e

χ

∣∣∣∣ sh

2p(η, ξ)

∣∣∣∣kadd dwh

dx

dφh

dxd�. (45)

After the finite element discretization, let the local element matrix corresponding to the above term be denoted by K eadd

which can be written as

K eadd = kaddχ

h

∫�e

∣∣∣∣ sh

2p(η, ξ)

∣∣∣∣d�

[1 −1

−1 1

]. (46)

The above function can be integrated by using the property of the absolute function (Eq. (25)). After some algebraic ar-rangements, the above integral simplifies to

∫�e

∣∣∣∣ sh

2p(η, ξ)

∣∣∣∣d� =

⎧⎪⎨⎪⎩

|s|h2

2 r(η), elements containing discontinuity,|s|h2

2 , elements adjacent to discontinuity,

0, elsewhere,

(47)

where r(η) is a function of the location of the discontinuity inside the element (0 ≤ η ≤ 1) given as [40]

r(η) =[

1 + 2η(1 − η)[1 − 2η(1 − η)]1 + 2η(1 − η)

]. (48)

Now, we turn our attention to the undefined scaling parameter χ . Since the change of the variable in the integration to the local coordinates introduces a factor equal to the Jacobian of the element (h/2 in one-dimensional case), we do not consider this factor in defining χ because of its geometry-dependent property. Hence, we scale the integral as χ = 2/(|s|h) so that the regulatory term depends purely on the function r(η), which is essentially geometry independent. Let us consider two cases:

Case 1: For the convection–diffusion problem with f = 0,

Page 9: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 255

|R(φh)||∇φh| = |u∇φh|

|∇φh| = |u|. (49)

In this case, we define χ = 1/|u|.Case 2: For the diffusion–reaction equation, we construct the same expression for the integral as Eq. (45) which gives

χ = 2/(|s|h). The Laplacian operator is exactly zero for linear elements. However, it is very small for bilinear and trilinear finite elements. Hence, it has been neglected in this case. Hence, we can conclude that for the reaction dominated problems (u → 0), χ → 2/(|s|h) and for the convection dominated problems (s → 0), χ → 1/|u|. Therefore, χ can be defined as a combined expression as follows:

χ = 2

|s|h + 2|u| (50)

Remark 2. Notice that we have not made any assumption on the sign of the reaction coefficient s. The above evaluated integral will adjust itself accordingly. The absolute function takes care of the change in the sign of the reaction coefficient.

The above steps complete the formulation of positivity condition and the nonlinear stabilization in one-dimension. We next proceed to generalize the procedure to multi-dimensional CDR equation.

2.5. Extension to multi-dimensions

In multi-dimensions, the discrete form of the proposed formulation for steady CDR equation is: find φh(x) ∈ Sh such that ∀wh ∈ Vh: ∫

(wh(u · ∇φh) + ∇wh · (k∇φh) + whsφh

)d� +

nel∑e=1

∫�e

Lwhτ (Lφh − f )d�

+nel∑

e=1

∫�e

χ|R(φh)||∇φh| kadd

s ∇wh ·(

u ⊗ u

|u|2)

· ∇φhd� +nel∑

e=1

∫�e

χ|R(φh)||∇φh| kadd

c ∇wh ·(

I − u ⊗ u

|u|2)

· ∇φhd�

=∫�

wh f d� +∫�N

wh gd�, (51)

where kadds and kadd

c are the diffusion added in the streamline and crosswind directions respectively. The added diffusion required to satisfy the discrete maximum principle for the proposed stabilized method in one-dimension is given in Eq. (36). We will directly extend this formula to multi-dimensions by working in two principal directions namely, streamline and crosswind (Fig. 1). Implementation of the procedure requires only minor modifications to existing stabilized finite element codes.

Remark 3. The present PPV method adds diffusion in both the streamline and crosswind directions consistently so that in the case of velocity being perpendicular to the solution gradient, sufficient diffusion is added to maintain positivity and local boundedness (see Fig. 1(b)). We will show the effectiveness of the proposed treatment through a range of numerical experiments in Section 4.

First, we consider the streamline direction. The following expression adds diffusion in the streamline direction while maintaining the positivity property:

Stabilization terms =nel∑

e=1

∫�e

χ|R(φh)||∇φh| kadd

s ∇wh ·(

u ⊗ u

|u|2)

· ∇φhd�, (52)

where kadds is the added diffusion in the streamline direction given by

kadds = max

{ ||u| − τ |u|s + τ |u||s||h2

− (k + τ |u|2) + (s + τ s|s|)h2

6,0

}. (53)

While in the crosswind direction, we will add the following term:

Stabilization termc =nel∑

e=1

∫e

χ|R(φh)||∇φh| kadd

c ∇wh ·(

I − u ⊗ u

|u|2)

· ∇φhd�, (54)

Page 10: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

256 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. 1. Sketch of the residual-based stabilization inside a generic element with ABCD sub-domain boundary: (a) 4-noded quadrilateral element with con-vection velocity and the added diffusions kadd

s and kaddc in the streamline and crosswind directions respectively; (b) added diffusions and solution gradient

(∇φ) shown for designing positivity. Solid (red) and dashed (blue) lines represent the streamline and crosswind directions of the convection field respec-tively while solid (blue) line is the solution gradient vector. (For interpretation of the references to color in this figure, the reader is referred to the web version of this article.)

where kaddc is the added diffusion in the crosswind direction given by

kaddc = max

{ ||u| + τ |u||s||h2

− k + (s + τ s|s|)h2

6,0

}. (55)

Here, |u| = √uiui is the magnitude of the multi-dimensional velocity vector.

Remark 4. The formula derived in one-dimension for kadd has been directly extended to multi-dimensions. In one-dimension, there is no sense of the crosswind direction. Therefore, kadd in Eq. (36) is added along the streamline. In multi-dimensions, the proposed expression for added streamline diffusion is same as that in Eq. (36) pertaining to stream-line, but for the added crosswind diffusion in Eq. (55), the terms associated with the linear stabilization and convection velocity have been omitted. Assume that linear stabilization is added in streamline direction (SUPG), the terms in Eq. (36)depicting this streamline stabilization are | − τ |u|s|h/2 and τ |u|2. In crosswind direction stabilization, these terms will not be present, resulting in Eq. (55). This case is elaborated as follows. Suppose that we have SUPG stabilization in one-dimension, then the added term in the linear stabilization is

nel∑e=1

∫�e

udwh

dxτ

(u

dφh

dx+ sφh − f

)d�. (56)

The left hand side of the stabilized expression after finite element discretization can be written in the matrix form at the local element level as[

τu2

h − uτ s2 − τu2

h − uτ s2

− τu2

h + uτ s2

τu2

h + uτ s2

]. (57)

When we write the kadd expression for the SUPG method, these extra terms will correspond to the addition of diffusion in the streamline direction. Hence, the terms relating to the expressions above are omitted from the crosswind diffusion in Eq. (55).

Remark 5. The PPV method takes care of gradients in the solution in any direction. Earlier methods added null disconti-nuity capturing term when the convection velocity is perpendicular to the solution gradient. The present method adds the discontinuity capturing term in both the crucial directions and prevents any unwanted oscillations in the solution.

Remark 6. The present PPV method is slightly more diffusive than that proposed in [17,40,41]. Neglecting the effects of the added nonlinear diffusion in the streamline direction, the method can be simplified to that of [17] by using a factor of 0.7 rather than 1 in the first term of the kadd

c for the convection–diffusion equation:

Page 11: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 257

kaddc = max

{0.7|u|h2

− k,0}

(58)

We take the constant as 1 rather than 0.7 for maintaining positivity throughout the computational domain. With 0.7 as the multiplying factor, a non-regular solution near the boundary for 90◦ convection case is obtained, which is shown in the subsequent section describing the test results (Fig. 12(f)).

Remark 7. We have made only two assumptions in the above description of the method: (i) the diffusion is isotropic and (ii) higher order derivatives in the variational form and the differential operator of the stabilization term are neglected due to the use of linear and multi-linear finite elements.

Remark 8. Since the nonlinear expression has the absolute function, the computation of the derivative of this function is required for evaluating the Jacobian for implicit and nonlinear methods. Here, we have used Picard fixed-point procedure for the nonlinear iterations, meaning that the factor |R(φh)|/|∇φh| is evaluated using the values of the variable φh at the previous nonlinear step.

2.6. Characteristic element length scale

A general and precise definition of the element length scale poses a difficulty to the error analysis of the residual-based stabilization of the Galerkin formulation. In one-dimensional problem, it is straightforward to select the characteristic ele-ment length. Finding an appropriate length for an element in multi-dimensions is a challenging task, particularly for highly irregular and anisotropic elements. It was shown in [16] that under generalized isoparametric transformation, the formula for the stabilization parameter τ is given by

τ =[(

1

θt

)2

+ u · Gu + C Ik2G : G + s2

]−1/2

, (59)

where C I is a constant derived from inverse estimates [42] and G is the element contravariant metric tensor for isopara-metric mapping given by

G = ∂ξ T

∂x

∂ξ

∂x, (60)

where ξ and x are the vectors of natural and global coordinates, respectively. The above formula for τ reduces to Eq. (21)in case of one-dimension. Hence, in one-dimension

u · Gu =(

2u

h

)2

. (61)

One can define the characteristic element length in multi-dimensions such that one-dimensional equivalent streamline length scale is obtained. Such length scale has been used in the literature [43–45]:

hu = 2|u|√u · Gu

, (62)

where hu is the streamline element length and |u| = √uiui . The above length scale or the expression for τ in Eq. (59)

does not take into account the anisotropic character of the finite element, in particular when there is a large directionality mismatch between the equation coefficients and the wave vector associated to subscale physics. Due to this reason, when the element is anisotropic, we observe oscillations in the numerical solution for some of the cases. This was studied in [39]where a generalized Fourier analysis of the CDR equation was carried out. We will highlight some of the crucial points from that analysis.

It has been discussed in the introduction that the origin of the stabilization parameter comes from the multi-scale phenomenon in which we model the unresolved subgrid scales via residual-based stabilization. The approximation of stabi-lization parameter τ arises from the Fourier representation of the Green’s function for a subscale problem at the element level whereby the subscale term vanishes on the element boundary. Using the inverse Fourier transform in the wave vector space K, the stabilization parameter τ for the subscale problem can be written as [39]

τ =[(Ki K jk

ri j + s)2 + (K ju

rj)

2]−1/2

, (63)

where Ki and K j are the components of the wave vector K from the Fourier analysis, urj and kr

i j are the convection velocity and the diffusion coefficient of the transformed CDR equation in the local coordinates, i.e., ur

i = u j J−Ti j and kr

lm = J−Tmi ki j J−T

lj , J being the Jacobian of a finite element. If we neglect the directionality of the wave vector and write the terms in the above expression for τ , we get

Page 12: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

258 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Ki K jkri j ≈ ||K||2

√kr

i jkri j, (64)

K jurj ≈ ||K||||ur ||, (65)

where || · || is the invariant of the vector. When s = 0, the above expression is similar to Eq. (59). However, neglection of the directionality of the wave vector has consequences on an anisotropic grid with variable coefficients. A heuristic approach to find the direction where maximum instability occurs based on the element Peclet and Damkohler numbers was proposed in [39]. We employ a similar definition of the element length scale and demonstrate the method for anisotropic and unstructured grids in Section 4.3. For generality, the preceding developments can be extended to the time-dependent case by considering the transient term and deriving the added diffusion expressions similar to the above procedure.

3. Convergence and stability analysis

In this section, we systematically analyze the different methods for solving the one-dimensional CDR equation and as-sess the convergence, accuracy and stability properties of the proposed method. This comparison is conducted by means of computed solutions for a wide range of characteristic dimensionless parameters. First, to understand the behavior of dif-ferent methods with the non-dimensional numbers, the variation of non-dimensionalized L2 error with Da = sh/u (for the convection–reaction case) and with ψ = sh2/k (for the diffusion–reaction case) is analyzed. Then, the stability properties of the proposed method are described on the basis of Fourier analysis with quantification of the algorithmic damping and phase velocity (or algorithmic frequency) ratios. Finally, the mesh convergence study is performed to demonstrate the ac-curacy of a variety of methods for the steady state convection–reaction, diffusion–reaction and CDR equations. Throughout the error analysis, the non-dimensionalized L2 error is computed for fixed number of sample nodal points as

L2 error = ||φnumerical − φexact||2||φexact||2 , (66)

where φexact is the analytical value defined in Appendix D for the convection–reaction, the diffusion–reaction and the convection–diffusion equations and || · ||2 is the L2 norm.

3.1. Dependence of error on the non-dimensional parameters

We consider the one-dimensional problem for the error analysis by varying the non-dimensional numbers and keep-ing the element length to 0.1 (number of elements = 10 with domain length, L = 1) and 0.025 (number of elements = 40 with the same domain length). Without the loss of generality, the left-hand side Dirichlet condition is set to 1 with f = 0 for the convection–reaction case (since only one Dirichlet condition is required to solve the problem), while the left-hand side and right-hand side nodal values are 8 and 3 respectively with f = 0 for the diffusion–reaction case. One can observe from Figs. 2(a) and 2(c) that in the convection dominated regime (Da < 1), all the methods give a monotonically decreasing error, while for high Da, methods other than the present method behave like an asymptote to a constant value of the computed error. The present method minimizes the error even in the reaction dominated regime (Da > 1). Moreover, the error decreases with the increase in Da. This is due to the reduc-tion in the undershoots and overshoots of the solution near the boundary layers. The maximum error occurs around Da ≈ 10 for the coarse mesh and at around Da ≈ 1 for the fine mesh case. Similarly, from Figs. 2(b) and 2(d), SGS method behaves quite well for diffusion dominated regime (ψ < 1) with the same behavior of monotonically decreas-ing error with decreasing ψ . All the methods tend to achieve an asymptotic error at higher ψ , while the error norm decreases monotonically for the proposed method in the reaction dominated regime (ψ > 1). The performance of the PPV is very similar to that of SUPG and GLS in the diffusion dominated regime. The maximum error for the present method occurs around ψ ≈ 5 and ψ ≈ 1 for the coarse and fine meshes respectively. One can observe the improve-ment in the error norm for the proposed method with increasing both Da and ψ for the reaction dominated effects. This is mainly due to the preservation of the positivity property and the reduction of oscillations near the boundary layer.

The trend of an increase in the computed error at the middle of the regime of the non-dimensional numbers can be explained by the fact that with increase in Da (or ψ ), the boundary layer in the exact solution becomes sharper. Since we consider a fixed number of finite elements in the domain, the error depends on the behavior of each node to resolve the boundary layer. At lower Da (or ψ ), the reaction effects are small showing less error. With increase in the non-dimensional numbers, the ability of the method to resolve the layer is tested, which introduces some errors as the node of the element falls near the edge of the layer. Due to the efficacy in the positivity preservation, reduction of oscillations as well as the fixed number of elements, the error decreases for large dimensionless parameters for the present method as it approaches the nodally exact solution and the edge of the boundary layer recedes away from the node. The high error at the middle range of the non-dimensionalized parameters can be reduced through an adaptive refinement as shown in the finer mesh (Fig. 2(c–d)) where we observe a similar trend.

Page 13: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 259

Fig. 2. Dependence of non-dimensionalized L2 error on non-dimensional numbers as a function of: Da for convection–reaction equation with number of elements – (a) and (c); and ψ for diffusion–reaction problem – (b) and (d). Number of elements is kept constant at 10 for (a–b) and 40 for (c–d) with a domain length L = 1.

3.2. Two-dimensional Fourier analysis

It is now known that the assumption in the von Neumann analysis regarding the error dynamics following the discrete equation needs improvement [46,47]. In the von Neumann analysis, one does not observe any dispersion errors. Therefore, in this study, we employ the Fourier analysis assessing the dispersion as well as diffusion errors introduced by the discretiza-tion. We present the Fourier analysis of the PPV method without the nonlinear stabilization term. To analyze the stability and accuracy measures, the analysis has also been performed for the GLS and SGS methods in Appendix B and Appendix Cfor one- and two-dimensions respectively. Assuming the exact solution of the one-dimensional transient CDR equation as a Fourier series φ = Aeνt+iK x , where K is the spatial wave number and ν represents the evolution of the solution with time. ν can be expressed as ν = −ξ − iω, ξ and ω being the damping coefficient and frequency respectively and i = √−1. From the continuous equation, one can obtain

ξ = s + kK 2, (67)

ω = uK . (68)

The group velocity of the continuous equation is given as v g = ∂ω/∂ K = u. Similarly, expressing the discrete solution in terms of Fourier series, φh(x j, t) = Aeνht+iK jh , where νh = −ξh − iωh , ξh and ωh being the discrete counterparts of ξ and ω termed as algorithmic damping coefficient and algorithmic frequency respectively. It is assumed that there is a negligible error in the time discretization. The Fourier analysis of the proposed method in one-dimension leads to the following amplification factor:

νhPresent = 2(cos(Kh) − 1)(k + u2τ ) − sh2

3 (cos(Kh) + 2)(1 + |s|τ ) − ihusin(Kh)(1 − sτ + |s|τ ))

h2

3 (cos(Kh) + 2)(1 + |s|τ ) − ihuτ sin(Kh). (69)

Page 14: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

260 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

The above formula reduces to that of GLS method (Eq. (B.10)) when s ≥ 0 and to that of SGS method (Eq. (B.11)) when s < 0. Refer to the Appendix B for detailed steps.

The accuracy of the present scheme can be analyzed by expanding ξh and ωh as follows:

ωhPresent =uK + ukK 3τ −

(uK 5

180

)h4 +O(τt,t2, τ 2,h6), (70)

ξhPresent =s + kK 2 − |s|kK 2τ +

(kK 4

12

)h2 +O(τt,t2, τ 2,h4). (71)

The above expressions show that the accuracy of the algorithmic damping coefficient (ξh) and the algorithmic frequency (ωh) with respect to h will depend on the stabilization parameter τ when u �= 0. Hence, depending on which phenomenon among convection, diffusion and reaction is dominant, τ varies with h, according to Eq. (21). Further analysis is done by evaluating the algorithmic damping ratio (ξh/ξ ), the algorithmic frequency ratio (ωh/ω) and the group velocity ratio (vh

g/c) which is the ratio of the group velocity of the numerical scheme to that of the continuous differential equation. The plots of these ratios are given in Appendix B.1. The proposed PPV method has a relatively less damping than the SGS counterpart when s ≥ 0 and it behaves very similar to the GLS method. When s < 0, the proposed method adds appropriate damping compared to GLS which has a larger negative damping. In this range, the PPV behaves similar to that of the SGS method. Hence, the behavior of the present method will be the same as that of GLS for positive reaction and that of SGS for negative reaction. The variation of algorithmic frequency and algorithmic damping ratios with Kh are shown in Fig. B.1 for GLS and SGS methods. Further details of the Fourier analysis are given in Appendix B where we have also considered the fully discrete form of the equation.

Similarly in two dimensions, the exact solution is assumed as φ = Aeνt+iK·x , where K = K cosαi + K sinαj and x are the wave vector and the position vector respectively. For simplicity, it is assumed that the velocity vector u = ui + vj has the same direction as that of the wave vector. The damping coefficient and frequency for the continuous CDR equation are given by

ξ = s + kK 2, (72)

ω = |u|K . (73)

The detailed analysis in two-dimensions is presented in Appendix C. The amplification factor in two-dimensions for the present method can be expressed as

νhPresent = 1

γ h2x MxM y(1 + |s|τ ) − iτhx(uγ M ysinαx + vMxsinαy)

×[

2Mx(cosαy − 1)

γ(k + τ v2) + 2M y(cosαx − 1)γ (k + τu2) − 2τuvsinαxsinαy

− sγ h2x MxM y(1 + |s|τ ) − ihxuγ M ysinαx(1 − sτ + |s|τ ) − ihx vMxsinαy(1 − sτ + |s|τ )

], (74)

where hx , γ , αx , αy , Mx and M y are defined in Appendix C. The above expression can be reduced to its one-dimensional counterpart if the wave vector is considered along the coordinate directions. The phase velocity ratio is defined as ωh/ωand the damping ratio as ξh/ξ . The polar plots of the phase velocity ratio and the damping ratio are given in Fig. 3. From the analysis done in Appendix C, one can make similar inference as in one-dimension. SGS method is more diffusive and has more phase error when s ≥ 0, while it behaves well for s < 0. We next turn our attention to the issue of accuracy of the new variational scheme, in particular with regard to the convergence rate of various stabilized finite element meth-ods.

3.3. Mesh convergence study

The truncation error in a discretization scheme can be obtained by expanding the stencil using Taylor’s series and then subtracting the given differential equation from it. Herein we consider the linear stabilized (GLS) discretized form of steady CDR equation:(

− u

2h− k

h2+ s

6− u2τ

h2+ uτ s

2h− uτ s

2h+ s2τ

6

)φh

j−1 +(

2k

h2+ 2s

3+ 2u2τ

h2+ 2s2τ

3

)φh

j

+(

u

2h− k

h2+ s

6− u2τ

h2− uτ s

2h+ uτ s

2h+ s2τ

6

)φh

j+1 = 0. (75)

Expanding φhj+1 and φh

j−1 around φhj and rearranging, we obtain the modified equation which is solved by the numerical

method [48] as

Page 15: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 261

Fig. 3. Variation of phase velocity and damping ratios with α for different Khx/π ∈ [0, 1] for convection–diffusion–reaction problem for the present method: phase velocity ratio for (a) positive reaction, (c) negative reaction; damping ratio for (b) positive reaction, (d) negative reaction.

udφ

dx− k

d2φ

dx2+ sφ +

(− u2 d2φ

dx2+ s2φ

)τ + k

12

d4φ

dx4h2 +

(− u2

12

d4φ

dx4+ s2

6

d2φ

dx2

)τh2 +O(τ 2,h4) = 0. (76)

The local truncation error of the scheme is defined as the difference between the modified equation and the actual differ-ential equation, which can be written as follows:

εGLS =(

− u2 d2φ

dx2+ s2φ

)τ + k

12

d4φ

dx4h2 +

(− u2

12

d4φ

dx4+ s2

6

d2φ

dx2

)τh2 +O(τ 2,h4). (77)

In the convection–reaction regime (k = 0), the coefficient corresponding to τ becomes zero using rearrangement and substi-tution from the original convection–reaction equation. This makes the leading error of the order τh2. Since τ is of the order h when the mesh is refined, GLS is formally third-order accurate in this regime. Galerkin method is fourth-order accurate

Page 16: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

262 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. 4. Mesh convergence study for various finite element methods through dependence of non-dimensionalized L2 error as a function of uniform mesh refinement h: (a) convection–reaction; (b) diffusion–reaction; (c) CDR (destruction) and (d) CDR (production) problem. Number of elements is increased by decreasing h.

since τ = 0 and k = 0. While in the diffusion–reaction regime (u = 0), GLS is second-order accurate since τ will be of order h2 as mesh is refined.

Similarly, the truncation error for the SGS method can be written as

εSGS =(

− u2 d2φ

dx2− 2us

dx− s2φ

)τ + k

12

d4φ

dx4h2 +

(− u2

12

d4φ

dx4− us

3

d3φ

dx3− s2

6

d2φ

dx2

)τh2 +O(τ 2,h4). (78)

For the SGS method, we observe a third-order of accuracy in the convection–reaction regime which is related to the can-cellation of the coefficient of τ in the truncation error. Although in the diffusion–reaction regime, we observe a peculiar fourth-order of accuracy for the SGS method. This could be seen if we manipulate the terms in the error such that the second-order terms get canceled. Assuming that refinement of mesh could be interpreted as increase in the diffusion effects of the equation, we can approximate the stabilization parameter as

τ ≈ h2

12k. (79)

Substituting this term in −s2τφ above and manipulating k12

d4φ

dx4 h2, we observe that these terms indeed get canceled. More-

over, the order of τ is h2 in this case leading to the order of truncation as τh2 which makes the solution fourth-order accurate.

For the proposed method, the truncation error in the steady state model problem is given by

εPresent = − χ|R(φ)||∇φ| kadd d2φ

dx2+

(− u2 d2φ

dx2− us

dx+ u|s|dφ

dx+ s|s|φ

)τ +

(k

12

d4φ

dx4− 1

12χ

|R(φ)||∇φ| kadd d4φ

dx4

)h2

+(

− u2

12

d4φ

dx4− us

6

d3φ

dx3+ u|s|

6

d3φ

dx3+ s|s|

6

d2φ

dx2

)τh2 +O(τ 2,h4). (80)

Page 17: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 263

Fig. 5. Variation of scalar field φ of the steady CDR equation in one-dimension in the three canonical regimes: (a) convection–diffusion (Pe = 1, f = 1, (0, 0)); (b) convection–reaction (Da = 10, f = 1, inlet Dirichlet condition = 0); (c) diffusion–reaction (ψ = 10, f = 1, (0, 0)).

The proposed method is at least second-order accurate in all the regimes except the convection–reaction where we see a third-order of accuracy and in the propagation regime where a fourth-order of accuracy is observed. This can be explained as follows. Under the asymptotic convergence regime, the residual of the equation tends to be negligible leading to the behavior of the method to be that of its parent linear method, i.e., GLS when s ≥ 0 and SGS when s < 0. This is observed in the convergence plots as the trend of the error follows that of the parent method. The properties shown above about the accuracy are confirmed by the mesh convergence plots in Fig. 4. The parameters such as convection velocity (u), diffusion coefficient (k) and reaction coefficient (s) are kept constant while varying the element length (h) during the uniform mesh refinement in the convergence study. The convergence of solution with respect to element size (h) is shown in Figs. 4(a), 4(b), 4(c) and 4(d) for the convection–reaction, the diffusion–reaction, the CDR with destruction and production cases re-spectively. For the CR equation, u = 1, s = 50, f = 0 with left-hand node assigned value of 1; while for the DR equation, k = 0.01, s = 50, f = 0, left-hand and right-hand nodes have values of 8 and 3 respectively. u = 4, k = 0.01 and f = 1 with Dirichlet condition of 0 is imposed at both the extreme nodes with s = 60 for the CDR equation with destruction effects and s = −6 for the CDR equation with production effects. The number of elements is increased by a factor of 2 from 10 to 2560. Three comments can be made from the mesh convergence plots. Firstly, the measured slope of the PPV method is higher than 2 for the steady convection–reaction equation, as shown in Fig. 4(a). Secondly, the GLS, SUPG and the present PPV methods provide second-order accuracy for the diffusion–reaction and the CDR equations. Finally, the SGS shows an order of accuracy up to 4 for the diffusion–reaction and the CDR equations, as shown in Figs. 4(b)–(d). Although the mesh convergence study has been done for the steady CDR equation, Fourier analysis of the transient CDR equation has been carried out in Appendix B and Appendix C and Section 3.2.

4. Numerical results

To further assess the accuracy of the PPV scheme and compare against other stabilized finite element methods, we present detailed results for one-dimensional and two-dimensional cases for wide ranging conditions of the CDR equation. Furthermore, we demonstrate the generality of the method for unstructured and anisotropic two-dimensional meshes.

Page 18: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

264 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

4.1. One-dimensional cases

First, we test several one-dimensional steady state cases for verification. A domain of length L = 1 is discretized with 10linear one-dimensional elements. The categories of various cases are as follows:

• Canonical forms– Convection–diffusion equation: Pe = 1 with f = 1 and (0, 0) (Fig. 5(a))– Convection–reaction equation: Da = 10 with f = 1 and inlet condition = 0 (Fig. 5(b))– Diffusion–reaction equation: ψ = 10 with f = 1 and (0, 0) (Fig. 5(c))

• With source term ( f �= 0)– Pe = 0.01 and Da = 100 with (0, 0) (Fig. 6(a))– Pe = 1 and Da = 10 with (0, 0) (Fig. 6(b))– Pe = 10 and Da = 1 with (0, 0) (Fig. 6(c))

• Without source term ( f = 0)– Pe = 0.1 and Da = 10 with (0, 1) (Fig. 7(a))– Pe = 1 and Da = 10 with (8, 3) (Fig. 7(b))– Pe = 10 and Da = 10 with (0, 1) and (1, 0) (Figs. 7(c) and 7(d))– Pe = 10 and Da = 0.1 with (1, 0) (Fig. 7(e))– Pe = 10 and Da = 0.2 with (8, 3) (Fig. 7(f))– Pe = 10 and Da = 1 with (8, 3) (Fig. 7(g))– Pe = 1 and Da = 60 with (8, 3) (Fig. 7(h))

• Production regime (s < 0)– Exponential regime (u2 + 4ks ≥ 0)

* Pe = 1 and Da = −0.4 with (0, 1) (Fig. 8(a))* Pe = 1.5 and Da = −0.5 with f = 1 and (0, 0) (Fig. 8(b))* Pe = 9 and Da = −0.15 with (0, 1) and (1, 0) (Figs. 8(c) and 8(d))

– Propagation regime (u2 + 4ks < 0)* Pe = 0.05 and Da = −3 with (0, 1) (Fig. 9(a))* Pe = 0.1 and Da = −6 with (0, 1) (Fig. 9(b))* Pe = 0.15 and Da = −9 with (0, 1) and (1, 0) (Figs. 9(c) and 9(d))

where Pe = uh/2k, Da = sh/u and ψ = sh2/k and the values in brackets refer to the left and right Dirichlet boundary node values respectively. The following key observations can be made from the steady one-dimensional study. The proposed method preserves positivity and precludes oscillations associated with the positivity and monotonicity violation. The other methods such as SUPG, GLS and SGS lack the enforcement of positivity and local boundedness property. The PPV method behaves quite well for the propagation regime similar to the SGS method (Fig. 9) with minimal phase error, which is analyzed in Appendix B and Appendix C and shown in Section 2.3. The SGS method is excessively diffusive for high Da and Pe numbers (Figs. 7(c) and 7(h)). The Galerkin solution is very oscillatory in Figs. 8(c) and 8(d) and is partially shown.

To examine the performance of PPV method in the transient regime, the convection of two rectangular pulses is consid-ered as the test problem for the transient CDR equation in one-dimension. The case is similar to that considered in [40]. The time integration is carried out by the Crank–Nicholson method with the nonlinear iterations via Picard fixed-point proce-dure. A total of 200 linear two-node elements is employed, and t is chosen as 0.002s with convection velocity u = 1 and k = s = f = 0. The progress of the rectangular pulse at t = 0s, t = 0.1s and t = 0.5s is shown in Fig. 10. The initial condition is

φ(x, t = 0) ={

1, ∀ x ∈ [0.1,0.2] ∪ [0.3,0.4],0, else.

Clearly, no oscillations are observed during the convection of the discontinuous rectangular pulses. The solution is smooth and the symmetry of the profile is maintained at all times.

4.2. Two-dimensional cases

We next consider a computational domain consisting of 20 × 20 and 80 × 80 bilinear structured quadrilateral elements for testing some two-dimensional steady state cases. Cases are similar to those taken in [41]. Following test examples for the steady-state CDR equation in 2D are considered:

1. Convection–diffusion problem with unit convection velocity skewed to the mesh at δ = 0◦ , 30◦ , 45◦ , 60◦ and 90◦ with |u| = 1, k = 10−8, s = 0 and f = 0 (Fig. 12)

2. Convection–diffusion problem with constant source term. u = (1, 0), k = 10−8, s = 0 and f = 1 (Fig. 13(a))3. Diffusion–reaction problem with constant source term. u = (0, 0), k = 10−8, s = 1 and f = 1 (Fig. 13(b))

Page 19: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 265

Fig. 6. Solution of the scalar field φ of the steady CDR equation in one-dimension by setting the source term, f �= 0: (a) Pe = 0.01, Da = 100, f = 1, (0, 0); (b) Pe = 1.0, Da = 10, f = 1, (0, 0); (c) Pe = 10, Da = 1.0, f = 1, (0, 0).

4. Convection–diffusion problem with varying velocity and constant source term. u = (y, −x), k = 10−8, s = 0 and f = 1(Fig. 13(c))

5. Convection–diffusion with discontinuous source term. u = (1, 0), k = 10−8, s = 0 and f (x ≤ 0.5, y) = 1, f (x > 0.5, y) =−1 (Fig. 13(d))

The solution is observed to be slightly more diffusive as discussed in Remark 6. However, the internal and exponential layers are captured accurately with minimal oscillations, even the 90◦ skewed convection has less oscillation in the bound-ary. In Fig. 13(d), we observe some negative variation in the numerical solution for the refined case. This appears in the region where the source term f < 0. This shortcoming is generally manifested by all the discontinuity capturing methods which are based on the Petrov–Galerkin framework [49].

To examine the transient CDR equation in two-dimensions, pure convection of a circular bubble is simulated with a velocity at 45◦ with the X-axis [50,41]. u = (0.5, 0.5), k = 10−30, s = 0 and f = 0. A mesh of 300 × 300 was used with the Crank–Nicholson time integration method and t = 0.005s. The initial condition is

φ(r, t = 0) =H(R − |r − rc|), (81)

where H() is the Heaviside function given by

H(y) = 1 + sgn(y)

2=

⎧⎪⎪⎨⎪⎪⎩

0, y < 0,

0.5, y = 0,

1, y > 0,

where sgn(y) is defined by y|y| , rc is the center of the circular bubble (0.5, 0.5), r is the position vector in the computational

domain and R = 0.25. The domain size is [0, 3] × [0, 3]. The results are shown in Fig. 14. It can be observed that the amplitude of the circular bubble is maintained in the convection process with no observed oscillations in the solution. The solution is monotone visually and the mesh resolves the important characteristics of the solution. Table 2 depicts the comparison of the extreme values of the obtained numerical solution with that of the exact one for all the two-dimensional test cases considered. For generality, we next present some test cases in two-dimensions using unstructured and anisotropic meshes and give some insights about the performance of the proposed method.

Page 20: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

266 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. 7. Solution of the scalar field φ of the steady CDR equation in one-dimension by setting the source term, f = 0: (a) Pe = 0.1, Da = 10, (0, 1); (b) Pe = 1.0, Da = 10, (8, 3); (c) Pe = 10, Da = 10, (0, 1); (d) Pe = 10, Da = 10, (1, 0); (e) Pe = 10, Da = 0.1, (1, 0); (f) Pe = 10, Da = 0.2, (8, 3); (g) Pe = 10, Da = 1.0, (8, 3); (h) Pe = 1.0, Da = 60, (8, 3).

Page 21: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 267

Fig. 8. Solution of the steady CDR equation in one-dimension in the exponential regime: (a) Pe = 1.0, Da = −0.4, f = 0, (0, 1); (b) Pe = 1.5, Da = −0.5, f = 1, (0, 0); (c) Pe = 9.0, Da = −0.15, f = 0, (0, 1); (d) Pe = 9.0, Da = −0.15, f = 0, (1, 0). The Galerkin solution is very oscillatory and hence is shown partially in Figs. 8(c) and 8(d).

Fig. 9. Solution of the steady CDR equation in one-dimension in the propagation regime: (a) Pe = 0.05, Da = −3.0, f = 0, (0, 1); (b) Pe = 0.1, Da = −6.0, f = 0, (0, 1); (c) Pe = 0.15, Da = −9.0, f = 0, (0, 1); (d) Pe = 0.15, Da = −9.0, f = 0, (1, 0).

Page 22: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

268 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. 10. Solution of the transient CDR equation in one-dimension: transient convection of two rectangular pulses, u = 1, k = s = f = 0.

Fig. 11. Schematic diagrams of the two-dimensional steady test cases: (a) convection–diffusion problem with unit skewed convection velocity, s = 0, f =0; (b) convection–diffusion problem with constant source term, s = 0, f = 1; (c) diffusion–reaction problem with constant source term, s = 1, f = 1; (d) convection–diffusion problem with varying velocity and constant source term, s = 0, f = 1; (e) convection–diffusion problem with discontinuous source term, s = 0, f (x ≤ 0.5, y) = 1, f (x > 0.5, y) = −1. The diffusion coefficient (k) is taken constant with a value of 10−8 for all the cases.

4.3. Non-uniform unstructured and anisotropic meshes

To further assess the generality and robustness of the positivity preserving property, we present some numerical results for unstructured isotropic, structured anisotropic and unstructured anisotropic quadrilaterals. We consider the computational domain � = [0, 1] × [0, 1] for the following three cases:

1. Skewed convection–diffusion problem at 60◦ with |u| = 1, k = 10−8, s = 0 and f = 0 (Fig. 11(a))2. Convection–diffusion problem with constant source term with u = (1, 0), k = 10−8, s = 0 and f = 1 (Fig. 11(b))3. Diffusion–reaction problem with no convection with u = (0, 0), k = 10−8, s = 1, f = 1 (Fig. 11(c))

where the boundary conditions are described in the figure. We employ three types of meshes for the assessment:

• Mesh A: Unstructured quadrilateral in 20 × 20 grid (Fig. 15(a))• Mesh B: Structured anisotropic quadrilateral in 10 × 100 grid (Fig. 15(b))• Mesh C: Unstructured anisotropic quadrilateral in 20 × 100 grid (Fig. 15(c))

The meshes employed for the different cases are plotted in Figs. 15(a–c) while the numerical solution is superimposed for each case in the same figure. The unstructured meshes are created by perturbing the coordinates of the elements inside the domain of the structured mesh through a pseudo-random process given by

xu = xs + hxδxrand, (82)

yu = xs + hyδyrand, (83)

Page 23: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 269

Fig. 12. Solution of the steady CDR equation in two-dimensions at 20 ×20 and 80 ×80 mesh resolutions: convection–diffusion problem with unit convection velocity skewed at (a) 0◦; (b) 30◦; (c) 45◦; (d) 60◦; (e) 90◦; and (f) 90◦ (Codina [17]).

Page 24: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

270 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. 13. Solution of the steady CDR equation in two-dimensions at 20 × 20 and 80 × 80 mesh resolutions: (a) convection–diffusion problem with constant source term; (b) diffusion–reaction problem with constant source term; (c) convection–diffusion problem with varying velocity and constant source term; (d) convection–diffusion problem with discontinuous source term.

Page 25: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 271

Fig. 14. Solution of the transient CDR equation in two-dimensions: transient convection of a circular bubble with the convection velocity at an angle of 45◦with the X-axis, k = 10−30, s = 0, f = 0 at (a) t = 1s; (b) t = 2s, (c) t = 3s; (d) t = 4s.

where (xu, yu) and (xs, ys) represent the nodal coordinates of the unstructured and structured meshes respectively, hx and hy are the mesh size of the structured mesh in x- and y-directions respectively and δx and δy are the mesh distortion parameters in the respective directions with rand representing uniformly distributed random numbers in the interval (0, 1). For mesh A, we consider the mesh resolution hx = hy = 1/20 and δx = δy = 0.5 while for mesh C, we have hx = 1/20, hy = 1/100, δx = 0.2 and δy = 1.0. The plots show that the defined length scale behaves reasonably well for the cases con-

Page 26: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

272 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Table 2Quantification of the minimum and maximum values of the variable φ for the different test cases in two-dimensions.

Case max(φ) max(φexact) min(φ) min(φexact)

Fig. 12(a) (20 × 20) 1.00002 1.0 −4.06514 × 10−6 0.0Fig. 12(a) (80 × 80) 1.00001 1.0 −3.40949 × 10−6 0.0Fig. 12(b) (20 × 20) 1.00165 1.0 0.0 0.0Fig. 12(b) (80 × 80) 1.00165 1.0 −2.60600 × 10−6 0.0Fig. 12(c) (20 × 20) 1.00077 1.0 0.0 0.0Fig. 12(c) (80 × 80) 1.00077 1.0 0.0 0.0Fig. 12(d) (20 × 20) 1.00102 1.0 0.0 0.0Fig. 12(d) (80 × 80) 1.00102 1.0 −5.67374 × 10−7 0.0Fig. 12(e) (20 × 20) 1.01578 1.0 0.0 0.0Fig. 12(e) (80 × 80) 1.01634 1.0 0.0 0.0Fig. 13(a) (20 × 20) 0.94999 0.95 0.0 0.0Fig. 13(a) (80 × 80) 0.98749 0.9875 0.0 0.0Fig. 13(b) (20 × 20) 1.00527 1.0 0.0 0.0Fig. 13(b) (80 × 80) 1.00532 1.0 0.0 0.0Fig. 13(c) (20 × 20) 1.50854 <1.5708 0.0 0.0Fig. 13(c) (80 × 80) 1.55723 <1.5708 0.0 0.0Fig. 13(d) (20 × 20) 0.50833 0.5 −0.01208 0.0Fig. 13(d) (80 × 80) 0.50208 0.5 −0.04734 0.0Fig. 14(a) 1.0 1.0 0.0 0.0Fig. 14(b) 1.0 1.0 0.0 0.0Fig. 14(c) 0.99999 1.0 0.0 0.0Fig. 14(d) 0.99999 1.0 0.0 0.0

Table 3Quantification of the minimum and maximum values of the variable φ for the different test cases in two-dimensions: unstructured and anisotropic meshes.

Case max(φ) max(φexact) min(φ) min(φexact)

Fig. 15(d) 1.0756 1.0 0.0 0.0Fig. 15(e) 1.1111 1.0 −1.1959 × 10−4 0.0Fig. 15(f) 1.1313 1.0 0.0 0.0Fig. 15(g) 1.0012 <1.0 0.0 0.0Fig. 15(h) 0.8999 <1.0 0.0 0.0Fig. 15(i) 1.0787 <1.0 0.0 0.0Fig. 15(j) 1.0305 1.0 0.0 0.0Fig. 15(k) 1.0 1.0 0.0 0.0Fig. 15(l) 1.0728 1.0 0.0 0.0

sidered herewith. It is worth pointing that high oscillations are observed for the anisotropic cases when the element length scale corresponding to Eq. (62) is considered. These oscillations are reduced when we use the length scale which takes into account the directionality of the wave vector (Eq. (63)). The comparison of the maximum and minimum values of the numerical solution with the exact solution for the cases is quantified in Table 3. From the minimum and maximum length scales obtained by locating the direction of maximum instability [39], the range of the non-dimensional parameters namely Peclet number (Pe), Damkohler number (Da) and ψ has been summarized in Table 4. From the tests on unstructured and anisotropic grids, we observe that the spurious oscillations are reduced when the convection or the reaction effects are dominant. The internal layers in two-dimensions are captured with reasonable accuracy in the skewed convection case with unstructured quadrilaterals (Fig. 15(d)) while small oscillations are observed for the under-resolved and highly anisotropic meshes at the extreme values of non-dimensional parameters for the other cases. Based on these numerical experiments using anisotropic length scale and linear finite elements, the positivity behavior of the present method has been demon-strated.

To summarize, the accuracy and convergence properties of the PPV method have been systematically examined for a wide range of parameters using both one-dimensional and two-dimensional discretizations of the CDR equation. The results presented above lead to the following remarkable findings: (i) the PPV method maintains the positivity property in all the regimes of the non-dimensional parameters, (ii) in the propagation regime of steady CDR equation, the PPV scheme provides a minimal phase error while the GLS and SUPG methods suffer from significant phase errors and for the exponential production regime, the performance of the PPV and SGS is comparable with regard to the accuracy measures, (iii) for the steady 2D cases, the PPV method captures the internal and exponential layers with minimal oscillations even for the 90◦ skewed convection, and (iv) the method behaves quite well for non-uniform unstructured and anisotropic grids under different convection- and reaction-dominated regimes.

Page 27: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 273

Fig. 15. Three representative unstructured and anisotropic grids: (a) mesh A, (b) mesh B, (c) mesh C. Results of the steady CDR equation in two-dimensions for skewed convection–diffusion problem at 60◦ (second row); convection–diffusion problem with constant source term (third row); diffusion–reaction problem (fourth row).

Page 28: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

274 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Table 4The range of non-dimensional parameters: unstructured and anisotropic meshes.

Case Pe = |u|h/(2k) Da = sh/|u| ψ = sh2/k

Fig. 15(d) 1.395 × 106 − 3.875 × 106 0 0Fig. 15(e) 4.33 × 106 0 0Fig. 15(f) 1.755 × 106 − 2.595 × 106 0 0Fig. 15(g) 1.18 × 106 − 3.895 × 106 0 0Fig. 15(h) 5 × 106 0 0Fig. 15(i) 1.35 × 105 − 3.01 × 106 0 0Fig. 15(j) 0 ∞ 1.354 × 105 − 6.972 × 105

Fig. 15(k) 0 ∞ 1 × 106

Fig. 15(l) 0 ∞ 1.648 × 105 − 3.634 × 105

5. Conclusions

The design of a novel positivity preserving variational method has been presented for solving convection–diffusion–reaction equation. A residual-based linear stabilization with absolute reaction term has been proposed to minimize the amplitude and phase errors in the production regime based on the Fourier analysis performed for one- and two-dimensional CDR equation. Spurious oscillations found near the boundary and internal layers in the conventional linear stabilized meth-ods such as SUPG, GLS and SGS are reduced by the addition of nonlinear diffusion depending on the residual of the equation. Through the discrete upwind operator technique, the expression for the added nonlinear diffusion is constructed in one-dimension and then generalized to multi-dimensions by considering the crucial streamwise and crossflow directions. The definition of the characteristic element length establishes the generality of the method with regard to element topology. A systematic error analysis has been conducted for a range of non-dimensional parameters including the convection, diffu-sion as well as the reaction effects. It is found that the present method is at least second-order accurate for the range of non-dimensional numbers and provides a superior non-negative solution in the convection- and reaction-dominated regions by preventing the oscillations and accurately capturing the boundary and internal layers for structured and unstructured anisotropic grids. Moreover, the slightly more diffusive character of the method has been aimed to maintain positivity in all the regimes. The generality of the method makes its application very flexible and the prospect of its use to model complex physical systems with unstructured finite element meshes.

Acknowledgements

The first author would like to thank for the financial support from National Research Foundation through Keppel-NUS Corporate Laboratory. Special thanks to Prashanth Nadukandi for crucial inputs and suggestions. The conclusions put forward reflect the views of the authors alone, and not necessarily those of the institutions.

Appendix A. One-dimensional analysis of the element matrix

Consider the steady CDR equation in one-dimension:

udφ

dx− k

d2φ

dx2+ sφ = f . (A.1)

For simplicity, assume that only Dirichlet boundary conditions are specified and f = 0. The variational formulation gives: find φh(x) ∈ Sh such that ∀wh ∈ Vh:∫

(whu

dφh

dx+ dwh

dxk

dφh

dx+ whsφh

)d� = 0. (A.2)

After linear finite element discretization in one-dimension, the above equation can be written as a system of linear equa-tions, Aφ = b. Let Ae be the local matrix at the element level. Using Eq. (32),

Ae =[

− u2 + k

h + sh3

u2 − k

h + sh6

− u2 − k

h + sh6

u2 + k

h + sh3

]. (A.3)

Case 1. Convection–reaction equation (k = 0): Let Da = sh/u be the non-dimensional number representing the ratio of reaction to convection effects. Note that in this case, the first row non-diagonal element is positive for positive convection velocity and reaction coefficient, thus violating the positivity property (Eq. (27)). Although it seems that Ae is violating the positivity property for all cases when u > 0 and s > 0, the method behaves well until Da = 2.5 (observed in the performed numerical simulations). This can be explained by the fact that the conditions of monotonicity are sufficient but not necessary for positivity. Hence, the convection–reaction equation solution behaves as positivity preserving for some small Da.

Page 29: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 275

Case 2. Diffusion–reaction equation (u = 0): Let ψ = sh2/k be the representative non-dimensional number for this case. It is observed from Eq. (A.3) that the non-diagonal elements are positive when the reaction effects are in excess to those of the diffusion, i.e., when (k/h) < (sh/6) or ψ > 6.

Case 3. Convection–diffusion equation (s = 0): Pe = uh/2k is the non-dimensional number depicting the ratio of convection to diffusion effects. The non-diagonal element of the first row is positive when the convection effects are dominating to those of the diffusion, i.e., when (u/2) > (k/h) or Pe > 1.

Since the positivity property is violated for many different regimes, we enforce this property with the help of the discrete upwind operator. For matrix Ae , the operator is given by

De =[

max{ |u|2 − k

h + sh6 ,0} −max{ |u|

2 − kh + sh

6 ,0}−max{ |u|

2 − kh + sh

6 ,0} max{ |u|2 − k

h + sh6 ,0}

]= kadd

h

[1 −1

−1 1

], (A.4)

where kadd can be considered as the added diffusion to the original equation which is expressed as

kadd = max{ |u|h

2− k + sh2

6,0

}. (A.5)

This diffusion matrix when added to Ae transforms it as (for positive u)

Ae = Ae + De =

[sh2 0

−u u + sh2

]. (A.6)

The above matrix is positivity preserving since it has positive row rum and non-diagonal elements are less than or equal to zero. The above simple formulation confirms that the positivity and local boundedness can be restored in the finite element method in a relatively simple manner.

Appendix B. Fourier analysis in one-dimension

For the Fourier analysis, the boundary conditions are assumed to be periodic throughout the domain. Similar to [51], let us express the exact solution of the transient CDR equation as a Fourier series

φ = Aeνt+iK x, (B.1)

where K is the spatial wave number and ν denotes the evolution of the solution with respect to time. ν can be written as

ν = −ξ − iω, (B.2)

ξ and ω being the damping coefficient and frequency respectively and i = √−1. Substituting (B.1) and (B.2) in the transient form of Eq. (A.1),

ξ =s + kK 2, (B.3)

ω =uK . (B.4)

We define the phase speed for the continuous CDR equation by

c = ω

K. (B.5)

The group velocity is defined by [51,47]

v g = ∂ω

∂ K= c = u. (B.6)

Discretizing the continuous equation using the finite element method, we obtain the following three-point semi-discrete stencil for the linear GLS method:

h

6

[1 4 1

]φh + uτ

2

[1 0 −1

]φh + sτh

6

[1 4 1

]φh + u

2

[−1 0 1]φh

−k

h

[1 −2 1

]φh + sh

6

[1 4 1

]φh − u2τ

h

[1 −2 1

]φh + uτ s

2

[1 0 −1

]φh

+uτ s

2

[−1 0 1]φh + τ s2h

6

[1 4 1

]φh = 0, (B.7)

where φh represents the time derivative of the unknown variable vector φh .

Page 30: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

276 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

B.1. Semi-discrete analysis

In the semi-discrete domain, the solution is assumed as φh(x j, t) = Aeνht+iK jh , where νh = −ξh − iωh , ξh and ωh being the algorithmic damping coefficient and algorithmic frequency respectively and A is a constant. Moreover, it is assumed that the time discretization has negligible error. For the discrete equation, the phase speed is given by

ch = ωh

K. (B.8)

The group velocity for a numerical scheme is defined by [51]

vhg = ∂ωh

∂ K, (B.9)

which is not equal to the group velocity of the continuous differential equation, i.e., c or u. Putting the above expressions in the stencil formula, it can be shown that

νhGLS = 2(cos(Kh) − 1)(k + u2τ ) − sh2

3 (cos(Kh) + 2)(1 + sτ ) − ihusin(Kh)

h2

3 (cos(Kh) + 2)(1 + sτ ) − ihuτ sin(Kh). (B.10)

Similarly, for the SGS method,

νhSGS = 2(cos(Kh) − 1)(k + u2τ ) − sh2

3 (cos(Kh) + 2)(1 − sτ ) − ihusin(Kh)(1 − 2sτ ))

h2

3 (cos(Kh) + 2)(1 − sτ ) − ihuτ sin(Kh). (B.11)

Further analysis is done to quantify the phase velocity ratio (or algorithmic frequency ratio) and the diffusivity (or algorith-mic damping ratio) of the method by evaluating ωh and ξh . The phase velocity ratio for the semi-discrete numerical scheme is defined by ch/c = ωh/ω. The algorithmic damping ratio is given by ξh/ξ while the group velocity ratio is given by vh

g/c. The non-dimensional wave number K = Kh is defined such that it is equal to the element Damköhler number, Da = sh/u. The parameters u, k and K are kept constant and the element length (h) is varied from 0 to π/K . They are plotted against the non-dimensional wavenumber Kh in Fig. B.1. The ideal continuous problem will have no phase error and damping ratio, shown as ωh/ω = 1 and ξh/ξ = 1 respectively and the group velocity will be equal to the convection velocity vh

g = c. It is observed from Fig. B.1 that SGS method has high phase error and is highly damped at high positive Da. However, GLS method adds appropriate amount of damping or diffusion. When the reaction coefficient is negative, SGS method performs better than GLS with respect to phase error in both phase velocity as well as group velocity ratios. It also provides sufficient damping while damping of GLS is more negative compared to that of the Galerkin method. The accuracy of the scheme can be analyzed by expanding the expressions for algorithmic frequency and algorithmic damping coefficient as follows:

ωhGLS =uK + ukK 3τ −

(uK 5

180

)h4 +O(τt,t2, τ 2,h6), (B.12)

ξhGLS =s + kK 2 − skK 2τ +

(kK 4

12

)h2 +O(τt,t2, τ 2,h4). (B.13)

Similarly, for the SGS method,

ωhSGS =uK + ukK 3τ −

(uK 5

180

)h4 +O(τt,t2, τ 2,h6), (B.14)

ξhSGS =s + kK 2 + skK 2τ +

(kK 4

12

)h2 +O(τt,t2, τ 2,h4). (B.15)

The order of accuracy of ωh and ξh depends on the reliance of the stabilization parameter τ on h. For Galerkin method (τ = 0), ωh and ξh are fourth-order and second-order accurate respectively. Stability and accuracy analysis for the SGS and SUPG methods was also performed in [52] and [53] respectively, however the expression for the stabilization parameter τwas different. Moreover, constant Damköhler number and element length were assumed with varying wavenumber unlike the above analysis where the wavenumber is defined equal to the element Damköhler number.

B.2. Fully discrete analysis

In the fully discrete domain, the solution is assumed as φh(x j, tn) = Aeνhnt+iK jh , where t and n are the discretized time step size and the time step respectively. Let ζ h = eνht be the amplification factor of the scheme. Putting the above expressions in the stencil formula, it can be shown that for the backward Euler implicit time integration scheme,

Page 31: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 277

Fig. B.1. Variation of phase velocity, damping and group velocity ratios with K = Kh for convection–diffusion–reaction problem for different numerical schemes: phase velocity ratio for (a) positive reaction, (d) negative reaction; damping ratio for (b) positive reaction, (e) negative reaction; group velocity ratio for (c) positive reaction, (f) negative reaction. The plots for the proposed method will be similar to those of GLS method for positive reaction and those of SGS method for negative reaction.

ζ hGLS = (2 + cosK )(1 + sτ ) − i3uτ sinK

(2 + cosK )(1 + sτ )(1 + s) + 6(k + u2τ )(1 − cosK ) + i3usinK (1 − τ ), (B.16)

where all the variables are non-dimensionalized as follows:

K = Kh, (B.17)

u = ut

h, (B.18)

k = kt

h2, (B.19)

s = st, (B.20)

τ = τ

t. (B.21)

Similar fully discrete analysis was carried out in [54]. For the SGS method,

ζ hSGS = (2 + cosK )(1 − sτ ) − i3uτ sinK

(2 + cosK )(1 − sτ )(1 + s) + 6(k + u2τ )(1 − cosK ) + i3usinK (1 − τ − 2sτ ). (B.22)

For further analysis, we notice that ζ h has both real and imaginary parts. Let ζ h = ζ hreal + iζ h

imag, where ζ hreal and ζ h

imag are the real and imaginary parts of the amplification factor for the respective scheme. Some of the quantities are defined below which are used in the analysis [46,47,55]:

|ζ h| =([

ζ hreal

]2 + [ζ h

imag

]2)1/2

, (B.23)

Page 32: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

278 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. B.2. Contours of the magnitude of the amplification factor (|ζ h|), the phase velocity ratio (ch/c) and the group velocity ratio (vhg/c) for GLS and SGS

methods when the reaction coefficient is positive (s ≥ 0).

tanβ = −ζ himag

ζ hreal

, (B.24)

ch

c= β

ωt= β

cKt, (B.25)

vhg

c= 1

hu

dK, (B.26)

where |ζ h| is the amplitude of the amplification factor of the scheme, ch is the numerical phase velocity, β is known as the phase shift, ω is the frequency of the continuous CDR equation defined earlier, vh

g is the numerical group velocity and c is the group velocity of the continuous CDR equation, i.e., c = u. The contours of these quantities are depicted in Figs. B.2and B.3 for positive and negative reaction coefficients respectively. The abscissa shows the Courant number u = ut/h and the ordinate represents the non-dimensional wavenumber K = Kh which is assumed to be equal to the Damköhler number. The parameters u, k and K are kept constant and the element length (h) is varied from 0 to π/K . t is varied such that the Courant number u varies from 0 to π . When the reaction coefficient is positive, |ζ h| ≤ 1 over the whole plot for both GLS and SGS methods. Moreover, the phase and group velocity ratio plots are similar for both the methods. However, due to excess diffusion in SGS method, we choose GLS in this regime. For the case when the reaction coefficient is negative, SGS seems to be stable for the whole regime. Furthermore, the phase velocity ratio becomes negative and has a jump discontinuity for the GLS method. The group velocity ratio plot shows negative values for both GLS and SGS methods, but SGS is better in this case since the minimum ratio is −3.085 compared to that in GLS which is −6123.188. These negative values of the group velocity ratio represent the upstream propagation of the signal waves which was also observed for the pure convection in [47,55].

Such detailed analysis dealing with the Galerkin method, SUPG for linear interpolation functions and higher order in-terpolations for convection equation was carried out in [47]. The proposed PPV method is a combination of GLS and SGS

Page 33: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 279

Fig. B.3. Contours of the magnitude of the amplification factor (|ζ h|), the phase velocity ratio (ch/c) and the group velocity ratio (vhg/c) for GLS and SGS

methods when the reaction coefficient is negative (s < 0).

methods. It behaves as GLS method when s ≥ 0 and as SGS when s < 0 for linear and multi-linear elements. This ensures that the phase and accuracy of the method is maintained to the highest possible level.

Appendix C. Fourier analysis in two dimensions

The procedure is similar to that followed in [56]. Let the wave vector be K = K cosαi + K sinαj and the velocity vector be u = ui + vj in two dimensions with α denoting the wave propagation direction. The wave vector and the velocity vectors are assumed to be aligned in the same direction for simplicity so that u = |u|cosα and v = |u|sinα. The nodal locations are given by mhx and nhy for a point (xm, yn) with aspect ratio, γ = hy/hx with hx and hy denoting the grid size in the two coordinate axes respectively. Let us express the exact solution of the transient CDR equation as a Fourier series

φ = Aeνt+iK·x, (C.1)

where K is the spatial wave vector, x is the position vector and ν denotes the evolution of the solution with respect to time. The damping coefficient and frequency for the continuous CDR equation in two-dimensions can be obtained as

ξ =s + kK 2, (C.2)

ω =|u|K . (C.3)

The following semi-discrete stencil is used for the linear GLS method in two-dimensions (contains a total of 9 nodes with node of coordinate (xm, yn) at the center surrounded by four elements):

hxhy

36

1 4 1

4 16 4

1 4 1

φh + uτhy

12

1 0 −1

4 0 −4

1 0 −1

φh + vτhx

12

−1 −4 −1

0 0 0

1 4 1

φh

Page 34: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

280 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

+ sτhxhy

36

1 4 1

4 16 4

1 4 1

φh + uhy

12

−1 0 1

−4 0 4

−1 0 1

φh + vhx

12

1 4 1

0 0 0

−1 −4 −1

φh

+ shxhy

36

1 4 1

4 16 4

1 4 1

φh − τ

6

u2 hyhx

− 3uv + v2 hxhy

−2u2 hyhx

+ 4v2 hxhy

u2 hyhx

+ 3uv + v2 hxhy

4u2 hyhx

− 2v2 hxhy

−8(u2 hy

hx+ v2 hx

hy

)4u2 hy

hx− 2v2 hx

hy

u2 hyhx

+ 3uv + v2 hxhy

−2u2 hyhx

+ 4v2 hxhy

u2 hyhx

− 3uv + v2 hxhy

φh

+ sτuhy

12

−1 0 1

−4 0 4

−1 0 1

φh + sτ vhx

12

1 4 1

0 0 0

−1 −4 −1

φh + uτ shy

12

1 0 −1

4 0 −4

1 0 −1

φh + vτ shx

12

−1 −4 −1

0 0 0

1 4 1

φh

+ s2τhxhy

36

1 4 1

4 16 4

1 4 1

φh − k

6

hyhx

+ hxhy

−2 hyhx

+ 4 hxhy

hyhx

+ hxhy

4 hyhx

− 2 hxhy

−8(hy

hx+ hx

hy

)4 hy

hx− 2 hx

hy

hyhx

+ hxhy

−2 hyhx

+ 4 hxhy

hyhx

+ hxhy

φh = 0. (C.4)

The φh denotes the time derivative of the unknown variable and periodic boundary condition is assumed over the entire domain. Also, for simplicity, the analysis is carried out in the semi-discrete form assuming that negligible error occurs in the time discretization. In the discrete domain, the solution is assumed as φh((m, n), t) = Aeνht+iKhx(mcosα+nγ sinα) . Putting this expression in the stencil formula, we get

νhGLS = 1

γ h2x MxM y(1 + sτ ) − iτhx(uγ M ysinαx + vMxsinαy)

×[

2Mx(cosαy − 1)

γ(k + τ v2) + 2M y(cosαx − 1)γ (k + τu2) − 2τuvsinαxsinαy

− sγ h2x MxM y(1 + sτ ) − ihx(uγ M ysinαx + vMxsinαy)

], (C.5)

where

αx =Khxcosα, (C.6)

αy =Khysinα = Kγ hxsinα, (C.7)

Mx =cosαx + 2

3, (C.8)

M y =cosαy + 2

3. (C.9)

Similarly, for the SGS method,

νhSGS = 1

γ h2x MxM y(1 − sτ ) − iτhx(uγ M ysinαx + vMxsinαy)

×[

2Mx(cosαy − 1)

γ(k + τ v2) + 2M y(cosαx − 1)γ (k + τu2) − 2τuvsinαxsinαy

− sγ h2x MxM y(1 − sτ ) − ihxuγ M ysinαx(1 − 2sτ ) − ihx vMxsinαy(1 − 2sτ )

]. (C.10)

One can observe the similarity in the above expressions compared with those of one-dimensional analysis. The two-dimensional expression reduces to the one-dimensional one along the coordinate directions. The phase velocity ratio is defined as ωh/ω and the damping ratio as ξh/ξ . Since the wave propagation direction α is an extra parameter, polar plots with α as azimuthal coordinate and the phase velocity ratio or the algorithmic damping ratio as the radial coordinate with

Page 35: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 281

Fig. C.1. Variation of phase velocity and damping ratios with α for different Khx/π ∈ [0, 1] for convection–diffusion–reaction problem with positive reaction: phase velocity ratio for (a) GLS, (b) SGS; damping ratio for (c) GLS, (d) SGS. The plots for the proposed method will be similar to those of GLS method in this regime.

the aspect ratio of γ = 1/2 are shown in Figs. C.1 and C.2 for positive and negative reaction respectively. Similar observa-tions can be made for the two-dimensional results from the polar plots. The semi-discrete wave velocity will be equal to the continuous wave velocity in the absence of phase error from h → 0 to the grid Nyquist limit. Hence, the ideal phase speed ratio curves are circular with ωh/ω = 1. For positive reaction coefficient (Figs. C.1(a) and (b)), the GLS method has less phase error compared to the SGS method since it is more closer to the ideal circular curve of zero phase error. Moreover, SGS is more diffusive than the GLS method (Figs. C.1(c) and (d)). In the negative reaction regime (Fig. C.2), SGS method behaves quite well with less phase error and damping than the GLS method.

Similar analysis for finite difference methods was carried out in [57] for the pure convection problem where the dis-persion error was characterized in terms of the phase velocity and group velocity ratios in the two independent directions. Convection–diffusion equation under the finite element framework was analyzed in [56].

Page 36: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

282 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

Fig. C.2. Variation of phase velocity and damping ratios with α for different Khx/π ∈ [0, 1] for convection–diffusion–reaction problem with negative reac-tion: phase velocity ratio for (a) GLS, (b) SGS; damping ratio for (c) GLS, (d) SGS. The plots for the proposed method will be similar to those of SGS method in this regime.

Appendix D. Exact solutions in one-dimension

For the sake of completeness, we present analytical solution of the one-dimensional CDR equation:

udφ

dx− k

d2φ

dx2+ sφ = f . (D.1)

Let L be the length of the computational domain, A and B be the Dirichlet conditions specified at the left-hand and right-hand extreme nodes respectively. Let m1 = −u+

√u2+4ks

−2k , m2 = −u−√

u2+4ks−2k ,

C1 = Aem2 L − fs (em2 L − 1) − B

m L m L, (D.2)

e 2 − e 1

Page 37: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 283

C2 =A − C1 − f

s. (D.3)

The exact solution is given by

φ(x) = C1em1x + C2em2x + f

s. (D.4)

The exact solution for each of the canonical cases, i.e., convection–reaction, diffusion–reaction and convection–diffusion can be derived similarly in a simple manner.

References

[1] M. Stynes, Steady-state convection–diffusion problems, Acta Numer. 14 (2005) 445–508.[2] T.J.R. Hughes, Finite Element Methods for Convection Dominated Flows, vol. 34, ASME, New York, 1979.[3] A.N. Brooks, T.J.R. Hughes, Streamline upwind/Petrov–Galerkin formulations for convection dominated flows with particular emphasis on the incom-

pressible Navier–Stokes equations, Comput. Methods Appl. Mech. Eng. 32 (1) (1982) 199–259.[4] A. Mizukami, T.J.R. Hughes, A Petrov–Galerkin finite element method for convection-dominated flows: an accurate upwinding technique for satisfying

the maximum principle, Comput. Methods Appl. Mech. Eng. 50 (2) (1985) 181–193.[5] D. Kuzmin, R. Löhner, S. Turek, Flux-Corrected Transport: Principles, Algorithms and Applications, Springer, 2005.[6] J.G. Rice, R.J. Schnipke, A monotone streamline upwind finite element method for convection-dominated flows, Comput. Methods Appl. Mech. Eng.

48 (3) (1985) 313–327.[7] R.J. LeVeque, Numerical Methods for Conservation Laws, Birkhäuser Verlag, Basel, Boston, 1992.[8] T.J.R. Hughes, M. Mallet, A. Mizukami, A new finite element formulation for computational fluid dynamics: II. Beyond SUPG, Comput. Methods Appl.

Mech. Eng. 54 (3) (1986) 341–355.[9] T.J.R. Hughes, M. Mallet, A new finite element formulation for computational fluid dynamics: III. The generalized streamline operator for multidimen-

sional advective–diffusive systems, Comput. Methods Appl. Mech. Eng. 58 (3) (1986) 305–328.[10] T.J.R. Hughes, M. Mallet, A new finite element formulation for computational fluid dynamics: IV. A discontinuity-capturing operator for multidimen-

sional advective–diffusive systems, Comput. Methods Appl. Mech. Eng. 58 (3) (1986) 329–336.[11] T.J.R. Hughes, L.P. Franca, M. Mallet, A new finite element formulation for computational fluid dynamics: VI. Convergence analysis of the generalized

SUPG formulation for linear time-dependent multidimensional advective–diffusive systems, Comput. Methods Appl. Mech. Eng. 63 (1) (1987) 97–112.[12] A.C. Galeão, E.G. Dutra do Carmo, A consistent approximate upwind Petrov–Galerkin method for convection-dominated problems, Comput. Methods

Appl. Mech. Eng. 68 (1) (1988) 83–95.[13] E.G. Dutra do Carmo, G.B. Alvarez, A new stabilized finite element formulation for scalar convection–diffusion problems: the streamline and approxi-

mate upwind/Petrov–Galerkin method, Comput. Methods Appl. Mech. Eng. 192 (2003) 3379–3396.[14] T.J.R. Hughes, L.P. Franca, G.M. Hulbert, A new finite element formulation for computational fluid dynamics: VIII. The Galerkin/least-squares method

for advective–diffusive equations, Comput. Methods Appl. Mech. Eng. 73 (2) (1989) 173–189.[15] L.P. Franca, E.G. Dutra do Carmo, The Galerkin gradient least-squares method, Comput. Methods Appl. Mech. Eng. 74 (1989) 41–54.[16] F. Shakib, T.J.R. Hughes, Z. Johan, A new finite element formulation for computational fluid dynamics: X. The compressible Euler and Navier–Stokes

equations, Comput. Methods Appl. Mech. Eng. 89 (1991) 141–219.[17] R. Codina, A discontinuity-capturing crosswind-dissipation for the finite element solution of the convection–diffusion equation, Comput. Methods Appl.

Mech. Eng. 110 (1993) 325–342.[18] R. Codina, Comparison of some finite element methods for solving the diffusion–convection–reaction equation, Comput. Methods Appl. Mech. Eng.

156 (1) (1998) 185–210.[19] T.J.R. Hughes, Multiscale phenomena: Green’s functions, the Dirichlet-to-Neumann formulation, subgrid scale models, bubbles and the origins of stabi-

lized methods, Comput. Methods Appl. Mech. Eng. 127 (1) (1995) 387–401.[20] T.J.R. Hughes, G.R. Feijóo, L. Mazzei, J.B. Quincy, The variational multiscale method—a paradigm for computational mechanics, Comput. Methods Appl.

Mech. Eng. 166 (1998) 3–24.[21] Y. Bazilevs, V.M. Calo, J.A. Cottrell, T.J.R. Hughes, A. Reali, G. Scovazzi, Variational multiscale residual-based turbulence modeling for large eddy simula-

tion of incompressible flows, Comput. Methods Appl. Mech. Eng. 197 (1) (2007) 173–201.[22] I. Akkerman, Y. Bazilevs, V.M. Calo, T.J.R. Hughes, S. Hulshoff, The role of continuity in residual-based variational multiscale modeling of turbulence,

Comput. Mech. 41 (3) (2008) 371–378; 2007.[23] E. Oñate, Derivation of stabilized equations for numerical solution of advective–diffusive transport and fluid flow problems, Comput. Methods Appl.

Mech. Eng. 151 (1998) 233–265.[24] E. Oñate, J. Miquel, G. Hauke, Stabilized formulation for the advection–diffusion–absorption equation using finite calculus and linear finite elements,

Comput. Methods Appl. Mech. Eng. 195 (2006) 3926–3946.[25] E. Oñate, F. Zarate, S.R. Idelsohn, Finite element formulation for the convective–diffusive problems with sharp gradients using finite calculus, Comput.

Methods Appl. Mech. Eng. 195 (2006) 1793–1825.[26] E. Oñate, J. Miquel, F. Zarate, Stabilized solution of the multidimensional advection–diffusion–absorption equation using linear finite elements, Comput.

Fluids 36 (2007) 92–112.[27] J.P. Boris, D.L. Book, Flux-corrected transport. I. SHASTA, a fluid transport algorithm that works, J. Comput. Phys. 11 (1973) 38–69.[28] S.T. Zalesak, Fully multidimensional flux-corrected transport algorithms for fluids, J. Comput. Phys. 31 (1979) 335–362.[29] A. Harten, High resolution schemes for hyperbolic conservation laws, J. Comput. Phys. 49 (1983) 357–393.[30] T.E. Tezduyar, Y.J. Park, Discontinuity-capturing finite element formulations for nonlinear convection–diffusion–reaction equations, Comput. Methods

Appl. Mech. Eng. 59 (1986) 307–325.[31] S.R. Idelsohn, N. Nigro, M. Storti, G. Buscaglia, A Petrov–Galerkin formulation for advective–reaction–diffusion problems, Comput. Methods Appl. Mech.

Eng. 136 (1996) 27–46.[32] I. Harari, T.J.R. Hughes, Stabilized finite element methods for steady advection–diffusion with production, Comput. Methods Appl. Mech. Eng. 115

(1994) 165–191.[33] S.R. Idelsohn, J.C. Heinrich, E. Oñate, Petrov–Galerkin methods for the transient advective–diffusive equation with sharp gradients, Int. J. Numer. Meth-

ods Eng. 39 (9) (1996) 1455–1473.[34] R. Codina, On stabilized finite element methods for linear systems of convection–diffusion–reaction equations, Comput. Methods Appl. Mech. Eng.

188 (1) (2000) 61–82.

Page 38: Journal of Computational Physics...248 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284 the information throughout the domain and the term sφ denotes

284 V. Joshi, R.K. Jaiman / Journal of Computational Physics 339 (2017) 247–284

[35] L.P. Franca, F. Valentin, On an improved unusual stabilized finite element method for the advective–reactive–diffusive equation, Comput. Methods Appl. Mech. Eng. 190 (2001) 1785–1800.

[36] G. Hauke, A. Garcia-Olivares, Variational subgrid scale formulations for the advection–diffusion–reaction equation, Comput. Methods Appl. Mech. Eng. 190 (2001) 6847–6865.

[37] G. Hauke, A simple subgrid scale stabilized method for the advection–diffusion–reaction equation, Comput. Methods Appl. Mech. Eng. 191 (2002) 2925–2947.

[38] G. Houzeaux, B. Eguzkitza, M. Vázquez, A variational multiscale model for the advection–diffusion–reaction equation, Commun. Numer. Methods Eng. 25 (2009) 787–809.

[39] J. Principe, R. Codina, On the stabilization parameter in the subgrid scale approximation of scalar convection–diffusion–reaction equations on distorted meshes, Comput. Methods Appl. Mech. Eng. 199 (21) (2010) 1386–1402.

[40] P. Nadukandi, E. Oñate, J. Garcia, A high-resolution Petrov–Galerkin method for the 1D convection–diffusion–reaction problem, Comput. Methods Appl. Mech. Eng. 199 (2010) 525–546.

[41] P. Nadukandi, E. Oñate, J. Garcia, A high-resolution Petrov–Galerkin method for the convection–diffusion–reaction problem. Part II—A multidimensional extension, Comput. Methods Appl. Mech. Eng. 213–216 (2012) 327–352.

[42] I. Harari, T.J.R. Hughes, What are C and h?: inequalities for the analysis and design of finite element methods, Comput. Methods Appl. Mech. Eng. 97 (2) (1992) 157–192.

[43] R. Codina, E. Oñate, M. Cervera, The intrinsic time for the streamline upwind/Petrov–Galerkin formulation using quadratic elements, Comput. Methods Appl. Mech. Eng. 94 (1992) 239–262.

[44] R. Codina, O. Soto, Approximation of the incompressible Navier–Stokes equations using orthogonal subscale stabilization and pressure segregation on anisotropic finite element meshes, Comput. Methods Appl. Mech. Eng. 193 (15–16) (2004) 1403–1419.

[45] S. Mittal, On the performance of high aspect ratio elements for incompressible flows, Comput. Methods Appl. Mech. Eng. 188 (2000) 269–287.[46] T.K. Sengupta, A. Dipankar, P. Sagaut, Error dynamics: beyond von Neumann analysis, J. Comput. Phys. 226 (2) (2007) 1211–1218.[47] T.K. Sengupta, High Accuracy Computing Methods: Fluid Flows and Wave Phenomena, Cambridge University Press, 2013.[48] R.F. Warming, B.J. Hyett, The modified equation approach to the stability and accuracy analysis of finite-difference methods, J. Comput. Phys. 14 (1974)

159–179.[49] R. Codina, A Finite Element Formulation for the Numerical Solution of the Convection–Diffusion Equation, CIMNE, Barcelona, 1993.[50] M. Casey, T. Wintergerste, Best practice guidelines for industrial computational fluid dynamics, ERCOFTAC, 2000.[51] M.A. Christon, M.J. Martinez, T.E. Voth, Generalized Fourier analyses of the advection-diffusion equation—Part I: one-dimensional domains, Int. J. Numer.

Methods Fluids 45 (8) (2004) 839–887.[52] G. Hauke, M.H. Doweidar, Fourier analysis of semi-discrete and space–time stabilized methods for the advective–diffusive–reactive equation: II. SGS,

Comput. Methods Appl. Mech. Eng. 194 (2005) 691–725.[53] G. Hauke, M.H. Doweidar, Fourier analysis of semi-discrete and space–time stabilized methods for the advective–diffusive–reactive equation: I. SUPG,

Comput. Methods Appl. Mech. Eng. 194 (2005) 45–81.[54] F. Shakib, T.J.R. Hughes, A new finite element formulation for computational fluid dynamics: IX. Fourier analysis of space–time Galerkin/Least-Squares

algorithms, Comput. Methods Appl. Mech. Eng. 87 (1991) 35–58.[55] T.K. Sengupta, Y.G. Bhumkar, M.K. Rajpoot, V.K. Suman, S. Saurabh, Spurious waves in discrete computation of wave phenomena and flow problems,

Appl. Math. Comput. 218 (2012) 9035–9065.[56] T.E. Voth, M.J. Martinez, M.A. Christon, Generalized Fourier analyses of the advection–diffusion equation—Part II: two-dimensional domains, Int. J.

Numer. Methods Fluids 45 (8) (2004) 889–920.[57] T.K. Sengupta, M.K. Rajpoot, S. Saurabh, V.V.S.N. Vijay, Analysis of anisotropy of numerical wave solutions by high accuracy finite difference methods, J.

Comput. Phys. 230 (2011) 27–60.