Energy Metering blocks > Flow Metering (AGA_US) function block

AGA_US function block execution

The configurer determines the algorithms used by the block by means of the following parameters:
  • METER_TYPE specifies whether an orifice (differential pressure) or turbine (pulse) meter is being used.

  • AGA8_OPT determines whether the AGA8 parameters are to be calculated by the block or manually entered. The AGA8 parameters include DEN_BASE and DEN_FLW (base and flowing density) and the report parameters ZB, ZF, F_PV, and REL_DEN (compressibility factors, supercompressibility, and relative density). When manual entry is chosen, the block does not calculate HTG_VAL (gas volumetric heating value), which otherwise is calculated using the ISO6976 technique, not AGA8.

    The AGA8 parameters are calculated using the mole fractions for the 21 components in GAS_COMP and the base and flowing temperatures and pressures using the detail characterization method. The AGA8 parameters are calculated whenever PRES_IN or TEMP_IN changes from the last AGA8 calculation value by the amount specified in the tunable PRES_CHNG and TEMP_CHNG parameters (but at a minimum of every 60 seconds). The AGA8 parameters are calculated whenever GAS_COMP changes. If the fluid is not a natural gas or other hydrocarbon gas whose components are included in GAS_COMP, choose to manually enter the AGA8 parameters.

  • For orifice meters TAP_TYPE specifies the type of differential pressure tap, either Flange, Radius (D-D/2), or Corner taps. The block does not calculate flow rates for pipe taps (2.5D-8D).

  • PRES_TAP specifies the location of the static pressure tap, either Upstream or Downstream of the orifice plate.

The AGA3 algorithm calculates the mass flow rate when METER_TYPE is Differential Pressure. The coefficient of discharge is a function of pipe Reynolds number, which is a function of mass flow. Therefore the calculation of mass flow is an iterative one. The parameter ITERATE_LIM3 specifies the maximum number of iterations allowed. The default value is generally sufficient, but may need to be increased for viscous liquids. The entire flow equation is calculated each block execution, so averaging techniques are not necessary. From the mass flow the block uses the base and flowing densities from AGA8 to determine volumetric flow rates at base and flowing conditions. Like AGA3, the AGA8 algorithms are iterative. ITERATE_LIM8 specifies the maximum iterations allowed. If an iteration limit is violated, the condition is indicated in ERROR_STATE, as are any violations of the limits of use for orifice metering (see Status Handling).

When METER_TYPE is Turbine, the value on IN is the volumetric flow rate at flowing conditions (expected to be wired from the output of a Pulse Input function block). AGA_US converts this flow to volumetric flow at base conditions and mass flow using the two density values.

Energy flow rate is determined from volumetric flow at base conditions and the volumetric heating value per ISO6976. In the AGA_US block this is the superior heating value (not inferior) and is for the real gas (not ideal gas). It is based on the mole fractions in GAS_COMP and 15/15 data from ISO6976, which corresponds to a base temperature of 59°F and base pressure of 14.696 psig.

Totalization parameters

The block accumulates base volumetric flow each scan into two parameters, CURR_VOLUME (reset by TIMER_ACCUM) and VOL_ACCUM (reset by RESET_ACCUM). CURR_VOLUME is intended for daily or shift totals. VOL_ACCUM is intended for ad hoc totals to monitor short-term contract usage. The block accumulates energy flow in CURR_ENERGY and flow hours in CURR_HRS_ON. Flow hours is the number of hours of flow through the pipe where IN > LOW_CUT (for differential pressure meter types) or VOL_FLW_F > 0.0 (for turbine meter types).

The reset parameter TIMER_ACCUM is intended to be wired from OUT_D of a Date Time Event (DTE) function block, which allows resetting at regular intervals. When TIMER_ACCUM is 0, the block allows the accumulation of CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON. When greater than 0, the block copies the three CURR_ parameters to the three LAST_ parameters and resets the CURR_ parameters. CURR implies today or this shift or whatever the current period represents.

If the Restore parameter values after restart check box is selected in the Module Properties dialog, all of the accumulation parameters retain their current value during a module (partial) download and a controller restart. The accumulation parameters have status.