Showing posts with label ISO 5167. Show all posts
Showing posts with label ISO 5167. Show all posts

Model a Gas Orifice Meter with Excel

This Excel spreadsheet calculates the flowrate from the pressure drop across a gas orifice meter with the equations defined in ISO 5167.

Orifice meters use the pressure loss across a constriction (that is, the orifice plate) in a pipe to determine the flowrate.  While orifice meters are cost effective, they have several disadvantages. 
  • The relationship between flowrate and pressure is non-linear,
  • accurate values of the physical parameters are required,
  • and high Reynolds numbers (>104) are required for the greatest confidence in their accuracy, and the resulting pressure drop can be significant.
Accordingly, orifice meters are only used with the pressure drop is not critical, and accuracy is around 2% at best.

These are the equations implemented in the spreadsheet (as specified in ISO 5167)

Gas Orifice Meter Equations in ISO 5167

The notation is given below
  • C is the discharge coefficient (only valid for the three standard tap positions given below)
  • Re is the Reynolds number
  • L1 and L2 are the upstream and downstream tap positions (m)
  • P1 and P2 are the upstream and downstream pressures (Pa)
  • D1 and D2 are the pipe and orifice diameters (m)
  • V is the gas velocity in the pipe (m s-1)
  • ρ is the gas density (kg m-3)
  • μ is the gas viscosity (Pa s) 
  • M is the molecular weight
  • Y is the expansion coefficient
  • Z is the gas compressibility factor
  • K is the specific heat ratio
  • R is the gas constant (8314 J kg-1 k-1)
  • Ao is the cross-sectional area of the orifice (m2) 
There are three standard tap positions that determine the values of L1 and L2, as illustrated below. For corner taps, L1 = L2= 0, for D-D/2 taps L1 = D1 and L2= D1/2, and for flange taps L1 = L2= 1 inch. 
Tap positions in ISO 5167

The equations use the ideal gas law to calculate the gas density (you could override this with your own value), and are only valid for pipes with internal diameters from 50 mm to 1000 mm, and for pressure ratios greater than 0.75.

This is a screen grab of part of the spreadsheet.


The calculation is iterative: you need Re to calculate C, you need V to calculate Re, but you need C to calculate V.  Excel's Goal Seek functionality is used to iteratively solve the equations for the flowrate. This process is automated with a button - just fill in the parameters, click a button, and some VBA initiates Goal Seek with the correct settings

The spreadsheet provides an initial guess value for Re. This is used to calculate C and V. V is then used to calculate Re.  Excel's Goal Seek varies the guess value of Re until it matches the calculated value of Re.

By carefuly altering the equations (and the parameters used by Goal Seek), you could also solve for any other variable - for example, you could find the pressure drop for a specific flowrate (let me know if you need help in implementing this).

You'll find a spreadsheet  that models a liquid orifice meter here.

Visit http://excelcalculations.blogspot.com regularly for more free engineering spreadsheets.

Download Excel Spreadsheet to Calculate Flowrate in a Gas Orifice Meter (ISO 5167)

Size a Liquid Orifice Meter with ISO 5167 and Excel

This Excel spreadsheet sizes a liquid orifice meter using the equations in ISO 5167.  Orifice meters determine liquid flowrate by measuring the pressure difference across a constriction in a pipe. 

The spreadsheet is free - all I ask is that you credit this website with its authorship (and perhaps provide a link!)


The equations given in ISO 5167 are given below.
  • C is the discharge coefficient (the equation is only valid for the three standard tap positions defined below)
  • Re is the Reynolds number
  • L1 and L2 are the upstream and downstream tap positions (ft)
  • P1 and P2 are the upstream and downstream pressures (psig)
  • D1 and D2 are the pipe and orifice diameters (inches)
  • V is the liquid velocity in the pipe (ft s-1)
  • ρ is the liquid density slugs ft-3
  • μ is the liquid viscosity lb-sec ft-2

ISO 5167 defines three different tap positions for the pressure probes (Corner, D-D/2 and Flange taps). These positions the values of L1 and L2, and are given below

    • Corner Taps: L1 = L2 = 0
    • Flange Taps: L1 = L2 = 1 inch
    • D-D/2 Taps: L1 = D1, L2 = D1/2
    The solution to the equations is iterative; you need Re to calculate C, but you need Q to calculate Re, but you need C to calculate Q.  This requires the use of Excel's Goal Seek.  We simply find the
    1. Guess a value of Re,
    2. Calculate C and Q
    3. Use C and Q to calculate Re
    4. Use Goal Seek to change the value of Re we guessed in Step 1 until it's equal to the value calculated in Step 3
    This process is automated in the Excel spreadsheet with a button linked to a VBA macro. The VBA macro simply initiates Goal Seek with the requireed settings.

    Download Excel spreadsheet to size an orifice meter with ISO 5167