15.5.31. volumeInt

Integrates the specified variable or expression over the volume location. This is the 3D equivalent of the areaInt function.

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

where:

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

  • <Location> is any 3D region (such as a domain or subdomain). An error is raised if the location specified is not a 3D object.

For example, volumeInt(Density)@StaticMixer will calculate the total fluid mass in the domain StaticMixer.


Note:  Because the Density variable represents the average density during the timestep rather than the density at the end of the timestep, the volumeInt(Density) does not accurately give the mass of fluid at the end of a timestep. Use the mass() function instead.

The volumeInt function does not take into account the porosity of the location specified for porous domains. To include the porosity effect in your calculation, you need to manually multiply your argument by:

  • The Volume Porosity if you want to evaluate the integral on the fluid side

  • (1-Volume Porosity) if you want to evaluate the integral on the solid side


15.5.31.1. Tools > Command Editor Example

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

15.5.31.2. Tools > Function Calculator Example

This example calculates the integral of density (the total mass) in Volume1.

Function: volumeInt, Location: Volume1, Variable: Density