# Orifice plates, flow nozzles, Venturi tubes, cone and wedge meters (fluids.flow_meter)

This module contains correlations, standards, and solvers for orifice plates and other flow metering devices. Both permanent and measured pressure drop is included, and models work for both liquids and gases. A number of non-standard devices are included, as well as limited two-phase functionality.

For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker or contact the author at Caleb.Andrew.Bell@gmail.com.

- Flow Meter Solvers

- Flow Meter Interfaces

- Orifice Plate Correlations

- Nozzle Flow Meters

- Venturi Tube Meters

- Cone Meters

- Wedge Meters

- Flow Meter Utilities

## Flow Meter Solvers

fluids.flow_meter.differential_pressure_meter_solver(D, rho, mu, k=None, D2=None, P1=None, P2=None, m=None, meter_type='ISO 5167 orifice', taps=None, tap_position=None, C_specified=None, epsilon_specified=None)

  Calculates either the mass flow rate, the upstream pressure, the second pressure value, or the orifice diameter for a differential pressure flow meter based on the geometry of the meter, measured pressures of the meter, and the density, viscosity, and isentropic exponent of the fluid. This solves an equation iteratively to obtain the correct flow rate.

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    k float, optional

      Isentropic exponent of fluid; required unless epsilon_specified is specified , [-]

    D2 float, optional

      Diameter of orifice, or venturi meter orifice, or flow tube orifice, or cone meter end diameter, or wedge meter fluid flow height, [m]

    P1 float, optional

      Static pressure of fluid upstream of differential pressure meter at the cross-section of the pressure tap, [Pa]

    P2 float, optional

      Static pressure of fluid downstream of differential pressure meter or at the prescribed location (varies by type of meter) [Pa]

    m float, optional

      Mass flow rate of fluid through the flow meter, [kg/s]

    meter_type str

      One of {‘conical orifice’, ‘orifice’, ‘machined convergent venturi tube’, ‘ISO 5167 orifice’, ‘Miller quarter circle orifice’, ‘Hollingshead venturi sharp’, ‘segmental orifice’, ‘Miller conical orifice’, ‘Miller segmental orifice’, ‘quarter circle orifice’, ‘Hollingshead v cone’, ‘wedge meter’, ‘eccentric orifice’, ‘venuri nozzle’, ‘rough welded convergent venturi tube’, ‘ISA 1932 nozzle’, ‘ISO 15377 quarter-circle orifice’, ‘Hollingshead venturi smooth’, ‘Hollingshead orifice’, ‘cone meter’, ‘Hollingshead wedge’, ‘Miller orifice’, ‘long radius nozzle’, ‘ISO 15377 conical orifice’, ‘unspecified meter’, ‘as cast convergent venturi tube’, ‘Miller eccentric orifice’, ‘ISO 15377 eccentric orifice’}, [-]

    taps str, optional

      The orientation of the taps; one of ‘corner’, ‘flange’, ‘D’, or ‘D/2’; applies for orifice meters only, [-]

    tap_position str, optional

      The rotation of the taps, used only for the eccentric orifice case where the pressure profile is are not symmetric; ‘180 degree’ for the normal case where the taps are opposite the orifice bore, and ‘90 degree’ for the case where, normally for operational reasons, the taps are near the bore [-]

    C_specified float, optional

      If specified, the correlation for the meter type is not used - this value is used for C

    epsilon_specified float, optional

      If specified, the correlation for the fluid expansibility is not used - this value is used for \(\epsilon\). Many publications recommend this be set to 1 for incompressible fluids [-]

  Returns
    ans float

      One of m, the mass flow rate of the fluid; P1, the pressure upstream of the flow meter; P2, the second pressure tap’s value; and D2, the diameter of the measuring device; units of respectively, kg/s, Pa, Pa, or m

  Notes

  See the appropriate functions for the documentation for the formulas and references used in each method.

  The solvers make some assumptions about the range of values answers may be in.

  Note that the solver for the upstream pressure uses the provided values of density, viscosity and isentropic exponent; whereas these values all depend on pressure (albeit to a small extent). An outer loop should be added with pressure-dependent values calculated in it for maximum accuracy.

  It would be possible to solve for the upstream pipe diameter, but there is no use for that functionality.

  If a meter has already been calibrated to have a known C, this may be provided and it will be used in place of calculating one.

  Examples

      >>> differential_pressure_meter_solver(D=0.07366, D2=0.05, P1=200000.0,
      ... P2=183000.0, rho=999.1, mu=0.0011, k=1.33,
      ... meter_type='ISO 5167 orifice', taps='D')
      7.702338035732167

      >>> differential_pressure_meter_solver(D=0.07366, m=7.702338, P1=200000.0,
      ... P2=183000.0, rho=999.1, mu=0.0011, k=1.33,
      ... meter_type='ISO 5167 orifice', taps='D')
      0.04999999990831885

## Flow Meter Interfaces

fluids.flow_meter.differential_pressure_meter_dP(D, D2, P1, P2, C=None, meter_type='ISO 5167 orifice')

  Calculates the non-recoverable pressure drop of a differential pressure flow meter based on the geometry of the meter, measured pressures of the meter, and for most models the meter discharge coefficient.

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    D2 float

      Diameter of orifice, or venturi meter orifice, or flow tube orifice, or cone meter end diameter, or wedge meter fluid flow height, [m]

    P1 float

      Static pressure of fluid upstream of differential pressure meter at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of differential pressure meter or at the prescribed location (varies by type of meter) [Pa]

    C float, optional

      Coefficient of discharge (used only in orifice plates, and venturi nozzles), [-]

    meter_type str

      One of {‘conical orifice’, ‘orifice’, ‘machined convergent venturi tube’, ‘ISO 5167 orifice’, ‘Miller quarter circle orifice’, ‘Hollingshead venturi sharp’, ‘segmental orifice’, ‘Miller conical orifice’, ‘Miller segmental orifice’, ‘quarter circle orifice’, ‘Hollingshead v cone’, ‘wedge meter’, ‘eccentric orifice’, ‘venuri nozzle’, ‘rough welded convergent venturi tube’, ‘ISA 1932 nozzle’, ‘ISO 15377 quarter-circle orifice’, ‘Hollingshead venturi smooth’, ‘Hollingshead orifice’, ‘cone meter’, ‘Hollingshead wedge’, ‘Miller orifice’, ‘long radius nozzle’, ‘ISO 15377 conical orifice’, ‘unspecified meter’, ‘as cast convergent venturi tube’, ‘Miller eccentric orifice’, ‘ISO 15377 eccentric orifice’}, [-]

  Returns
    dP float

      Non-recoverable pressure drop of the differential pressure flow meter, [Pa]

  Notes

  See the appropriate functions for the documentation for the formulas and references used in each method.

  Wedge meters, and venturi nozzles do not have standard formulas available for pressure drop computation.

  Examples

      >>> differential_pressure_meter_dP(D=0.07366, D2=0.05, P1=200000.0,
      ... P2=183000.0, meter_type='as cast convergent venturi tube')
      1788.5717754177406

fluids.flow_meter.differential_pressure_meter_C_epsilon(D, D2, m, P1, P2, rho, mu, k, meter_type, taps=None, tap_position=None, C_specified=None, epsilon_specified=None)

  Calculates the discharge coefficient and expansibility of a flow meter given the mass flow rate, the upstream pressure, the second pressure value, and the orifice diameter for a differential pressure flow meter based on the geometry of the meter, measured pressures of the meter, and the density, viscosity, and isentropic exponent of the fluid.

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    D2 float

      Diameter of orifice, or venturi meter orifice, or flow tube orifice, or cone meter end diameter, or wedge meter fluid flow height, [m]

    m float

      Mass flow rate of fluid through the flow meter, [kg/s]

    P1 float

      Static pressure of fluid upstream of differential pressure meter at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of differential pressure meter or at the prescribed location (varies by type of meter) [Pa]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    k float

      Isentropic exponent of fluid, [-]

    meter_type str

      One of {‘conical orifice’, ‘orifice’, ‘machined convergent venturi tube’, ‘ISO 5167 orifice’, ‘Miller quarter circle orifice’, ‘Hollingshead venturi sharp’, ‘segmental orifice’, ‘Miller conical orifice’, ‘Miller segmental orifice’, ‘quarter circle orifice’, ‘Hollingshead v cone’, ‘wedge meter’, ‘eccentric orifice’, ‘venuri nozzle’, ‘rough welded convergent venturi tube’, ‘ISA 1932 nozzle’, ‘ISO 15377 quarter-circle orifice’, ‘Hollingshead venturi smooth’, ‘Hollingshead orifice’, ‘cone meter’, ‘Hollingshead wedge’, ‘Miller orifice’, ‘long radius nozzle’, ‘ISO 15377 conical orifice’, ‘unspecified meter’, ‘as cast convergent venturi tube’, ‘Miller eccentric orifice’, ‘ISO 15377 eccentric orifice’}, [-]

    taps str, optional

      The orientation of the taps; one of ‘corner’, ‘flange’, ‘D’, or ‘D/2’; applies for orifice meters only, [-]

    tap_position str, optional

      The rotation of the taps, used only for the eccentric orifice case where the pressure profile is are not symmetric; ‘180 degree’ for the normal case where the taps are opposite the orifice bore, and ‘90 degree’ for the case where, normally for operational reasons, the taps are near the bore [-]

    C_specified float, optional

      If specified, the correlation for the meter type is not used - this value is returned for C

    epsilon_specified float, optional

      If specified, the correlation for the fluid expansibility is not used - this value is returned for \(\epsilon\), [-]

  Returns
    C float

      Coefficient of discharge of the specified flow meter type at the specified conditions, [-]

    expansibility float

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Notes

  This function should be called by an outer loop when solving for a variable.

  The latest ISO formulations for expansibility are used with the Miller correlations.

  Examples

      >>> differential_pressure_meter_C_epsilon(D=0.07366, D2=0.05, P1=200000.0,
      ... P2=183000.0, rho=999.1, mu=0.0011, k=1.33, m=7.702338035732168,
      ... meter_type='ISO 5167 orifice', taps='D')
      (0.6151252900244296, 0.9711026966676307)

fluids.flow_meter.differential_pressure_meter_beta(D, D2, meter_type)

  Calculates the beta ratio of a differential pressure meter.

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    D2 float

      Diameter of orifice, or venturi meter orifice, or flow tube orifice, or cone meter end diameter, or wedge meter fluid flow height, [m]

    meter_type str

      One of {‘conical orifice’, ‘orifice’, ‘machined convergent venturi tube’, ‘ISO 5167 orifice’, ‘Miller quarter circle orifice’, ‘Hollingshead venturi sharp’, ‘segmental orifice’, ‘Miller conical orifice’, ‘Miller segmental orifice’, ‘quarter circle orifice’, ‘Hollingshead v cone’, ‘wedge meter’, ‘eccentric orifice’, ‘venuri nozzle’, ‘rough welded convergent venturi tube’, ‘ISA 1932 nozzle’, ‘ISO 15377 quarter-circle orifice’, ‘Hollingshead venturi smooth’, ‘Hollingshead orifice’, ‘cone meter’, ‘Hollingshead wedge’, ‘Miller orifice’, ‘long radius nozzle’, ‘ISO 15377 conical orifice’, ‘unspecified meter’, ‘as cast convergent venturi tube’, ‘Miller eccentric orifice’, ‘ISO 15377 eccentric orifice’}, [-]

  Returns
    beta float

      Differential pressure meter diameter ratio, [-]

  Examples

      >>> differential_pressure_meter_beta(D=0.2575, D2=0.184,
      ... meter_type='cone meter')
      0.6995709873957624

fluids.flow_meter.dP_orifice(D, Do, P1, P2, C)

  Calculates the non-recoverable pressure drop of an orifice plate based on the pressure drop and the geometry of the plate and the discharge coefficient.

  \[\Delta\bar w = \frac{\sqrt{1-\beta^4(1-C^2)}-C\beta^2} {\sqrt{1-\beta^4(1-C^2)}+C\beta^2} (P_1 - P_2)\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of orifice at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of orifice at the cross-section of the pressure tap, [Pa]

    C float

      Coefficient of discharge of the orifice, [-]

  Returns
    dP float

      Non-recoverable pressure drop of the orifice plate, [Pa]

  Notes

  This formula can be well approximated by:

  \[\Delta\bar w = \left(1 - \beta^{1.9}\right)(P_1 - P_2)\]

  The recoverable pressure drop should be recovered by 6 pipe diameters downstream of the orifice plate.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  Examples

      >>> dP_orifice(D=0.07366, Do=0.05, P1=200000.0, P2=183000.0, C=0.61512)
      9069.474705745388

## Orifice Plate Correlations

fluids.flow_meter.C_Reader_Harris_Gallagher(D, Do, rho, mu, m, taps='corner')

  Calculates the coefficient of discharge of the orifice based on the geometry of the plate, measured pressures of the orifice, mass flow rate through the orifice, and the density and viscosity of the fluid.

  \[\begin{split}C = 0.5961 + 0.0261\beta^2 - 0.216\beta^8 + 0.000521\left(\frac{ 10^6\beta}{Re_D}\right)^{0.7}\\ + (0.0188 + 0.0063A)\beta^{3.5} \left(\frac{10^6}{Re_D}\right)^{0.3} \\ +(0.043 + 0.080\exp(-10L_1) -0.123\exp(-7L_1))(1-0.11A)\frac{\beta^4} {1-\beta^4} \\ - 0.031(M_2' - 0.8M_2'^{1.1})\beta^{1.3}\end{split}\]
  \[M_2' = \frac{2L_2'}{1-\beta}\]
  \[A = \left(\frac{19000\beta}{Re_{D}}\right)^{0.8}\]
  \[Re_D = \frac{\rho v D}{\mu}\]

  If D < 71.12 mm (2.8 in.) (Note this is a continuous addition; there is no discontinuity):

  \[C += 0.11(0.75-\beta)\left(2.8-\frac{D}{0.0254}\right)\]

  If the orifice has corner taps:

  \[L_1 = L_2' = 0\]

  If the orifice has D and D/2 taps:

  \[L_1 = 1\]
  \[L_2' = 0.47\]

  If the orifice has Flange taps:

  \[L_1 = L_2' = \frac{0.0254}{D}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    m float

      Mass flow rate of fluid through the orifice, [kg/s]

    taps str

      The orientation of the taps; one of ‘corner’, ‘flange’, ‘D’, or ‘D/2’, [-]

  Returns
    C float

      Coefficient of discharge of the orifice, [-]

  Notes

  The following limits apply to the orifice plate standard [1]:

  The measured pressure difference for the orifice plate should be under 250 kPa.

  There are roughness limits as well; the roughness should be under 6 micrometers, although there are many more conditions to that given in [1].

  For orifice plates with D and D/2 or corner pressure taps:

  - Orifice bore diameter muse be larger than 12.5 mm (0.5 inches)

  - Pipe diameter between 50 mm and 1 m (2 to 40 inches)

  - Beta between 0.1 and 0.75 inclusive

  - Reynolds number larger than 5000 (for \(0.10 \le \beta \le 0.56\)) or for \(\beta \ge 0.56, Re_D \ge 16000\beta^2\)

  For orifice plates with flange pressure taps:

  - Orifice bore diameter muse be larger than 12.5 mm (0.5 inches)

  - Pipe diameter between 50 mm and 1 m (2 to 40 inches)

  - Beta between 0.1 and 0.75 inclusive

  - Reynolds number larger than 5000 and also larger than \(170000\beta^2 D\).

  This is also presented in Crane’s TP410 (2009) publication, whereas the 1999 and 1982 editions showed only a graph for discharge coefficients.

  References

  1(1,2)

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  3

    Reader-Harris, M. J., “The Equation for the Expansibility Factor for Orifice Plates,” Proceedings of FLOMEKO 1998, Lund, Sweden, 1998: 209-214.

  4

    Reader-Harris, Michael. Orifice Plates and Venturi Tubes. Springer, 2015.

  Examples

      >>> C_Reader_Harris_Gallagher(D=0.07391, Do=0.0222, rho=1.165, mu=1.85E-5,
      ... m=0.12, taps='flange')
      0.5990326277163659

fluids.flow_meter.C_eccentric_orifice_ISO_15377_1998(D, Do)

  Calculates the coefficient of discharge of an eccentric orifice based on the geometry of the plate according to ISO 15377, first introduced in 1998 and also presented in the second 2007 edition. It also appears in BS 1042-1.2: 1989.

  \[C = 0.9355 - 1.6889\beta + 3.0428\beta^2 - 1.7989\beta^3\]

  This type of plate is normally used to avoid obstructing entrained gas, liquid, or sediment.

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

  Returns
    C float

      Coefficient of discharge of the eccentric orifice, [-]

  Notes

  No correction for where the orifice bore is located is included.

  The following limits apply to the orifice plate standard [1]:

  - Bore diameter above 50 mm.

  - Pipe diameter between 10 cm and 1 m.

  - Beta ratio between 0.46 and 0.84

  - \(2\times 10^5 \beta^2 \le Re_D \le 10^6 \beta\)

  The uncertainty of this equation for C is said to be 1% if beta is under 0.75, otherwise 2%.

  The orifice_expansibility function should be used with this method as well.

  Additional specifications are:

  - The thickness of the orifice should be between 0.005`D` and 0.02`D`.

  - Corner tappings should be used, with hole diameter between 3 and 10 mm. The angular orientation of the tappings matters because the flow meter is not symmetrical. The angle should ideally be at the top or bottom of the plate, opposite which side the bore is on - but this can cause issues with deposition if the taps are on the bottom or gas bubbles if the taps are on the taps. The taps are often placed 30 degrees away from the ideal position to counteract this effect, with under an extra 2% error.

  Some comparisons with CFD results can be found in [2].

  References

  1

    TC 30/SC 2, ISO. ISO/TR 15377:1998, Measurement of Fluid Flow by Means of Pressure-Differential Devices - Guide for the Specification of Nozzles and Orifice Plates beyond the Scope of ISO 5167-1.

  2

    Yashvanth, S., Varadarajan Seshadri, and J. YogeshKumarK. “CFD Analysis of Flow through Single and Multi Stage Eccentric Orifice Plate Assemblies,” 2017.

  Examples

      >>> C_eccentric_orifice_ISO_15377_1998(.2, .075)
      0.6351923828125

fluids.flow_meter.C_quarter_circle_orifice_ISO_15377_1998(D, Do)

  Calculates the coefficient of discharge of a quarter circle orifice based on the geometry of the plate according to ISO 15377, first introduced in 1998 and also presented in the second 2007 edition. It also appears in BS 1042-1.2: 1989.

  \[C = 0.73823 + 0.3309\beta - 1.1615\beta^2 + 1.5084\beta^3\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

  Returns
    C float

      Coefficient of discharge of the quarter circle orifice, [-]

  Notes

  The discharge coefficient of this type of orifice plate remains constant down to a lower than normal Re, as occurs in highly viscous applications.

  The following limits apply to the orifice plate standard [1]:

  - Bore diameter >= 1.5 cm

  - Pipe diameter <= 50 cm

  - Beta ratio between 0.245 and 0.6

  - \(Re_d \le 10^5 \beta\)

  There is also a table in [1] which lists increased minimum upstream pipe diameters for pipes of different roughnesses; the higher the roughness, the larger the pipe diameter required, and the table goes up to 20 cm for rusty cast iron.

  Corner taps should be used up to pipe diameters of 40 mm; for larger pipes, corner or flange taps can be used. No impact on the flow coefficient is included in the correlation.

  The recommended expansibility method for this type of orifice is `orifice_expansibility`.

  References

  1(1,2)

    TC 30/SC 2, ISO. ISO/TR 15377:1998, Measurement of Fluid Flow by Means of Pressure-Differential Devices - Guide for the Specification of Nozzles and Orifice Plates beyond the Scope of ISO 5167-1.

  Examples

      >>> C_quarter_circle_orifice_ISO_15377_1998(.2, .075)
      0.77851484375000

fluids.flow_meter.C_Miller_1996(D, Do, rho, mu, m, subtype='orifice', taps='corner', tap_position='180 degree')

  Calculates the coefficient of discharge of any of the orifice types supported by the Miller (1996) [1] correlation set. These correlations cover a wide range of industrial applications and sizes. Most of them are functions of beta ratio and Reynolds number. Unlike the ISO standards, these correlations do not come with well defined ranges of validity, so caution should be applied using there correlations.

  The base equation is as follows, and each orifice type and range has different values or correlations for \(C_{\infty}\), b, and n.

  \[C = C_{\infty} + \frac{b}{{Re}_D^n}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    m float

      Mass flow rate of fluid through the orifice, [kg/s]

    subtype str, optional

      One of ‘orifice’, ‘eccentric orifice’, ‘segmental orifice’, ‘conical orifice’, or ‘quarter circle orifice’, [-]

    taps str, optional

      The orientation of the taps; one of ‘corner’, ‘flange’, ‘D and D/2’, ‘pipe’, or ‘vena contracta’; not all orifice subtypes support the all tap types [-]

    tap_position str, optional

      The rotation of the taps, used only for the eccentric orifice case where the pressure profile is are not symmetric; ‘180 degree’ for the normal case where the taps are opposite the orifice bore, and ‘90 degree’ for the case where, normally for operational reasons, the taps are near the bore [-]

  Returns
    C float

      Coefficient of discharge of the orifice, [-]

  Notes

  Many of the correlations transition at a pipe diameter of 100 mm to different equations, which will lead to discontinuous behavior.

  It should also be noted the author of these correlations developed a commercial flow meter rating software package, at [2]. He passed away in 2014, but contributed massively to the field of flow measurement.

  The numerous equations for the different cases are as follows:

  For all regular (concentric) orifices, the b equation is as follows and n = 0.75:

  \[b = 91.706\beta^{2.5}\]

  Regular (concentric) orifice, corner taps:

  \[C_{\infty} = 0.5959 + 0.0312\beta^2.1 - 0.184\beta^8\]

  Regular (concentric) orifice, flange taps, D > 58.4 mm:

  \[C_{\infty} = 0.5959 + 0.0312\beta^{2.1} - 0.184\beta^8 + \frac{2.286\beta^4}{(D_{mm}(1.0 - \beta^4))} - \frac{0.856\beta^3}{D_{mm}}\]

  Regular (concentric) orifice, flange taps, D < 58.4 mm:

  \[C_{\infty} = 0.5959 + 0.0312\beta^{2.1} - 0.184\beta^8 + \frac{0.039\beta^4}{(1.0 - \beta^4)} - \frac{0.856\beta^3}{D_{mm}}\]

  Regular (concentric) orifice, ‘D and D/2’ taps:

  \[C_{\infty} = 0.5959 + 0.0312\beta^{2.1} - 0.184\beta^8 + \frac{0.039\beta^4}{(1.0 - \beta^4)} - 0.01584\]

  Regular (concentric) orifice, ‘pipe’ taps:

  \[C_{\infty} = 0.5959 + 0.461\beta^{2.1} + 0.48\beta^8 + \frac{0.039\beta^4}{(1.0 - \beta^4)}\]

  For the case of a conical orifice, there is no tap dependence and one equation (b = 0, n = 0):

  \[C_{\infty} = 0.734 \text{ if } 250\beta \le Re \le 500\beta \text{ else } 0.730\]

  For the case of a quarter circle orifice, corner and flange taps have the same dependence (b = 0, n = 0):

  \[C_{\infty} = (0.7746 - 0.1334\beta^{2.1} + 1.4098\beta^8 + \frac{0.0675\beta^4}{(1 - \beta^4)} + 0.3865\beta^3)\]

  For all segmental orifice types, b = 0 and n = 0

  Segmental orifice, ‘flange’ taps, D < 10 cm:

  \[C_{\infty} = 0.6284 + 0.1462\beta^{2.1} - 0.8464\beta^8 + \frac{0.2603\beta^4}{(1-\beta^4)} - 0.2886\beta^3\]

  Segmental orifice, ‘flange’ taps, D > 10 cm:

  \[C_{\infty} = 0.6276 + 0.0828\beta^{2.1} + 0.2739\beta^8 - \frac{0.0934\beta^4}{(1-\beta^4)} - 0.1132\beta^3\]

  Segmental orifice, ‘vena contracta’ taps, D < 10 cm:

  \[C_{\infty} = 0.6261 + 0.1851\beta^{2.1} - 0.2879\beta^8 + \frac{0.1170\beta^4}{(1-\beta^4)} - 0.2845\beta^3\]

  Segmental orifice, ‘vena contracta’ taps, D > 10 cm:

  \[C_{\infty} = 0.6276 + 0.0828\beta^{2.1} + 0.2739\beta^8 - \frac{0.0934\beta^4}{(1-\beta^4)} - 0.1132\beta^3\]

  For all eccentric orifice types, n = 0.75 and b is fit to a polynomial of beta.

  Eccentric orifice, ‘flange’ taps, 180 degree opposite taps, D < 10 cm:

  \[C_{\infty} = 0.5917 + 0.3061\beta^{2.1} + .3406\beta^8 -\frac{.1019\beta^4}{(1-\beta^4)} - 0.2715\beta^3\]
  \[b = 7.3 - 15.7\beta + 170.8\beta^2 - 399.7\beta^3 + 332.2\beta^4\]

  Eccentric orifice, ‘flange’ taps, 180 degree opposite taps, D > 10 cm:

  \[C_{\infty} = 0.6016 + 0.3312\beta^{2.1} -1.5581\beta^8 + \frac{0.6510\beta^4}{(1-\beta^4)} - 0.7308\beta^3\]
  \[b = -139.7 + 1328.8\beta - 4228.2\beta^2 + 5691.9\beta^3 - 2710.4\beta^4\]

  Eccentric orifice, ‘flange’ taps, 90 degree side taps, D < 10 cm:

  \[C_{\infty} = 0.5866 + 0.3917\beta^{2.1} + .7586\beta^8 - \frac{.2273\beta^4}{(1-\beta^4)} - .3343\beta^3\]
  \[b = 69.1 - 469.4\beta + 1245.6\beta^2 -1287.5\beta^3 + 486.2\beta^4\]

  Eccentric orifice, ‘flange’ taps, 90 degree side taps, D > 10 cm:

  \[C_{\infty} = 0.6037 + 0.1598\beta^{2.1} -.2918\beta^8 + \frac{0.0244\beta^4}{(1-\beta^4)} - 0.0790\beta^3\]
  \[b = -103.2 + 898.3\beta - 2557.3\beta^2 + 2977.0\beta^3 - 1131.3\beta^4\]

  Eccentric orifice, ‘vena contracta’ taps, 180 degree opposite taps, D < 10 cm:

  \[C_{\infty} = 0.5925 + 0.3380\beta^{2.1} + 0.4016\beta^8 - \frac{.1046\beta^4}{(1-\beta^4)} - 0.3212\beta^3\]
  \[b = 23.3 -207.0\beta + 821.5\beta^2 -1388.6\beta^3 + 900.3\beta^4\]

  Eccentric orifice, ‘vena contracta’ taps, 180 degree opposite taps, D > 10 cm:

  \[C_{\infty} = 0.5922 + 0.3932\beta^{2.1} + .3412\beta^8 - \frac{.0569\beta^4}{(1-\beta^4)} - 0.4628\beta^3\]
  \[b = 55.7 - 471.4\beta + 1721.8\beta^2 - 2722.6\beta^3 + 1569.4\beta^4\]

  Eccentric orifice, ‘vena contracta’ taps, 90 degree side taps, D < 10 cm:

  \[C_{\infty} = 0.5875 + 0.3813\beta^{2.1} + 0.6898\beta^8 - \frac{0.1963\beta^4}{(1-\beta^4)} - 0.3366\beta^3\]
  \[b = -69.3 + 556.9\beta - 1332.2\beta^2 + 1303.7\beta^3 - 394.8\beta^4\]

  Eccentric orifice, ‘vena contracta’ taps, 90 degree side taps, D > 10 cm:

  \[C_{\infty} = 0.5949 + 0.4078\beta^{2.1} + 0.0547\beta^8 + \frac{0.0955\beta^4}{(1-\beta^4)} - 0.5608\beta^3\]
  \[b = 52.8 - 434.2\beta + 1571.2\beta^2 - 2460.9\beta^3 + 1420.2\beta^4\]

  References

  1

    Miller, Richard W. Flow Measurement Engineering Handbook. McGraw-Hill Education, 1996.

  2

    “RW Miller & Associates.” Accessed April 13, 2020. http://rwmillerassociates.com/.

  Examples

      >>> C_Miller_1996(D=0.07391, Do=0.0222, rho=1.165, mu=1.85E-5, m=0.12, taps='flange', subtype='orifice')
      0.599065557156788

fluids.flow_meter.orifice_expansibility(D, Do, P1, P2, k)

  Calculates the expansibility factor for orifice plate calculations based on the geometry of the plate, measured pressures of the orifice, and the isentropic exponent of the fluid.

  \[\epsilon = 1 - (0.351 + 0.256\beta^4 + 0.93\beta^8) \left[1-\left(\frac{P_2}{P_1}\right)^{1/\kappa}\right]\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of orifice at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of orifice at the cross-section of the pressure tap, [Pa]

    k float

      Isentropic exponent of fluid, [-]

  Returns
    expansibility float, optional

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Notes

  This formula was determined for the range of P2/P1 >= 0.80, and for fluids of air, steam, and natural gas. However, there is no objection to using it for other fluids.

  It is said in [1] that for liquids this should not be used. The result can be forced by setting k to a really high number like 1E20.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  Examples

      >>> orifice_expansibility(D=0.0739, Do=0.0222, P1=1E5, P2=9.9E4, k=1.4)
      0.9974739057343425

fluids.flow_meter.orifice_expansibility_1989(D, Do, P1, P2, k)

  Calculates the expansibility factor for orifice plate calculations based on the geometry of the plate, measured pressures of the orifice, and the isentropic exponent of the fluid.

  \[\epsilon = 1- (0.41 + 0.35\beta^4)\Delta P/\kappa/P_1\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of orifice at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of orifice at the cross-section of the pressure tap, [Pa]

    k float

      Isentropic exponent of fluid, [-]

  Returns
    expansibility float

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Notes

  This formula was determined for the range of P2/P1 >= 0.75, and for fluids of air, steam, and natural gas. However, there is no objection to using it for other fluids.

  This is an older formula used to calculate expansibility factors for orifice plates.

  In this standard, an expansibility factor formula transformation in terms of the pressure after the orifice is presented as well. This is the more standard formulation in terms of the upstream conditions. The other formula is below for reference only:

  \[\epsilon_2 = \sqrt{1 + \frac{\Delta P}{P_2}} - (0.41 + 0.35\beta^4) \frac{\Delta P}{\kappa P_2 \sqrt{1 + \frac{\Delta P}{P_2}}}\]

  [2] recommends this formulation for wedge meters as well.

  References

  1

    American Society of Mechanical Engineers. MFC-3M-1989 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2005.

  2

    Miller, Richard W. Flow Measurement Engineering Handbook. 3rd edition. New York: McGraw-Hill Education, 1996.

  Examples

      >>> orifice_expansibility_1989(D=0.0739, Do=0.0222, P1=1E5, P2=9.9E4, k=1.4)
      0.9970510687411718

fluids.flow_meter.ISO_15377_CONICAL_ORIFICE_C = 0.734

  Constant loss coefficient for conical orifice plates according to ISO 15377

## Nozzle Flow Meters

fluids.flow_meter.C_long_radius_nozzle(D, Do, rho, mu, m)

  Calculates the coefficient of discharge of a long radius nozzle used for measuring flow rate of fluid, based on the geometry of the nozzle, mass flow rate through the nozzle, and the density and viscosity of the fluid.

  \[C = 0.9965 - 0.00653\beta^{0.5} \left(\frac{10^6}{Re_D}\right)^{0.5}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of long radius nozzle orifice at flow conditions, [m]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    m float

      Mass flow rate of fluid through the nozzle, [kg/s]

  Returns
    C float

      Coefficient of discharge of the long radius nozzle orifice, [-]

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-3:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 3: Nozzles and Venturi Nozzles.

  Examples

      >>> C_long_radius_nozzle(D=0.07391, Do=0.0422, rho=1.2, mu=1.8E-5, m=0.1)
      0.9805503704679863

fluids.flow_meter.C_ISA_1932_nozzle(D, Do, rho, mu, m)

  Calculates the coefficient of discharge of an ISA 1932 style nozzle used for measuring flow rate of fluid, based on the geometry of the nozzle, mass flow rate through the nozzle, and the density and viscosity of the fluid.

  \[C = 0.9900 - 0.2262\beta^{4.1} - (0.00175\beta^2 - 0.0033\beta^{4.15}) \left(\frac{10^6}{Re_D}\right)^{1.15}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of nozzle orifice at flow conditions, [m]

    rho float

      Density of fluid at P1, [kg/m^3]

    mu float

      Viscosity of fluid at P1, [Pa*s]

    m float

      Mass flow rate of fluid through the nozzle, [kg/s]

  Returns
    C float

      Coefficient of discharge of the nozzle orifice, [-]

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-3:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 3: Nozzles and Venturi Nozzles.

  Examples

      >>> C_ISA_1932_nozzle(D=0.07391, Do=0.0422, rho=1.2, mu=1.8E-5, m=0.1)
      0.9635849973250495

fluids.flow_meter.C_venturi_nozzle(D, Do)

  Calculates the coefficient of discharge of an Venturi style nozzle used for measuring flow rate of fluid, based on the geometry of the nozzle.

  \[C = 0.9858 - 0.196\beta^{4.5}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of nozzle orifice at flow conditions, [m]

  Returns
    C float

      Coefficient of discharge of the nozzle orifice, [-]

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-3:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 3: Nozzles and Venturi Nozzles.

  Examples

      >>> C_venturi_nozzle(D=0.07391, Do=0.0422)
      0.9698996454169576

fluids.flow_meter.nozzle_expansibility(D, Do, P1, P2, k, beta=None)

  Calculates the expansibility factor for a nozzle or venturi nozzle, based on the geometry of the plate, measured pressures of the orifice, and the isentropic exponent of the fluid.

  \[\epsilon = \left\{\left(\frac{\kappa \tau^{2/\kappa}}{\kappa-1}\right) \left(\frac{1 - \beta^4}{1 - \beta^4 \tau^{2/\kappa}}\right) \left[\frac{1 - \tau^{(\kappa-1)/\kappa}}{1 - \tau} \right] \right\}^{0.5}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice of the venturi or nozzle, [m]

    P1 float

      Static pressure of fluid upstream of orifice at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of orifice at the cross-section of the pressure tap, [Pa]

    k float

      Isentropic exponent of fluid, [-]

    beta float, optional

      Optional beta ratio, which is useful to specify for wedge meters or flow meters which have a different beta ratio calculation, [-]

  Returns
    expansibility float

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Notes

  This formula was determined for the range of P2/P1 >= 0.75.

  Mathematically the equation cannot be evaluated at k = 1, but if the limit of the equation is taken the following equation is obtained and is implemented:

  \[\epsilon = \sqrt{\frac{- D^{4} P_{1} P_{2}^{2} \log{\left(\frac{P_{2}} {P_{1}} \right)} + Do^{4} P_{1} P_{2}^{2} \log{\left(\frac{P_{2}}{P_{1}} \right)}}{D^{4} P_{1}^{3} - D^{4} P_{1}^{2} P_{2} - Do^{4} P_{1} P_{2}^{2} + Do^{4} P_{2}^{3}}}\]

  Note also there is a small amount of floating-point error around the range of k ~1+1e-5 to ~1-1e-5, starting with 1e-7 and increasing to the point of giving values larger than 1 or zero in the k ~1+1e-12 to ~1-1e-12 range.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-3:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 3: Nozzles and Venturi Nozzles.

  Examples

      >>> nozzle_expansibility(D=0.0739, Do=0.0222, P1=1E5, P2=9.9E4, k=1.4)
      0.994570234456

## Venturi Tube Meters

fluids.flow_meter.ROUGH_WELDED_CONVERGENT_VENTURI_TUBE_C = 0.985

  Constant loss coefficient for rough-welded convergent venturi tubes

fluids.flow_meter.MACHINED_CONVERGENT_VENTURI_TUBE_C = 0.995

  Constant loss coefficient for machined convergent venturi tubes

fluids.flow_meter.AS_CAST_VENTURI_TUBE_C = 0.984

  Constant loss coefficient for as-cast venturi tubes

fluids.flow_meter.dP_venturi_tube(D, Do, P1, P2)

  Calculates the non-recoverable pressure drop of a venturi tube differential pressure meter based on the pressure drop and the geometry of the venturi meter.

  \[\epsilon = \frac{\Delta\bar w }{\Delta P}\]

  The \(\epsilon\) value is looked up in a table of values as a function of beta ratio and upstream pipe diameter (roughness impact).

  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of venturi tube at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of venturi tube at the cross-section of the pressure tap, [Pa]

    P2 float
      Static pressure of fluid downstream of venturi tube at the

        cross-section of the pressure tap, [Pa]

  Returns
    dP float

      Non-recoverable pressure drop of the venturi tube, [Pa]

  Notes

  The recoverable pressure drop should be recovered by 6 pipe diameters downstream of the venturi tube.

  Note there is some information on the effect of Reynolds number as well in [1] and [2], with a curve showing an increased pressure drop from 1E5-6E5 to with a decreasing multiplier from 1.75 to 1; the multiplier is 1 for higher Reynolds numbers. This is not currently included in this implementation.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-4:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 4: Venturi Tubes.

  Examples

      >>> dP_venturi_tube(D=0.07366, Do=0.05, P1=200000.0, P2=183000.0)
      1788.5717754177406

fluids.flow_meter.C_Reader_Harris_Gallagher_wet_venturi_tube(mg, ml, rhog, rhol, D, Do, H=1)

  Calculates the coefficient of discharge of the wet gas venturi tube based on the geometry of the tube, mass flow rates of liquid and vapor through the tube, the density of the liquid and gas phases, and an adjustable coefficient H.

  \[C = 1 - 0.0463\exp(-0.05Fr_{gas, th}) \cdot \min\left(1, \sqrt{\frac{X}{0.016}}\right)\]
  \[Fr_{gas, th} = \frac{Fr_{\text{gas, densionetric }}}{\beta^{2.5}}\]
  \[\phi = \sqrt{1 + C_{Ch} X + X^2}\]
  \[C_{Ch} = \left(\frac{\rho_l}{\rho_{1,g}}\right)^n + \left(\frac{\rho_{1, g}}{\rho_{l}}\right)^n\]
  \[n = \max\left[0.583 - 0.18\beta^2 - 0.578\exp\left(\frac{-0.8 Fr_{\text{gas, densiometric}}}{H}\right),0.392 - 0.18\beta^2 \right]\]
  \[X = \left(\frac{m_l}{m_g}\right) \sqrt{\frac{\rho_{1,g}}{\rho_l}}\]
  \[{Fr_{\text{gas, densiometric}}} = \frac{v_{gas}}{\sqrt{gD}} \sqrt{\frac{\rho_{1,g}}{\rho_l - \rho_{1,g}}} = \frac{4m_g}{\rho_{1,g} \pi D^2 \sqrt{gD}} \sqrt{\frac{\rho_{1,g}}{\rho_l - \rho_{1,g}}}\]
  Parameters
    mg float

      Mass flow rate of gas through the venturi tube, [kg/s]

    ml float

      Mass flow rate of liquid through the venturi tube, [kg/s]

    rhog float

      Density of gas at P1, [kg/m^3]

    rhol float

      Density of liquid at P1, [kg/m^3]

    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of venturi tube at flow conditions, [m]

    H float, optional

      A surface-tension effect coefficient used to adjust for different fluids, (1 for a hydrocarbon liquid, 1.35 for water, 0.79 for water in steam) [-]

  Returns
    C float

      Coefficient of discharge of the wet gas venturi tube flow meter (includes flow rate of gas ONLY), [-]

  Notes

  This model has more error than single phase differential pressure meters. The model was first published in [1], and became ISO 11583 later.

  The limits of this correlation according to [2] are as follows:

  \[0.4 \le \beta \le 0.75\]
  \[0 < X \le 0.3\]
  \[Fr_{gas, th} > 3\]
  \[\frac{\rho_g}{\rho_l} > 0.02\]
  \[D \ge 50 \text{ mm}\]

  References

  1

    Reader-harris, Michael, and Tuv Nel. An Improved Model for Venturi-Tube Over-Reading in Wet Gas, 2009.

  2

    ISO/TR 11583:2012 Measurement of Wet Gas Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits.

  Examples

      >>> C_Reader_Harris_Gallagher_wet_venturi_tube(mg=5.31926, ml=5.31926/2,
      ... rhog=50.0, rhol=800., D=.1, Do=.06, H=1)
      0.9754210845876333

fluids.flow_meter.dP_Reader_Harris_Gallagher_wet_venturi_tube(D, Do, P1, P2, ml, mg, rhol, rhog, H=1.0)

  Calculates the non-recoverable pressure drop of a wet gas venturi nozzle based on the pressure drop and the geometry of the venturi nozzle, the mass flow rates of liquid and gas through it, the densities of the vapor and liquid phase, and an adjustable coefficient H.

  \[Y = \frac{\Delta \bar \omega}{\Delta P} - 0.0896 - 0.48\beta^9\]
  \[Y_{max} = 0.61\exp\left[-11\frac{\rho_{1,g}}{\rho_l} - 0.045 \frac{Fr_{gas}}{H}\right]\]
  \[\frac{Y}{Y_{max}} = 1 - \exp\left[-35 X^{0.75} \exp \left( \frac{-0.28Fr_{gas}}{H}\right)\right]\]
  \[X = \left(\frac{m_l}{m_g}\right) \sqrt{\frac{\rho_{1,g}}{\rho_l}}\]
  \[{Fr_{\text{gas, densiometric}}} = \frac{v_{gas}}{\sqrt{gD}} \sqrt{\frac{\rho_{1,g}}{\rho_l - \rho_{1,g}}} = \frac{4m_g}{\rho_{1,g} \pi D^2 \sqrt{gD}} \sqrt{\frac{\rho_{1,g}}{\rho_l - \rho_{1,g}}}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of venturi tube at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of venturi tube at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of venturi tube at the cross- section of the pressure tap, [Pa]

    ml float

      Mass flow rate of liquid through the venturi tube, [kg/s]

    mg float

      Mass flow rate of gas through the venturi tube, [kg/s]

    rhol float

      Density of liquid at P1, [kg/m^3]

    rhog float

      Density of gas at P1, [kg/m^3]

    H float, optional

      A surface-tension effect coefficient used to adjust for different fluids, (1 for a hydrocarbon liquid, 1.35 for water, 0.79 for water in steam) [-]

  Returns
    C float

      Coefficient of discharge of the wet gas venturi tube flow meter (includes flow rate of gas ONLY), [-]

  Notes

  The model was first published in [1], and became ISO 11583 later.

  References

  1

    Reader-harris, Michael, and Tuv Nel. An Improved Model for Venturi-Tube Over-Reading in Wet Gas, 2009.

  2

    ISO/TR 11583:2012 Measurement of Wet Gas Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits.

  Examples

      >>> dP_Reader_Harris_Gallagher_wet_venturi_tube(D=.1, Do=.06, H=1,
      ... P1=6E6, P2=6E6-5E4, ml=5.31926/2, mg=5.31926, rhog=50.0, rhol=800.,)
      16957.43843129572

## Cone Meters

fluids.flow_meter.CONE_METER_C = 0.82

  Constant loss coefficient for flow cone meters

fluids.flow_meter.diameter_ratio_cone_meter(D, Dc)

  Calculates the diameter ratio beta used to characterize a cone flow meter.

  \[\beta = \sqrt{1 - \frac{d_c^2}{D^2}}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Dc float

      Diameter of the largest end of the cone meter, [m]

  Returns
    beta float

      Cone meter diameter ratio, [-]

  Notes

  A mathematically equivalent formula often written is:

  \[\beta = \frac{\sqrt{D^2 - d_c^2}}{D}\]

  References

  1

    Hollingshead, Colter. “Discharge Coefficient Performance of Venturi, Standard Concentric Orifice Plate, V-Cone, and Wedge Flow Meters at Small Reynolds Numbers.” May 1, 2011. https://digitalcommons.usu.edu/etd/869.

  Examples

      >>> diameter_ratio_cone_meter(D=0.2575, Dc=0.184)
      0.6995709873957624

fluids.flow_meter.cone_meter_expansibility_Stewart(D, Dc, P1, P2, k)

  Calculates the expansibility factor for a cone flow meter, based on the geometry of the cone meter, measured pressures of the orifice, and the isentropic exponent of the fluid. Developed in [1], also shown in [2].

  \[\epsilon = 1 - (0.649 + 0.696\beta^4) \frac{\Delta P}{\kappa P_1}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Dc float

      Diameter of the largest end of the cone meter, [m]

    P1 float

      Static pressure of fluid upstream of cone meter at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid at the end of the center of the cone pressure tap, [Pa]

    k float

      Isentropic exponent of fluid, [-]

  Returns
    expansibility float

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Notes

  This formula was determined for the range of P2/P1 >= 0.75; the only gas used to determine the formula is air.

  References

  1

    Stewart, D. G., M. Reader-Harris, and NEL Dr RJW Peters. “Derivation of an Expansibility Factor for the V-Cone Meter.” In Flow Measurement International Conference, Peebles, Scotland, UK, 2001.

  2

    ISO 5167-5:2016 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 5: Cone meters.

  Examples

      >>> cone_meter_expansibility_Stewart(D=1, Dc=0.9, P1=1E6, P2=8.5E5, k=1.2)
      0.9157343

fluids.flow_meter.dP_cone_meter(D, Dc, P1, P2)

  Calculates the non-recoverable pressure drop of a cone meter based on the measured pressures before and at the cone end, and the geometry of the cone meter according to [1].

  \[\Delta \bar \omega = (1.09 - 0.813\beta)\Delta P\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Dc float

      Diameter of the largest end of the cone meter, [m]

    P1 float

      Static pressure of fluid upstream of cone meter at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid at the end of the center of the cone pressure tap, [Pa]

  Returns
    dP float

      Non-recoverable pressure drop of the orifice plate, [Pa]

  Notes

  The recoverable pressure drop should be recovered by 6 pipe diameters downstream of the cone meter.

  References

  1

    ISO 5167-5:2016 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 5: Cone meters.

  Examples

      >>> dP_cone_meter(1, .7, 1E6, 9.5E5)
      25470.093437973323

## Wedge Meters

fluids.flow_meter.C_wedge_meter_ISO_5167_6_2017(D, H)

  Calculates the coefficient of discharge of an wedge flow meter used for measuring flow rate of fluid, based on the geometry of the differential pressure flow meter according to the ISO 5167-6 standard (draft 2017).

  \[C = 0.77 - 0.09\beta\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    H float

      Portion of the diameter of the clear segment of the pipe up to the wedge blocking flow; the height of the pipe up to the wedge, [m]

  Returns
    C float

      Coefficient of discharge of the wedge flow meter, [-]

  Notes

  This standard applies for wedge meters in line sizes between 50 and 600 mm; and height ratios between 0.2 and 0.6. The range of allowable Reynolds numbers is large; between 1E4 and 9E6. The uncertainty of the flow coefficient is approximately 4%. Usually a 10:1 span of flow can be measured accurately. The discharge and entry length of the meters must be at least half a pipe diameter. The wedge angle must be 90 degrees, plus or minus two degrees.

  The orientation of the wedge meter does not change the accuracy of this model.

  There should be a straight run of 10 pipe diameters before the wedge meter inlet, and two of the same pipe diameters after it.

  References

  1

    ISO/DIS 5167-6 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 6: Wedge Meters.

  Examples

      >>> C_wedge_meter_ISO_5167_6_2017(D=0.1524, H=0.3*0.1524)
      0.724792059539853

fluids.flow_meter.C_wedge_meter_Miller(D, H)

  Calculates the coefficient of discharge of an wedge flow meter used for measuring flow rate of fluid, based on the geometry of the differential pressure flow meter.

  For half-inch lines:

  \[C = 0.7883 + 0.107(1 - \beta^2)\]

  For 1 to 1.5 inch lines:

  \[C = 0.6143 + 0.718(1 - \beta^2)\]

  For 1.5 to 24 inch lines:

  \[C = 0.5433 + 0.2453(1 - \beta^2)\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    H float

      Portion of the diameter of the clear segment of the pipe up to the wedge blocking flow; the height of the pipe up to the wedge, [m]

  Returns
    C float

      Coefficient of discharge of the wedge flow meter, [-]

  Notes

  There is an ISO standard being developed to cover wedge meters as of 2018.

  Wedge meters can have varying angles; 60 and 90 degree wedge meters have been reported. Tap locations 1 or 2 diameters (upstream and downstream), and 2D upstream/1D downstream have been used. Some wedges are sharp; some are smooth. [2] gives some experimental values.

  References

  1

    Miller, Richard W. Flow Measurement Engineering Handbook. 3rd edition. New York: McGraw-Hill Education, 1996.

  2

    Seshadri, V., S. N. Singh, and S. Bhargava. “Effect of Wedge Shape and Pressure Tap Locations on the Characteristics of a Wedge Flowmeter.” IJEMS Vol.01(5), October 1994.

  Examples

      >>> C_wedge_meter_Miller(D=0.1524, H=0.3*0.1524)
      0.7267069372687651

fluids.flow_meter.diameter_ratio_wedge_meter(D, H)

  Calculates the diameter ratio beta used to characterize a wedge flow meter as given in [1] and [2].

  \[\beta = \left(\frac{1}{\pi}\left\{\arccos\left[1 - \frac{2H}{D} \right] - 2 \left[1 - \frac{2H}{D} \right]\left(\frac{H}{D} - \left[\frac{H}{D}\right]^2 \right)^{0.5}\right\}\right)^{0.5}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    H float

      Portion of the diameter of the clear segment of the pipe up to the wedge blocking flow; the height of the pipe up to the wedge, [m]

  Returns
    beta float

      Wedge meter diameter ratio, [-]

  References

  1

    Hollingshead, Colter. “Discharge Coefficient Performance of Venturi, Standard Concentric Orifice Plate, V-Cone, and Wedge Flow Meters at Small Reynolds Numbers.” May 1, 2011. https://digitalcommons.usu.edu/etd/869.

  2

    IntraWedge WEDGE FLOW METER Type: IWM. January 2011. http://www.intra-automation.com/download.php?file=pdf/products/technical_information/en/ti_iwm_en.pdf

  Examples

      >>> diameter_ratio_wedge_meter(D=0.2027, H=0.0608)
      0.5022531424646643

fluids.flow_meter.dP_wedge_meter(D, H, P1, P2)

  Calculates the non-recoverable pressure drop of a wedge meter based on the measured pressures before and at the wedge meter, and the geometry of the wedge meter according to [1].

  \[\Delta \bar \omega = (1.09 - 0.79\beta)\Delta P\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    H float

      Portion of the diameter of the clear segment of the pipe up to the wedge blocking flow; the height of the pipe up to the wedge, [m]

    P1 float

      Static pressure of fluid upstream of wedge meter at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid at the end of the wedge meter pressure tap, [ Pa]

  Returns
    dP float

      Non-recoverable pressure drop of the wedge meter, [Pa]

  Notes

  The recoverable pressure drop should be recovered by 5 pipe diameters downstream of the wedge meter.

  References

  1

    ISO/DIS 5167-6 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 6: Wedge Meters.

  Examples

      >>> dP_wedge_meter(1, .7, 1E6, 9.5E5)
      20344.849697483587

## Flow Meter Utilities

fluids.flow_meter.discharge_coefficient_to_K(D, Do, C)

  Converts a discharge coefficient to a standard loss coefficient, for use in computation of the actual pressure drop of an orifice or other device.

  \[K = \left[\frac{\sqrt{1-\beta^4(1-C^2)}}{C\beta^2} - 1\right]^2\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    C float

      Coefficient of discharge of the orifice, [-]

  Returns
    K float

      Loss coefficient with respect to the velocity and density of the fluid just upstream of the orifice, [-]

  Notes

  If expansibility is used in the orifice calculation, the result will not match with the specified pressure drop formula in [1]; it can almost be matched by dividing the calculated mass flow by the expansibility factor and using that mass flow with the loss coefficient.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  Examples

      >>> discharge_coefficient_to_K(D=0.07366, Do=0.05, C=0.61512)
      5.2314291729754

fluids.flow_meter.K_to_discharge_coefficient(D, Do, K)

  Converts a standard loss coefficient to a discharge coefficient.

  \[C = \sqrt{\frac{1}{2 \sqrt{K} \beta^{4} + K \beta^{4}} - \frac{\beta^{4}}{2 \sqrt{K} \beta^{4} + K \beta^{4}} }\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    K float

      Loss coefficient with respect to the velocity and density of the fluid just upstream of the orifice, [-]

  Returns
    C float

      Coefficient of discharge of the orifice, [-]

  Notes

  If expansibility is used in the orifice calculation, the result will not match with the specified pressure drop formula in [1]; it can almost be matched by dividing the calculated mass flow by the expansibility factor and using that mass flow with the loss coefficient.

  This expression was derived with SymPy, and checked numerically. There were three other, incorrect roots.

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  Examples

      >>> K_to_discharge_coefficient(D=0.07366, Do=0.05, K=5.2314291729754)
      0.6151200000000001

fluids.flow_meter.velocity_of_approach_factor(D, Do)

  Calculates a factor for orifice plate design called the velocity of approach.

  \[\text{Velocity of approach} = \frac{1}{\sqrt{1 - \beta^4}}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

  Returns
    velocity_of_approach float

      Coefficient of discharge of the orifice, [-]

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  Examples

      >>> velocity_of_approach_factor(D=0.0739, Do=0.0222)
      1.0040970074165514

fluids.flow_meter.flow_coefficient(D, Do, C)

  Calculates a factor for differential pressure flow meter design called the flow coefficient. This should not be confused with the flow coefficient often used when discussing valves.

  \[\text{Flow coefficient} = \frac{C}{\sqrt{1 - \beta^4}}\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of flow meter characteristic dimension at flow conditions, [m]

    C float

      Coefficient of discharge of the flow meter, [-]

  Returns
    flow_coefficient float

      Differential pressure flow meter flow coefficient, [-]

  Notes

  This measure is used not just for orifices but for other differential pressure flow meters [2].

  It is sometimes given the symbol K. It is also equal to the product of the diacharge coefficient and the velocity of approach factor [2].

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2(1,2)

    Miller, Richard W. Flow Measurement Engineering Handbook. 3rd edition. New York: McGraw-Hill Education, 1996.

  Examples

      >>> flow_coefficient(D=0.0739, Do=0.0222, C=0.6)
      0.6024582044499308

fluids.flow_meter.flow_meter_discharge(D, Do, P1, P2, rho, C, expansibility=1.0)

  Calculates the flow rate of an orifice plate based on the geometry of the plate, measured pressures of the orifice, and the density of the fluid.

  \[m = \left(\frac{\pi D_o^2}{4}\right) C \frac{\sqrt{2\Delta P \rho_1}} {\sqrt{1 - \beta^4}}\cdot \epsilon\]
  Parameters
    D float

      Upstream internal pipe diameter, [m]

    Do float

      Diameter of orifice at flow conditions, [m]

    P1 float

      Static pressure of fluid upstream of orifice at the cross-section of the pressure tap, [Pa]

    P2 float

      Static pressure of fluid downstream of orifice at the cross-section of the pressure tap, [Pa]

    rho float

      Density of fluid at P1, [kg/m^3]

    C float

      Coefficient of discharge of the orifice, [-]

    expansibility float, optional

      Expansibility factor (1 for incompressible fluids, less than 1 for real fluids), [-]

  Returns
    m float

      Mass flow rate of fluid, [kg/s]

  Notes

  This is formula 1-12 in [1] and also [2].

  References

  1

    American Society of Mechanical Engineers. Mfc-3M-2004 Measurement Of Fluid Flow In Pipes Using Orifice, Nozzle, And Venturi. ASME, 2001.

  2

    ISO 5167-2:2003 - Measurement of Fluid Flow by Means of Pressure Differential Devices Inserted in Circular Cross-Section Conduits Running Full – Part 2: Orifice Plates.

  Examples

      >>> flow_meter_discharge(D=0.0739, Do=0.0222, P1=1E5, P2=9.9E4, rho=1.1646,
      ... C=0.5988, expansibility=0.9975)
      0.01120390943807026

fluids.flow_meter.all_meters = frozenset({'Hollingshead orifice', 'Hollingshead v cone', 'Hollingshead venturi sharp', 'Hollingshead venturi smooth', 'Hollingshead wedge', 'ISA 1932 nozzle', 'ISO 15377 conical orifice', 'ISO 15377 eccentric orifice', 'ISO 15377 quarter-circle orifice', 'ISO 5167 orifice', 'Miller conical orifice', 'Miller eccentric orifice', 'Miller orifice', 'Miller quarter circle orifice', 'Miller segmental orifice', 'as cast convergent venturi tube', 'cone meter', 'conical orifice', 'eccentric orifice', 'long radius nozzle', 'machined convergent venturi tube', 'orifice', 'quarter circle orifice', 'rough welded convergent venturi tube', 'segmental orifice', 'unspecified meter', 'venuri nozzle', 'wedge meter'})

  Set of string inputs representing all of the different supported flow meters and their correlations.