# www.squinch.org

AGA3

AGA 3 takes meter settings, compressibilities, a differential pressure, static pressure and temperature, and calculates base volume, base volume flow rate or volume correction factor.  It requires flowing and base pressure, temperature and compressibility.

AGA3:  Enter a flowing temperature, pressure and compressibility, a base temperature, pressure and compressibility, a flowing volume and a meter factor, then press Calculate.
 Value Input SI units US units Units ? SI    US SI US Diff Press = kPa in WC @ 60F Flowing Pressure = kPaA PSIA Flowing Temp = Deg C Deg F Downstream Pressure Tap? Orifice diameter = mm in Pipe diameter = mm in Flowing Compressibility = - - Base Compressibility = Deg C Deg F Ideal specific gravity = - - Base Pressure = kPaA PSIA Base Temp = Deg C Deg F Orifice diameter temp = Deg C Deg F Orifice therm exp. coeff. = mm/(mm Deg C) in/(in Deg F) Pipe diameter temp = Deg C Deg F Pipe therm exp. coeff. = mm/(mm Deg C) in/(in Deg F)

Results Table

AGA 3 1990 Algorithm
The algorithm for the calculation is as follows.  There is one iterative loop to solve for Reynolds number and coefficient of discharge.  The standard defines many constants.
Constants of the form A and S are simply fixed numbers and do not change based on the system of units used.
Constants of the form Nx are unit conversion constants and are determined based on the system of units in use for the calculation.

For further details on the calculation, refer to part 4 of the specification AGA3 1990 / GPA 8185-92.

• Set unit conversion constants for the unit system chosen
• Calculate flowing density: Dflow = Pf * Mrair * Gi / (Zf  * R * (Tf + N5))
• Calculate base density: Dbase = Pb * Mrair * Gi / (Zb  * R * (Tb + N5))
• Calculate size of orifice at flowing conditions: d' = d * [1 + alpha1 * (Tf - Tdm)]
• Calculate size of meter run at flowing conditions: D' = D * [1 + alpha2 * (Tf - TDm)]
• Calculate beta = d' / D'
• Calculate velocity of approach factor:  Ev = 1 / sqrt( 1 - beta 4)
• Calculate factors required for coefficient of discharge / Reynolds number iteration loop.
• Upstream tap position L1 = N4/D
• Downstream tap position L2 = N4/D
• Upstream tap correction factor Tu = [ S2 + S3 e( -8.5 L1) + S4 e (-6.0 L1) ] * beta 1.1
• Dimensionless downstream dam height M2 = (2 L2 ) / (1 - beta)
• Downstream tap correction factor Td = S6 [ M2 + S7 M2 1.3 ] beta 1.1
• Small pipe correction factor: if D <= (A4 N4) then Ts = A3 (1 - beta) (A4 - D/N4)  else Ts = 0
• Cd0 = A0 + A1 beta 2 + A2 B 8 + Tu + Td + Ts
• Cd1 = A5 * beta 0.7 (250) 0.7
• Cd2 = A6 * beta 4 (250) 0.35
• Cd3 = S1 * beta 4 * beta 0.8 (4.75) 0.8 (250) 0.35
• Cd4 = (S5Tu + S8Td ) beta 0.8 (4.75) 0.8
• Orifice differential pressure to flowing pressure ratio x = dP / (N3 * Pf)
• Yp = (0.41 + 0.35 beta 4) / k
• Expansion factor Y = 1 - Yp x
• Calculate Ftmp = Ev Y d 2
• Calculate FIc = 4000 NIc D * mu / Ftmp
• Calculate FIp = sqrt ( 2 * Dflow * dP)
• Calculate FI = FIc / FIp
• Limit FI to 1000 maximum.
• Set up coefficient of discharge loop by setting Cd(FT) to Cd0
• Perform loop:
• X = Fl / Cd(FT)
• If X < Xc then
• Fc = Cd0 + ( Cd1 X0.35 + Cd2 + Cd3 X 0.8 ) X 0.35 + Cd4 X 0.8
• Dc = ( 0.7 Cd1 X 0.35 + 0.35 Cd2 + 1.15 Cd3 X 0.8 ) X 0.35 + 0.8 Cd4 X 0.8
• else
• Fc = Cd0 + Cd1 X 0.7 + ( Cd2 + Cd3 X 0.8 ) ( A - B / X ) + Cd4 X 0.8
• Dc = 0.7 Cd1 X 0.7 + ( Cd2 + Cd3 X 0.8 ) * B / X + 0.8 Cd3 ( A - B / X) X 0.8 + 0.8 Cd4 X 0.8
• Calculate the amount to vary Cd(FT) by: dCd = [ Cd (FT) - Fc] / [ 1 + Dc / Cd(FT)  ]
• Change Cd(FT) : Cd(FT) = Cd(FT)  - dCd
• Until the absolute value of dCd is less than 0.000005.
• Reynolds number is Re = 4000 / X
• Calculate mass flow factor: F mass = ( pi  / 4) * Nc Ev d2
• Calculate mass flow rate: qm = F mass Cd(FT) Y * sqrt (2 Dflow * dP )
• Calculate standard flow rate: qv = qm / D base