15.5.4. ave

The ave function calculates the arithmetic average of a variable or expression on the specified location.


Note:  CFD-Post and CFX-Solver may compute slightly different average values due to differences in how the average is computed:

  • CFD-Post computes the arithmetically averaged vertex value for the location. Specifically, the average is computed by summing the vertex values and then dividing by the number of vertices.

  • CFX-Solver computes the arithmetically averaged face value for the location. Specifically, the average is computed by summing the face values and then dividing by the number of faces. The value for a particular face is computed by arithmetically averaging the vertex values of the face.

  • Computation in CFX-Solver and CFD-Post can be made more consistent by using expert parameter bcp arithmetic aver sum option. For details, see Discretization Parameters in the CFX-Solver Modeling Guide.


Results will be biased towards areas of high nodal density on the location. To obtain a mesh independent result, you should use the lengthAve, areaAve, volumeAve or massFlowAve functions.

ave(<Variable|Expression>)@<Location>

where:

  • <Variable|Expression> is a variable or expression.

  • <Location> is any 3D region (such as a domain or subdomain) or injection region. For an injection region, an average value is calculated at each position and then these are averaged over all positions.

The ave function can be used on point, 1D, 2D, or 3D locations, or injection regions.

ave(Yplus)@Default calculates the mean Yplus values from each node on the default walls.

15.5.4.1. Tools > Command Editor Example

>calculate ave, <Variable|Expression>, <Location>

Note:  To obtain a mesh-independent result, you should use the lengthAve, areaAve, volumeAve or massFlowAve functions.


The average of a vector value is calculated as an average of its magnitudes, not the magnitude of component averages. As an example, for velocity:

(15–1)

where

(15–2)

15.5.4.2. Tools > Function Calculator Example

This example calculates the mean temperature at all nodes in the selected domain.

Function: ave, Location: MainDomain, Variable: Temperature.