% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
% 
% 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.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\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.
%
% 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 only 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.
%
\usepackage{amsmath,amssymb,mathrsfs}
\usepackage{xcolor}
\usepackage{graphicx}
%\usepackage{hyperref}
\usepackage{url}
\usepackage{framed}
\usepackage{tasks}
\usepackage{enumitem}
\usepackage{exsheets}
\SetupExSheets[question]{type=exam}
%
\renewcommand{\baselinestretch}{1.3}
 \DeclareMathOperator{\sech}{sech}
%
% 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\\Traveling wave analysis of a porous medium model}



\teacher{
    \keywords{Nonlinear partial differential equation model; porous medium; traveling waves; hyperbolic tangent; seepage velocity}

\tagwords{Traveling waves; series solution}
}

\markboth{Traveling waves}{Porous Medium Model}

\author{Eric Stachura\\
Department of Mathematics\\ 
Kennesaw State University\\
Marietta GA \teacher{30060} USA\\
\teacher{eric.stachura@kennesaw.edu}
}

\makeStitlePDFLaTex

\teacher{
\begin{abstract}
In this scenario, students will be taken through a traveling wave analysis of a porous medium model. While the starting point is a nonlinear partial differential equation (PDE) model, after a change of variables, students are led quickly to an ordinary differential equation (ODE) model. Students will find a power series solution of their ODE. It is expected that students will become familiar with a traveling wave approach to solving PDEs; in particular, they will see how to transform a PDE into an ODE which is easier to solve. At the end, students will think about how to generalize what they have done to other problems. 
%Offer an abstract which describes what the students will do and learn, including technical descriptions of mathematics, area of application, and outcomes expected for the scenario. This should help the teacher decide if the material is suitable for a given class.   This will appear in Teacher Version only.
\end{abstract}
}

\teacher{
\vspace*{-.1 true cm}
\listkeywords

\vspace*{-.9 true cm}
\listtags
}

\section*{STATEMENT}

\begin{center}
\parbox{12 true cm}{NOTE: There is an Introduction to the Problem file in the same folder (\url{https://www.simiode.org/resources/629}) as this Modeling Scenario. Further there is a video of the process referred to in this Introduction file called drip.mov which can also be found in the same folder under Supporting Docs.}
\end{center}


The following model for the flow of water under gravity through a homogenous, isotropic, porous medium is developed in \cite{Vanaja} and given by
\begin{align} \label{mainPDEmodel}
\dfrac{\partial u}{\partial t} = \dfrac{\partial u^n}{\partial x} + \dfrac{\partial^2 u^m}{\partial x^2}, \quad n, m \geq 1, \; x \in \mathbb{R}, \; t>0
\end{align}
where $u(x,t)$ is the volumetric moisture content of the porous medium. 

Your task is to analyze the model (\ref{mainPDEmodel}) by developing analytical solutions. Consider the case when $n=3, m=2$; this case is suggested by empirical data \cite{porousmedia}. Notice this is a nonlinear partial differential equation! A typical approach to solving such problems is by seeking \emph{traveling wave solutions}; that is, seeking solutions of the form
$$u(x,t) = u(x-ct)$$
which represents a wave traveling with speed $c$. Traveling waves advance in a particular direction and retain a fixed shape. They also retain a constant velocity throughout its propagation; see Figure \ref{TravelingWave} for an example of such a traveling wave. Notice the wave advances to the right as time progresses and keeps its shape fixed. 

\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.4]{traveling_wave_intro_pic6}
\caption{Example traveling wave profile with speed $c>0$.}
\label{TravelingWave}
\end{center}
\end{figure}

\begin{framed}
\begin{question}
Let $z=x-ct$. Assuming a traveling wave solution $u(z)$ as above, what \emph{ordinary} differential equation arises from such an approach? 
\end{question}
\end{framed}

\begin{framed}
\begin{question}
Now that you have your ODE model, introduce the new independent variable
$$Y=\tanh(\mu (x-ct))$$
where $\mu$ is some constant you will determine. Why hyperbolic tangent? Good question. There is a method, called the ``tanh method", which assumes a traveling wave solution can be expressed in terms of tangents or hyperbolic tangents \cite{tanhref}. The Appendix at the end provides some information about the $\tanh$ function if you have not seen it before. \\
\begin{enumerate}[label=(\roman*)]
\item How do the derivatives $\dfrac{d}{dz}$ and $\dfrac{d^2}{dz^2}$ transform under this change of variables? That is, for a function $v(z)$, how do $\dfrac{dv}{dz}$ and $\dfrac{d^2 v}{dz^2}$ transform to $\dfrac{dv}{dY}$ and $\dfrac{d^2 v}{dY^2}$ under this change of variables? HINT: Chain rule. \\
\item What is the resulting equation for $u(Y)$?\\
\end{enumerate}
\end{question}
\end{framed}

%\newpage

\begin{framed}
\begin{question}
With your tanh method, an idea is to seek power series solutions. This is because the resulting polynomials tend to be easy to work with (much easier than a nonlinear PDE!). For a reminder of power series solutions, see e.g. \cite[Chapter 8]{ODEbook}. We seek a solution of the form
$$u(x,t)=S(Y) = \sum_{k=0}^p a_k Y^k + \sum_{\ell =1}^q b_{\ell} Y^{-\ell}$$
After balancing various terms (no need to do this--if you're interested, see \cite{Vanaja}), the solution is forced to be of the form
\begin{align} \label{solutionform}
u(x,t)=S(Y) = a_0 +a_1 Y +b_1 Y^{-1}
\end{align}
Now, find a system of equations for the unknowns $\mu, a_0, a_1$ and $b_1$. HINT: Plug (\ref{solutionform}) into the solution you obtained in Question 2. 
\end{question}
\end{framed}

\begin{framed}
\begin{question}
Solve the system of equations you obtained in Question 3. HINT: your solution depends on the sign of $c$ (which dictates the direction of travel for the traveling wave). You should use computer software (e.g., Matlab, Mathematica, \ldots) to help with this task.
\end{question}
\end{framed}

\begin{framed}
\begin{question}
Show then that the linearly independent solutions of (\ref{mainPDEmodel}) are given by
\begin{align} \label{solutionscpositive}
\begin{split}
u_1(x,t)&=-\sqrt{c}\tan(0.5\sqrt{c}(x-ct)), \quad 0.5\sqrt{c}(x-ct) \neq \text{ an odd multiple of } \pi \\
u_2(x,t) &= \sqrt{c} \cot(0.5\sqrt{c}(x-ct)), \qquad 0.5\sqrt{c}(x-ct) \neq \text{ a multiple of } \pi\\
%u_3(x,t) &= \sqrt{-c}\tanh((.5\sqrt{-c}(x-ct)))
\end{split}
\end{align}
if $c>0$ and if $c<0$ then
\begin{align} \label{solutionscnegative}
\begin{split}
u_3(x,t)&= \sqrt{-c}\tanh(0.5\sqrt{-c}(x-ct))\\
u_4(x,t) &=\sqrt{-c}\coth(0.5\sqrt{-c}(x-ct)), \quad x-ct \neq 0\\
\end{split}
\end{align}
\end{question}
\end{framed}

\begin{framed}
\begin{question}
Let's analyze your results now. The solutions you constructed $u_j(x,t)$ for $j=1,2,3,4$ correspond to moisture content in a porous medium (remember this is what the model is for!). This should be a positive quantity (how could you have negative moisture content?!?). For one of your solutions $u_j(x,t)$, find where it is positive. 
\end{question}
\end{framed}

\begin{framed}
\begin{question}
Consider $u_1(x,t)$ when $c=1$. From physical considerations, the seepage velocity of the water $q$ satisfies the continuity equation
\[\dfrac{\partial u_1}{\partial t} + \dfrac{\partial q}{\partial x} = 0\]
The seepage velocity here corresponds to the ratio of the volume flow rate to the average area of voids in the porous medium. See Figure \ref{seepage}.






Using this equation as well as your calculation of $u_1(x,t)$, derive an expression for $q(x,t)$. For this to be a physically relevant quantity, we expect $q(x,t)$ to be continuous. Under what conditions on $x$ and $t$ will this be true?
\end{question}
\end{framed}
\begin{figure}[htbp]
\begin{center}
\includegraphics[scale=0.3]{seep2}

\parbox{9.5 true cm}{\caption{Flow of water in a porous medium. The seepage velocity is the ratio of volume flow rate to the average void area.}}
\label{seepage}
\end{center}
\end{figure}

\begin{framed}
\begin{question}
Note that changing the values of $m$ and $n$ means your model is changing, so you may be interested in different things. For example, the case $m=4,n=3$ models the flow of a thin viscous sheet on an inclined bed. Also, the case $n=0$ and $m \neq 0$ is called the \emph{porous medium equation}, and models water movement along a horizontal column of the medium. 

\vspace{.2in}

\noindent Think about what might change in your analysis if you took different values of $m$ and $n$. Could you perform a similar traveling wave analysis? What other types of equations do you think you could apply this method to? 
\end{question}
\end{framed}


\newpage

\section*{Appendix}
One way of defining the hyperbolic tangent is 
$$\tanh(x) = \dfrac{e^x-e^{-x}}{e^x + e^{-x}}. $$
Hyperbolic tangent satisfies $\tanh(-x) =-\tanh(x)$, and the following trigonometric identity
$$\sech^2(x)+\tanh^2(x)=1.$$
where we can define $\sech(x)$ by
$$\sech(x)=\dfrac{2}{e^x+e^{-x}}.$$
Furthermore, when differentiating the hyperbolic tangent, we get
$$\dfrac{d}{dx} \tanh(x)= 1-\tanh^2(x) = \sech^2(x).$$
Plots of $\tanh(x)$ and $\sech(x)$ can be found in Figure~\ref{fig:twoplots}:
\begin{figure}[htbp]
\begin{center}
\includegraphics{hyperbolic_trig_functions}
\caption{\label{fig:twoplots}Plots of two hyperbolic trigonometric functions.}
\end{center}
\end{figure}

Additionally, with complex arguments, the following identities hold
$$\tanh(x)=-i\tan(ix) \quad \text{and} \quad \coth(x)=i\cot(ix).$$


%\newpage


\begin{thebibliography}{98}

\bibitem{porousmedia}
Bear, J. 1972.  \textit{Dynamics of Fluids in Porous Media}. New York: Elsevier. 

\bibitem{ODEbook}
Nagle, R. Kent, Edward B. Saff, and Arthur D. Snider. 2018. \textit{Fundamentals of Differential Equations,  7$^{\rm th}$ edition}.  Boston MA: Addison-Wesley. 

\bibitem{tanhref}
Malfliet, W. and W. Hereman. 1996. The Tanh method: I. Exact solutions of nonlinear evolution and wave equations.  {\it Physica Scripta\/}.  54: 563--568. 

\bibitem{Vanaja}
Vanaja, V. 2009. Exact solutions of a nonlinear diffusion-convection equation. {\it Physica Scripta\/}.  80: 045402. 





%\bibitem{Hutchinson1978} Hutchinson, G. Evelyn. 1978. {\it Introduction to Population Ecology\/}. New Haven CT:  Yale University Press.


\end{thebibliography}

\teacher{
\section*{COMMENTS}
Solutions can be found in the associated file ``Teacher-Solution". Students should have seen at the very least power series solutions to ODEs. In principle, it is not strictly necessary to have discussed PDEs before giving this problem to students. This is because the students are essentially studying an ODE model with their traveling wave ansatz. However, it might be helpful to review the chain rule here. 

Regarding Question 2, it might also be helpful to work through an example in class of how to change variables in an ODE. For example, in the ODE $y' = f(ax+by)$, if we make the substitution $u=ax+by$, the equation becomes
\[ \dfrac{du}{dx} = b f(u)+a\]
which is separable. 

There is also an introduction to this problem as a beamer file so that you may derive the main equation in class. This is expected to take approximately 15-20 minutes, but could be gone through quicker if in time constraints. Even if this is not discussed in class, it may be helpful to provide students the PDF of this presentation as they work on the activity. I have also included a simulation of fluid flow in porous media so that students can better visualize what they are modeling. This simulation comes from a COMSOL simulation of so-called Stokes Flow, and is based on experiments conducted by Keller, Auset, and Sirivithayapakorn \cite{AK2004}. Stokes flow is a type of flow where inertial forces are small compared to viscous forces. In the movie, water is flowing and the flow in the pores do not penetrate the solid grains. The derivation of the model is entirely at your discretion. 

Other projects related to this topic could include numerical experiments. We have not pursued this direction here, but a useful resource for this is LeVeque's book \cite{NumericalMethodsConservationLaws}. It is highly suggested to have students use technology to help with some of their calculations so they don't get bogged down in the algebra. 

The last question in this project is meant to have students reflect on their work and see if they think it can be generalized. Students may attempt to work out solutions to the more general problems, but they may stumble since these problems can be quite difficult. Thus, perhaps expecting just some basic reflection is enough; this is really the important part here. 

The way I propose to give this problem in class is via a partner writing project. Students can submit a draft of their work (in particular, Question 2) to you online so you can check their progress. A possible rubric is provided at the end of this document; this is a general rubric, and can be adapted to other projects as you see fit. Alternatively, the ``rubric" can be used as a reminder of the main things required in order for success in this activity, and can be given to students while they work. 

%This is a set of COMMENTS about the scenario, for the teacher only. It might include a ``solution" or a  number of solution strategies. However, the main narrative should be about how to use the scenario in teaching, e.g., what are prerequisites, how long might one devote to it, what resources for students could be expected to be used, what  issues which cause students difficult or ease should be expected to come up, discussion of technology use, pointers to other files, etc.  This set of COMMENTS might have its own  pointers to data sets, supplementary files,  videos, etc. for student and teacher  use, the material for students could be something the teacher might use with discretion. There could be an extended bibliography \cite{Gause1934,Hutchinson1978a}  for additional teacher resources, analyses,  data, etc.



\begin{thebibliography}{99}

\bibitem{AK2004}
Auset, M.  and A.~A.~Keller. 2004.  Pore-scale processes that control dispersion of colloids in saturated porous media. {\it Water Resources Research\/}.  40(3): W03503.


%\bibitem{porousmedia}
%J. Bear, \textit{Dynamics of Fluids in Porous Media}. New York, Elsevier, 1972. 
%
%\bibitem{ODEbook}
%R. Kent Nagle, Edward B. Saff and Arthur D. Snider, \textit{Fundamentals of Differential Equations}, Addison-Wesley, 7th edition, 2018. 

\bibitem{NumericalMethodsConservationLaws}
LeVeque, R.  1996. \textit{Numerical Methods for Conservation Laws}. Vol.~132.  Basel: Birkh\"auser.  

%\bibitem{mainreference} 
%K. Merwin, \textit{Analysis of a Partial Differential Equation and Real World Applications regarding water flow in the state of Florida}. McNair Scholars Research Journal, vol. 1, article 8, 2014. 

%\bibitem{Vanaja}
%V. Vanaja, \textit{Exact solutions of a nonlinear diffusion-convection equation}. Physica Scripta, 80 (2009), 045402. 


\end{thebibliography}
}

\newpage

\centerline{\textbf{POSSIBLE RUBRIC/ GUIDE FOR STUDENTS} }

\bigskip

Each of the following elements are rated along a range of $0-4$, depending on the completeness and quality of the work on that element.

\begin{enumerate}
\item \textbf{Organization:} You must have the following organizational elements in the final paper, each with a clear header.
\begin{itemize}
%\item Cover Sheet (title of your project, your name, your partners' names (if any) and the date)
\item Problem Introduction Section
\item Model Section
\item Mathematical Analysis Section
\item Prediction and Evaluation Section
%\item Reflection Section
\item Credits: Give credit to people that assisted you or references you used (if any)
\end{itemize}

\item \textbf{Layout and Formatting:} This is a report, not an assignment, so please write this paper in narrative (paragraph) format, except putting equations and formulas on separate lines. Here are further guidelines:
\begin{itemize}
\item Narratives in paragraphs. Typed 11 or 12 point font. 
\item Equations and calculations, etc. are on a separate line and easy to read. 
\item Understandability of graphs. (Suggestion: You may take a picture of hand drawn graphs and of graphs on calculators or other software.)
\item Clear identification of graphs in the narratives through labeling of the graphs (e.g., ``see Figure 1''). 
\item Graphs are used effectively in the narratives and explanations. In other words, you refer to the graphs and use the graphs in your discussions.
\end{itemize}

\item \textbf{Introduction:} Must include: 
\begin{itemize}
\item Introduction of the problem. (Summarize the problem in your own words.) 
\item 	Discuss how this problem may be similar and different from other applied problems you have encountered. 
\end{itemize}
 
\item \textbf{Model:}  Must include: 
\begin{itemize}
\item Clear mathematical statement of the model.
\item 	Definitions of variables. 
\item 	Explanation of the different parts of the model and how they relate to each other.
\item 	Justification of the model and its parts.
\end{itemize}

\newpage

\item \textbf{Mathematical Analysis:} Must include:
\begin{itemize}
\item Qualitative Analysis: Discuss what mathematical information the qualitative analysis gives about the solution. 
\item 	Analytical Analysis: Solve and discuss what mathematical information the analytical analysis gives about the solution.
\item 	Numerical analysis: Solve and discuss what mathematical information the numerical analysis gives about the solution.
\item 	Explain: Each analysis should include an explanation of the steps taken analyzing the model. (But note you don't have to state or show every single basic algebraic step.)
\item 	Model verification: Are the results of the model consistent with any data? How? If there is no data, what else can you do to verify if the model results are accurate? 
\item 	Compare/Contrast: Compare and contrast the three techniques (graphical, analytical, numerical). What is similar and different? Did they agree with each other? For this problem, in what ways were they useful or not? 
\end{itemize}

\item \textbf{Prediction, Interpretation, and Evaluation:}  Must include: 
\begin{itemize}
\item Prediction: Make predictions based on the model. See the project directions. 
\item 	Interpretations: Be sure to state what your solution and predictions mean or say in terms of the applied problem. This should be done throughout the write-up as necessary. 
\item 	Evaluation: Critique the interpretations and predictions. Do the interpretations of the solution and predictions make sense for that applied problem? Why or why not? 
\item 	Evaluation: What might your solutions and predictions imply and why is it important for the people, animals, or objects in the applied problem? Does it imply any actions that should be taken in the future, i.e. do you have any recommendations based on your conclusion? 
\end{itemize}

%\item \textbf{Reflection:}  Each person on the project must include separately a reflection with these elements:
%\begin{itemize}
%\item What was the most important thing you learned mathematically or about solving problems and did you learn anything mathematically new?
%\item 	What was the most important thing you learned personally and did you learn anything new about yourself? (This could be about how you go about your work, how you communicate, your relationship with others, what you enjoy doing, your attitude towards mathematics, etc.)
%\item 	Did you find the project difficult? In what ways? 
%\item 	Did you find any connections to other disciplines or to courses you have had? 
%\item 	Did you encounter any technical or non-technical problems? 
%\item 	Did you encounter or think of other ways to attack the problem? 
%\item 	Did other mathematical or physical questions arise that would be interesting to investigate? 
%\end{itemize}
\end{enumerate}





\end{document}
