\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 8}
\lhead{Section Notes}
\rfoot{\thepage}
\usepackage[nomarginpar, margin=1in, foot=.25in]{geometry}


\begin{document}

\section{Contents}
\begin{itemize}
\item Gravitational circulation scaling
\item Lecture Notes Summary
\end{itemize}

\section{Gravitational Circulation}
One way to calculate a dispersion coefficient in a stratification dominated system is via a scaling of the long box problem. We show here how salinity variability can drive gravitational circulation (i.e. flow driven by density differences) in an estuary. If you remember from 262A, the long box problem is simply a pressure--friction balance, i.e. 

\begin{equation*}
\frac{1}{\rho} \frac{\partial p}{\partial x} = \frac{\partial }{\partial z} \left(\nu_t \frac{\partial u}{\partial z} \right)
\end{equation*}

We can choose a scaling for the RHS:
\begin{equation*}
\frac{\partial }{\partial z} \left(\nu_t \frac{\partial u}{\partial z} \right) \sim \nu_t \frac{U}{H^2}
\end{equation*}


And assuming that the density varies with salinity like:
\begin{equation*}
\rho = \rho_0(1 + \beta S)
\end{equation*}

We can scale the LHS like: 

\begin{equation*}
\frac{1}{\rho} \frac{\partial p}{\partial x} \sim \beta \frac{\partial S}{\partial x} g H
\end{equation*}

Here, $\nu_t$ is the eddy-viscosity, $\beta$ is a coefficient known as the saline expansivity, and $\frac{\partial S}{\partial x}$ is the longitudinal salinity gradient. 

Equating these two scalings, we find that:

\begin{equation*}
U \sim \frac{\beta \frac{\partial S}{\partial x} g H^3}{\nu_t}
\end{equation*}

Now, a local, steady salt balance gives (balancing advection and diffusion):
\begin{equation*}
U \frac{\partial S}{\partial x} \sim \epsilon_z \frac{S}{H^2}
\end{equation*}

Where $\epsilon_z$ is the vertical diffusivity for salt. Solving for $S$, and multiplying by the above expression for $U$, we can obtain an expression for the salt flux:

\begin{equation*}
US \sim \frac{\beta^2 \left(\frac{\partial S}{\partial x}\right)^3 g^2 H^8}{\nu_t^2 \epsilon_z}
\end{equation*}

Then, noting that the dispersion coefficient is the salt flux divided by the salinity gradient, we obtain: 

\begin{equation*}
K_x \sim \frac{US}{\left(\frac{\partial S}{\partial x}\right)} \sim \frac{\beta^2 \left(\frac{\partial S}{\partial x}\right)^2 g^2 H^8}{\nu_t^2 \epsilon_z}
\end{equation*}

Hansen and Rattrey found that this expression should be multiplied by a constant of proportionality, which they calculated to be $5.4 \times 10^{-5}$. 

Things to note here: we see once again that our expression for a dispersion coefficient is inversely proportional to diffusivity. What increases the dispersion coefficient? It is a strong function of the salinity gradient, and a \textit{very} strong function of depth. Note that velocity goes like $\mathcal{O}(H^3)$, so squaring the velocity, and multiplying by another factor of $H^2$ results in a slightly ridiculous dependence on depth. 


\section{Mixing Mechanisms in Estuaries: Tides}

\subsection{Background on Timescales}
The first few pages of the lecture shows plots of variance over time for an unsteady shear flow. The takeaway from all of this is found on page 4 of the note packet, which I will summarize here:
\newline
\newline
Assume we have an unsteady, oscillatory flow with period $T$, and a mixing time scale $T_c = h^2/\epsilon_z$. We can define their ratio as $T' = T/T_c$. So, the two cases we can find ourselves in:
\begin{gather*}
	T' >> 1 \qquad \textrm{Steady dispersion} \\
	T' << 1 \qquad \textrm{Diffusion only}
\end{gather*}
This makes intuitive sense. If the time scale before the flow reverses is much \textit{less} than the time scale at which shear flow dispersion kicks in, then we would not expect there to be significant dispersive effects. However, if the time scale before the flow reverses is much \textit{greater} than the time scale for SFD, then we can approximate the dispersion coefficient at its steady limit. 

\subsection{Calculating Dispersion}
There is some slightly tedious math that goes into deriving these equations which I won't reproduce here. So for the moment, just know that for an unsteady shear flow, we have, in general: 
\begin{equation*}
K = K_0 f(T')
\end{equation*}
Where $K_0$ is the dispersion coefficient in the limit of $T' >> 1$, given by:
\begin{equation*}
	K_0 = \frac{U^2 h^2}{240 D}
\end{equation*}
And $f(T')$ is a function of our nondimensional timescale, $T'$. For unsteady flows where we can't use the steady limit, the math reduces everything to:
\begin{equation*}
	K = 0.1 \overline{u'^2}T\left[\frac{1}{T'} f(T')\right]
\end{equation*}

Fischer suggests the assumption that $\overline{u'^2} = 0.2 \overline{u}^2$, which makes this a little bit simpler:

\begin{equation*}
		K = 0.02 \overline{u}^2 T\left[\frac{1}{T'} f(T')\right]
\end{equation*}

You can find a plot of $\left[\frac{1}{T'} f(T')\right]$ as a function of $T'$ below. There is also a nice example for Montezuma Slough, which should illuminate things if you're unsure how to implement these equations.

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

\subsubsection{Dead Zone Dispersion: Okubo's Traps}
Recall our discussion of "dead zones" along tidal channels, where pollutants can become trapped. This will modify the dispersion coefficient, leading to an "effective" dispersion coefficient that takes the dead zones into account. Okubo showed that we can calculate this effective dispersion coefficent as:

\begin{equation*}
K_{eff} = \frac{K'}{1 + r} + \frac{r U_0^2}{2 k (1+r) 2 (1 + r + k^{-1} \omega)}
\end{equation*}
Where we define:
\begin{equation*}
r = \frac{\textrm{Trap Volume}}{\textrm{Channel Volume}}
\end{equation*}

$k^{-1}$ is the exchange time between the channel and the trap, $\omega$ is the oscillation frequency, and $K'$ is the dispersion coefficient we would have gotten from the original analysis (i.e. not accounting for traps). 

\subsection{Tidal Exchange Salt Balance}
Here we have an equation that describes the relationship between the salinity inside the estuary, and the salinity in the neighboring coastal ocean. It's derived from a straightforward volume and salt balance, so keep in mind that it's a fairly rough estimate.

\begin{equation*}
\frac{S_E}{S_0} = 1 - \frac{Q_f T}{V - a\sqrt{2Vd/\pi}}
\end{equation*}

Here, $Q_f$ is the volumetric flow rate during flood tide, $T$ is the tidal period, $V$ is the total volume exchanged, $a$ is the width of the inlet/outlet, and $d$ is the depth. 

\end{document}