Lab 5 Report
Lab 5 Report
Lab 5 Report
Table of Contents
Abstract………………………………………………………………………………………...…3
Introduction……………………………………………………………………………………...3
Method of Analysis……………………………………………………………………………...5
Appendix A…………………………………………………………………………………….12
Appendix B……………………………………………………………………………………
3
Abstract
Three experiments were conducted in order to estimate the orifice discharge coefficients (CD) for
the upper and lower tanks in a given two-tank system. In the first experiment, fluid height in
the upper tank was recorded over time as the tank drained through the orifice; the same
experiment was conducted for the lower tank. The third experiment recorded fluid heights in
both tanks as both tanks drained over time. The models of both tanks were found by deriving
certain conservation laws, including conservation of mass and conservation of energy. The
estimates of the orifice discharge coefficients were found by minimizing standard estimates of
error between the experimental data for the single tank experiments and the models using a
range of CD values. These CD values for the upper and lower tanks were found to be 0.7581 and
0.9304. The corresponding SEE values for these estimates were 0.1155 inches and 0.0478 inches.
The models for each tank with the estimated CD values were compared graphically to the two-
tank experimental data, which validated the estimated values. The discharge coefficients of the
orifices are important to the system because they account for energy loss as the fluid travels
through the orifice.
Introduction
The objective of this lab was to estimate the orifice discharge coefficients (CD) for the upper and
lower tanks in a given two-tank system. The discharge coefficient is a unitless value that
accounts for energy loss of a nozzle or orifice; this value is directly related to the minor loss
coefficient. In order to find the best estimate of the discharge coefficient, an equation relating
fluid height (h) and CD was necessary. To find this equation, conservation of mass and energy
equations were derived and simplified based on stated assumptions.
Next, experimental data was needed to measure the heights of the tanks over time as the tanks
drained. Fluid height in the tanks were recorded over time as each one was separately drained.
A final experiment involved draining both tanks at the same time and recording fluid heights in
both tanks. To find the best estimate for CD values, the standard estimate of error between the
experimental data and the model was minimized. To validate these estimates, the models with
the optimized CD values were compared graphically to the fluid height data of the two-tank
experiment.
The following sections explains in more detail how the experiments were conducted, the
derivations and assumptions used to obtain the model for the system, specific results of the
experiment, and how the experiment could be improved.
4
The two-tank draining system was set up in a vertical series at station #3, allowing the
first tank to be able to drain into the second. Figure 1 shows the schematic diagram of
the two-tank draining system. Three different experiments were conducted using this
system. Fluid height in these experiments were measured by pressure sensors at the
bottom of the tank. These pressure sensors gave output voltages that were recorded
over time. The first experiment measured the output voltage as the upper tank drained
from a set water height. Similarly, the second experiment measured the output voltage
as the lower tank drained from a set water height. In the last experiment, both tanks
started with a specified height of water; as the top tank drained into the bottom tank,
the voltages were measured for each until there was almost no water in either tank. The
first two experiments were then used to find the best estimate of the CDs. The third
experiment was used to validate the estimates.
Figure 1 shows a schematic diagram of the given two tank draining system from which
the model can be derived.
The following procedure was used to determine the relationship between the water
level and the pressure sensor output voltage. Each exit orifice had a valve that allowed
the water to either flow freely or to be held in the tank. At each draining increment of
5
one inch, the valves restricted water flow to measure both the voltage and height. The
calibration equation that relates the change in water level to output voltage was then
used to convert the voltage data from the individual tank experiments to height data.
The conversion of the voltage data to height data allowed height to be plotted over
time. This data was plotted against Equation 14 – the model of the height as a single
tank drains over time. In comparing the plots, the most accurate model used the CD
value that corresponded to the lowest SEE value. The new CD values for each tank were
then used in a refined model of a two-tank draining system. This refined model was
plotted against the fluid height data taken from the third experiment of a two-tank
draining system to validate the new CD values.
Methods of Analysis
To solve for the discharge coefficients for each tank, it is necessary to derive
conservation laws and state assumptions for our particular system shown in Figure 1.
In the following derivations, only the upper tank is analyzed. However, all Equations
still apply to the lower tank; the differences only lie in the physical parameters.
dmsystem
where is the rate of change in mass in the system over time, ṁin is the rate of
dt
mass entering the system over time, and ṁout is the rate of mass leaving the system over
time. By assuming that the liquid in our system (water) is incompressible and knowing
that mass is equal to density multiplied by volume, the Equation can be simplified into:
𝑑𝑉𝑠𝑦𝑠𝑡𝑒𝑚
= ∑ 𝑄𝑖 − ∑ 𝑄1 (2)
𝑑𝑡
dVsystem
where is the rate of change in volume of the system, Qi is the volumetric flow
dt
rate into the system, and Q1 is the volumetric flow rate out of the system. The volume
(Vsystem) of the tank can be defined as:
where A is the cross-sectional area of the tank and h1 is the height of fluid in the tank
from the bottom of the tank. Because the height is changing over time, this Equation
can be changed into:
6
𝑑𝑉𝑠𝑦𝑠𝑡𝑒𝑚 𝑑ℎ1
=𝐴 (4)
𝑑𝑡 𝑑𝑡
dh
where is change in fluid height over time. Assuming there is only one orifice and
dt
faucet putting water into the tank and setting Equations (2) and (4) equal to each other
gives:
𝑑ℎ1
𝐴 = 𝑄𝑖 − 𝑄1 (5)
𝑑𝑡
To solve for Q1, it is necessary to derive the finite-form Equation of energy conservation.
This is also known as the modified Bernoulli Equation:
𝑃1 𝑣12 𝑃2 𝑣22
+ + 𝑔𝑧1 = + + 𝑔𝑧2 + 𝑔ℎ𝐿 (6)
𝜌 2 𝜌 2
where positions 1 and 2 are shown on figure 1, 𝜌 is the density of the fluid, g is the
acceleration due to gravity, P is the pressure at each position, v is the fluid speed at
each position, z is the height of each position. Assuming that the datum of the system is
at the bottom of the orifice, the height at position 1 is equal to the fluid height in
addition to the length the orifice extends below the tank (h1o), and the height at position
2 is 0 (position 2 is where the datum is located). The term ghL refers to head loss.
Applying these simplifications gives the Equation:
where f is the friction factor, L is the pipe length, D is the pipe diameter, and K is the
orifice minor loss coefficient. Because the output pipe is short, we neglect major losses
and only consider the minor loss coefficient. We are only analyzing the draining of the
tank, so we only consider the minor loss in the orifice. These assumptions simplify
Equation 8:
𝑣𝑖2
𝑔ℎ𝐿 = ∑ 𝐾𝑖 (9)
2
Next, the definition of flow rate relates flow rate to fluid velocity:
𝑄1 = 𝑣2 𝐴𝑜1 (10)
where Ao1 is equal to the cross-sectional area of the orifice. Plugging Equations 9 and 10
into Equation 7 gives:
7
1 2
𝑄1 = 𝐴2𝑜1 √1+𝐾 √𝜌 (𝑃1 + 𝜌𝑔(ℎ1 + ℎ1𝑜 ) − 𝑃2 ) (11)
1
𝐶𝐷 = √1+𝐾 (12)
In our particular system, there is an initial tank fluid height and no input flow rate (Qin
=0). Plugging Equation 11 and 12 into Equation 5 gives the Equation of motion for the
tank:
𝑑ℎ1 2
𝐴 = −𝐶𝐷 𝐴𝑜1 √𝜌 (𝑃1 + 𝜌𝑔(ℎ1 + ℎ1𝑜 ) − 𝑃2 ) (13)
𝑑𝑡
The top and bottom of the tank are open to the atmosphere (P1=P2), so they cancel each
dh
other out in Equation 13. Separating and integrating both sides to solve for the
dt
height of the tank as a function of time (t) gives:
𝐴𝑜1 2
ℎ1 (𝑡) = (√ℎ1 (0) + ℎ1𝑜 − 𝐶𝐷 √2𝑔 𝑡) − ℎ1𝑜 (14)
𝐴1
To estimate the CD in the above Equation, the standard estimate of error (SEE) between
the model in Equation 14 and the experimental data was minimized using a large range
of CD values. The initial guess for each CD was 0.7. The CD value that corresponded to
the lowest SEE was used as the estimate. The standard estimate of error Equation used
was:
2
(ℎ𝑚𝑜𝑑𝑒𝑙,𝑖 −ℎ𝑑𝑎𝑡𝑎,𝑖 )
𝑆𝐸𝐸 = √∑𝑛𝑖=1 (15)
𝑛−2
where hmodel is the fluid height found by using Equation 14 (h1), hdata is the experimental
fluid height found at the same instant, and n is the number of experimental data points.
The process of minimizing the SEE was done for both the upper and lower tank to
estimate each CD.
The models for each tank with the estimated CD values were then compared graphically
to the two-tank experimental data in order to validate the estimated values.
8
After obtaining the various measurements for the top and bottom tank shown below in
Table 1, we were able to use these measurements as physical parameters for our model
equation. The last parameter necessary in our equation in order to properly model the
system was the discharge coefficient. In order to do this, we tested many different CD
values and found which one produced the lowest SEE. We interpreted the
corresponding CD values as the best estimates for the orifice discharge coefficients.
Shown in Figure 2 are the SEE values for each tank model with initial guess at the CDs
(0.7) and our optimized CDs.
Table 1 shows system measurements taken from station number three. Apart from
orifice diameter, both the upper and lower tank had identical dimensions.
Orifice
Tank Width Tank Depth Outlet Nut Height
Tank Diameter
(in) (in) Height (in) (in)
(in)
Upper
6.90 3.10 0.25 3.375 0.5
Lower
6.90 3.10 0.14 3.375 0.5
Table 2 shows the initial guesses for the discharge coefficients on the orifices of the
given upper and lower tanks, as well as the refined discharge coefficients and the
standard estimate of error (SEE) corresponding to each discharge coefficient.
Refined Model
0.7581 0.1155 0.9304 0.0478
In order to obtain a visual frame of reference for the accuracy of our model for each
tank, a graph of the upper and lower tanks’ response was plotted alongside the
respective experimental data. The plot for the upper tank is shown in Figure 2, the
lower tank plot in Figure 3. To validate the CD estimates, the model responses for both
9
Figure 2 shows the upper tank model responses for initial and optimized CD values and
experimental data of fluid height of the upper tank over time.
Figure 3 shows the lower tank model responses for initial and optimized CD values and
experimental data of fluid height of the lower tank over time.
10
Figure 4 shows the upper and lower tank model response for the optimized CD values
and the experimental fluid height data in both tanks from the two-tank experiment.
As shown in Figures 2 and 3, the initial model responses were significantly different
than the experimental data. After refinement our optimized model followed the
experimental data with very little error. For both tanks, the initial guesses at CD value
were low, which resulted in higher height of water in each tank for every time value.
This is because the lower the CD, the more the orifice slows down the exiting water,
which in turn slows the draining of the tank.
As shown in Figure 4, the CD estimates and our models match the experimental data
very closely. This figure supports our estimates further.
During our first experimental period, we had obtained measurement data that lead to a
similar CD for the upper tank, but our lower tank CD was over 1. A CD greater than 1 is a
physical impossibility since it signifies that the orifice is creating energy. We analyzed
our model Equation 14 and realized that incorrect tank width, tank depth, and orifice
diameter measurements would greatly affect our calculated model CD. Returning to the
lab, we obtained the proper measurements listed in Table 1 and realistic CD values for
both tanks listed in Table 2.
While our final CD results are significantly more accurate after our revised
measurements, the effect that measurement error has on our calculated model CD values
is great. Given that our measurement equipment only contains markings down to 0.125
inches, the greatest possible error in the orifice diameter measurement would be 0.0625
inches. This results in a 19.7% margin of error on our final CD values.
Another possible source of error in our obtained CD values stems from a leaky water
faucet feeding the second tank. A small amount of water was constantly feeding into
the second tank, which would result in data that represents a higher discharge
coefficient than actual. The error our data has in representing the system itself is not
known since the amount of water leaking into the second tank is unknown.
11
The objective of this lab was to estimate the orifice discharge coefficients for the upper
and lower tanks in the given two-tank system. We first conducted three experiments
with the system. For the first experiment, the height of the water in the upper tank
started at a set height, the valve was opened, and we recorded the height of water in the
tank over time until the water reached only approximately 0.5 inches above the height
of the orifice. The same experiment was conducted with the lower tank. The third
experiment consisted of the upper and lower tanks starting at set heights. Both of the
valves were opened, and the fluid heights in both tanks were measured and recorded
over time until the fluid height in the bottom tank reached only approximately 0.5
inches.
Using models derived from conservation laws, we used a range of CDs to find the
smallest SEE values between the experimental data for the one-tank trials and the
models. The corresponding CD values for the upper and lower tank were found to be
0.7581 and 0.9304. The SEE values for the optimal CD value for the upper and the lower
tank were found to be 0.1155 inches and 0.0478 inches. The models for each tank with
the estimated CD values were graphically compared to the two-tank experimental data.
Because the models were very close to the experimental data, it was concluded that the
comparison validates the estimated CD values.
Appendix A
The following Matlab code was used to generate the program that produced the results discussed above:
The following simulink diagram was also used in the Matlab program to obtain the results:
13
In order to measure the fluid height in each tank, a pressure transducer was used. This pressure
transducer gave an output voltage. Table 1 contains the voltage data taken in increments of
approximately 1 fluid inch. This data was then used to convert voltage to height. The equations used for
the conversion based on a linear calibration fit line for each tank were as follows:
Table A1 shows tank height and pressure transducer output data taken that was used to calibrate the
specific tank pressure transducers for the upper and lower tanks at station #3.
Water height from bottom Pressure transducer Water height from Pressure transducer
(in) output (V) bottom (in) output (V)