15.5.17. massFlowAve

Computes the average of a variable or expression on the specified 2D location. The massFlowAve function enables you to select the fluids to use for the calculation. The returned result is the average variable or expression value, evaluated according to the formula:

(15–3)

where represents the variable or expression being averaged and represents the local mass flow (net local mass flow if more than one fluid is selected). Each summation term is evaluated on, and corresponds to, a node on the 2D locator. The mass flow for each term is derived from summing contributions from the surrounding solver integration points. As a result, the denominator evaluates to the net mass flow through the 2D locator.

In cases where there is significant flow, but little or no net flow through the 2D locator (as can happen with recirculation), the denominator of the averaging formula becomes small, and the resulting average value may become adversely affected. In such cases, the massFlowAveAbs (see massFlowAveAbs) function is a viable alternative to the massFlowAve function.

[<Phase>.]massFlowAve(<Variable|Expression>)@<Location>

where:

  • [<Phase>.] is an optional prefix that is not required for single-phase flows. For details, see CEL Functions with Multiphase Flow.

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

  • <Location> is any fluid surface (such as Inlets, Outlets, Openings and fluid-fluid interfaces) or injection region. For an injection region, the mass flow at each affected vertex is used. An error is raised if the location specified is not 2D.

massFlowAve(Density)@Plane1 calculates the average density on Plane1 weighted by the mass flow at each point on the location.

Examples:

  • Tools > Function Calculator Example

    This example calculates the average velocity on Plane1 weighted by the mass flow for all fluids assigned to each point on Plane1:

    Function: massFlowAve, Location: Plane1, Variable: Velocity, Phase: All Fluids

  • Tools > Command Editor Example

    >calculate massFlowAve, <Variable|Expression>, <Location>, [<Phase>]
    

See Details on Mass Flow Related Functions.