Documente Academic
Documente Profesional
Documente Cultură
ISSN 2229-5518
Abstract— and Program Objective - A multi-functional single screen desktop companion program for piping calculations using Microsoft
EXCELTM with its Visual basic for Applications (VBA) automation tool is presented. The program can be used for the following piping geometries –
circular, rectangular, triangular, square, elliptical and annular. Fluid properties are obtained from built-in fluid properties functions.
Index Terms— engineered spreadsheet solutions, liquid pipline flow, pipeline design, pipeline fluid properties, piping program, pipeline
sizing.
—————————— ——————————
1 INTRODUCTION
fLV 2 8 fLQ 2
often involve repetitive calculations whether for simple hori- hf (4)
zontal pipelines or piping of complex terrains. Modern com- 2 gD 2 2 gD 5
puter- assisted - tools are now often employed as aids in
achieving these, if time and cost permits. Often times, for mi-
nor changes to existing installations or retrofitting, a customer
(pipeline owner) would contract an engineering consultancy Friction Factor: The friction factor, f, is obtained as follows:
to conduct an analysis check that will involve desktop routine
calculations such as determining pressure drops, or head loss, For Laminar Flow: The applicable equations for laminar flows
flow rate or pipe geometry (diameter, length, cross-sectional (Re≤2100) can be defined in terms of a laminar flow factor, Lf,
area, etc.) that can be assigned to an engineer for quick an- which varies depending on the pipe geometry. The equation is
swers. Simple spreadsheet calculators can be developed to aid of the form:
such small routine calculations. One such program is shown
here with all required equations to assist in developing one. f .Re L f (5)
Re (1)
Flowrate:
Flow Velocity:
For Laminar Flow:
Q
V (2) gD 4 h f
A Q (7)
128L
D 2
Area: A (3)
4 For Turbulent Flow:
Q VA (8)
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 2
ISSN 2229-5518
Also, for Turbulent Flow within the limits defined below, explicit
3.17 2 L
0.5
0.5
gD 5 h f values for the friction factor, f is obtained by the Swamee-Jain
Q 0.965D 2 Ln relationship, ―(16),‖.
L 3.7 D gD 3h f
(9)
5.74
f 0.25 Log D 0.9
2
3.7 Re
Range of application: 10-6 ≤ (ε/D) ≤ 2 x 10-2
3 x 103 ≤ Re ≤ 3 x 108 (16)
Solution for Diameter:
Range of application: 10-6 ≤ (ε/D) ≤ 2 x 10-2
8 fLQ 2 3 x 103 ≤ Re ≤ 3 x 108
D5 2 (10)
gh
f The Microsoft Excel TM Solver Add-in, has two built-in interpo-
lation search solution methods – the Newton method and the
Conjugate Gradient method. By rewriting the equation to be
0.04
4.75 5.2
1.25 LQ L solved in the solution form required (see ‚17,‛) in the Micro-
2
D 0.66 Q
9.4
gh f
soft ExcelTM cells, the Solver Add-in option dialog box under
gh f
the Tools menu, allows for desired constraints to be set as fol-
(11) lows:
P h f gh f g 1
2 Log D
2.51
0
(12)
f
1
2
3.7 f
Re
(17)
ameter, defined as the ratio of the cross-sectional area of the Fig 2: geometry of isosceles triangular pipe section
piping section to the wetted perimeter. Source: [3], [4]
The hydraulic diameter is defined such that it reduces to the
The laminar flow factors vary as a function of the isosceles
diameter for the circular pipes (Cengel et. al., ‚[2],‛). It is gen-
angle, in line with the values in Table 1.
erally a parameter for generalising fluid flow in turbulent
Note that angles falling between those in the table can be ob-
flow. The hydraulic diameter concept does not apply for lami-
tained by straight line interpolation.
nar flow through non-circular pipe sections. The hydraulic
diameter for different piping configurations is provided by
Table 1: Laminar flow factors for Isosceles duct type pipes
Engineering Sciences Data Unit (ESDU), [3], [4].
Source: ESDU, [3], [4]
θ f.Re
3.2.2 SQUARE SECTION PIPE 10 12.5
30 13.1
45 13.3
60 13.3
D 90 13.2
120 12.7
150 12.5
D
A = D2 (17)
Thus,
Fig 3: geometry of Rectangular pipe section-Source: [3], [4]
14.2
f (19a)
Re A Dd (22)
A ½ d 2 sin (20)
d sin (21)
Dh
1 sin 2 d d
f .Re 160.67 0.46 2
D D
(24)
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 4
ISSN 2229-5518
Again, duct side ratios falling between those in the table can Laminar flow factors for triangular pipe sections of the right-
be obtained by straight line interpolation. angled type, for variations in the angle θ¸ defined by ‚(31),‛ is
shown in Table 3.
2dD
2D Dh
d D d 2
D2
0.5
(30)
Dh
4 Dd 64 16c 2 10 12.5
(26)30
d D 64 3c 4 45
13.0
13.2
60 13.0
Where, for, 0.1 < (D/d) < 10
70 12.8
90 12.0
c
D d
D d (27)
4 FLUID PROPERTIES FUNCTIONS
f .Re
2 Dh2 D 2 d 2 Yaws,
( [5], [6], [7], [8], provides density, viscosity, and vapour
pressure data as a function of temperature in line with the
28)
d 2D2 mathematical relation, function(Temperature), i.e ƒ(T).
For example, [8], derived general curve-fitted density relation-
ships for certain fluid types as functions of reduced tempera-
ture. As an example, for Chlorobenzene (C6H6Cl), the follow-
3.2.6 RIGHT-ANGLED TRIANGULAR PIPE SECTION ing relations for liquid density apply:
2
L AB 1T
7
r
(32)
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 5
ISSN 2229-5518
Compared to a VBA subroutine (SUB) procedure, a FUNC- Fig. 5: A clip of Excel Screen Solution for the Example 1
TION procedure has a return value. Thus, by entering the
function procedure name into a cell, a return value can be ob-
tained by referencing the function dependent cell. In this case Example 2: Square Pipe Cross-section
the functions are dependent on temperature.
A 350 m long square cross-section duct is used to transport air.
Evaluate the pipeline given the following? Take that: Pipe
Roughness = 0.008 mm; Air density = 1.22 kg/m 3; Viscosty =
1.81 x 10-5 N.s/m2, headloss = 35 m; flow rate = 0.5 m3/s.
6 METHOD OF SOLUTION AND SCREEN FORMATTING
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 6
ISSN 2229-5518
Example 3: Triangular Ducts Ethanol at 20 oC flows from tank 1 to tank 2 at the rate of 0.024
m3/s through a 100 mm-diameter, 100 m long pipe. Compute
A 40 m long triangular conduit made of commercial steel is the total head loss, if the fittings along the pipe include a 90o
used to carry water at 20 oC, at the rate of 0.3 m3/s. If the head Long Radius Elbow, and a gate valve. (ε/D=0.00065)
pipe cross-section fluid Name: Application area
loss is 4 m, and the triangular section is shaped in the form of circular Ethanol uniform diameter pipeline
pipe Operating temperature 20 degC
an isosceles triangle with ¸=35o, find the length of the longest type: user-defined Fluid density 7.98E+02 kg/cu.m
side, x? Losses
combined losses
Fluid viscosity (dynamic)
Flowrate
1.14E-03
2.40E-02
N.s/sq.m
cu.m/s
pipeline losses only Pipe Major Diameter or longerside 100.00 mm
minor losses only Minor Diameter or shortside-length mm
angle or Aspect ratio
# of fittings along line Pipe Length 100 m
1 90 deg long radius elbow Head loss (total) 314.735 m
1 Gate valve, fully open Pipe Roughness 0.0650 mm
0 Relative roughness 6.50E-04
0 pressure drop 2.46E+06 Pa
0 efficiency(specify or 100assumed) 100 percent
Reynolds Number 2.14E+05
Friction Factor 0.01945
Velocity of flow 3.056 m/s
Shear rate 1.81E+01 kg/sq.m
Power reqd. to pump thru the line 5.92E+01 kW
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 7
ISSN 2229-5518
reciprocal of sqr. reciprocal of sqr. ElseIf 2 <= ActiveSheet.Range("M13") And ActiveSheet.Range("M13") <=
solverSolve solution frictionfactor frictionfactor 10 Then
sngRecipfric 7.170320286 7.890194064 ActiveSheet.Range("F13") = ActiveSheet.Range("Q17")
End If
Relative Roughness2
D=
sngFricfunction 1.26738E-06 -0.747686295 End Sub
P1 Upstream pressure (kPa). 'same as above but given PipeRoughness not relative roughness
P2 Downstream pressure (kPa ). ElseIf ActiveSheet.Range("M17").Value = 2 And (Active-
Pw Power Required (kW) Sheet.Range("M6").Value = 1 Or ActiveSheet.Range("M6").Value = 2 Or
Q Flowrate (KN/s). ActiveSheet.Range("M6").Value = 3) And ActiveSheet.Range("M9").Value
g Gravity constant (m/s2). = True And ActiveSheet.Range("M10").Value = True And Active-
hf Head loss (m or J/kg) Sheet.Range("M15").Value = 2 Then
A Area (m2).
f Friction factor ActiveSheet.Range("F14") = ActiveSheet.Range("S18")
ActiveSheet.Range("F19") = ActiveSheet.Range("S23")
D Pipe Major or Minor diameter (m)
ActiveSheet.Range("F17") = ActiveSheet.Range("S28")
Dh Hydraulic diameter (m)
Sheets("incompressible flow").Range("S11").GoalSeek Goal:=0, Chan-
L Pipe section length (m).
gingCell:=Sheets("incompressible flow").Range("S7")
V Velocity of flow (m/s). ActiveSheet.Range("F18") = ActiveSheet.Range("S29")
ε Pipe Rougness (mm) ActiveSheet.Range("F12") = ActiveSheet.Range("S25")
γ Specific weight (kN/m3). ActiveSheet.Range("F20") = ActiveSheet.Range("S30")
ρ liquid density (kN-s2/m4). ActiveSheet.Range("F21") = ActiveSheet.Range("S31")
τ Shear rate ActiveSheet.Range("F16") = ActiveSheet.Range("S32")
ActiveSheet.Range("F15") = ActiveSheet.Range("S33")
APPENDIX 'pipe sizing for circular section given relative roughness diameter un-
known
A Clip of Microsoft Excel VBA Cells – Link Worksheet Subroutines for ElseIf ActiveSheet.Range("M17").Value = 2 And (Active-
Display Interface Sheet.Range("M6").Value = 1 Or ActiveSheet.Range("M6").Value = 2 Or
ActiveSheet.Range("M6").Value = 3) And ActiveSheet.Range("M9").Value
Sub pipeType() = True And ActiveSheet.Range("M11").Value = True And Active-
If ActiveSheet.Range("M13") = 1 Then Sheet.Range("M15").Value = 1 Then
ActiveSheet.Range("F13") = "" ActiveSheet.Range("F13") = ActiveSheet.Range("T17")
End If
IJSER © 2012
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 3, Issue 1, January-2012 8
ISSN 2229-5518
End Sub
————————————————
REFERENCES
BIOGRAPHICAL NOTES
IJSER © 2012
http://www.ijser.org