Water Resource Engineering Illustrations Using Excel: David H. Huddleston, PH.D, P.E
Water Resource Engineering Illustrations Using Excel: David H. Huddleston, PH.D, P.E
Water Resource Engineering Illustrations Using Excel: David H. Huddleston, PH.D, P.E
Abstract
Excel spreadsheet solutions are presented and discussed for typical illustrations used in undergraduate
water resources engineering curricula. Examples include variations of the threereservoir problem and
water distribution networks. The spreadsheet solutions, built upon commonly available technology, are
presented as a straightforward alternative to solution techniques that utilize equation solvers, mathematics
software packages, or scientific programming languages. The use of Excel to solve the governing system of
nonlinear, algebraic equations enables the student to allocate more of their time to develop an
understanding of the basic concepts that govern complex engineering systems.
Introduction
As an applied science, there exists a natural tension between the study of fundamental scientific theory and
instruction in the application of analysis and design methodologies within undergraduate engineering
curricula. Most engineering courses are structured to emphasize the relevant physical, chemical and
biological processes that are then reinforced by studying specific problem solving skills applied to systems of
engineering interest. In the area of water resources engineering, analysis commonly results in nonlinear
differential or algebraic equations or systems of equations. Consequently, the level of application complexity
and realism introduced to undergraduates is often limited by students’ computational capability.
Instructors must diligently balance the need to emphasize the engineering system physics versus
instruction in numerical methods used to solve resulting mathematical equations. Student comprehension
of basic concepts that govern complex engineering systems is often impeded by their ability to master
archaic computational skills.
Computer hardware and analysis software are readily available to most engineering students. The analysis
and simulation tools available are applicable to water resources systems at levels of engineering complexity
that easily exceed undergraduate instructional requirements. One key to enrichment of undergraduate
water resources instruction is to utilize such technology to improve the student’s understanding of complex
engineering systems. It is not worthwhile to increase technology utilization just because the technology is
available and interesting but utilizing technology to improve instructional capability is significant. A
variety of software tools including standard spreadsheet applications, equation solvers, and sophisticated
simulation software can be applied to achieve this objective.
Effective instruction in hydraulic design and piping system analysis has been the subject of several recent
publications. The December 2001 issue of the Journal of Hydraulic Engineering was devoted to the topic of
teaching hydraulic design. A common theme among many of these articles was a desire to increase the level
of realism associated with engineering systems introduced. Jewell (2001) discussed the use of a commercial
Associate Professor, Department of Civil Engineering, Mississippi State University, Mississippi
1
State, MS 39762. Email: hudd@engr.msstate.edu.
This study examines the use of Excel, a commonly available spreadsheet package, to solve several
applications that are normally introduced in an undergraduate water resources curriculum. Illustrations
include variations of the threereservoir problem and water distribution networks. The primary course
objectives and the physical principles are unaltered but use of this technology is an efficient way to enable
undergraduate students to solve a relatively complex engineering application that requires the solution of
nonlinear systems of equations. The pervasive access to spreadsheet software and student familiarity with
the software, commonly prior to college enrollment, enables students to analyze complex engineering
systems without being forced to learn additional software tools. Obviously, the instructor retains the
prerogative to focus upon numerical analysis concepts or additional software tools but that is not a
requirement.
BACKGROUND
A onedimensional energy and mass balance describes the fundamental physical processes in many
engineering systems studied in the first undergraduate course in water resource engineering. This includes
the hydraulic processes that govern pressurized pipe flow and openchannel flow of incompressible fluids.
The analysis of such engineering systems invariably requires the student to solve a system of nonlinear,
algebraic equations. Illustration of these principles to specific engineering systems has long been standard
material in popular textbooks.
Over the years, clever solution techniques have been developed to enable manual solution to illustrative
examples. Such illustrations include (1) branching pressurized pipe flow between three fixed energygrade
reservoirs, (2) pressurized water distribution networks, and (3) gradually varied openchannel hydraulics.
Each of these illustrations is analyzed through a onedimensional energy and mass balance and application
of clever solution techniques. However, students often become engrossed with trying to master the
mechanics of the solution techniques to the detriment of the primary mission, which is to develop
understanding of the overall engineering system.
Elevation =60 ft
Elevation =0 ft
Figure 1: Threereservoir system schematic.
Consider the flow distribution of water between the three reservoirs illustrated in Figure 1. The Hazen
Williams model is used to approximate friction losses and minor energy losses are neglected relative to
friction loss. Applying the onedimensional, incompressible, conservation of energy equation between each
fixed grade node and the network junction and assuming that water flows out of reservoir R1 and into
reservoirs R2 and R3 yields:
In the preceeding, the absolute value of the volumetric flow rate is applied to facilitate flow reversal
computations. Conservation of mass applied at the common junction yields:
Q1 Q 2 Q 3 0 (4)
If the assumed flow directions are correct, equations 14 can be combined to form a single nonlinear,
algebraic equation that can be solved for the junction energy grade, EGL J1, as:
EGL 1 - EGL J1
EGL J1 - EGL 2
4.73L 1 4.73L 2
1
(5)
C1.85 D 34.87 1.85
EGL J1 - EGL 3 3
0
4.73L 3
Such an approach allows the problem to be reduced to the solution of a single nonlinear algebraic equation
(5) for the junction energy head, EGL J1, followed by determination of flow rates through back substitution in
equations 13 (Mays 2001). Although this approach is clever and amenable to manual solution techniques,
the technique tends to obscure the fundamental concept of energy conservation between fixed grade nodes.
Students tend to focus upon the development and solution of the composite equation (5), which represents a
conglomeration of energy and mass conservation to the detriment of their global understanding of the
problem physics.
A modern spreadsheet program can be used to obtain a direct solution to the resulting conservation
statements providing a positive reinforcement of the problem physics and developing a foundation for the
subsequent study of more complex pipe networks. As an illustration, consider the following variation to the
preceding example. As a numerical example, assume that all pipes are made from riveted steel with
reservoir elevations, pipe characteristics, and assumed positive flow directions as indicated in Figure 1.
Pipeline data is provided in Table 1.
Table 1: Pipeline data for example 1.
Equations 4, 7 and 8 comprise a system of three nonlinear, algebraic equations for the three unknown flow
rates, Q1, Q2, and Q3. The Excel function Solver (Gottfried, 2000) is ideal for solving small nonlinear systems
of equations such as this. The student merely needs to apply the function after defining the nonlinear
Students’ prior familiarity with spreadsheet applications is a significant advantage to this approach. It is
straightforward for students to associate a spreadsheet cell location with each of the equations that must be
satisfied. For example in the Excel formula sheet depicted in Figure 2, cells C12, C13 and C16 correspond to
equations 6, 7, and 4, respectively.
A B C D E F
1 Pipe Upstream Node Downstream Diameter Length C
Node (inches) (feet)
2 [1] R1 J1 24 3000 130
3 [2] R2 J1 18 1000 130
4 [3] R3 J1 16 4000 130
5
6 Reservoir Elevation (ft)
7 R1 100
8 R2 60
9 R3 0
10
11 Conservation of Energy
12 R1R2 =(B7+B8)+I2+I3
13 R1R3 =(B7+B9)+I2+I4
14
15 Conservation of Mass
16 Junction J1 =G2G3G4
G H I
1 Q (cfs) K Friction Loss KQ1.85
2 28.129 =4.73*E2/((F2^1.85)*((D2/12)^4.87)) =H2*G2*(ABS(G2))^0.85
3 14.545 =4.73*E3/((F3^1.85)*((D3/12)^4.87)) =H3*G3*(ABS(G3))^0.85
4 13.584 =4.73*E4/((F4^1.85)*((D4/12)^4.87)) =H4*G4*(ABS(G4))^0.85
Figure 2: EXCEL formula sheet.
Students can readily identify the correspondence between cell C12 and energy conservation between fixed
grade nodes R1 and R2; cell C13 and energy conservation between fixed grade nodes R1 and R3, and cell
C16 and mass conservation at junction J1. For the problem data presented, the calculated volumetric flow
rates in each pipe are Q1=28.1 cfs, Q2=14.5 cfs, and Q3=13.6 cfs.
As an illustration, consider the hydraulic network described in Figure 3, which is a variation of the network
presented by Wood and Charles (1972). The example is modified from the original reference by replacing
the specified inflows with fixed grade nodes to provide an additional level of problem realism. All piping
materials are assumed to be cast iron. Specified junction demands and the assumed positive flow direction
is indicated on the figure. The DarcyWeisbach friction model is applied throughout subject to the Swamee
and Jain (1976) approximation to the friction factor. The kinematic viscosity of water is prescribed as 1.41e
5 ft2/sec at fifty degrees Fahrenheit. Reservoir R1 is at an elevation twelve feet above the elevation of
reservoir R2. Pipeline data is provided in Table 2.
This example contains twelve nodes and eight loops which exceeds the usual expectations of a class
assignment via manual HardyCross calculations. Students could be required to develop a computer
program to solve the hydraulic network but that would divert the course focus away from the central
physical principles. Based upon the linear theory method, the piping network can be analyzed by developing
a system of equations comprised of conservation of mass enforced at each of the twelve junctions,
conservation of energy for each of the eight network loops, and conservation of energy between the two fixed
grade nodes. This yields a system of twentyone nonlinear, algebraic equations to solve simultaneously for
the twentyone unknown volumetric flow rates. Wood and Charles (1972) and Mays (2001) summarize the
complete system of equations for this problem subject to specified inflow rates in lieu of the indicated fixed
grade nodes. Herein, representative equations are summarized for conservation of mass, conservation of
energy applied to one closed loop and conservation of energy applied between the fixed grade nodes.
(5)
600 700 (8)
gpm gpm
(7)
(6)
400
gpm
Figure 3: Hydraulic network for example 2.
Conservation of mass must be enforced at each of the twelve pipe junctions. For example, conservation of
mass applied to junction, J9, yields
Conservation of energy applied to representative loop (1) yields:
f 1 L1 Q 1 f L Q f L Q f L Q (9)
2
Q1 15 15 15
2
Q15 - 10 10 10
2
Q10 - 9 9 92 Q 9 0
2gD1 A1 2gD15 A15 2gD10 A 10 2gD 9 A 9
Similarly, conservation of energy applied between the two fixed grade nodes yields:
The remaining node equations are comparable to (8) and the remaining loop equations are comparable to
(9). The remaining equations can be obtained from the cited references. As in example 1, the Excel Solver
function can readily solve the assembled system of equations for the unknown flow rates in each pipe. The
Excel formula sheet is a direct extension of that presented for example 1 in Figure 2 and is not included
herein. The resulting network distribution of flow rates is included in Table 2.
CONCLUSIONS
The examples discussed herein illustrate the use of a commonly available spreadsheet package as a tool to
facilitate instruction in water resource engineering. The Excel solution procedures are presented in a
manner that is consistent with the governing conservation statements. This, coupled with students’ pre
existing familiarity with the spreadsheet package, enables students to focus on understanding of the
engineering system rather than development of computational skills.
Computer technology plays a significant role in engineering education. Determining how and at what level
to introduce technology within the curricula is a significant challenge to educators. A productive role exists
for scientific calculators, equation solvers, mathematics packages, spreadsheet applications, and
commercial analysis software. The selection of the appropriate tool is dependent upon the course context
and available technology infrastructure. The Excel illustrations are presented as a bridge that enables
students to analyze more realistic applications while still requiring enough manual development of
equations to reinforce the underlying engineering principles.
NOMENCLATURE
A Flow crosssectional area
C HazenWilliams roughness coefficient
D Pipe diameter (inches)
EGL Energy grade (feet)
f DarcyWeisbach friction factor
g Gravitational constant
L Pipe length (feet)
Q Pipe volumetric flow rate (cfs)
References
Gottfried, B. S. (2000). Spreadsheet Tools for Engineers: EXCEL 2000Version, McGrawHill, Inc., New York.
Hodge, B. K. and Taylor, R. P. (2002) “PipingSystem Solutions Using Mathcad,”Computer Applications in
Engineering Education, American Society of Engineering Education (ASEE), Washington, D.C.
Jewell, T. K. (2001), “Teaching Hydraulic Design Using Equation Solvers,” Journal of Hydraulic Engineering,
American Society of Civil Engineers (ASCE), Washington, D.C.
Mays, L. W. (2001), Water Resources Engineering, John Wiley & Sons, Inc., New York.
Swamee, P. K. and Jain, A. K. (1976), “Explicit Equations for PipeFlow Problems”, Journal of Hydraulic
Division, American Society of Civil Engineers (ASCE), Washington, D.C.
Weiss, P. T. and Gulliver, J. S. (2001), “What Do Students Need in Hydraulic Design Projects?,” Journal of
Hydraulic Engineering, American Society of Civil Engineers (ASCE), Washington, D.C.
Whiteman, W. and Nygren, K. P., “Achieving the right Balance: Properly Integrating Mathematical Software
Packages into Engineering Education”, Journal of Engineering Education, American Society of
Engineering Education (ASEE), Washington, D.C.
Wood, D. and Charles, C. (1972), “Hydraulic Network Analysis Using Linear Theory,” Journal of Hydraulics
Division, American Society of Civil Engineers (ASCE), Washington, D.C.