Professional Documents
Culture Documents
01 Fluid Flow
01 Fluid Flow
This Excel workbook includes Visual Basic for Application function subroutines.
Macros must be enabled for them to work.
The following Text Boxes contain the syntax for the functions.
Copy them to the worksheet where you want to use the functions for ready reference.
Function NReSI(W, mu, d, Optional ro, Optional Tin, Optional Mw, Optional p)
' W = Flowrate in kg/h
' mu = Viscosity in mPa-s
' d = PipeID in mm
' ro = density in kg/m3 (required for liquid)
' Tin = temperature, deg C (required for gas) - default 20 deg C
' Mw = molecular weight (required for gas) - default 29
' p = pressure, kPa (required for gas) - default 1000 kPa
Function PDSI(W, Pin, Pout, d, L, f, Optional Density, Optional Tin, Optional Mw, Optional Gamma, Optional Isothermal)
' Pressure Drop due to friction in a round pipe (adiabatic for compressible flow)
' with the following arguments
' Specify two of the following three; function will compute the third
' W = mass flow rate, kg/h
' Pin = inlet, or upstream, pressure, kPa
' Pout = outlet, or downstream pressure, kPa
' Pipe properties
' d = pipe diameter, mm
' L = pipe length, m
' f = Darcy friction factor
' Fluid properties
' Density (optional) -- specify for liquids, kg/m3
' Tin (optional) -- specify for gas, inlet temperature, deg C (default to 20)
' Mw (optional) -- specify for gas, molecular weight (default to 29 for air)
' Gamma (optional) -- specify for gas, ratio of Cp/Cv (default to 1.4)
' Isothermal (optional) -- any value results in isothermal compressible calc, if missing then adiabatic calc
ChemEng Software sells an Excel template called PIPESIZE.
www.chemengsoftware.com
PIPESIZE sizes pipes for gases and liquids. It includes a database of properties for piping materials, fluids, roughness values,
and recommended velocities. Order on-line or by telephone, 24-h/d; credit cards accepted.
Function Subroutines in US Units
Function NReUS(W, mu, d, Optional ro, Optional Tin, Optional Mw, Optional p)
' W = Flowrate in lb/h
' mu = Viscosity in cP
' d = PipeID in inches
' ro = density in lb/ft3 (required for liquid)
' Tin = temperature, deg F (required for gas) - default 60
' Mw = molecular weight (required for gas) - default 29
' p = pressure, psia (required for gas) - default 115
Function PDUS(W, Pin, Pout, d, L, f, Optional Density, Optional Tin, Optional Mw, Optional Gamma, Optional Isothermal)
' Pressure Drop due to friction in a round pipe (adiabatic or isothermal for compressible flow)
' with the following arguments
' Specify two of the following three; function will compute the third
' W = mass flow rate, lb/hr
' Pin = inlet, or upstream, pressure, psia
' Pout = outlet, or downstream pressure, psia
' Pipe properties
' d = pipe diameter, inches
' L = pipe length, feet
' f = Darcy friction factor
' Fluid properties
' Density (optional) -- specify for liquids, lb/ft3
' Tin (optional) -- specify for gas, inlet temperature, deg F (default to 60)
' Mw (optional) -- specify for gas, molecular weight (default to 29 for air)
' Gamma (optional) -- specify for gas, ratio of Cp/Cv (default to 1.4)
' Isothermal (optional) -- any value results in isothermal compressible calc, if missing then adiabatic calc
Optional Isothermal)
calc
Problem Statement:
Calculate pressure drop per 100 m or 100 ft using the
shortcut formula
SI Units US Units
Inputs
Flow Rate kg/h 10,000.0 lb/h 22,000.0
Viscosity mPa-s 1.2 cP 1.2
Pipe Diameter mm 38.1 in 1.5
Density kg/m3 961.5 lb/ft3 60.0
Output
Delta P Bar/100 m 1.83 psi/100 ft 8.09
Problem Statement:
Calculate Reynolds Number using VBA function call.
Output
Reynolds Number dimensionless #VALUE! #VALUE!
=NReSI(D8,D9,D10,D11) =NReSI(E8,E9,E10,,E12,E13,E14)
US Customary Units Liquid Gas
Units Example 1a Example 2a
lb/h 22,000.0 2,645.0
cP 1.2 0.011
in 1.5 1.047
lb/ft3 60.0
F 104.0
lb/lbmol 16.04
psia 319.0
#VALUE! #VALUE!
13,E14)
=NReUS(I8,I9,I10,I11) =NReUS(J8,J9,J10,,J12,J13,J14)
Problem Statement:
Calculate Darcy Friction Factor using VBA function call.
Inputs Liquid
Parameter Units Example 3
Mass Flow Rate kg/h 290.0
Viscosity mPa-s 1.2
Pipe Diameter mm 38.1
Density kg/m3 961.0
Temperature C
Molecular Weight kg/kgmol
Pressure kPa, absolute
Output
Reynolds Number dimensionless #VALUE!
=FrictionSI(D16,D19,D10)
US Customary Units Liquid
Units Example 3a
lb/h 22,000.0
cP 1.2
in 1.5
lb/ft3 60.0
F
lb/lbmol
psia
ft 0.00015
#VALUE!
#VALUE!
=FrictionUS(I16,I19,I10)
Problem Statement:
Calculate Pressure Drop due to Friction
Output
Reynolds Number dimensionless #VALUE! #VALUE!
=PDSI(D8,D9,,D12,D13,D24,D14)
=PDSI(E8,E9,,E12,E13,E24,,E15,E16,E17)
US Customary Units Liquid Gas
Units Example 4a Example 5a
lb/h 22,000.0 3,080.0
psia 101.5 319.0
cP 1.2 0.011
in 1.5 1.047
ft 131.0 197.0
lb/ft3 60.0
F 104.0
lb/lbmol 16.04
1.35
ft 0.00015 0.00015
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
=PDUS(I8,I9,,I12,I13,I24,I14)
=PDUS(J8,J9,,J12,J13,J24,,J15,J16,J17)
Problem Statement:
Calculate Flow Rate given upstream and downstream pressures
Inputs Gas
Parameter Units Example 5
GUESS Mass Flow Rate kg/h 1200
Pressure in (upsteam) kPa, absolute 2200
Pressure out (downstream) 1340
Viscosity mPa-s 0.011 Use Goal Seek to find a
Pipe Diameter mm 26.6 the Guessed flow rate (C
Equivalent Length of Pipe m 60 that equals the calculate
(Cell E26). Notice that R
Number is calculated us
Temperature C 40
Guess.
Molecular Weight kg/kgmol 16.04
Cp/Cv 1.35
Output
Reynolds Number dimensionless #VALUE!
=PDSI( ,E9,E10,E12,E13,E24,E14,E15,E16,E17)
ft 0.00015
#VALUE!
#VALUE!
#VALUE!
=PDUS( ,L9,L10,L12,L13,L24,,L15,L16,L17)
#VALUE!
Problem Statement:
Compare pressure drop calculations using equivalent length and K-value methods for fittings.
Fittings Quantity
90 deg, welded r/D = 1 6
TEE, through branch (as elbow) 2
Plug valve, straight 2
Swing check, Vmin = 35 ro^0.5 1
Output
Reynolds Number dimensionless #VALUE! #VALUE!
Eq L 3-K Method
total Kf
Ex 4 Ex 5
(L/D)eq Km Ki Kd Total L/D
20 800 0.091 4 120 #VALUE! #VALUE!
20 800 0.28 4 40 #VALUE! #VALUE!
18 300 0.084 3.9 36 #VALUE! #VALUE!
100 1500 0.46 4 100 #VALUE! #VALUE!
296 #VALUE! #VALUE!
Pressure Drop, Pa
Flow Regime Equiv L Crane K 3-K
50 Laminar 0.060 0.043 0.051
100 Laminar 0.120 0.087 0.102
500 Laminar 0.598 0.446 0.525
1000 Laminar 1.196 0.921 1.089
2000 Laminar 2.392 1.960 2.331
10000 Turbulent 41.079 35.508 38.774
30000 Turbulent 284.129 257.934 278.315
50000 Turbulent 716.261 663.917 715.526
70000 Turbulent 1,328.928 1,247.301 1,344.249
US Customary UnitLiquid
Units Example 4a
lb/h 63,000.0
psia 101.5
cP 10.0
in 3.1 3 nominal size
ft 31.5
lb/ft3 112.5
F 127.0
lb/lbmol
Crane
ft Crane K ft 0.00015
0.019213 2.31
0.019213 0.77 #VALUE!
0.019213 0.69
0.019213 1.92 #VALUE!
5.69
Delta P, pipe #VALUE!
Velocity 3.03
f, full turbulence 0.017314983
#VALUE! #VALUE! 1
Problem Statement:
Calculate Permanent Pressure Drop Through Orifice
60 m, 38.1 mm ID
Inputs Liquid P0
Parameter Units Example 6
Mass Flow Rate kg/h 10,000.0
P0 Pressure in (upsteam) kPa, absolute 700.0 Pipe Header at 700
Viscosity mPa-s 1.2 kPa absolute
Pipe Diameter mm 38.1
Equivalent Length of Pipe m 60.0
Density kg/m3 961.0
Temperature C
Molecular Weight kg/kgmol
Cp/Cv
Output
Reynolds Number dimensionless #VALUE!
Result
P1
P3
Output
Reynolds Number dimensionless #VALUE! #VALUE!
10000
1000
1.01 Bar
6.89 Bar
34.4 Bar
68.9 Bar
1000
1.01 Bar
6.89 Bar
34.4 Bar
68.9 Bar
103 Bar
100
138 Bar
172 Bar
207 Bar
221.2 Bar
10
1
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
250
200
150
G=339
G=1356
G=5424
100
150
G=339
G=1356
G=5424
100
50
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
25
20
15
Awad
Janssen
10
5
10
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Comparison Case
R12 User inputs are in RED
2,000.0
Temperature, viscosity, and density are d
0.9
correlation parameters in lookup table (d
6.00 worksheet). These are affected by the in
50.0 assumed that the temperature is the sat
1.0 the pressure.
0.0000015 m) 0.0000015 (Smooth Tube = 0.0000015 m)
Calculations for Re, f, and pressure drop
subroutines -- other worksheets in this w
Total as Liq Vapor Props Mixture subroutines are correct.
0.001963495408494 Clicking on the "Re-Run All Inputs" butto
14,137.2 macro that runs the calculation on variou
600.0 inputs, based on the charts in IPC2004-
22.0
0.20 0.013 0.015 It seems like the only way to get a straig
120.9 reference) for Figure 7 (Row 123) is to d
1,325.3 29.6 32.8 calculations once, then recalculate phi fo
to 1) without recomputing the mixture vis
1.17
each quality.
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
Phi^2
Quality 1.01
0 1
0.03 46.416452917
0.05 73.332287701
0.08 111.1844284
0.11 147.18519503
0.15 193.407243
0.2 249.36525285
0.3 357.76001856
0.6 670.81472045
0.8 875.24415635
1 1078.089605
Phi^2
Quality 339
0 1
0.1 21.653425095
0.2 38.385069488
0.3 53.697372825
0.4 68.238366662
0.5 82.285448021
0.6 95.986127907
0.7 109.4292805
0.8 122.67301809
0.9 135.75760735
1 148.71218525
Phi^2
Quality 2278
0 1
0.1 3.2250195655
0.2 5.3366251276
0.3 7.3866032834
0.4 9.3983608959
0.5 11.384366361
0.6 13.35199619
0.7 15.305947405
0.8 17.249378952
0.9 19.184507397
1 21.112941761
Liquid Viscosity: ln(cP) = A + B / (C+t) Vapor Viscosity: ln(cP) = A + B / (C+t)
A B C
(8.77) 5,134.3 693.01 (9.00) (4,611.86) (1,008.87)
20.79 46,143.5 (2,064.89) (3.47) (278.74) 286.66
4.34 6,927.32 (1,332.33) (4.92) (200.49) (502.57)
User inputs are in RED
t seems like the only way to get a straight line (per the
reference) for Figure 7 (Row 123) is to do the friction factor
calculations once, then recalculate phi for a range of qualities (0
o 1) without recomputing the mixture viscosity and density for
each quality.
Sonic Velocity
U max =
√ Zγ RT
M
489.4987227 m/s
100,000
10,000
1,000
100
10
f ric t io n a l p
100,000
10,000
1,000
100
10
1
10 100 1000
mass flux (kg/m2-s)
Reference: IMECE2005-81493
Comparison Case
R12
2,000.0
0.9
6.00
50.0
1.0
0.0000015 m) 0.0000015 (Smooth Tube = 0.0000015 m)
Liquid Vapor
0.00196349541
1,413.7 12,723.5
600.0 600.0
22.0 22.05
0.20 0.013
120.9 120.9
1,325.3 29.6
1.31
61.05
163.26
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
7.67
12.94
10.30
Quality 0.5
Output
Reynolds Number dimensionless #VALUE! #VALUE!
water
Comparison Case Reference article, Figure 1
R12 Water-Air
2,000.0 591.0
0.9 0.035
6.00 1.30
50.0 27.0
1.0 1.0
0.0000015 m) 0.0000015 (Smooth Tube = 0.0000015 m) 0.0000015 (Smooth Tube = 0.0000015 m)
0.3 This method depends on fitting parameter, p 0.25 This method depends on fitting para
#VALUE! #VALUE!
#VALUE!
rticle, Figure 1
Output
Reynolds Number dimensionless #VALUE! #VALUE!
0.10
0.09
0.08
0.07
0.06
Comparison of Two-Phase Models
0.10
0.09
0.08
0.07
0.06
0.05
0.04
0.03
0.02
0.01
-
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Quality
Pressure Drop, kPa per m
160
140
120
100
80
60
40
20
-
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Quality
20
-
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Quality
Reference: Branan, Rules of Thumb, 4th Edition
Liquid Vapor
0.0019634954
1,413.7 12,723.5
600.0 600.0
22.0 22.05
0.20 0.013
120.9 120.9
1,325.3 29.6
1.31
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
#VALUE! #VALUE!
Homogeneous
se Models
50 mm smooth pipe
Comp
R12, 6 Bar pressu
4
6
F
5
-
0 0.1 0.2 0.3 0.4
Q
Pressure Drop, kPa per m
Comp
R22, 9.1 Bar pre
100.000
10.000
Pressure
10.000
1.000
0.100
0.010
0.001
10
Mass F
Comparison of Two-Phase Models
Bar pressure, 1000 kg/m2-s in 50 mm smooth pipe
0.4 0.5 0.6 0.7 0.8 0.9 1
Quality
100 1000
Mass Flux, kg/m2-s
pipe
Lockhart
Asymptotic
Lockhart
Asymptotic
Split
Homogeneous
ube
Lockhart
Asymptotic
Split
Homogenous
Hashizume's Data
1000
Problem Statement:
Calculate Pressure Drop Through an Elbow for Different Steam Qualities
Output
Reynolds Number dimensionless #VALUE! #VALUE!
Sonic Velocity
U max =
√ Zγ RT
M
475.6
Km Ki Kd
m/s 800 0.091 4
m2 K #VALUE! elbow
#VALUE! kPa
#VALUE!
Pressure Drop Through a DN Elbow
12.00
10.00
#VALUE! Pressure Drop Through a DN Elbow
#VALUE!
#VALUE! 12.00
#VALUE!
#VALUE!
#VALUE!
10.00
#VALUE!
#VALUE!
#VALUE!
#VALUE! 8.00
#VALUE!
#VALUE!
#VALUE!
#VALUE! 6.00
#VALUE!
#VALUE!
#VALUE!
#VALUE! 4.00
#VALUE!
#VALUE!
#VALUE!
2.00
#VALUE!
#VALUE!
#VALUE!
#VALUE! -
#VALUE! -0.1 -2.77555756156289E-17 0.1 0.2
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
#VALUE!
Liquid Viscosity: ln(cP) = A + B / (C+t) Vapor Viscosity: ln(cP) = A + B / (C+t)
A B C
(8.77) 5,134.3 693.01 (9.00) (4,611.86) (1,008.87)
20.79 46,143.5 (2,064.89) (3.47) (278.74) 286.66
4.34 6,927.32 (1,332.33) (4.92) (200.49) (502.57)
Drop Through a DN Elbow
Drop Through a DN Elbow
Velocity
1 0.2 0.3
Density: kg/m3 = m t + b Density: lb/ft3 = m t + b Molecular Cp/Cv
m b m b Weight
(3.09) 1,393.40 (0.19) 86.99 120.91 1.170
(3.20) 1,279.33 (0.20) 79.87 86.48 1.250
(1.56) 1,150.42 (0.06) 64.24 18.00
Problem Statement:
Compare the Panhandle and Weymouth formulas with the Isothermal gas calculation
Constants
Base temperature C - F 60
Base pressure kPa abs 100 psia 14.7
Pipe roughness m 0.0000457 ft 0.00015
Calculations
Isothermal Gas Calculation
Reynolds Number 200,000 200,000
Friction factor #VALUE! #VALUE!
Flow Rate kg/h #VALUE! lb/h #VALUE!
Standard volumetric rate MM m3/day #VALUE! MM ft3/day #VALUE!
Intermediate Calcs
Gas specific gravity 0.60 0.60
Average temperature K 311 R 560
Average pressure kPa abs 12,080 psia 1,762
Head correction kPa 49 psi 7
Weymouth
Standard volumetric rate MM m3/day MM ft3/day 10,151
Panhandle A
Standard volumetric rate MM m3/day 402 MM ft3/day 15,110
Panhandle B
Standard volumetric rate MM m3/day 428 MM ft3/day 16,034
n