% SIMIODETemplate-TeacherORStudent.tex and simiode.cls for LaTeX2e
% Version 29 July 2015.
% 
% This class (simiode.cls) is a modification of that used by 
% the journal PRIMUS - Problems, Resources, and Issues in 
% Mathematics Undergraduate Studies. 
% 
% See http://www.tandfonline.com/loi/upri .
% 
% The class was developed by  Marc Frantz with suggestions of the 
% PRIMUS Editorial Board, especially John Thoo.
%
% This template is to be used with the  class file "simiode.cls". 
%  
% The latest version of this class and template files 
% can be found at
% 
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
%
\documentclass{SIMIODE}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Basically the Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review (but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.   
% Rename the pdf after you compile each final version.
% This option was created  by Eric Sullivan, Carroll College, Helena MT.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
%\usepackage{hyperref}
\usepackage{url}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NOTE regarding double spacing %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Manuscripts should be submitted doubled spaced.  This is 
% accomplished via the \baselinestretch command below.
% However, you may obtain an idea of how your article will 
% look in final form, so that you can better plan your 
% presentation.  To see your manuscript formatted very 
% similarly to the on-line published format of  SIMIODE, 
% comment the following line out by inserting a percent sign % (%) at its beginning.

\renewcommand{\baselinestretch}{1.3}

%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% NOTE regarding macros %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Any macros defined for your paper should be contained in 
% the top matter. Likewise, any environment definitions such 
% as \newtheorem or \newenvironment should also go in the 
% top matter. 
% 
% Do not \input your macros as separate files within your 
% final version because more files make it harder for the 
% editors and users to keep track of and/or modify and 
% append your paper.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Top matter is above and 
% the beginning of the document below.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\newpage
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote. See above for instructions on toggling from Teacher Version to Student Version.
\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\EMPTY SPHERICAL TANK}




\markboth{Empty Spherical Tank}{Empty Spherical Tank}






\author{Brian Winkel,
Director SIMIODE\\ 
Chardon OH 44024 USA USA\\
BrianWinkel@SIMIODE.org}



% \makeStitle
% replaces: \makeStitle
% Choose only one of the following:
\makeStitlePDFLaTex  % <--- use this for PDFLaTex (jpg and pdf image files etc.)
% \makeStitleLaTex    % <--- use this for LaTex (eps image files)



\begin{abstract}
We model the emptying of water from a spherical tank. First, we pump out water at a constant rate. Second, we allow the water to exit through a small hole in the bottom of the tank. We seek to determine how fast the water level is falling in both cases. Furthermore, we seek to determine the size of the small hole at the bottom so that the time it takes for all the water to run out of the spherical tank is the same as the time it takes to pump the water out at a constant rate.
\end{abstract}


\section*{SCENARIO DESCRIPTION}

There are several ways to empty a container filled with water, among them are (1) through a pump at a constant rate and (2) through a hole in the bottom of the container. 

We consider a spherical tank in which we first pump the water out at a constant rate   and then permit the water to fall through a hole in the bottom. 

We wish to model both and determine the size of the hole in the bottom of the tank which will give us the same time for emptying the tank as when we pump out the water at a constant rate.  


In both cases we seek to model the situation so that we can predict the height of the water level at time $t$. 

Let us consider  a thin-shelled spherical tank if inner radius $R$ m. Suppose the tank is completely filled with water.   We will use the numerical value of $R = 2$ m and for the constant pump rate we will use $B = - 0.1 {\rm m}^3/{\rm s}$.


Torricelli's Law for the height of a   column of water, $h(t)$, at time $t$ in a container of cross sectional area $A(h(t))$ when the water is at height $h(t)$ says $h(t)$ must satisfy the differential equation (\ref{eq:Torricelli}),
\begin{equation}\label{eq:Torricelli}
A(h(t))\cdot h'(t) =- a \alpha  \sqrt{2 g h(t)} \, .
\end{equation} 
$g$ is the acceleration due to gravity, $a$ is the cross sectional area of the hole through which the water exits from the tank, and $\alpha$ is an empirical number which indicates the percentage of the  maximum flow rate which actually gets through the small  hole, the reduction due to friction and constriction.  $\alpha$  is called the {\it discharge or contraction coefficient\/}. Note the negative sign on the right hand side of (\ref{eq:Torricelli}) as water is leaving the column of water.  You can see the development of Torricelli's Law in the Modeling Scenario \cite{Winkel2015}.

We  assume the small hole at the bottom of the spherical tank is circular of radius $r$, i.e. $a =\pi r^2$.

The issue is then to decide how big a hole, i.e. determine $r$ in $a =\pi r^2$, so that the time it takes the water to empty from the tank in this case is the same as the time it takes when the water is pumped out.  Go ahead and determine just how big the hole has to be for this to happen and compare the volumes, height, and rate of change in volume for both cases. 

\begin{thebibliography}{99}


\bibitem{Winkel2015} Winkel. B.  2015.  1-015-S-Torricelli. 
\end{thebibliography}

\teacher{
\section*{NOTES FOR TEACHERS}

\subsection*{General Remarks}

The original idea for this project came from our browsing the Internet and finding NASA's Space Math \@ NASA website.  We have found the Internet, if properly browsed to be a great source of materials.\cite{Winkel2013}.  Inside the calculus section we find a problem to model the fuel level in a spherical tank.\cite{NASA2016}.

We have purposely left the narrative in the STATEMENT section non-pointed, but rather offer a description from which the students need to pick out the issues they need to address. 

A complete solution effort is offered in a Mathematica notebook, 1-90-T-Mma-EmptySphericalTank-TeacherVersion.nb, found in the Supplemental Docs for this Modeling Scenario along with a pdf version as well for those who cannot read Mathematica files.

\subsection*{Technical Details}

The first thing students will need to do is relate the volume of water in a sphere to the corresponding height of water in the sphere.  In our solution we formed the sphere of radius $R$ by rotating a circle centered at $(0,R)$  with base at the point $(0,0)$.  This circle  has equation (\ref{eq:circle}):

\begin{equation}\label{eq:circle}
x^2 + (y - R)^2 = R^2\,.
\end{equation}

From (\ref{eq:circle}) we can calculate the radius of the  cross sectional circle of rotation at height $h$ to be $x(y) = \sqrt{y(2 R - y)}$. From kn owing this radius  we can compute, through integration,  the volume of water in the spherical tank when the water level is at height $h$, thus establishing a relationship (\ref{eq:vol}) between volume and height for water in the tank.

\begin{equation}\label{eq:vol}
{\rm vol}(h) = \int_{y=0}^{y=h} \pi x(y)^2\, dy  = \int_{y=0}^{y=h} \pi (\sqrt{y(2 R - y)})^2\, dy   = -\frac{\pi h^3}{3} + h^2  \pi R \, .
\end{equation}

We could now solve (\ref{eq:vol}) obtaining the height $h$ of the column of water in terms of the volume of water $V$, but this is a messy solution to a third degree equation. We could also differentiate  (\ref{eq:vol}) with respect to time, $t$, assuming $h = h(t)$ and thus volume is a function of time, $t$.  This would relate the rates at which volume and height change at any given time.

From  \ref{eq:vol}) we determine a relationship between time $h$ and $t$ using  the two ways to account for the volume of water in the tank, namely the right hand side of (\ref{eq:vol}) and the computation of pumping water out of the tank at a rate of $0.1 {\rm m}^3/{\rm s}$ from its initial filled level of $\frac{4 \pi s^3}{3}$ arriving at (\ref{eq:vol1}). Here,  $R = 2$ m.

\begin{equation}\label{eq:vol1}
 -\frac{\pi h^3}{3} + h^2  \pi 2  = \frac{4 \pi 2^3}{3} - 0.1 t\, .
\end{equation}


For our first problem, a constant pumping out of water at a rate of $B = 0.1 {\rm m}^3/{\rm s}$, we obtain a long and complex formula  for $h(t, R, B)$, the height of the water in the tank of radius $R$ at time $t$. Rather than reproduce this here we offer a plot in Figure~\ref{fig:1-90-Plot1} of $h(t, 2, 0.1)$. Figure~\ref{fig:1-90-Plot1} is a plot of the height (in m) of the column of water as a function of time $t$ s.



\begin{figure}[h]
\centering
\includegraphics[width=10cm]{1-90-Plot1}
\parbox{13 true cm}{\caption{\label{fig:1-90-Plot1} Plot of the height of the column of water in a spherical tank of radius $R = 2$ m when the water is being pumped out of the tank at a rate of 0.1 ${\rm m}^3/{\rm s}$}}
\end{figure}

Incidentally, one computes the time it takes to empty the tank in this case by solving the equation $\frac{4 \pi 2^3}{3} = 0.1 t$ for $t$ and obtaining ${\rm tempty} =  335.103$ s or about five and a half minutes. This seams to be a reasonable amount of time for the pump rate of  0.1 ${\rm m}^3/{\rm s}$ for an initial volume of water  $\frac{4 \pi 2^3}{3} = 33.5103\,  {\rm m}^3$.


Now we turn to the situation where we have a hole in the bottom of the tank and this is where Torricelli's Law (\ref{eq:Torr}) has something to offer us. From the Modeling Scenario \cite{Winkel2015} on Torricelli's Law we have the following differential equation (\ref{eq:Torr}), derived using  the Conservation of Energy Principle which relates the instantaneous rate of change in volume of the column of water $V'(t) = A(h(t)) h'(t)$ to the current height $-\alpha a \sqrt{2 g h(t)}$.

\begin{equation}\label{eq:Torr}
A(h(t)) h'(t)=-\alpha a \sqrt{2 g h(t)}\, ,
\end{equation}
where
\begin{itemize}
\item $h(t)$ is height of the water in the container at time $t$;
\item $A(h(t))$ is the cross sectional area of the tank at height $h(t)$;
\item $g$ is the acceleration due to gravity;
\item $a$ is the cross sectional area (circle) of the hole in the bottom of the container through which the water exits;
\item $\alpha $ is the discharge or contraction coefficient (``the percentage of the maximum  flow rate which actually gets through the small bore hole,  the reduction due to friction and constriction in the small hole.'')\cite{Winkel2015}
\end{itemize}


As we say in the Student Version, ``The issue is then to decide how big a hole, i.e. determine $r$ in $a =\pi r^2$, so that the time it takes the water to empty from the tank in this case is the same as the time it takes when the water is pumped out.  Go ahead and determine just how big the hole has to be for this to happen and compare the volumes, height, and rate of change in volume for both cases.''

  In this case we need to solve (\ref{eq:Torr}).  In Mathematica there are 10 branches for the solution and we  can, through substituting numbers and plotting numerical solutions, determine which is the appropriate realistic solution for our problem.  We thus obtain the height of the water in the tank as a function of the radius, $R$, of the spherical tank itself and  $r$ the radius of the exit hole. Once we force the condition that the water in the tank in the Torricelli's Law  approach empty out at time ${\rm tempty} =  335.103$ s and we use $R = 2$ m, we find that the appropriate exit hole radius has to be $r = 0.0906477$ m. 
  
In this case let us do a reality check. We have a  sphere of radius 2 m (that is over 12 feet high) and we have a hole in the bottom which has a radius of approximately 1/10 meter, which is almost 0.2 m wide (or almost 8 inches wide).  Here, once the hole on the bottom is open it will take 335 sec or about 5 and a half minutes to empty. That sounds reasonable.

Figures~\ref{fig:1-90-Plot2}, \ref{fig:1-90-Plot3}, and \ref{fig:1-90-Plot4} offer  interesting plots students might produce for which they should offer their comments. See how these compare  with your own intuition.



\begin{figure}[t]
\centering
\includegraphics[width=12.5cm]{1-90-Plot2}
\parbox{13 true cm}{\caption{\label{fig:1-90-Plot2} Plots of the height of the column of water in a spherical tank of radius $R = 2$ m when the water is being pumped out of the tank at a rate of 0.1 ${\rm m}^3/{\rm s}$  (Gold-Thin) and when the water exits a hole on the bottom of the tank of radius $r = 0.0906477$ m (Blue-Thick).}}
\end{figure}


\begin{figure}[!h]
\centering
\includegraphics[width=12.5cm]{1-90-Plot3}
\parbox{13 true cm}{\caption{\label{fig:1-90-Plot3} Plots of the volume of the column of water in a spherical tank of radius $R = 2$ m when the water is being pumped out of the tank at a rate of 0.1 ${\rm m}^3/{\rm s}$  (Gold-Thin) and when the water exits a hole on the bottom of the tank of radius $r = 0.0906477$ m (Blue-Thick).}}
\end{figure}
  
  
\begin{figure}[!h]
\centering
\includegraphics[width=12.5cm]{1-90-Plot4}
\parbox{13.5 true cm}{\caption{\label{fig:1-90-Plot4} Plots of the rate of water leaving the column of water in a spherical tank of radius $R = 2$ m when the water is being pumped out of the tank at a rate of 0.1 ${\rm m}^3/{\rm s}$  (Gold-Thin) and when the water exits a hole on the bottom of the tank of radius $r = 0.0906477$ m (Blue-Thick).}}
\end{figure}


\begin{thebibliography}{99}




\bibitem{NASA2016} 
National Aeronautics and Space Administration. 2016. {\it Space Math \@ NASA}. 
Fuel Level in a Spherical Tank. \url{http://spacemath.gsfc.nasa.gov/Calculus/5Page45.pdf}. Accessed  1 November 2016.

\bibitem{Winkel2013} Winkel, B. J. 2013. Browsing Your Way to Better Teaching. {\it PRIMUS\/}. 23(3): 274-290.

\bibitem{Winkel2015} Winkel. B.  2015.  1-015-S-Torricelli. 
\end{thebibliography}

}






\end{document}
