        ## 18.3.3 Evaluation of Gradients and Derivatives

Gradients are needed not only for constructing values of a scalar at the cell faces, but also for computing secondary diffusion terms and velocity derivatives. The gradient of a given variable is used to discretize the convection and diffusion terms in the flow conservation equations. The gradients are computed in ANSYS FLUENT according to the following methods:

• Green-Gauss Cell-Based

• Green-Gauss Node-Based

• Least Squares Cell-Based

To learn how to apply the various gradients, see this section in the separate User's Guide.

Green-Gauss Theorem

When the Green-Gauss theorem is used to compute the gradient of the scalar at the cell center , the following discrete form is written as   (18.3-22)

where is the value of at the cell face centroid, computed as shown in the sections below. The summation is over all the faces enclosing the cell.

By default, the face value, , in Equation  18.3-22 is taken from the arithmetic average of the values at the neighboring cell centers, i.e., (18.3-23)

Alternatively, can be computed by the arithmetic average of the nodal values on the face. (18.3-24)

where is the number of nodes on the face.

The nodal values, in Equation  18.3-24, are constructed from the weighted average of the cell values surrounding the nodes, following the approach originally proposed by Holmes and Connel[ 132] and Rauch et al.[ 286]. This scheme reconstructs exact values of a linear function at a node from surrounding cell-centered values on arbitrary unstructured meshes by solving a constrained minimization problem, preserving a second-order spatial accuracy.

The node-based gradient is known to be more accurate than the cell-based gradient particularly on irregular (skewed and distorted) unstructured meshes, however, it is relatively more expensive to compute than the cell-based gradient scheme. The node-based gradient method is not available with polyhedral meshes.

In this method the solution is assumed to vary linearly. In Figure  18.3.4, the change in cell values between cell and along the vector from the centroid of cell to cell , can be expressed as (18.3-25) If we write similar equations for each cell surrounding the cell c0, we obtain the following system written in compact form: (18.3-26)

Where [J] is the coefficient matrix which is purely a function of geometry.

The objective here is to determine the cell gradient ( î    ) by solving the minimization problem for the system of the non-square coefficient matrix in a least-squares sense.

The above linear-system of equation is over-determined and can be solved by decomposing the coefficient matrix using the Gram-Schmidt process [ 6]. This decomposition yields a matrix of weights for each cell. Thus for our cell-centered scheme this means that the three components of the weights ( ) are produced for each of the faces of cell c0.

Therefore, the gradient at the cell center can then be computed by multiplying the weight factors by the difference vector ,   (18.3-27)   (18.3-28)   (18.3-29)

On irregular (skewed and distorted) unstructured meshes, the accuracy of the least-squares gradient method is comparable to that of the node-based gradient (and both are much more superior compared to the cell-based gradient). However, it is less expensive to compute the least-squares gradient than the node-based gradient. Therefore, it has been selected as the default gradient method in the ANSYS FLUENT solver.     Previous: 18.3.2 Temporal Discretization
Up: 18.3 Discretization