This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

[3]\fnmGanesh \surNatarajan

1]\orgdivChemical Engineering Department, \orgnameIndian Institute of Science Bangalore, \orgaddress\cityBengaluru, \postcode560012, \stateKarnataka, \countryIndia

2]\orgdivMechanical Engineering Department, \orgnameIndian Institute of Technology Patna, \orgaddress\cityPatna, \postcode801106, \stateBihar, \countryIndia

[3]\orgdivMechanical Engineering Department, \orgnameIndian Institute of Technology Palakkad, \orgaddress\cityPalakkad, \postcode678623, \stateKerela, \countryIndia

A generalized formulation for gradient schemes in unstructured finite volume method

\fnmMandeep \surDeka [email protected]    \fnmAshwani \surAssam [email protected]    [email protected] [ [ *
Abstract

We present a generic framework for gradient reconstruction schemes on unstructured meshes using the notion of a dyadic sum-vector product. The proposed formulation reconstructs centroidal gradients of a scalar from its directional derivatives along specific directions in a suitably defined neighbourhood. We show that existing gradient reconstruction schemes can be encompassed within this framework by a suitable choice of the geometric vectors that define the dyadic sum tensor. The proposed framework also allows us to re-interpret certain hybrid schemes, which might not be derivable through traditional routes. Additionally, a generalization of flexible gradient schemes is proposed that can be employed to enhance the robustness of consistent gradient schemes without compromising on the accuracy of the computed gradients.

keywords:
Gradient reconstruction, Generalized formulation, Finite Volume method, Unstructured grid
pacs:
[

MSC Classification]65N08, 76M12

1 Introduction

The computation of gradients of flow properties plays a pivotal role in obtaining accurate numerical solutions of Navier-Stokes equations on unstructured meshes. This is because these gradients are necessary to evaluate both inviscid and viscous fluxes in finite volume flow solvers. The solution gradients are employed for higher-order convective schemes for inviscid flux calculations while viscous fluxes are directly dependent on the gradients of velocities and temperature. The construction of robust and accurate flow solvers for incompressible and compressible flows therefore necessitate an accurate and robust methodology for gradient computation among other requirements.

Cell-centered finite volume codes which typically employ unstructured grids reconstruct the centroidal gradients using reconstruction schemes that can be generally classified as belonging to either least squares (LSQ) or Green-Gauss (GG) family of approaches [1, 2]. While the former category of techniques are based on the principle of least squares minimization, the latter class of methods rely on the Gauss divergence theorem to calculate the gradients. These reconstruction strategies have been in widespread use, with LSQ approaches largely favoured for Euler flows while GG-based schemes are more common in viscous computations. The schemes of the two families have their own advantages and drawbacks. While the linear least squares approach gives consistent gradients and accurate estimates on isotropic irregular meshes, it is quite inaccurate on stretched meshes over curved geometries [3]. The use of weights mitigates the problem but the weighted least squares reconstruction requires limiting to stabilise the numerical solution on these meshes even for subsonic inviscid flows [4] and also results in incorrect gradients on triangulated meshes with skewed elements [3]. The choice of the explicit neighbourhood necessary for least squares family of schemes affects both the stability and accuracy and requires special attention. The Green-Gauss family of schemes do not always lead to consistent gradients but can produce accurate estimates of gradients on curved meshes with high aspect ratio [3]. Coupled with their ease of implementation, they are a popular choice in viscous flow solvers where they estimate aerodynamic coefficients quite accurately [4]. The detailed investigations of Diskin and Thomas [5] for high Reynolds number applications also demonstrate that the gradient accuracy on high aspect ratio meshes depends both on the grid and the solution.

It is evident that accuracy, robustness and computational cost are conflicting requirements for any gradient scheme. While there exists no known “all-in-one” scheme with all these attributes for a wide range of flow conditions on arbitrary polyhedral meshes, there have been advancements in devising new improved schemes as well as constructing hybrid reconstruction approaches. The latter class of methods attempt to blend the GG and LSQ strategies with a view to jointly harness their advantages and the GLSQ scheme of Shima and co-workers [4] is a notable effort in this direction. Among the recently proposed schemes for gradient computations are the variational reconstruction (VR) approach of Wang et al. [6], the Implicit Green-Gauss (IGG) [7] scheme, the Taylor-Gauss gradients (TG) [8, 9] and the Modified Green-Gauss (MGG) [10] reconstruction. The first two schemes are inherently implicit and may be regarded effectively as an extension of compact schemes for unstructured meshes, with the VR scheme categorised as a least squares based method and IGG reconstruction belonging to Green-Gauss family. The TG gradients are constructed similar to least squares but have dependence on the face normal vector similar to GG, thereby having a unique flavor of hybridization. The MGG reconstruction, derived from a different variant of the Gauss-divergence theorem, reconstructs centroidal gradients from face normal derivatives of the scalar which makes it an implicit scheme on non-orthogonal meshes. All the schemes however result in consistent gradients on arbitrary mesh topologies and exhibit advantages compared to their conventional counterparts for fluid flow problems. A good overview of various gradient techniques in the finite volume framework including recent developments may be found in [11].

The least squares and Green-Gauss reconstruction schemes have been traditionally considered as two different families for gradient computation. This is arguably because they adopt vastly different mathematical philosophies to compute the same quantity of interest. However, efforts to hybridize the constructional philosophies of both classes have yielded some interesting insights into the methods. For instance, it is possible to derive the Green-Gauss formula from a face-based least squares reconstruction using a specific choice of weights [12]. In another work by Syrakos et al. [9], a unified framework for gradient reconstruction schemes is proposed which encompasses both GG and LSQ classes of schemes. The basic idea is to use Taylor expansion to express the scalar at a neighbour point (which may or may not be a neighbour cell center) in terms of the value and gradients of the scalar at the cell center where the gradients are sought. The difference in values is then multiplied by a vector and the summation across a suitable stencil yields a system of equations that can be solved to obtain the centroidal gradients. The choice of the neighbour point and the vector used to left multiply the system, distinguishes the different gradients schemes, with LSQ class of methods generated by an orthogonal projection and the GG class of methods by an oblique projection.

In this work, we propose a generalized formulation for nominally first order accurate gradient schemes in unstructured finite volume method, in the similar spirit as Syrakos et al. [9]. Our proposed framework reconstructs centroidal gradients from the directional derivatives of the scalar in a specified neighbourhood, which brings in more generality in the formulation. The mathematical framework of the proposed formulation is presented in section 2. Following that in section 3, we demonstrate how existing gradient schemes of both GG and LSQ families can be constructed using the generalized formulation. The framework also enables us to interpret and possible derive hybrid schemes that could retain some benefits of both GG and LSQ family of schemes. This is discussed in section 4. Finally, we extend the proposed framework to construct a generalized version of flexible gradient scheme [13] in section 5. The flexible scheme has a free-parameter that can be tuned to increase robustness of finite volume computations without compromising the gradient reconstruction accuracy. Some general discussions on the novelties and drawbacks of the proposed formalism are presented in section 6.

Refer to caption
Figure 1: Configuration of a cell in an unstructured mesh with a compact “neighbourhood” denoted by a “×\times” symbol. A representative point in the neighbourhood is denoted by “ff” where the two geometric vectors are 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} are shown. The points “f,1f,1” and “f,2f,2” are along the vector 𝐛f\mathbf{b}_{f}.

2 Dyadic sum-vector product formalism

We present a generic mathematical framework for nominally first order accurate gradient reconstruction schemes in unstructured cell-centered finite volume method. Traditional approaches of deriving gradient schemes are generally through some variants of the Gauss-divergence theorem or through a least squares minimization problem. We, however, adopt a different approach wherein the development of a gradient reconstruction formula is through a tensor identity, that requires the definition of two key entities - the ‘neighbourhood’ of a cell, and, a geometric vector pair (𝐚,𝐛\mathbf{a},\mathbf{b}) defined at each element forming the neighbourhood of a cell.

To illustrate, let us consider a typical unstructured mesh with a characteristic dimension ‘hh111For a general unstructured mesh in a dd-dimensional domain, h=(V/N)1/dh=(V/N)^{1/d}, where VV is the total volume of the computational domain and NN is the number of cells discretizing the domain., where the gradients of a scalar are required to be computed in a representative cell, with the cell center “ii” (see Fig. 1). We define a ‘neighbourhood’ of the cell comprising of a set of points that maintain a compact support about the cell centroid. For the sake of generality, the location of these points are kept arbitrary but typical choices could be (but not restricted to) the cell centres of face-sharing or node-sharing cells, face centers of the faces forming the cell, mid-point of the line joining the face-sharing cell centers, etc. We use the subscript “ff” to denote a representative point in the defined neighbourhood of the cell “ii”, as shown in Fig. 1. With the neighbourhood set, we define a pair of “geometric” vectors 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} at each point forming the cell neighbourhood. The term “geometric” here implies that the vectors shall be function of the mesh metrics alone with a constraint on the magnitudes of these vectors,

|𝐚f|O(hp),|𝐛f|O(hq),|\>\mathbf{a}_{f}\>|\sim O(h^{p})\>,\>\>\>\>\>|\>\mathbf{b}_{f}\>|\sim O(h^{q}), (1)

where, pp and qq are positive integers222It is presumed that h1h\ll 1 as a requirement for sufficient resolution of the calculations..

For a continuous vector field 𝐮\bf{u}, we can write the following tensor identity,

(𝐚f𝐛f)𝐮f=𝐚f(𝐛f𝐮f),({\bf a}_{f}\otimes{\bf b}_{f})\cdot{\bf u}_{f}={\bf a}_{f}~{}({\bf b}_{f}\cdot{\bf u}_{f}), (2)

where 𝐮f{\bf u}_{f} denotes the value of the vector at the point “ff”. Since 𝐮\bf u is a continuous vector field, we use a Taylor expansion to express 𝐮f{\bf u}_{f} on the left hand side of Eq. 2 in terms of the value at the cell centroid 𝐮i{\bf u}_{i}, which after rearranging leads to the expression,

  (𝐚f𝐛f)𝐮i=𝐚f(𝐛f𝐮f)(𝐚f𝐛f)(𝐮i(𝐱f𝐱i)+ϵ1),  ({\bf a}_{f}\otimes{\bf b}_{f})\cdot{\bf u}_{i}={\bf a}_{f}~{}({\bf b}_{f}\cdot{\bf u}_{f})-({\bf a}_{f}\otimes{\bf b}_{f})\cdot({\nabla{\bf u}}_{i}\cdot({\bf x}_{f}-{\bf x}_{i})+\epsilon_{1}), (3)

where, ϵ1O(h2)\epsilon_{1}\sim O(h^{2}) represents the higher order terms. Summing up the above equation over the entire neighbourhood of the cell, we get the relation,

 f(𝐚f𝐛f)𝐮i=f𝐚f(𝐛f𝐮f) f(𝐚f𝐛f)(𝐮i(𝐱f𝐱i)+ϵ1).   \sum_{f}({\bf a}_{f}\otimes{\bf b}_{f})\cdot{\bf u}_{i}=\sum_{f}{\bf a}_{f}~{}({\bf b}_{f}\cdot{\bf u}_{f})- \sum_{f}({\bf a}_{f}\otimes{\bf b}_{f})\cdot({\nabla{\bf u}}_{i}\cdot({\bf x}_{f}-{\bf x}_{i})+\epsilon_{1}).   (4)

The sum of the dyadic product of the vectors 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} appearing in the left hand side of the above equation, is a second order tensor, referred to from here on as the ‘dyadic sum’,

=f(𝐚f𝐛f).{\mathbb{P}}=\sum_{f}\left({{\bf a}_{f}}\otimes{{\bf b}_{f}}\right).

To construct the gradient reconstruction scheme, we place another constraint on the choice of the neighbourhood and the geometric vectors, which is that the dyadic sum, \mathbb{P}, is invertible. Now, we simply substitute the vector field as the gradient of a scalar field, i.e. 𝐮=ϕ\bf u=\nabla\phi in Eq. 4 and obtain the following expression for centroidal gradients,

ϕi=1f𝐚f(𝐛fϕf).\nabla\phi_{i}=\mathbb{P}^{-1}\sum_{f}\mathbf{a}_{f}(\mathbf{b}_{f}\cdot\nabla\phi_{f}). (5)

In obtaining the above expression, the contribution from the second term on the right hand side of Eq. 4 is ignored. It can be shown that the contribution from that term is O(h)O(h) (see appendix A.1) and hence can be ignored to obtain an expression for nominally first order accurate gradients.

The generalized gradient scheme of Eq. 5 reconstructs centroidal gradients from the directional derivatives of ϕ\phi along the 𝐛f\mathbf{b}_{f} vectors. It is possible to generalize existing gradient reconstruction schemes using this framework, as shall be demonstrated in the next few sections. With the neighbourhood and geometric vectors defined, the next crucial step in the formalism is the evaluation of quantity 𝐛fϕf\mathbf{b}_{f}\cdot\nabla\phi_{f} on the right hand side of Eq. 5, from which the centroidal gradients are to be reconstructed. For a cell-centered finite volume discretization, we have the values of ϕ\phi only at the cell centers. Therefore, we can express the quantity (𝐛fϕf)(\mathbf{b}_{f}\cdot{\nabla\phi}_{f}), in terms of centroidal values of ϕ\phi. To do that, we write a general expression for the directional derivative using Taylor series expansion,

𝐛fϕf=ϕ(𝐱f,2)ϕ(𝐱f,1)δf,2δf,1(δf,2+δf,1)(ϕf:(𝐛f𝐛f)+ϵ2\displaystyle{\bf b}_{f}\cdot\nabla{\phi}_{f}=\dfrac{\phi(\mathbf{x}_{f,2})-\phi(\mathbf{x}_{f,1})}{\delta_{f,2}-\delta_{f,1}}-(\delta_{f,2}+\delta_{f,1})({\nabla\nabla\phi}_{f}:(\mathbf{b}_{f}\otimes\mathbf{b}_{f})+\epsilon_{2} (6)

where, the 𝐱f,1=𝐱f+δf,1𝐛f\mathbf{x}_{f,1}=\mathbf{x}_{f}+\delta_{f,1}\mathbf{b}_{f} and 𝐱f,2=𝐱f+δf,2𝐛f\mathbf{x}_{f,2}=\mathbf{x}_{f}+\delta_{f,2}\mathbf{b}_{f} are points along 𝐛f\mathbf{b}_{f}, at a distance of δf,1/|𝐛f|\delta_{f,1}/|\mathbf{b}_{f}| and δf,2/|𝐛f|\delta_{f,2}/|\mathbf{b}_{f}| from 𝐱f\mathbf{x}_{f}, respectively (see Fig. 1). The first term on the right hand side of Eq. 6 essentially expresses (𝐛fϕf)(\mathbf{b}_{f}\cdot{\nabla\phi}_{f}) in terms of ϕ\phi at specific locations along the 𝐛f\mathbf{b}_{f} vector. While the choice of the locations 𝐱f,1\mathbf{x}_{f,1} and 𝐱f,2\mathbf{x}_{f,2} are generic, to ensure compactness, we impose a restriction that |δf,1𝐛f|O(h)|\delta_{f,1}\mathbf{b}_{f}|\sim O(h) and |δf,2𝐛f|O(h)|\delta_{f,2}\mathbf{b}_{f}|\sim O(h), i.e., the points 𝐱f,1\mathbf{x}_{f,1} and 𝐱f,2\mathbf{x}_{f,2} are at an O(h)O(h) distance from 𝐱f\mathbf{x}_{f}. Therefore, substituting Eq. 6 into Eq. 5, we obtain a nominally first order accurate gradient reconstruction formula,

ϕi=1f𝐚f(ϕf,2ϕf,1δf,2δf,1),\displaystyle\nabla\phi_{i}=\mathbb{P}^{-1}\sum_{f}\mathbf{a}_{f}\left(\dfrac{\phi_{f,2}-\phi_{f,1}}{\delta_{f,2}-\delta_{f,1}}\right), (7)

where, ϕf,1=ϕ(𝐱f,1)\phi_{f,1}=\phi(\mathbf{x}_{f,1}) and ϕf,2=ϕ(𝐱f,2)\phi_{f,2}=\phi(\mathbf{x}_{f,2}). The contribution from the second term on the right hand side of Eq. 6 is ignored as it can be shown to be O(h)O(h) in magnitude (see appendix A.2).

The expression in Eq. 7 represents an explicit gradient reconstruction formula if the values of ϕ\phi are available at 𝐱f,1\mathbf{x}_{f,1} and 𝐱f,2\mathbf{x}_{f,2}. In general, 𝐛f\mathbf{b}_{f} need not pass through cell centers, implying that there need not exist a point along the vector 𝐛f\mathbf{b}_{f} where the values of ϕ\phi are available. Therefore, in order to obtain these values, one may need to interpolate. If that is the case, then it can be shown (see appendix A.3) that the interpolation needs to be at least second order accurate in order to obtain first order accurate centroidal gradients. Instead of obtaining ϕf,1\phi_{f,1} and ϕf,2\phi_{f,2}, using the values from neighbour cells, one may also use the values and the gradients from neighbour cells in the interpolation scheme, thereby creating an implicit gradient scheme. Implicit schemes can also be constructed by directly expressing the directional derivative (𝐛fϕf)(\mathbf{b}_{f}\cdot\nabla\phi_{f}) in terms of the values and gradients in the neighbourhood of the cell.

Refer to caption
Figure 2: Typical polygonal geometry showing the cells sharing a face. The cells are denoted by their centroids ii and jj, while ff represents the face as well as the face center.

3 Revisiting the existing gradient reconstruction schemes

In this section, we demonstrate that existing gradient schemes including the popularly employed Green-Gauss reconstruction [14, 15] and the linear least squares reconstruction [3, 16] can be generalized under the proposed formalism. In all the following discussions, we assume a two-dimensional domain discretized by non-overlapping arbitrary polygonal volumes where the gradient of the scalar field needs to be reconstructed at the cell-centers. The extension of ideas presented herein to three dimensions is relatively straightforward.

3.1 Green-Gauss schemes

The traditional Green-Gauss (GG) scheme can be obtained using the present formalism by defining the neighbourhood consisting of the face centers of the faces forming the cell “ii”. The geometric vectors are 𝐚f=𝐒f{\bf a}_{f}={\bf S}_{f} and 𝐛f=𝐱f𝐱i{\bf b}_{f}={\bf x}_{f}-{\bf x}_{i}. The area vector vector 𝐒f=𝐧fΔsf{\bf S}_{f}={\bf n}_{f}\Delta s_{f} where Δsf\Delta s_{f} is the face area and 𝐧f{\bf n}_{f} is the unit normal while 𝐱f{\bf x}_{f} and 𝐱i{\bf x}_{i} denote the position vectors of the face centers and the cell center respectively (See Fig. 2). The resulting dyadic-sum \mathbb{P}, for a two dimensional case, is given by,

=[fnx(xfxi)Δsffnx(yfyi)Δsffny(xfxi)Δsffny(yfyi)Δsf]=[Ωi00Ωi],\begin{split}\mathbb{P}&=\begin{bmatrix}\displaystyle\sum_{f}n_{x}({x}_{f}-{x}_{i})\,\Delta s_{f}&\displaystyle\sum_{f}n_{x}({y}_{f}-{y}_{i})\,\Delta s_{f}\\ \\ \displaystyle\sum_{f}n_{y}({x}_{f}-{x}_{i})\,\Delta s_{f}&\displaystyle\sum_{f}n_{y}({y}_{f}-{y}_{i})\,\Delta s_{f}\end{bmatrix}=\begin{bmatrix}\Omega_{i}&0\\ \\ 0&\Omega_{i}\end{bmatrix},\end{split} (8)

where (nx,ny)(n_{x},n_{y}) are the xx and yy components of 𝐧f\mathbf{n}_{f} and Ωi\Omega_{i} is the volume of the cell. The simplification of the terms in the matrix result from geometric identities (see Appendix B). The dyadic-sum is therefore a diagonal matrix proportional to the identity tensor and can be inverted with ease. For this choice of vectors, the right hand side of Eq. 5 simplifies to,

f𝐚f(𝐛fϕf)=f𝐧fΔsf((𝐱f𝐱i)ϕf)=f𝐧fΔsf(ϕfϕi).\begin{split}\sum_{f}{\bf a}_{f}~{}\left({\mathbf{b}_{f}}\cdot{\nabla\phi_{f}}\right)&=\sum_{f}{\bf n}_{f}\Delta s_{f}\,\Big{(}({\bf x}_{f}-{\bf x}_{i})\cdot{\nabla\phi_{f}}\Big{)}=\sum_{f}{\bf n}_{f}\Delta s_{f}\,(\phi_{f}-\phi_{i}).\end{split}

Recognizing that fϕi𝐧fΔsf=0\sum_{f}\phi_{i}\,{\bf n}_{f}\Delta s_{f}=0, the above expression substituted into the right hand side of Eq. 5, gives,

ϕi=1Ωifϕf𝐧fΔsf,{\bf\nabla\phi}_{i}=\dfrac{1}{\Omega_{i}}\sum_{f}\phi_{f}\,{\bf n}_{f}\Delta s_{f}, (9)

which is the Green-Gauss reconstruction formula. The face value ϕf\phi_{f} is generally not available in cell-centered finite volume discretization and is typically obtained using suitable interpolation, which needs to be at least second order accurate to obtain consistent gradients [15].

Besides the traditional Green-Gauss reconstruction, there exist other variants of the same family. One such scheme is the modified Green-Gauss (MGG) reconstruction which is derived from a different variant of the Gauss divergence theorem [10]. This scheme, however, can be obtained through the proposed formalism by simply flipping the choices of the geometric vectors from GG reconstruction, i.e., 𝐚f=𝐱f𝐱i{\bf a}_{f}={\bf x}_{f}-{\bf x}_{i} and 𝐛f=𝐒f=𝐧fΔsf{\bf b}_{f}={\bf S}_{f}={\bf n}_{f}\Delta s_{f}. The resulting dyadic sum is, therefore, just the transpose of \mathbb{P} for GG, shown in Eq. 8 and therefore enjoys the same ease of inversion. The directional derivative, however, is different from that of GG, leading to the right hand side of Eq. 5 as,

f𝐚f(𝐛ϕ)f=f(𝐱f𝐱i)(𝐧fΔsfϕ)=fϕn|f(𝐱f𝐱i)Δsf.\begin{split}\sum_{f}{\bf a}_{f}~{}\Big{(}{\bf b}\cdot{\nabla\phi}\Big{)}_{f}&=\sum_{f}({\bf x}_{f}-{\bf x}_{i})\,\Big{(}{\bf n}_{f}\Delta s_{f}\cdot{\nabla\phi}\Big{)}=\sum_{f}\frac{\partial\phi}{\partial n}\Big{|}_{f}\,({\bf x}_{f}-{\bf x}_{i})\,\Delta s_{f}.\end{split} (10)

Substituting this into the generalized formulation, we get the MGG reconstruction formula [10],

ϕi=1Ωfϕn|f(𝐱f𝐱i)Δsf.{\bf\nabla\phi}_{i}=\dfrac{1}{\Omega}\sum_{f}\frac{\partial\phi}{\partial n}\Big{|}_{f}\,({\bf x}_{f}-{\bf x}_{i})\,\Delta s_{f}. (11)

For MGG, the face normal derivative can approximated on unstructured meshes using Zwart reconstruction [10] or by central differences with a non-orthogonal correction [17], which can essentially be interpreted as variants of the general idea of evaluating the directional derivative shown in Eq. 6 in section 2. It is instructive to note that, unlike traditional GG, the 𝐛f\mathbf{b}_{f} vector for MGG does not pass through the cell center “ii” except on genuinely orthogonal meshes. Therefore, an O(h)O(h) accurate evaluation of the face normal derivative (which is necessary to obtain consistent gradients [10]) typically requires the values and gradients of the scalar in the cell and its face-sharing neighbours. This makes MGG an implicit gradient reconstruction scheme.

3.2 Least squares schemes

The least squares family of schemes are obtained by minimizing the error in the estimation of the values of a scalar in a specified stencil, in a least squares sense. The most commonly employed gradient scheme of the least squares family on unstructured meshes is the linear least squares reconstruction [3, 16], which boils down to minimizing the function GG^{*} defined by,

G=j=1nb(Δϕjϕx,iΔxjϕy,iΔyj)2,G^{*}=\sum_{j=1}^{nb}\Big{(}\Delta\phi_{j}-\phi_{x,i}\Delta x_{j}-\phi_{y,i}\Delta y_{j}\Big{)}^{2},

where, Δxj=xjxi\Delta x_{j}=x_{j}-x_{i}, Δyj=yjyi\Delta y_{j}=y_{j}-y_{i}, Δϕj=ϕjϕi\Delta\phi_{j}=\phi_{j}-\phi_{i}, and (ϕx,i,ϕy,i)(\phi_{x,i},\phi_{y,i}) are the xx and yy components of the ϕi\nabla\phi_{i}, respectively. The minimization problem reduces to a system of linear equations obtained by setting G/ϕx,i=0\partial G^{*}/\partial\phi_{x,i}=0 and G/ϕy,i=0\partial G^{*}/\partial\phi_{y,i}=0. Naturally due to the quadratic nature of the functional it is easy to see that the resulting system of equations contains a symmetric matrix that needs to be inverted to obtain the gradients. This property leads to the generalization in the proposed framework that least squares family of schemes correspond to a symmetric dyadic sum tensor, implying 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} are co-linear. Therefore, the linear least squares scheme can be obtained from the generalized formalism, by first defining the neighbourhood at the centroids of the face-sharing cells333Extended stencils are also used which could include node-sharing cell centers or cell centers of cells sharing the face-sharing neighbours of “ii”., i.e. f=jf=j (see Fig. 2) and then defining, 𝐚f=𝐛f=𝐱j𝐱i{\bf a}_{f}={\bf b}_{f}={\bf x}_{j}-{\bf x}_{i}. The corresponding dyadic sum,

=[jΔxj2jΔxjΔyjjΔyjΔxjjΔyj2],\begin{split}\mathbb{P}&=\begin{bmatrix}\displaystyle\sum_{j}\Delta x_{j}^{2}&\displaystyle\sum_{j}\Delta x_{j}\Delta y_{j}\\ \\ \displaystyle\sum_{j}\Delta y_{j}\Delta x_{j}&\displaystyle\sum_{j}\Delta y_{j}^{2}\\ \end{bmatrix},\end{split}

and the directional derivative,

𝐛fϕf=(𝐱j𝐱i)ϕj=ϕjϕi=Δϕj,\mathbf{b}_{f}\cdot\nabla\phi_{f}=(\mathbf{x}_{j}-\mathbf{x}_{i})\cdot\nabla\phi_{j}=\phi_{j}-\phi_{i}=\Delta\phi_{j}\>,

substituted into Eq. 5 gives the linear least squares reconstruction formula,

[jΔxj2jΔxjΔyjjΔxjΔyjjΔyj2][ϕx,iϕy,i]=[jΔϕjΔxjjΔϕjΔyj].\begin{bmatrix}\displaystyle\sum_{j}\Delta x_{j}^{2}&\displaystyle\sum_{j}\Delta x_{j}\Delta y_{j}\\ \displaystyle\sum_{j}\Delta x_{j}\Delta y_{j}&\displaystyle\sum_{j}\Delta y_{j}^{2}\\ \end{bmatrix}\begin{bmatrix}\phi_{x,i}\\ \phi_{y,i}\\ \end{bmatrix}=\begin{bmatrix}\displaystyle\sum_{j}\Delta\phi_{j}\Delta x_{j}\\ \displaystyle\sum_{j}\Delta\phi_{j}\Delta y_{j}\\ \end{bmatrix}. (12)

The above system corresponds to the unweighted variant (ULSQ) of linear least squares reconstruction. The weighted linear least squares reconstruction (WLSQ) can be obtained from the proposed formalism by simply scaling the geometric vectors as 𝐚j=𝐛j=wj(𝐱j𝐱i){\bf a}_{j}={\bf b}_{j}=w_{j}({\bf x}_{j}-{\bf x}_{i}), where the weights typically chosen such that it is inversely proportional to the cell-to-cell distance, wj=|𝐱j𝐱i|qw_{j}=|{\bf x}_{j}-{\bf x}_{i}|^{-q} where q[1,2]q\in[1,2].

A different variant of the least squares family can be constructed by choosing the neighbourhood as the face centers of the cell “ii” and thereby defining 𝐚f=𝐒f=𝐧fΔsf{\bf a}_{f}={\bf S}_{f}={\bf n}_{f}\Delta s_{f} and 𝐛f=𝐧f{\bf b}_{f}={\bf n}_{f}. This results in the symmetric dyadic-sum \mathbb{P},

=[fnx2ΔsffnxnyΔsffnynxΔsffny2Δsf].\mathbb{P}=\begin{bmatrix}\displaystyle\sum_{f}n_{x}^{2}\Delta s_{f}&\displaystyle\sum_{f}n_{x}n_{y}\Delta s_{f}\\ \\ \displaystyle\sum_{f}n_{y}n_{x}\Delta s_{f}&\displaystyle\sum_{f}n_{y}^{2}\Delta s_{f}\\ \end{bmatrix}.

For this choice of geometric vectors we obtain,

f𝐚f(𝐛fϕf)=f𝐒f(𝐧fϕ)=fϕn|f𝐧fΔsf.\begin{split}\sum_{f}{\bf a}_{f}~{}\Big{(}{\bf b}_{f}\cdot{\nabla\phi_{f}}\Big{)}&=\sum_{f}{\bf S}_{f}\,\Big{(}{\bf n}_{f}\cdot{\nabla\phi}\Big{)}=\sum_{f}\frac{\partial\phi}{\partial n}\Big{|}_{f}\,{\bf n}_{f}\,\Delta s_{f}.\end{split}

The generalized formulation in Eq. 5 then becomes,

[fnx2ΔsffnxnyΔsffnynxΔsffny2Δsf][ϕx,iϕy,i]=[fϕn|fnxΔsffϕn|fnyΔsf],\begin{bmatrix}\displaystyle\sum_{f}n_{x}^{2}\Delta s_{f}&\displaystyle\sum_{f}n_{x}n_{y}\Delta s_{f}\\ \displaystyle\sum_{f}n_{y}n_{x}\Delta s_{f}&\displaystyle\sum_{f}n_{y}^{2}\Delta s_{f}\\ \end{bmatrix}\begin{bmatrix}\phi_{x,i}\\ \phi_{y,i}\\ \end{bmatrix}=\begin{bmatrix}\displaystyle\sum_{f}\dfrac{\partial\phi}{\partial n}\Big{|}_{f}n_{x}\Delta s_{f}\\ \displaystyle\sum_{f}\dfrac{\partial\phi}{\partial n}\Big{|}_{f}n_{y}\Delta s_{f}\\ \end{bmatrix}, (13)

where the summation is over all faces of the cell, nxn_{x} and nyn_{y} are the components of the unit normal to the face. This is the same system of linear algebraic equations obtained by minimizing the function

G=f(ϕn|fϕx|inxϕy|iny)2Δsf,G=\sum_{f}\Big{(}\dfrac{\partial\phi}{\partial n}\Big{|}_{f}-\dfrac{\partial\phi}{\partial x}\Big{|}_{i}n_{x}-\dfrac{\partial\phi}{\partial y}\Big{|}_{i}n_{y}\Big{)}^{2}\Delta s_{f},

which is also referred to as the face area weighted least squares reconstruction (FLSQ), first proposed in the context of energy-conserving schemes by Mahesh et al. [18]. More recently, this method has been utilised to devise well-balanced solvers for incompressible multiphase flows [19, 20] and also as a face-flux reconstruction technique [21, 22]. Similar to MGG, the FLSQ scheme reconstructs gradients from the face normal derivative and is therefore an implicit scheme.

4 Hybrid schemes

Besides the GG and LSQ schemes discussed in the previous section, there are some schemes which cannot be clearly categorised into either of these families but have essence of both. One such scheme is the recently proposed Taylor-Gauss (TG) gradients [8, 9], which is obtained through an oblique projection and hence is not a minimization problem but leads to a least squares like system of equations. In our proposed framework, the same scheme can be obtained by first choosing the neighbourhood as the points of intersection of each face with the lines joining the cell center “ii” to the cell center of the respective face-sharing neighbour cell. The geometric vectors are then chosen as, 𝐚f=𝐒f\mathbf{a}_{f}=\mathbf{S}_{f}, and 𝐛f=𝐱j𝐱i\mathbf{b}_{f}=\mathbf{x}_{j}-\mathbf{x}_{i}, where 𝐒f\mathbf{S}_{f} is the face area vector. The resulting dyadic sum is,

=[fnx(xjxi)Δsffnx(yjyi)Δsffny(xjxi)Δsffny(yjyi)Δsf].\mathbb{P}=\begin{bmatrix}\displaystyle\sum_{f}n_{x}(x_{j}-x_{i})\Delta s_{f}&\displaystyle\sum_{f}n_{x}(y_{j}-y_{i})\Delta s_{f}\\ \\ \displaystyle\sum_{f}n_{y}(x_{j}-x_{i})\Delta s_{f}&\displaystyle\sum_{f}n_{y}(y_{j}-y_{i})\Delta s_{f}\\ \end{bmatrix}.

With the directional derivative evaluated the same way as in the linear least squares scheme, we get,

f𝐚f(𝐛fϕf)=f𝐒f((𝐱j𝐱i)ϕ)=f(ϕjϕi)𝐧fΔsf,\begin{split}\sum_{f}{\bf a}_{f}~{}\Big{(}{\bf b}_{f}\cdot{\nabla\phi_{f}}\Big{)}=\sum_{f}{\bf S}_{f}\,\Big{(}({\bf x}_{j}-{\bf x}_{i})\cdot{\nabla\phi}\Big{)}=\sum_{f}(\phi_{j}-\phi_{i})\,{\bf n}_{f}\,\Delta s_{f},\end{split}

and the corresponding system of equations to obtain the TG gradients as,

[fnx(xjxi)Δsffnx(yjyi)Δsffny(xjxi)Δsffny(yjyi)Δsf][ϕx,iϕy,i]=[f(ϕjϕi)nxΔsff(ϕjϕi)nyΔsf].\begin{bmatrix}\displaystyle\sum_{f}n_{x}(x_{j}-x_{i})\Delta s_{f}&\displaystyle\sum_{f}n_{x}(y_{j}-y_{i})\Delta s_{f}\\ \displaystyle\sum_{f}n_{y}(x_{j}-x_{i})\Delta s_{f}&\displaystyle\sum_{f}n_{y}(y_{j}-y_{i})\Delta s_{f}\\ \end{bmatrix}\begin{bmatrix}\phi_{x,i}\\ \phi_{y,i}\\ \end{bmatrix}=\begin{bmatrix}\displaystyle\sum_{f}(\phi_{j}-\phi_{i})n_{x}\Delta s_{f}\\ \displaystyle\sum_{f}(\phi_{j}-\phi_{i})n_{y}\Delta s_{f}\\ \end{bmatrix}. (14)

The weighted variants of Taylor-Gauss scheme [9] can be easily obtained by scaling the geometric vectors similar to the weighted variants of LSQ.

It is remarked upon by the authors of [8] that the TG gradient schemes have a flavor of GG due to the use of face normals in reconstructing the centroidal gradients but with the additional ability to create weighted variants like an LSQ scheme. If we notice closely, to construct the TG scheme through the generalized formulation, we effectively borrowed 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} from GG and LSQ schemes, respectively. Therefore, the scheme is, in some sense, a hybrid of GG and LSQ class of schemes, despite not being derivable from either routes clearly. This has been explained in [9] through their unification philosophy based on orthogonal and oblique projections. Within the context of our proposed formalism, the construction of TG gradients show a logical way of devising hybrid schemes out of traditional schemes, which is through different permutations of their respective geometric vectors. The efficacy of such a hybrid scheme can only be determined through numerical studies which is beyond the scope of this paper. Nevertheless, the proposed generalization provides an alternate route to creating nominally first order accurate hybrid gradient schemes where the advantages of the constituent schemes can possible be gained.

5 Generalization of flexible gradient schemes

Gradients of scalar fields are required during finite volume computation of fluid flow problems, where inconsistent gradients could lead to incorrect solutions. However, certain gradients reconstruction schemes like the linear least squares, despite being consistent, give rise to numerical instabilities on highly distorted meshes [3, 4]. Therefore, the efficacy of a gradient reconstruction scheme cannot be judged only in terms of its accuracy. For least squares reconstruction, the choice of the weights provide an indirect means to introduce robustness into the scheme. But a better idea is to directly introduce a damping parameter into the scheme, which was proposed in a flexible gradient scheme by Nishikawa [13]. The key idea in [13] is first to obtain gradients using conventional least squares approach and then use these gradients to compute the “α\alpha-damped” gradients, which are then averaged to obtain the centroidal gradients. The parameter ‘α\alpha’ can be controlled to directly introduce damping without compromising the accuracy of the computed gradients. Additionally, it is also shown that for a specific value of ‘α\alpha’, the gradients become fourth order accurate on uniform Cartesian meshes. In this section, we propose a generalization of the flexible gradient idea using the generalized gradient reconstruction formalism of section 2. To motivate this, we first demonstrate the construction of a flexible variant of the Modified Green-Gauss (MGG) scheme [10].

5.1 A flexible variant of the MGG gradient scheme

The Modified Green-Gauss (MGG) scheme of Deka et al. [10] shown in Eq. 11 in section 3, reconstructs centroidal gradients from face normal derivatives, which are evaluated using Zwart reconstruction (see [10]),

ϕn|fϕf𝐧f=α(ϕjϕi|𝐱j𝐱i|)+(ϕi+ϕj2)(𝐧fα𝐫f),\frac{\partial\phi}{\partial n}\Big{|}_{f}\equiv\nabla\phi_{f}\cdot\mathbf{n}_{f}=\alpha\left(\frac{\phi_{j}-\phi_{i}}{|\mathbf{x}_{j}-\mathbf{x}_{i}|}\right)+\left(\frac{\nabla\phi_{i}+\nabla\phi_{j}}{2}\right)\cdot(\mathbf{n}_{f}-\alpha\mathbf{r}_{f}), (15)

where 𝐧f\mathbf{n}_{f} and 𝐫f\mathbf{r}_{f} are unit vectors along the face normal and along the line joining cell center “ii” to the face sharing neighbour cell center “jj”, respectively. In principle, Zwart reconstruction expresses the vector 𝐧f\mathbf{n}_{f} in (ϕf𝐧f)(\nabla\phi_{f}\cdot\mathbf{n}_{f}) as, α𝐫f+(𝐧fα𝐫f)\alpha\mathbf{r}_{f}+(\mathbf{n}_{f}-\alpha\mathbf{r}_{f}). The ‘α𝐫f\alpha\mathbf{r}_{f}’ contribution can be written in terms of the centroidal values since 𝐫f\mathbf{r}_{f} is along the direction of the line joining the cell centers (first part on the right hand side of 15) whereas the ‘(𝐧fα𝐫f)(\mathbf{n}_{f}-\alpha\mathbf{r}_{f})’ contribution is expressed in terms of an average of the centroidal gradients (second part on the right hand side of Eq. 15). While the right hand side of Eq. 15 is directly employed to obtain MGG, it is possible to re-arrange it as,

ϕn|f=(ϕi+ϕj2)𝐧fConsistent+α(ϕjϕi|𝐱j𝐱i|(ϕi+ϕj2)𝐫f)Damping.\frac{\partial\phi}{\partial n}\Big{|}_{f}=\underbrace{\left(\frac{\nabla\phi_{i}+\nabla\phi_{j}}{2}\right)\cdot\mathbf{n}_{f}}_{\mbox{Consistent}}+\underbrace{\alpha\left(\frac{\phi_{j}-\phi_{i}}{|\mathbf{x}_{j}-\mathbf{x}_{i}|}-\left(\frac{\nabla\phi_{i}+\nabla\phi_{j}}{2}\right)\cdot\mathbf{r}_{f}\right)}_{\mbox{Damping}}. (16)

Here, the first term on the right hand side could be interpreted as a consistent O(h)O(h) accurate evaluation of the face normal derivative. The second term can be viewed as a damping component since it effectively represents a difference in the approximation of the quantity (ϕf𝐫f)(\nabla\phi_{f}\cdot\mathbf{r}_{f}), weighted by the parameter α\alpha. One could also re-write the second term upto O(h)O(h) accuracy, as, α((ϕRϕL)/|𝐱j𝐱i|)\alpha\left((\phi_{R}-\phi_{L})/|\mathbf{x}_{j}-\mathbf{x}_{i}|\right), where, ϕL=ϕi+ϕi(𝐱f𝐱i)\phi_{L}=\phi_{i}+\nabla\phi_{i}\cdot(\mathbf{x}_{f}-\mathbf{x}_{i}) and ϕR=ϕj+ϕj(𝐱f𝐱j)\phi_{R}=\phi_{j}+\nabla\phi_{j}\cdot(\mathbf{x}_{f}-\mathbf{x}_{j}), which is equivalent in form to the damping component of the flexible scheme proposed by Nishikawa [13]. In the original formulation of MGG [10], the parameter α\alpha is a fixed constant, chosen as (𝐧f𝐫f)(\mathbf{n}_{f}\cdot\mathbf{r}_{f}). This is a geometrically intuitive choice as it makes the vector ‘(𝐧fα𝐫f)(\mathbf{n}_{f}-\alpha\mathbf{r}_{f})’ orthogonal to ‘𝐧f\mathbf{n}_{f}’, thereby decreasing the implicit contribution with decreasing non-orthogonality. However, from a reconstruction accuracy perspective, the value of α\alpha is not constrained by any geometric considerations. Therefore, adopting α\alpha as a constant free-parameter, one can turn MGG into a flexible implicit gradient scheme.

Instead of the implicit formulation, we could also re-frame the scheme into a two-step explicit procedure (similar to [13]) with the purpose of numerical stabilization. The weighted LSQ gradients are known to be consistent but unstable for Euler computations on distorted meshes [3, 4]. We therefore compute these gradients as the first step which can be then employed in determining the normal derivative in Eq. 15 in the second step. This makes the process explicit and use of the damping parameter provides the flexibility to ensure convergence of the numerical approach with the gradients obtained by this two-step approach. While we have introduced this concept with reference to the MGG gradients, it is indeed possible to generalize this approach as discussed in the following section.

5.2 A general flexible scheme

For a general gradient scheme, it is shown through the proposed formalism in section 2 that, the centroidal gradients are reconstructed from the quantity (𝐛fϕf)(\mathbf{b}_{f}\cdot\nabla\phi_{f}) in a defined neighbourhood. Similar to the face normal splitting in Zwart reconstruction, we can split the vector 𝐛f\mathbf{b}_{f} as,

𝐛f|𝐛f|=α𝐫f+(𝐛f|𝐛f|α𝐫f),\frac{\mathbf{b}_{f}}{|\mathbf{b}_{f}|}=\alpha\mathbf{r}_{f}+\left(\frac{\mathbf{b}_{f}}{|\mathbf{b}_{f}|}-\alpha\mathbf{r}_{f}\right),

which gives,

𝐛fϕf\displaystyle{\bf b}_{f}\cdot\nabla{\phi}_{f} =α|𝐛f|(𝐫fϕf)+(𝐛fα|𝐛f|𝐫f)ϕf\displaystyle=\alpha|\mathbf{b}_{f}|\left(\mathbf{r}_{f}\cdot\nabla{\phi}_{f}\right)+({\bf b}_{f}-\alpha|\mathbf{b}_{f}|\mathbf{r}_{f})\cdot\nabla\phi_{f} (17)
=α|𝐛f|(ϕjϕi|𝐱j𝐱i|)+(𝐛fα|𝐛f|𝐫f)(ϕj+ϕi2).\displaystyle=\alpha|\mathbf{b}_{f}|\left(\frac{\phi_{j}-\phi_{i}}{|\mathbf{x}_{j}-\mathbf{x}_{i}|}\right)+(\mathbf{b}_{f}-\alpha|\mathbf{b}_{f}|\mathbf{r}_{f})\cdot\left(\frac{{\nabla\phi}_{j}+{\nabla\phi}_{i}}{2}\right).

This can again be shown as a sum of a consistent and damping part similar to Eq. 16. Therefore, by substituting Eq. 17 into the right hand side of Eq. 5, we can obtain a nominally first order accurate implicit flexible variant of any gradient scheme444From error analyses similar to the ones outlined in appendix A, it is easy to show that the generalized α\alpha-damped gradients in Eq. 17 reconstruct nominally first order accurate centroidal gradients..

The generalized flexible scheme can also be adopted into a two-step explicit stabilization mechanism for an existing ‘unstable’ scheme similar the one proposed by Nishikawa [13]. Suppose we have a gradient scheme represented by the geometric vectors (𝐚f,𝐛f)(\mathbf{a}_{f},\mathbf{b}_{f}) that is unstable on a poorly conditioned mesh. The idea would be to compute the centroidal gradients using that scheme as the first step (lets denote them as ϕ~\tilde{\nabla\phi}). In the second step, we substitute these gradients into the implicit part on the right hand side of Eq. 17, i.e,

𝐛fϕf=α|𝐛f|(ϕjϕi|𝐱j𝐱i|)+(𝐛fα|𝐛f|𝐫f)(ϕj~+ϕi~2).\displaystyle{\bf b}_{f}\cdot\nabla{\phi}_{f}=\alpha|\mathbf{b}_{f}|\left(\frac{\phi_{j}-\phi_{i}}{|\mathbf{x}_{j}-\mathbf{x}_{i}|}\right)+(\mathbf{b}_{f}-\alpha|\mathbf{b}_{f}|\mathbf{r}_{f})\cdot\left(\frac{\tilde{{\nabla\phi}_{j}}+\tilde{{\nabla\phi}_{i}}}{2}\right). (18)

This substituted into Eq. 5 leads to the two-step flexible variant of a general scheme. For numerical stabilization, the value of α\alpha has to be suitably chosen. It is, however, not possible for the generalization to specify how the flexible parameter has to be chosen to increase the robustness of a scheme, especially on arbitrary unstructured meshes. One could perform a modified wave-number analysis on a one-dimensional uniform grid to get an idea of the role of α\alpha, similar to Nishikawa [13]. But it is easy to show, that for a one-dimensional grid the geometric vectors degenerate to constant scalars and therefore the centroidal gradients degenerate to the same expression for all flexible schemes, including the one shown in [13]. Therefore, one can expect that on meshes closer to a uniform Cartesian mesh, decreasing α\alpha from unity should increase the numerical damping (at α=1\alpha=1 the undamped scheme is recovered). We, however, stress that the trends need not necessarily reciprocate in the same manner on arbitrary unstructured meshes and can only be determined by numerical tests. Nonetheless, the presence of a flexible parameter does provide a means to introduce damping for highly distorted meshes where gradients computed from a consistent scheme could cause numerical instabilities in flow computations.

6 General discussions and summary

In this work, we have presented a generalization of gradient reconstruction schemes in cell-centered unstructured finite volume method. The key components of the proposed framework are a pair of geometric vectors defined in a suitably chosen neighbourhood of a cell, different choices of which yield different gradient schemes. Commonly employed gradient reconstruction schemes generally belong to either the Green-Gauss family or the least squares family, both of which are built from starkly different philosophies. The proposed formalism shows that they can be mathematically unified under a common framework. But as these schemes can be conveniently derived from their own mathematical principles, it might appear that the proposed generalization merely serves as a post facto mathematical ‘fitting’ tool. The authors, however, believe that it is not just the intended purpose of this framework.

The generalization provides some important insights into the basic philosophy of gradient reconstruction. It shows that every nominally first order accurate gradient scheme effectively reconstructs centroidal gradients from the directional derivative of the scalar along specific directions in a defined neighbourhood. This viewpoint is not trivial and, to the best of the authors’ knowledge, has not been perceived before, as it is not seen from either the divergence theorem or the minimization based route. The only known generalization of gradient schemes is based on the idea of orthogonal and oblique projections proposed by Syrakos et al. [9]. Their framework has a similar flavor to the one proposed here as it also has a dyadic sum that requires inversion. But there is an important distinction between the two formalisms that is worth understanding. The framework proposed by Syrakos et al. [9] begins with obtaining a first order accurate estimate of the change in the scalar along a particular direction, using the value and gradients at the centroid of a cell “ii”, i.e.,

Δϕf=ϕfϕi=𝐑fϕi.\Delta\phi_{f}=\phi_{f}-\phi_{i}=\mathbf{R}_{f}\cdot\nabla\phi_{i}. (19)

Here, “ff” denotes a point in a compact neighbourhood about “ii”. The above expression is now multiplied by another vector 𝐕f\mathbf{V}_{f}, and then summed across the neighbourhood to obtain the generalized gradient formula,

f𝐕fΔϕf=(f𝐕f𝐑f)ϕi.\sum_{f}\mathbf{V}_{f}\Delta\phi_{f}=\Big{(}\sum_{f}\mathbf{V}_{f}\otimes\mathbf{R}_{f}\Big{)}\nabla\phi_{i}. (20)

Comparing this to Eq. 5, it can be easily seen that the vector 𝐕f\mathbf{V}_{f} is equivalent to 𝐚f\mathbf{a}_{f}. Also, Δϕf\Delta\phi_{f} on the left hand side of Eq. 20 can be seen as an evaluation of the quantity 𝐑fϕi\mathbf{R}_{f}\cdot\nabla\phi_{i} (from Eq. 19), which is effectively the directional derivative of ϕ\phi along the vector 𝐑f\mathbf{R}_{f}. Therefore, we can draw an equivalence of 𝐑f\mathbf{R}_{f} to 𝐛f\mathbf{b}_{f}, but that is not strictly true. The way in which the formulation proposed by Syrakos et al. [9] is built, 𝐑f\mathbf{R}_{f} always points from the cell center “ii” to some point “ff” in the defined neighbourhood. The location of “ff” is kept arbitrary, which provides a degree of freedom in the choice of 𝐑f\mathbf{R}_{f}, but the vector always passes through the cell center “ii”. This restriction is not imposed on the vector 𝐛f\mathbf{b}_{f} in our framework. Physically it means that at conception, the framework proposed by Syrakos et al. [9] reconstructs centroidal gradients from the variation of the scalar between the cell center and an arbitrary point in the neighbourhood, whereas we propose that the same variation could be taken between any two arbitrary points in a compact neighbourhood. Of course, it is always possible to express an arbitrary 𝐛f\mathbf{b}_{f} vector as a sum of 𝐑f\mathbf{R}_{f} and another vector to obtain some form of a generalization like [9], but at a philosophical level, our proposition has a different interpretation. It says that instead of the ϕ\phi difference between the cell center and an arbitrary ‘point’, it is, in fact, the change in ϕ\phi along an arbitrary ‘direction’ that is required to reconstruct nominally first order accurate centroidal gradients.

The implication of this insight is apparent from the re-derivation of some of the existing gradient schemes. From section 3, one can notice that for the traditional Green-Gauss and least squares reconstruction, the vector 𝐛f\mathbf{b}_{f} is either 𝐱f𝐱i\mathbf{x}_{f}-\mathbf{x}_{i} (for GG) or 𝐱j𝐱i\mathbf{x}_{j}-\mathbf{x}_{i} (for LSQ), both of which pass through “ii”, and therefore can be comfortably derived using the framework of Syrakos et al. [9] as well as ours. But for schemes like the MGG or FLSQ, where 𝐛f\mathbf{b}_{f} is along the face normal (which for an arbitrary unstructured mesh does not pass through cell centers), it not clear how the framework of Syrakos et al. [9] can be used to derive them. The arbitrariness of 𝐛f\mathbf{b}_{f} also allows for construction of hybrid schemes by just using 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} vectors directly from any two known schemes as shown in section 4. In addition, the perspective of reconstructing centroidal gradients from directional derivatives allows us to create flexible variants of known schemes as shown in section 5. The idea is to introduce an additional damping component in the evaluation of the directional derivative that is dependent on the centroidal gradients. These centroidal gradients could be evaluated apriori from a base scheme that is possibly unstable and then substituted into the α\alpha-damped version of the directional derivatives. With a suitably chosen value of the parameter α\alpha, the reconstructed gradients can introduce stability to finite volume computations without compromising the gradient accuracy. From a user perspective, this provides a simple route to increasing the robustness of their solver by modifying their choice of gradient reconstruction scheme into the flexible variant.

While the novelties of the proposed framework have been explained, it is incumbent upon us to highlight some of its shortcomings. The mathematical generalization proposed here does not outline a clear directive as to how the geometric vectors are to be chosen to construct a new gradient reconstruction scheme. The only constraints on the geometric vectors are,

  1. 1.

    The geometric vectors should depend on the mesh metrics,

  2. 2.

    Their magnitudes should be O(hk)O(h^{k}), where k>0k>0, and,

  3. 3.

    The sum of their dyadic product over the chosen neighbourhood should be an invertible tensor.

These guidelines are reasonably arbitrary from the point of view of directing possible choices of 𝐚f\mathbf{a}_{f} and 𝐛f\mathbf{b}_{f} to construct a scheme. The generalization, however, does indicate that one need not necessarily follow the traditional routes, like the divergence theorem or a minimization idea, to derive a first order accurate gradient reconstruction scheme. A good example is the Taylor-Gauss (TG) gradient scheme [8, 9] which is derivable neither from the GG or the LSQ route, but can be easily obtained from the unified framework of Syrakos et al. [9] as well as ours. Despite not being derivable from either routes, the scheme has flavor of both GG and LSQ families [8, 9], simply because the geometric vectors that define the scheme are borrowed from GG or LSQ. The generalization, therefore, allows us to see the mathematical hybridization that exists in the TG scheme, and could possibly pave a way for more such hybrid schemes in the future. Nevertheless, the framework does not specify how such a hybridization could be ‘better’ or ‘worse’ that a conventional scheme. As like in most cases, these can only be determined by numerical tests. Similarly in the extension to flexible gradient schemes, the generalization does not specify how to choose the flexible parameter to increase robustness of a given scheme. It is not generally possible to do so on arbitrary unstructured meshes as the degree of damping is highly dependent on the scheme as well as the solution. This is demonstrated in a future work by the same authors, where the proposed generalization of α\alpha-damped scheme is used to construct flexible variants of some known schemes.

\bmhead

Acknowledgments

The authors would like to express their gratitude to Thibault Pringuey for his write-up on CFD Online detailing the ideas behind fvc::reconstruct in OpenFOAM which motivated the present study. The last author would like to acknowledge the support from Science and Engineering Research Board (SERB), Government of India through the MATRICS grant MTR/2019/000241 during the course of this work.

Statements and Declarations

Funding

This work was supported by Science and Engineering Research Board (SERB), Government of India through the MATRICS grant MTR/2019/000241.

Competing interests

The authors declare that they have no competing interests.

Author contributions

All authors contributed equally to the work.

Availability of data and materials

No data were generated or analyzed in this study.

Appendix A Error analysis

A.1 Term 1:

In obtaining Eq. 5 from Eq. 4, the following term is ignored,

E1=1f(𝐚f𝐛f)(ϕc(𝐱f𝐱i)+ϵ1).E_{1}=-\mathbb{P}^{-1}\sum_{f}(\mathbf{a}_{f}\otimes\mathbf{b}_{f})\cdot({\nabla\nabla\phi}_{c}\cdot(\mathbf{x}_{f}-\mathbf{x}_{i})+\epsilon_{1}). (21)

Here, ϵ1O(h2)\epsilon_{1}\sim O(h^{2}). From Cauchy-Schwarz and triangle inequalities, we can write,

E11f(𝐚f𝐛f)((𝐱f𝐱i))(ϕc),||E_{1}||\leq||{\mathbb{P}}^{-1}||\sum_{f}\left(||\mathbf{a}_{f}\otimes\mathbf{b}_{f}||\right)\left(||(\mathbf{x}_{f}-\mathbf{x}_{i})||\right)\left(||{\nabla\nabla\phi}_{c}||\right),

where, norms are defined in the usual sense of dot product for vectors and tensor inner product for second order tensors. From equation 1, we can write 𝐚f𝐛fO(hp+q)||\mathbf{a}_{f}\otimes\mathbf{b}_{f}||\sim{O}(h^{p+q}) and therefore, 1O(hpq))||{\mathbb{P}}^{-1}||\sim{O}(h^{-p-q)}). Assuming a reasonably compact neighbour stencil, (𝐱f𝐱i)O(h)||(\mathbf{x}_{f}-\mathbf{x}_{i})||\sim{O}(h). Since any norm of the scalar field ϕ\phi is independent of the grid metrics, we can therefore write,

E1O(h).||E_{1}||\sim{O}(h).

A.2 Term 2:

The second term on the right hand side of Eq. 6 is an error term, which when substituted into Eq. 5 gives the contribution,

E2=1f𝐚f((δf,2+δf,1)(ϕf:(𝐛f𝐛f)+ϵ2)).E_{2}=\mathbb{P}^{-1}\sum_{f}\mathbf{a}_{f}\left((\delta_{f,2}+\delta_{f,1})({\nabla\nabla\phi}_{f}:(\mathbf{b}_{f}\otimes\mathbf{b}_{f})+\epsilon_{2})\right). (22)

Here, ϵ2O(h2)\epsilon_{2}\sim O(h^{2}). Similar to E1E_{1}, the norm of E2E_{2} can be written as,

E2\displaystyle||E_{2}|| ||1||f||𝐚f||(|δf,2+|δf,1|)(||𝐛f𝐛f||).\displaystyle\leq||\mathbb{P}^{-1}||\sum_{f}||{\bf a}_{f}||\>(|\delta_{f,2}+|\delta_{f,1}|)\>(||{{\bf b}_{f}}\otimes{{\bf b}_{f}}||).

The choice of δ\delta were such that |δf,1𝐛f|O(h)|\delta_{f,1}\mathbf{b}_{f}|\sim O(h) and |δf,2𝐛f|O(h)|\delta_{f,2}\mathbf{b}_{f}|\sim O(h). Therefore, from Eq. 1, we can write, |δf,1|O(h1q)|\delta_{f,1}|\sim O(h^{1-q}) and |δf,2|O(h1q)|\delta_{f,2}|\sim O(h^{1-q}). With 𝐛f𝐛fO(h2q)||\mathbf{b}_{f}\otimes\mathbf{b}_{f}||\sim O(h^{2q}), and 𝐚fO(hp)||\mathbf{a}_{f}||\sim O(h^{p}), while 1O(hpq)||\mathbb{P}^{-1}||\sim{O}(h^{-p-q}), we get,

E2O(h).||E_{2}||\sim{O}(h).

A.3 Term 3:

The values of ϕ\phi at 𝐱f,1\mathbf{x}_{f,1} and 𝐱f,2\mathbf{x}_{f,2} can be interpolated from neighbour cells. Let us consider an interpolation that is O(hr)O(h^{r}) accurate. In that case, the error term incurred in Eq. 7 due to interpolation can be written as,

E3=1f𝐚f(ϵϕf,2ϵϕf,1δf,2δf,1),E_{3}=\mathbb{P}^{-1}\sum_{f}\mathbf{a}_{f}\left(\dfrac{\epsilon_{\phi_{f},2}-\epsilon_{\phi_{f},1}}{\delta_{f,2}-\delta_{f,1}}\right), (23)

where ϵϕf,1,ϵϕf,2O(hr)\epsilon_{\phi_{f},1},\epsilon_{\phi_{f},2}\sim O(h^{r}), are the interpolation errors for ϕf,1,ϕf,2\phi_{f,1},\phi_{f,2}. Using Cauchy-Schwartz and triangle inequalities, we can write,

E3\displaystyle||E_{3}|| 1f𝐚f(ϵϕf,2ϵϕf,1)1(δf(2)δf(1)).\displaystyle\leq||\mathbb{P}^{-1}||\sum_{f}||{\bf a}_{f}||\>(||\epsilon_{\phi_{f},2}-\epsilon_{\phi_{f},1}||)\>\Big{|}\Big{|}\dfrac{1}{{(\delta^{(2)}_{f}-\delta^{(1)}_{f})}}\Big{|}\Big{|}.

Since |δf,1𝐛f|O(h)|\delta_{f,1}\mathbf{b}_{f}|\sim O(h) and |δf,2𝐛f|O(h)|\delta_{f,2}\mathbf{b}_{f}|\sim O(h), δf(2)δf(1)1O(hq1)||\delta^{(2)}_{f}-\delta^{(1)}_{f}||^{-1}\sim O(h^{q-1}). Since, 𝐚fO(hp)||\mathbf{a}_{f}||\sim O(h^{p}), while 1O(hpq)||\mathbb{P}^{-1}||\sim{O}(h^{-p-q}), we get

E3𝐎(hr1)||E_{3}||\approx{\bf O}(h^{r-1})

Therefore, for E3E_{3} to be at max O(h)O(h), it is required that r2r\geq 2.

Appendix B Some useful identities

The dyadic sum defined for the Green-Gauss family (GG and MGG reconstructions) can be simplified employing a simple identity for the volume of a cell. While this identity is commonplace in unstructured computations, we present its concise derivation for the sake of completeness and benefit of interested readers. The Gauss divergence theorem for a vector field 𝐅\bf F reads,

Ω𝐅dΩ=𝐅𝐧ds.\int_{\Omega}\nabla\cdot{\bf F}\,\mbox{d}\Omega=\oint{\bf F}\cdot{\bf n}\,\mbox{d}s. (24)

Letting 𝐅=𝐜ϕ\bf F={\bf c}\phi where ϕ\phi is a scalar and 𝐜\bf c is a constant vector gives (after simplification),

ΩϕdΩ=ϕ𝐧ds.\int_{\Omega}\nabla\phi\,\mbox{d}\Omega=\oint\phi\,{\bf n}\,\mbox{d}s. (25)

Consider that ϕ=𝐱𝐞\phi=\mathbf{x}\cdot\mathbf{e}, where 𝐱\mathbf{x} is a position vector and 𝐞\mathbf{e} is any unit vector in Cartesian co-ordinates. Then, Eq. 25 becomes,

Ω(𝐱𝐞)dΩ=(𝐱𝐞)𝐧ds=f(𝐱f𝐞f)𝐧fΔsf.\int_{\Omega}\nabla(\mathbf{x}\cdot\mathbf{e})\,\mbox{d}\Omega=\oint(\mathbf{x}\cdot\mathbf{e})\,{\bf n}\mbox{d}s=\sum_{f}(\mathbf{x}_{f}\cdot\mathbf{e}_{f})\,\mathbf{n}_{f}\Delta s_{f}. (26)

This is an exact relation which computes the integral over each face using single-point Gauss quadrature. One can then show with little effort that Eq. 26 reduces to the following relations if 𝐞=[10]T{\bf e}=[1~{}0]^{T},

f(xfxi)nxΔsf=Ωi,\displaystyle\displaystyle\sum_{f}(x_{f}-x_{i})\,n_{x}\,\Delta s_{f}=\Omega_{i},
f(xfxi)nyΔsf=0.\displaystyle\displaystyle\sum_{f}(x_{f}-x_{i})\,n_{y}\,\Delta s_{f}=0.

A similar exercise for 𝐞=[01]T{\bf e}=[0~{}1]^{T} gives,

f(yfyi)nxΔsf=0,\displaystyle\displaystyle\sum_{f}(y_{f}-y_{i})\,n_{x}\,\Delta s_{f}=0,
f(yfyi)nyΔsf=Ωi,\displaystyle\displaystyle\sum_{f}(y_{f}-y_{i})\,n_{y}\,\Delta s_{f}=\Omega_{i},

where Ωi\Omega_{i} is the volume of the cell ii, the summation is over the faces of ii and the identity f𝐧fΔsf=0\sum_{f}{\bf n}_{f}\Delta s_{f}=0 has been employed. The latter identity itself can be easily obtained from Eq. 25 by setting ϕ\phi equal to any constant scalar. The three dimensional analogues of all the above identities follow easily.

References

  • \bibcommenthead
  • Blazek [2005] Blazek, J.: Computational Fluid Dynamics Principles and Applications. Elsevier, Amsterdam; San Diego (2005)
  • Moukalled et al. [2016] Moukalled, F., Mangani, L., Darwish, M., et al.: The Finite Volume Method in Computational Fluid Dynamics. Springer, New York (2016)
  • Mavriplis [2003] Mavriplis, D.: Revisiting the least-squares procedure for gradient reconstruction on unstructured meshes. In: 16th AIAA Computational Fluid Dynamics Conference, p. 3986 (2003)
  • Shima et al. [2013] Shima, E., Kitamura, K., Haga, T.: Green–gauss/weighted-least-squares hybrid gradient reconstruction for arbitrary polyhedra unstructured grids. AIAA journal 51(11), 2740–2747 (2013)
  • Diskin and Thomas [2008] Diskin, B., Thomas, J.: Accuracy of gradient reconstruction on grids with high aspect ratio. NIA report 12, 2008 (2008)
  • Wang et al. [2017] Wang, Q., Ren, Y.-X., Pan, J., Li, W.: Compact high order finite volume method on unstructured grids iii: Variational reconstruction. Journal of Computational physics 337, 1–26 (2017)
  • Nishikawa [2018] Nishikawa, H.: From hyperbolic diffusion scheme to gradient method: Implicit green–gauss gradients for unstructured grids. Journal of Computational Physics 372, 126–160 (2018)
  • Oxtoby et al. [2019] Oxtoby, O., Syrakos, A., Villiers, E., Varchanis, S., Dimakopoulos, Y., Tsamopoulos, J.: A family of first-order accurate gradient schemes for finite volume methods (2019)
  • Syrakos et al. [2023] Syrakos, A., Oxtoby, O., de Villiers, E., Varchanis, S., Dimakopoulos, Y., Tsamopoulos, J.: A unification of least-squares and green–gauss gradients under a common projection-based gradient reconstruction framework. Mathematics and Computers in Simulation 205, 108–141 (2023) https://doi.org/10.1016/j.matcom.2022.09.008
  • Deka et al. [2018] Deka, M., Brahmachary, S., Thirumalaisamy, R., Dalal, A., Natarajan, G.: A new green–gauss reconstruction on unstructured meshes. part i: Gradient reconstruction. Journal of Computational Physics (2018)
  • Feng [2020] Feng, X.: Cell-centered finite volume methods. In: Magnetohydrodynamic Modeling of the Solar Corona and Heliosphere, pp. 125–337. Springer, ??? (2020)
  • Deka et al. [2023] Deka, M., Assam, A., Natarajan, G.: A least squares perspective of green–gauss gradient schemes. Physics of Fluids 35(3) (2023)
  • Nishikawa [2021] Nishikawa, H.: A flexible gradient method for unstructured-grid solvers. International Journal for Numerical Methods in Fluids 93(6), 2015–2021 (2021)
  • Sozer et al. [2014] Sozer, E., Brehm, C., Kiris, C.C.: Gradient calculation methods on arbitrary polyhedral unstructured meshes for cell-centered cfd solvers. In: 52nd Aerospace Sciences Meeting, p. 1440 (2014)
  • Syrakos et al. [2017] Syrakos, A., Varchanis, S., Dimakopoulos, Y., Goulas, A., Tsamopoulos, J.: A critical analysis of some popular methods for the discretisation of the gradient operator in finite volume methods. Physics of Fluids 29(12), 127103 (2017)
  • Diskin and Thomas [2011] Diskin, B., Thomas, J.L.: Comparison of node-centered and cell-centered unstructured finite-volume discretizations: inviscid fluxes. AIAA journal 49(4), 836–854 (2011)
  • Jasak [1996] Jasak, H.: Error analysis and estimation for the finite volume method with applications to fluid flows. PhD thesis, Imperial College London (University of London) (1996)
  • Mahesh et al. [2004] Mahesh, K., Constantinescu, G., Moin, P.: A numerical method for large-eddy simulation in complex geometries. Journal of Computational Physics 197(1), 215–240 (2004)
  • Ghods and Herrmann [2013] Ghods, S., Herrmann, M.: A consistent rescaled momentum transport method for simulating large density ratio incompressible multiphase flows using level set methods. Physica Scripta 2013(T155), 014050 (2013)
  • Manik et al. [2018] Manik, J., Dalal, A., Natarajan, G.: A generic algorithm for three-dimensional multiphase flows on unstructured meshes. International Journal of Multiphase Flow 106, 228–242 (2018)
  • Weller [2014] Weller, H.: Non-orthogonal version of the arbitrary polygonal c-grid and a new diamond grid. Geoscientific Model Development 7(3), 779–797 (2014)
  • Aguerre et al. [2018] Aguerre, H.J., Pairetti, C.I., Venier, C.M., Damián, S.M., Nigro, N.M.: An oscillation-free flow solver based on flux reconstruction. Journal of Computational Physics 365, 135–148 (2018)