\documentclass[12pt]{article}

\renewcommand\thesubsection{\alph{subsection}}

\usepackage{float}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorinlistoftodos]{todonotes}
\usepackage{fancyhdr}
\usepackage{enumerate}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{cancel}
\usepackage[justification=centering]{caption}
\usepackage{parskip}
\usepackage{array}
\usepackage{tabu}
\usepackage{subcaption}
\usepackage[style=ieee]{biblatex}
\usepackage{setspace}
\usepackage[section]{placeins}
\pagestyle{fancy}
\fancyhf{}
\rhead{CEE 262B Week 9}
\lhead{Section Notes}
\rfoot{\thepage}

\begin{document}

\section{Section Agenda}

\begin{enumerate}
\item Tidal wave propagation example
\item Lecture notes summary
\end{enumerate}

\section{Tidal wave example}

The Exponential Estuary is 300 m wide at its mouth and contracts exponentially with distance to a width of around 50 m at its head 10 km upstream, i.e. with the width varies as:

\begin{equation*}
B(x) = 300 \exp\left(-1.8\frac{x}{L}\right)
\end{equation*}

It is 10 m deep throughout and is foced by an M2 tide at the mouth with $\eta_0 = 1$m, i.e.
\begin{equation*}
\eta(0,t) = \eta_0 \sin\left(\frac{2 \pi t}{T_{M2}}\right)
\end{equation*}

\begin{enumerate}
\item Assuming the free surface remains approximately flat and that the velocity is uniform in any cross section, calculate the peak tidal velocity $U_t$ as a function of $x$. 
\item Calculate the height phase difference in degrees between $x=0$ and $x=L$ assuming a purely progressive wave in the absence of friction. What does this imply about the likely validity of the assumption made above?
\item What is the value of $K$ at x = 5 km that would be computed using Fischer's theory for oscillatory channel flow assuming that lateral variations dominate? 
\end{enumerate}


\section{The Salt Balance in Estuaries}

\subsection{1D (Cross-Sectionally Averaged), Unsteady, Tidally-Averaged Salinity}

We start with the 1D advection-diffusion equation for salt (though note that this could apply to some arbitrary pollutant as well!)
\begin{equation*}
\frac{\partial S}{\partial t} + u \frac{\partial S}{\partial x} = \frac{\partial}{\partial x}\left(K_x \frac{\partial S}{\partial x}\right) \end{equation*}

Taking the equation for conservation of salt, integrating it across a cross-section, and tidally averaging, we obtain: 

\begin{equation*}
A(x)\frac{\partial \langle\overline{S}\rangle}{\partial t} - \frac{\partial Q_f \langle\overline{S}\rangle }{\partial x} - \frac{\partial Q_E \langle\overline{S}\rangle }{\partial x}  = \frac{\partial }{\partial x} \left( K_x A(x)\frac{\partial \langle\overline{S}\rangle }{\partial x}\right)
\end{equation*}

Here, $A(x)$ is the cross-sectional area, $K_x$ is the tidally-averaged dispersion coefficient, $Q_f$ is the river flow, $Q_E$ is the evaporative flow, $\langle S \rangle $ is the tidally-averaged salinity, and $\overline{S}$ is the cross-sectionally averaged salinity. 

A note regarding the derivation of this equation: Fischer claims that ``Efforts have been made to derive [this equation] by averaging the advective diffusion equation over the cross section and over the tidal cycle, but they are not wholly satisfactory because of assumptions required during the averaging. It seems better to look on it as a postulated model, subject to verification".

This being the case, let's not worry too much about the derivation, and instead just break it down term by term to see what's going on. Starting with the 1st term on the LHS: 
\begin{equation*}
	A(x)\frac{\partial \langle\overline{S}\rangle}{\partial t}
\end{equation*}

This is the local storage of salt in the estuary, i.e. it's the differential term that describes how the amount of salt varies over time. 

Now for the 2nd term on the LHS: 
\begin{equation*}
\frac{\partial Q_f \langle\overline{S}\rangle }{\partial x}
\end{equation*}

This describes the removal of salt from the estuary via river flow (i.e. freshwater input). We generally define $Q_f$ as negative, so this decreases the amount of salt in the estuary over time. 

The 3rd term on the LHS:
\begin{equation*}
\frac{\partial Q_E \langle\overline{S}\rangle }{\partial x}
\end{equation*}

This term describes the change in salt due to evaporation. Here, we treat the evaporative flux like a flow in a similar manner to the 2nd term. We generally define $Q_E$ as positive, so this will increase the amount of salt in the estuary over time (remember, the water is evaporating, not the salt!). 

And finally, the RHS: 
\begin{equation*}
\frac{\partial }{\partial x} \left( K_x A(x)\frac{\partial \langle\overline{S}\rangle }{\partial x}\right)
\end{equation*}

This is the dispersive transport of salt (which is usually upstream), due to all dispersion mechanisms, such as tides, and gravitational circulation. While it looks a lot like a standard diffusive term (this is what you should think when you see a 2nd derivative), remember that it actually accounts for a lot more than Fickian diffusion! 

In order to calculate the evaporative flow, $Q_E$, refer to the figure below. 

\begin{figure}[H]
    \includegraphics[width=0.9\textwidth]{ComputingQe.png}
\end{figure}

\subsection{Decomposition to Compute the Salt Flux}
This section of the notes goes through how one could decompose the salinity and velocity into cross-sectional averged values, and deviations from from those cross sectionally averaged values, in order to compute the salt flux through a given cross section. 

\subsection{1D Salt Balance for Steady Flows}
If we integrate the \textit{steady} salt balance with respect to the longitudinal coordinate, from the river to some point in the estuary, we find that the upstream, dispersive flux is balanced by the downstream, advective flux:

\begin{equation*}
-Q \langle \overline{S} \rangle = K_x (x) A(x) \frac{d \langle \overline{S} \rangle }{d x}
\end{equation*}

This is slightly more tractable! In general, we can solve this equation to obtain: 

\begin{equation*}
\langle \overline{S} \rangle = \langle \overline{S_0} \rangle \textrm{exp} \left(- \int_0^x \frac{Q_f dx}{A(x) K(x)}\right)
\end{equation*}

As a side note, this formed the basis for what is called the "G-Model", where we assume an unsteady solution of the form: 

\begin{equation*}
S = (S_0 - S_b) \textrm{exp}\left(-\frac{G(t) x}{A K} \right) + S_b
\end{equation*}

Where $S_b$ is the river salinity (nonzero in many cases), and $G(t)$ is the ``antecedent outflow", described by: 

\begin{equation*}
\frac{\partial G}{\partial t} = \frac{(Q-G) G}{x A}
\end{equation*}

This model has to be calibrated based on existing data to solve for a $G$ value, so it has no predictive capability if the geometry is altered, but otherwise it works pretty well!

\end{document}