Académique Documents
Professionnel Documents
Culture Documents
0 Answer Report
Worksheet: [ThreeReservoirProblem.xlsx]Sheet1
Report Created: 08/05/2011 12:48:15 PM
Result: Solver found a solution. All Constraints and optimality conditions are satisfied.
Solver Engine
Engine: GRG Nonlinear
Solution Time: 0.047 Seconds.
Iterations: 2 Subproblems: 0
Solver Options
Max Time Unlimited, Iterations Unlimited, Precision 0.000001
Convergence 0.0001, Population Size 100, Random Seed 0, Derivatives Central
Max Subproblems Unlimited, Max Integer Sols Unlimited, Integer Tolerance 1%, Assume NonNeg
Objective Cell (Value Of)
Cell
Name
$D$15 Velocity (m s-1) Pipe 3
Variable Cells
Cell
Name
$B$18 Flowrates Pipe 1
$C$18 Flowrates Pipe 2
$D$18 Flowrates Pipe 3
Constraints
Cell
Name
$B$22 Restriction Q1+Q2+Q3= Pipe 1
$D$15 Velocity (m s-1) Pipe 3
Cell Value
Formula
0.00E+00 $B$22=0
0 $D$15=0
Status
Binding
Binding
Slack
0
0
Variable Cells
Cell
Name
$B$18 Flowrates Pipe 1
$C$18 Flowrates Pipe 2
$D$18 Flowrates Pipe 3
Final Reduced
Value Gradient
0
0
0
0
0
0
Constraints
Cell
Name
$B$22 Restriction Q1+Q2+Q3= Pipe 1
$D$15 Velocity (m s-1) Pipe 3
Final Lagrange
Value Multiplier
0
0
0
0
Liquid Properties
Viscosity (Pa s)
0.001
1000
Pipe 1
Reservoir Height (m)
Roughness (m)
Diameter (m)
Length (m)
120
0.0005
0.1
500
Pipe 2
80
0.0005
0.05
600
Pipe 3
60
0.0005
0.075
700
Velocity (m s-1)
Reynolds Number
Friction Factor
Junction
Head at Junction (m)
85.457431
0.01
Set
initial
guess
values
-8.51E-07
2.68E-11
Total error
(to be minimized)
Legend
Parameters you specify
Calculated values
To be varied by Solver
Constraint in Solver
To be minimized by Solver
Solver Instructions
Minimize the Total Error by varying the Flowrates and the Head at Junction while main
the External Demand at 0.01 m3 s-1
Introduction
This article discusses how you can solve the Three Reservoir Problem with Excel. Firs
If you just want the tutorial spreadsheet, click here, but I enco
Theory
Three reservoirs at different elevations are connected by a pipe network. The comm
Assuming that the liquid level in each reservoir is constant and the surface is open to
Equation 1
where zi is the elevation, fi is the friction factor, Li and Di are the length and diamet
But the volumetric flowrate Qi and the cross sectional area Ai of the pipe are
Equation 2
Equation 3
Equation 4
Equation 5
Additionally, the sum of the flowrates from each reservoir is equal to the external de
Excel Implementation
Moving all terms in Equation 5 to the right-hand side gives
Equation 6
However, if we don't know the exact values of the flowrates in each pipeline (Qi) or t
Equation 7
We'll use Excel's Solver add-in to find the values of Q1, Q2, Q3 and Hj that minimize
Equation 8
...while keeping the total flowrate at the junction equal to the external demand.
Equation 9
Step1. Specify fixed parameters (such as densities, viscosities, reservoir heights, pip
Step 2. Set initial guess values for the flowrates in each pipe
Step 4. Specify an initial guess value for the head at the junction, and the sum of all
Step 5. Specify the errors for each pipeline (as given by Equation 7), and the total er
We can now use Excel's Solver Add-in to find the flowrates (Q1, Q2 and Q3) and head
Step 6. Initiate Excel's Solver menu (if you haven't already, you'll need to load it in th
Step 7. Make the appropriate changes in the Solver window such that you minimise t
Step 8. Click Solve. After dismissing the following window, you'll find that the flowra
Step 9. We're not finished yet! Check that the Total Error specified in Step 5 is a very
ee Reservoir Problem with Excel. First, we develop the governing equations by applying Bernoulli's Equation and the Continuity Equation. We then e
sheet, click here, but I encourage you to read the rest of the article so you understand how the spreadsheet w
nected by a pipe network. The common junction of the piping network is subject to an external demand Qj of 0.01 m3/s. We will develop the theor
is constant and the surface is open to atmosphere, the Bernoulli Equation for Reservoir i (where i=1, 2 and 3) is
r, Li and Di are the length and diameter of the pipe connecting the reservoir to the junction, Vi is the liquid velocity and g is the gravitational const
o eliminate Vi gives
ut of a reservoir, we need to preserve the sign on the Qi^2 term by writing Equation 4 thus
hips to completely specify the system. The friction factor fi is given by the Haaland approximation to the Cole
he flowrates in each pipeline (Qi) or the head at the junction (Hj) then we can define an error for each pipe.
in each pipe
ad at the junction, and the sum of all flowrates in each pipe (as given by Equation 9). The External Demand will act as the constraint for Excel's Solv
given by Equation 7), and the total error (as given by Equation 8).
flowrates (Q1, Q2 and Q3) and head at the junction (Hj) that minimize the total error (as set in Step 5) subject to the flowrate constraint (as set in
n't already, you'll need to load it in the File > Options > Add-ins menu)
ver window such that you minimise the total error by varying the flowrates and the junction head while maintaining the external demand at a set v
ng window, you'll find that the flowrates in each pipeline, and the junction head have changed. Bear in mind that positive flowrates indicate flow o
otal Error specified in Step 5 is a very small number, and the External Demand (in Step 5) is equal to the value specified in Step 7.
d the Continuity Equation. We then explore how these equations can be solved in Excel.
tand how the spreadsheet was developed. Read on for the Three Reservoir Problem solution.
0.01 m3/s. We will develop the theory required to calculate the flowrates in each pipe (Q1, Q2 and Q3), the head at the junction (Hj) and determin
aining the external demand at a set value (for this example, I've set the external demand to 0.01 m3/s). Additionally, set the solving method to GR
hat positive flowrates indicate flow out of a reservoir, while negative flowrates indicate liquid flow into a reservoir.
specified in Step 7.
em solution.
ead at the junction (Hj) and determine whether liquid is flowing into or out of each reservoir