You are on page 1of 22

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/361880229

NOTES ON SIMPLE MATHEMATICAL MODELS FOR TANK DRAINING

Technical Report · July 2022


DOI: 10.13140/RG.2.2.28634.00968

CITATIONS READS
0 1,219

1 author:

Douglas Vinson Nance


Air Force Research Laboratory
30 PUBLICATIONS 78 CITATIONS

SEE PROFILE

All content following this page was uploaded by Douglas Vinson Nance on 09 July 2022.

The user has requested enhancement of the downloaded file.


Computational Physics Notes

NOTES ON SIMPLE MATHEMATICAL


MODELS FOR
TANK DRAINING

Douglas V. Nance

JULY 2022
NOTES ON SIMPLE MATHEMATICAL MODELS FOR TANK
DRAINING

Douglas V. Nance
Independent Research Scientist

JULY 2022

ii
DISCLAIMER

The author of this report has used his best effort in preparing this document. The author
makes no warranty, express or implied, or assumes any legal liability or responsibility for
the accuracy, completeness or usefulness of any information, apparatus, product or process
disclosed or represents that its use would not infringe privately owned rights. Reference
herein to any commercial products, processes, trade name, trademark, manufacturer or
otherwise, does not necessarily constitute or imply its recommendation, or favoring, by the
author.

iii
Abstract

These notes concentrate on solving two related problems in basic fluid dynamics. First,
we solve the Torriclli problem where a fluid filled tank drains under the force of gravity, i.e.,
under the weight of the fluid. An analytical solution is developed in detail for this problem.
In addition, the standard fourth order Runge-Kutta method is used to compute a numerical
solution for comparison. The second problem, and the main problem of interest, is the case
where a fluid filled tank drains under the motive force of a high pressure air bubble estab-
lished above the fluid surface. An analytical solution is not developed for this problem, but
two different numerical algorithms are successfully used to compute comparative solutions.
Results are presented for both problems, and we discuss the difference between analytical
and exact solutions are discussed.

iv
Contents

1 Introduction 1

2 Mathematical Models 2
2.1 The Torricelli Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2.2 The Pressurized Tank Problem . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Results 9
3.1 Results for the Torricelli Problem . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Results for Modeling the Draining of the Pressurized Tank . . . . . . . . . . 11

4 Conclusions 14

v
1 Introduction

An advantage (and there are disadvantages) of being a retired scientist (hopefully in the
temporary sense), is that I have time to revisit physics problems from my past. Sometimes,
I would get interested in a physics problem that I ultimately lacked the time to solve. A
particular interest of mine is for time dependent physics problems where one can actually see
things happen. The problem where a liquid filled tank drains through an orifice at its base is
one example. In my case, this problem also proved to be highly applicable to reality. Why?
Many years ago, I was asked by my major supervisor if I could determine just how quickly
a pressurized tank would drain. At the time, I believed that I could solve this problem, but
as frequently happens in a bureaucratic environment, other priorities came to the forefront.
As it happens, one of my intermediate supervisors retasked my work. Still, this problem
remained in the back of my mind.

When one becomes interested in solving a physics problem, a common approach is to


refer to a similar problem that has a solution. One can study that solution, understand it
and then build upon or modify it to emulate the new configuration. That approach is what
is taken here. We begin with the Torricelli problem developed and solved so long ago.[1] An
analytical solution is developed in detail for this problem as a test case. The fourth order
Runge-Kutta method is also applied to and subsequently validated for this problem. Using
this configuration as an initial point, a initial value problem is then developed for the drain-
ing of a pressurized, water filled tank. The ordinary differential equation for this problem is
similar to the for the Torricelli problem, but an analytical solution is more difficult to obtain.
Instead, the aforementioned Runge-Kutta scheme is used to solve this problem. To facilitate
a comparison of solutions (and to confirm the Runge-Kutta solution), we separate variables
in the ordinary differential equation, and use numerical quadrature techniques to evaluate
the resulting definite integral. This integral is cast in the variable for the height of the water
surface. In this way, we can express elapsed draining time as a numerical function of the
water height variable. An that sense, we obtain an “exact” solution for this problem. Later
in the report, we discuss what is meant by the term “exact solution”. Detailed solutions are
developed for both of these problems and shown graphically.

Douglas V. Nance
1
Figure 1: Configuration of the Open-Topped Tank

2 Mathematical Models

Detailed mathematical models for two tank draining configurations are developed in this
section.

2.1 The Torricelli Model


A fundamental fluid dynamics model for the gravity forced draining of a tank or other
liquid filled vessel is due to E. Torricelli as described in University Physics by Sears et al.[1]
A version of that model is developed here. Consider the diagram presented in Figure 1.
Two physical principles are applied in the development of this model. First, the continuity
equation is applied along with the assumption of steady, incompressible flow at the tank
outflow (signified by the V2 and A2 symbology). The incompressible continuity equation
may be written as

∇ · (ρ~u) = 0 → ∇ · (~u) = 0 (1)


To continue our analysis, we collapse the model to one streamwise dimension, i.e., the vertical
flow direction denoted by velocities V1 and V2 . That is to say, the lateral flow velocity in the

Douglas V. Nance
2
vessel is zero. At the outflow interface, we can resolve from equation (1), the constant mass
flow relation that states
 
A1
V1 A1 = V2 A2 → V2 = V1 (2)
A2
In (2), V1 is the velocity of the liquid surface closest to the top of the tank while V2 is outflow
velocity at the tank’s base. Accordingly, A1 is the cross-sectional area of the tank while A2 is
the cross-sectional area of the outflow orifice. The second relation used in this development
is Bernoulli’s equation (again attributed to Reference [1]), i.e.,
ρ ρ
Patm + P1 + V12 = Patm + V22 (3)
2 2
In the above equation, Patm is atmospheric pressure, and P1 is the fluid pressure within the
tank at its base. The density of the liquid is denoted by ρ. The static fluid pressure P1 is
given in accordance with the weight of the fluid colume in the tank, i.e.,

P1 = ρgh(t) (4)
where h(t) is the height of the fluid surface above the tank’s base. In this model, atmospheric
presssure cancels from both sides of (3). In a similar manner, the fluid density factors from
both sides of this equation. With the use of (2) and by noting that V1 is actually ḣ, (3) may
be expressed as
 2
ḣ2 (t) 1 A1
g h(t) + = ḣ2 (t) (5)
2 2 A2
A rewrite of (5) appears as
2g
ḣ2 (t) =  2  h(t) (6)
A1
A2
−1

Let us denote the constant C as follows.


2g
C 2 =  2  (7)
A1
A2
−1

Hence,
v
u 2g
C = −u  2 (8)
u 
t A1
A2
−1

Since h(t) must decrease as time advances, the negative sign has been chosen for C. With
this result, we can rewrite (6) as

dh(t) p
ḣ(t) = = C h(t) (9)
dt
Douglas V. Nance
3
This first order ordinary differential equation can be solved by the separation of variables
and definite integration, i.e.,
Z h Z t
dh̃
p =C dt̃ (10)
h0 h̃ 0

As it happens, (10) is easily solved to obtain the result


p 2
p p 1 1
h(t) = h0 + Ct → h(t) = h0 + Ct (11)
2 2
So the solution for this tank draining problem is given as
p 2
1
h(t) = h0 + Ct , h(0) = h0 (12)
2
Differentiation shows that the velocity of the liquid surface is
p 
1 p
V1 (t) = ḣ(t) = C h0 + Ct , ḣ(0) = C h0 (13)
2
A nice convenience for this model is that we can calculate the time tD at which the tank
drain completes. By setting (12) equals zero and then solving this equation for tD , i.e.,

2 h0
tD = − (14)
C
Plots for an example tank configuration are provided in the Results section.

2.2 The Pressurized Tank Problem


This tank configuration differs from the Torricelli problem because the draining process is
forced by a high pressure air bubble initiated above the liquid surface. A major change is
that liquid exists both inside and outside of the tank. The cross-sectional area of the tank
is A1 while the cross-sectional area of the outflow at the base of tank is A2 . Also, at the
outset of the problem (time zero), the water level is the same both inside and outside of the
tank. As time advances, the water level outside of the tank does not change. Conversely,
within the tank, the high pressure bubble of air drives down the tank water level. This
configuration is shown in Figure 2. Note that in Figure 2, the water has the color blue while
the region of the tank containing high pressure air has the color red (at time zero). Note also
that atmospheric pressure Patm is applied on the surface of the water outside of the tank.
As regards the region containing high pressure air, the initial pressure is PU and the initial
volume is WU . (In the notation, U stands for “ullage”). The height of this ullage region
is denoted hU . The height of water outside of the tank and initially inside the tank is h0 .
Outside of the tank, at its base, the pressure is fixed at Pout where

Pout = ρL g h0 (15)

Douglas V. Nance
4
Figure 2: Configuration for the Pressurized Tank Draining Problem

Douglas V. Nance
5
with ρL denoting the water density. According the pressure within and at the tank’s base is
Pin (t), i.e.,

Pin (t) = ρL g h(t), t ≥ 0 (16)


As one may observe, the primary variable for this problem is the height of the water level in
the tank, i.e., the function h(t).

It is very important to realize that my approach to this problem is very, very simplistic.
Like Torricelli’s problem, Bernoulli’s equation is again applied.[1] The expansion of the high
pressure gas bubble is treated in a highly quasi-static manner, that is, via a fixed pressure-
volume ratio. The specific gas dynamics processes are not addressed here, nor are the real
energetics of gas expansion and impulsive loading for the gas-liquid interface. The general
idea entertained here is to gain a view of the gross physics for this concept problem. It can be
used to plan improved approaches to this problem that incorporate higher resolution physics.
What this approach does highlight is the drop in gas pressure in the course of expansion,
the attendant efflux of water and the reduction of the liquid’s contribution to pressure at
the tank’s base.

To begin the derviation, we first obtain a relation for the pressure of the air in the ullage
bubble. We invoke the perfect gas relation, i.e.,

PU WU = MG R T (17)
We assume that the air expands both isentropically and isothermally, so by dictating the
starting pressure PU , we can determine the group MG RT as a fixed parameter. The change
is pressure with time is then computed based upon the changing air volume of the tank.
With these assertions in place, Bernoulli’s equation may be written as
1 1
PG (t) + ρL gh(t) + ρL V12 = Patm + ρL gh0 + V12 (18)
2 2
By invoking the continuity equation (as in the preceding section), we have the velocity area
relation
 
A1
V2 = V1 (19)
A2
As the air volume of the tank increases in time, the pressure of the air is given as
MG RT
PG (t) = (20)
A1 (hU + h0 − h(t))
By noting that V1 (t) = ḣ(t) and by applying (19), with some algebra, we have that
"  #
2
1 A1
− 1 ḣ2 (t) = ρL g [h(t) − h0 ] + PG − Patm (21)
2 A2

If we employ (20), we may then solve for ḣ(t). The result is

Douglas V. Nance
6
v  
u 1 MG RT
ḣ(t) = −u  2  ρL g[h(t) − h0 ] + − Patm (22)
u
t 1 A1 A1 [hu − (h(t) − h0 )]
2 A2
−1

Note that we have selected the negative branch of the square root function since, as time
advances, ḣ(t) must decrease. To facilitate the process of computation, we want to simplify
our notation by (i) representing lengthy constant expressions with single letter symbols
and (ii) by substituting an ancilliary function for an expression involving h(t). Denote the
constant formulas as follows. Let us use the expressions
2g
b=  2 (23)
A1
A2
−1

2MG RT
c=  
2
 (24)
A1
A1 ρL A2
−1

2P
d=  atm
2  (25)
A1
ρL A2
−1

To a common end, define the ancilliary function y(t) such that

y(t) = h(t) − h0 , y(0) = 0 → ẏ(t) = ḣ(t) (26)


With these substitutions in mind, we may write (22) as
r
c
ẏ(t) = − b y(t) + − d, y(0) = 0 (27)
hU − y(t)
We can separate variables in the above ordinary differential equation to obtain
dy
q = −dt (28)
c
b y(t) + hU −y(t) −d

By definite integration, we achieve the form


Z y
dỹ
t(y) = − q (29)
c
0 b ỹ(t) + hU −ỹ(t) −d

With the advent of (29), we could simply pronounce this problem as solved since we have
defined t as an implicit function of y. There is nevertheless a complication. While I am not
bold enough to claim that it does not exist, the form of the anti-derivative needed to evaluate
(29) is not immediately evident, so an algebraically closed result for y(t) seems distant, if not
out of reach. Still, that does not stall our progress. In the first place, I choose to evaluate (27)
by using contemporary numerical techniques for integrating ordinary differential equations.

Douglas V. Nance
7
My favorite method is the standard fourth order Runge-Kutta scheme.[2] This algorithm is
provided below for completeness. For an initial value problem of the form

dy(t)
= f (t, y(t)), y(t0 ) = y0 (30)
dt
For n = 0, 1, . . . with ∆t = tn+1 − tn , the algorithm is given as

k1 = ∆tf (tn , y(tn ))


k2 = ∆tf (tn + 1/2∆t, y(tn ) + 1/2k1 )
k3 = ∆tf (tn + 1/2∆t, y(tn ) + 1/2k2 )
k4 = ∆tf (tn + ∆t, y(tn ) + k3 )
1
y(tn+1 ) = y(tn ) + [k1 + 2k2 + 2k3 + k4 ] (31)
6
A noticeable simplification for using this algorithm in this case is that f (t, y(t)) is actually
f (y(t)) since the rate function has no explicit dependence on t. This algorithm is applied to
solve the pressurized tank draining problem.

It is always nice to have a secondary solution technique in hand to confirm primary nu-
merical results. Recalling (29), we may apply numerical quadrature in order to compute
the definite integral in the variable y. The corresponding time t follows immediately. A few
decades ago, this solution approach may have been the method of choice. Here, we apply
this method to confirm the Runge-Kutta solution. The definite integral in (29) is computed
by using the Romberg integration method.[2] As is detailed in this Reference (recommended
for the interested reader), the Trapezoidal Rule is combined with the Richardson Extrapola-
tion method to produce a rapidly converging quadrature scheme. In the next section, these
results are shown in concert with those of the Runge-Kutta scheme.

Douglas V. Nance
8
Table 1: Data for the Torricelli Problem
h0 10 m
A1 1.0 m2
A2 0.1 m2
ρ 1,000 kg/m3
Patm 1 atm

10

8 RK4
Water Height in the Tank (m)

EXACT

0
0 2 4 6 8 10 12 14
Time (s)

Figure 3: Water Height versus Time for the Torricelli Problem

3 Results

In this section of the notes, results are shown for both the Torricelli and Pressurized Tank
Draining problems. In retrospect, I decided to use the Runge-Kutta scheme to solve the
Torricelli problem as well as for the pressurized tank draining test case. This action provides
two advantages: (i) doing so serves to validate the Runge-Kutta method, and (ii) in the
course of this work, a small error has been detected and fixed in the Torricelli solution. In
addition, a definite integration procedure has been performed to confirm the results obtained
for the pressurized tank draining problem.

3.1 Results for the Torricelli Problem


Input data for the Torricelli test case is provided in Table 1. Both the exact and Runge-
Kutta solutions have been computed for this test case. The plots for the height of the water
in the tank are shown in Figure 3. Velocities for the water surface and for the tank outflow
are displayed in Figure 4. Here, the speed of the receding water level is denoted as V1 while
V2 is the speed of the water jetting from the outflow at the base of the tank. Figure 5 shows
a graph of the pressure at the bottom of the water tank. Each of these properties is graphed
as a function of elapsed time. Moreover, the exact solution is plotted at discrete points that

Douglas V. Nance
9
0

-2

Water Velocities (m/s) -4

-6

-8

-10
V1 RK4
V1 EXACT
V2 RK4
-12 V2 EXACT

-14

-16
0 2 4 6 8 10 12 14
Time (s)

Figure 4: Velocities for the Liquid Surface and Drain Outflow versus Time for the Torricelli
Problem

1.9

1.8
Pressure at Tank Bottom (atm)

1.7 RK4
EXACT
1.6

1.5

1.4

1.3

1.2

1.1

1
0 2 4 6 8 10 12 14
Time (s)

Figure 5: Pressure at the Tank Bottom versus Time for the Torricelli Problem

Douglas V. Nance
10
Table 2: Data for the Pressurized Tank Draining Problem
h0 10 m
hU 0.1 m
r1 1.0 m
r2 0.25 m
ρL 1,000 kg/m3
PU 4,500 psi
Patm 1 atm
10

8
Water Height in the Pressurized Tank (m)

6 RK4
Def. Int.

0
0 1 2 3 4 5 6
Time (s)

Figure 6: Water Level in the Tank for the Pressurized Draining Problem

overlay the numerical solution. For this problem, the tank drains in about 14.2 seconds,
and the peak outflow velocity is 14.07 m/s while the tank’s water level recedes with a peak
velocity of 1.4 m/s. The maximum pressure predicted at the bottom of the tank is almost
2 atmospheres. As is exhibited by these Figures, the agreement between the numerical and
exact solutions is quite good. Solving this problem serves as a nice prelude to working on
the draining problem for the pressurized tank.

3.2 Results for Modeling the Draining of the Pressurized Tank


The data needed for modeling the draining of the pressurized tank is presented in Table 2.
To revisit the sequence of events for this problems, at time zero, a high pressure region is ini-
tiated above the water’s surface in the tank. As the high air expands, it forces water through
the tank outflow. This action is resisted by pressure outside of the tank. This external pres-
sure does not change as it is comprised of atmospheric pressure plus the pressure exerted by
the external water column of height h0 . As the tank’s water level recedes, the gas pressure
reduces in what is modeled in a quasi-static manner. These dynamics do depart from reality

Douglas V. Nance
11
6

Water Velocities (m/s) - Logarithm of Magnitude 4

2 V1 RK4
V1 Def. Int.
V2 RK4
V2 Def. Int.
1

-1
0 1 2 3 4 5 6
Time (s)

Figure 7: Velocities for the Water Surface and Tank Outflow for the Pressurized Draining
Problem

1000
Pressure at Tank Bottom (atm) - Logarithmic Scale

100 RK4
Def. Int.

10

1
0 1 2 3 4 5 6
Time (s)

Figure 8: Pressure at the Tank Bottom for the Pressurized Draining Problem

Douglas V. Nance
12
as both wave propagation and viscous effects are neglected along with 3D geometric effects,
yet the model still remains interesting. We begin by examining the water level in the tank as
is shown in Figure 6. It is evident that the required draining time is about 5.5 seconds. It is
important to realize that the draining progress is resisted by external pressure. Drain related
velocities are graphed in Figure 7. Note that V1 and V2 are the water surface and tank outflow
velocities, respectively. This plot is provided in semi-logarithmic form to better elucidate
the spike in velocities occurring in the instants just after the problem is initiated. Figure 8
contains a plot of the pressure at the bottom of the tank, and again, logarithmic plotting is
used to more clearly display the rapid change in pressure near the start of the event. The
dependent variable existing in each of these plots is elapsed time. Moreover, and with no less
importance, the solution produced by the definite integration of (29) is over plotted in each
case as discrete points. In each case, the agreement between these two solutions is quite good.

Douglas V. Nance
13
4 Conclusions

The notes contained in this report address two related time dependent problems involving
the draining of a tank of water. The first problem is due to Torrecelli and involves the
draining of a tank using only the force of gravity. That is to say, the water flows from the
tank driven by the weight of the water. Both the continuity and Bernoulli equations are
used to develop the solution for this problem. Of course, the Torricelli problem has a legacy
analytical solution. One form of the solution is elucidated here. Also, the standard, fourth
order Runge-Kutta solution is applied to this problem in order to validate the associated
numerical programming. The agreement between these solutions is excellent.

The second problem of interest entails the draining of a water filled tank where the motive
force is provided by a bubble of high pressure air established above the water surface. As
the high pressure air expands, it exerts pressure on the water surface and forces the liquid
through the tank outflow. In this case, gravity does not drive the draining problem. On
the other hand, gravity resists the draining process since a body of water is established a
priori outside of the tank. This problem is more complicated than the Torricelli problem,
and many assumptions are made in order to develop a solution for this problem. We ne-
glect viscosity and wave propagation in gas dynamics, to name a couple of the assumptions
necessary. Again, the continuity and Bernoulli equations are applied to derive an ordinary
differential equation for this problem. An algebraic equation is not developed as a solution
for the associated initial value problem. Instead, two numerical solutions are developed. The
primary numerical solution is provided by the standard, fourth order Runge-Kutta scheme.
A secondary method is provided by separating variables in the ordinary differential equation
and by evaluating the ensuing definite integral cast in water surface height variable for the
tank. Numerical results are developed by using both methods, and excellent agreement is
observed between them.

The characterization of solutions for ordinary differential equations is a topic motivating


some rhetorical discussion. It is always preferrable to have an analytical solution rendered
in a closed algebraic form or expressed in terms of “radicals”. For real world problems, very
few solutions of this type exist, so numerical solutions become necessary. The prevailing
question that emerges is, “How does one develop trust in these solutions?” For highly com-
plex problems, we often rely upon experimental validation where numerical solutions are
compared against experimental data. This approach is a gold standard, but it can become
very expensive and may require a great deal of coordination. If data is available, this type
of validation is less difficult to implement. On the other hand, if data has to be measured,
validation is far more difficult to accomplish. A supportive approach in developing “belief”
in a particular numerical solution is based upon what might be referred to as doctrine. That
is to say, we have a system of legacy numerical methods that are supported by mathemati-
cal proof. This approach is viable when the pre-conditions or assumptions are satisified for
the theorems underlying the numerical method. This approach is what I have applied in
solving the pressurized tank draining problem. For instance, the fourth order Runge-Kutta
scheme and the Romberg quadrature method applied here are legacy numerical algorithms
known to be applicable for these types of problems. In that way of thinking, confirmation is

Douglas V. Nance
14
obtained for the pressurized tank draining problem by getting agreement between two dif-
ferent numerical methods. The idea that I am slogging toward is the concept of an “exact”
solution in lieu of an “analytical” solution. A somewhat imprecise definition of an exact
solution can be expressed as follows. An exact solution is a numerical solution developed
for an initial and boundary value problem by using legacy numerical techniques applied at
different scales of resolution for the independent variable. This definition (for which I have
no distinct reference) helps expand the population of available validation data.

Douglas V. Nance
15
References

[1] Sears,F.W., Zemansky, M.W. and Young, H.D., University of Physics, 5th Ed., Addison-
Wesley, New York, N.Y., 1980.

[2] Burden, R.L., Faires, J.D. and Reynolds, A.C., Numerical Analysis, 2nd Ed., Prindle,
Weber & Schmidt, Boston, MA., 1981.

Douglas V. Nance
16
View publication stats

You might also like