
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 FLUENT according to the following methods:
GreenGauss Theorem
When the GreenGauss theorem is used to compute the gradient of the scalar at the cell center , the following discrete form is written as
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.
GreenGauss CellBased Gradient Evaluation
By default, the face value, , in Equation 25.322 is taken from the arithmetic average of the values at the neighboring cell centers, i.e.,
(25.323) 
To use this option, select GreenGauss CellBased under Gradient Option in the Solver panel.
GreenGauss NodeBased Gradient Evaluation
Alternatively, can be computed by the arithmetic average of the nodal values on the face.
where is the number of nodes on the face.
The nodal values, in Equation 25.324, are constructed from the weighted average of the cell values surrounding the nodes, following the approach originally proposed by Holmes and Connel[ 146] and Rauch et al.[ 298]. This scheme reconstructs exact values of a linear function at a node from surrounding cellcentered values on arbitrary unstructured meshes by solving a constrained minimization problem, preserving a secondorder spatial accuracy.
The nodebased averaging scheme is known to be more accurate than the default cellbased scheme for unstructured meshes, most notably for triangular and tetrahedral meshes.

The nodebased gradient method is not available with polyhedral meshes.

To use this option, select GreenGauss NodeBased under Gradient Option in the Solver panel.
Least Squares CellBased Gradient Evaluation
In this method the solution is assumed to vary linearly. In Figure 25.3.4, the change in cell values between cell and along the vector from the centroid of cell to cell , can be expressed as
(25.325) 
If we write similar equations for each cell surrounding the cell c0, we obtain the following system written in compact form:
(25.326) 
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 nonsquare coefficient matrix in a leastsquares sense.
The above linearsystem of equation is overdetermined and can be solved by decomposing the coefficient matrix using GramSchmidt process [ 11]. This decomposition yields a matrix of weights for each cell. Thus for our cellcentered 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 ,
(25.327)  
(25.328)  
(25.329) 
When a flow solution is solved on polyhedral meshes the cellbased least squares gradients are recommended for use over the default cellbased gradients, particularly if a more accurate flow solution is required. Although, the cellbased least squares gradients are available for use with triangular and tetrahedral meshes and their accuracy is comparable to nodebased gradients, it is best if the nodebased gradients are used on these meshes since they are known to be more stable.
To use this option, go to the Solver panel and select Least Squares Cell Based under Gradient Option.