\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 4}
\lhead{Section Notes}
\rfoot{\thepage}

\begin{document}
\section{TA Section Agenda}
\begin{itemize}
\item Discuss turbulence in general, and why we need to average
\item Derive RANS equations
\item Derive TKE equations, and discuss meaning of terms
\item Lecture notes summary
\end{itemize}

\section{RANS}
We begin with the Navier Stokes Equations, using the Boussinesq approximation:

\begin{equation}
\frac{\partial u_i}{\partial t} + \frac{\partial }{\partial x_j} (u_i u_j) = -\frac{1}{\rho_0} \frac{\partial p}{\partial x_i} -\frac{g}{\rho_0} \rho \delta_{i3} + \nu \frac{\partial^2 u_i}{\partial x_j \partial x_j}
\end{equation}

Then we time-average all the terms, denoted by $\overline{()}$: 

\begin{equation*}
\frac{\partial \overline{u_i}}{\partial t} + \frac{\partial }{\partial x_j} (\overline{u_i u_j}) = -\frac{1}{\rho_0} \frac{\partial \overline{p}}{\partial x_i} -\frac{g}{\rho_0} \overline{\rho} \delta_{i3} + \nu \frac{\partial^2 \overline{u_i}}{\partial x_j \partial x_j}
\end{equation*}

Now we define the unresolved stress:

\begin{equation*}
\tau_{ij} = \overline{u_i u_j} - \bar{u_i}\bar{u_j}
\end{equation*}

Which allows us to write the averaged equations as: 
\begin{equation*}
\frac{\partial \overline{u_i}}{\partial t} + \frac{\partial }{\partial x_j} (\bar{u_i} \bar{u_j}) = -\frac{1}{\rho_0} \frac{\partial \overline{p}}{\partial x_i} -\frac{g}{\rho_0} \overline{\rho} \delta_{i3} + \nu \frac{\partial^2 \overline{u_i}}{\partial x_j \partial x_j} - \frac{\partial \tau_{ij}}{\partial x_j}
\end{equation*}


Now we can expand the unresolved stress using $u_i = \overline{u_i} + u_i'$:

\begin{align*}
\tau_{ij} &= \overline{u_i u_j} - \bar{u_i} \bar{u_j}\\
&=\overline{(\bar{u_i} + u_i')(\bar{u_j} + u_j')}- \bar{u_i} \bar{u_j}\\
&= \overline{\bar{u_i} \bar{u_j} +u_i' \bar{u_j} + \bar{u_i}u_j' + u_i' u_j'}- \bar{u_i} \bar{u_j}\\
&= \overline{\bar{u_i} \bar{u_j}} + \overline{u_i' \bar{u_j} + \bar{u_i}u_j'} + \overline{u_i' u_j'}- \bar{u_i} \bar{u_j}\\
\end{align*}

Now we can simplify things drastically by assuming that $\overline{u_i'} = 0$, which leaves us with: 
\begin{equation*}
\tau_{ij} = \overline{u_i' u_j'}
\end{equation*}

And thus, our Reynolds Averaged Navier Stokes Equations:

\begin{equation}
\frac{\partial \overline{u_i}}{\partial t} + \frac{\partial }{\partial x_j} (\bar{u_i} \bar{u_j}) = -\frac{1}{\rho_0} \frac{\partial \overline{p}}{\partial x_i} -\frac{g}{\rho_0} \overline{\rho} \delta_{i3} + \nu \frac{\partial^2 \overline{u_i}}{\partial x_j \partial x_j} - \frac{\partial \overline{u_i' u_j'}}{\partial x_j}
\end{equation}

\section{Reynolds-Stress Evolution \& TKE}

If we want to obtain an equation just for the fluctuating component of the velocity, all we have to do is subtract (2), the average, from (1), the full equation. This results in:
\begin{equation}
\frac{D u_i'}{Dt} + u_j' \frac{\partial \overline{u_i}}{\partial x_j} + u_j' \frac{\partial u_i'}{\partial x_j} = -\frac{1}{\rho_0} \frac{\partial p'}{\partial x_i} -\frac{g}{\rho_0} \rho' \delta_{i3} + \nu \frac{\partial^2 u_i'}{\partial x_j \partial x_j} - \frac{\partial \overline{u_i' u_j'}}{\partial x_j}
\end{equation}

This is where the algebra gets ridiculous. We are going to take equation (3), multiply it by $u_j'$, average it, and then add it to the product of the evolution equation for $u_j'$ with $u_i'$, also averaged. This comes from the fact that:

\begin{equation*}
\frac{\partial }{\partial t} \overline{u_i' u_j'} = \overline{\frac{\partial u_i'}{\partial t} u_j'} + \overline{\frac{\partial u_j'}{\partial t} u_i'}
\end{equation*}

This produces the following equation:
\begin{align*}
\frac{D}{Dt}\overline{u_i' u_j'} &= \frac{\partial}{\partial x_l}\left[\underbrace{-\overline{u_i' u_j' u_l'} - \overline{\frac{p'}{\rho_0}(\delta_{jl}u_i' + \delta_{il}u_j')}}_{\text{Transport}} + \underbrace{\nu \frac{\partial}{\partial x_l}\overline{u_i' u_j'}}_{\text{Diffusion}}\right] - \underbrace{\left(\overline{u_i' u_l'} \frac{\partial \overline{u_j}}{\partial x_l} + \overline{u_j' u_l'} \frac{\partial \overline{u_j}}{\partial x_l}\right)}_{\text{Production}}\\
&- \underbrace{2 \nu \overline{\frac{\partial u_i'}{\partial x_l} \frac{\partial u_j'}{\partial x_l}}}_{\text{Dissipation}} + \underbrace{\overline{\frac{p'}{\rho_0}\left(\frac{\partial u_i'}{\partial x_j}+ \frac{\partial u_j'}{\partial x_i}\right)}}_{\text{Pressure Strain}} - \underbrace{\frac{g}{\rho_0} \overline{\rho' u_j' \delta_{i3} + \rho' u_i' \delta_{j3}}}_{\text{Buoyancy Flux}}
\end{align*}

Now that we have the Reynolds Stress Evolution, we set $i=j$ to obtain the Turbulent Kinetic Energy (TKE) evolution equation. This looks like:

\begin{equation}
\frac{D k}{D t} = \frac{\partial }{\partial x_l} \left[\underbrace{-\frac{1}{2}\overline{u_i' u_i' u_l'} - \frac{\overline{p' u_l'}}{\rho_0} + \nu \frac{\partial k}{\partial x_l}}_{\text{Transport}}\right] - \underbrace{\overline{u_i' u_l'} \frac{\partial \overline{u_i}}{\partial x_l}}_{\text{Production}} - \underbrace{\nu \overline{\frac{\partial u_i'}{\partial x_l} \frac{\partial u_i'}{\partial x_l}}}_{\text{Dissipation}} - \underbrace{\frac{g}{\rho_0}\overline{\rho' u_i'}\delta_{i3}}_{\text{Buoyancy Flux}}
\end{equation}

where we have defined the turbulent kinetic energy as: 
\begin{equation*}
k = \frac{1}{2} \overline{u_i' u_i'}
\end{equation*}


This looks like a huge mess. However, we can break it down term by term:

\begin{itemize}
\item Transport: This transfers energy among the velocity components, and can be broken down further into three different transport terms. The first is the turbulent transport, as it depends on the mean of the correlation of the turbulent fluctuations. The second term is called pressure diffusion, and the third term is viscous transport. 
\item Production: Typically removes energy from the mean flow and adds it to the turbulent fluctuations. See if you can figure out why this term has a negative sign in front of it, despite being called ``production" 
\item Dissipation: Always acts to reduce TKE through viscous effects
\item Buoyancy Flux: Reduces TKE in the presence of stable stratification, increases TKE in the presence of unstable stratification. 
\end{itemize}

Note that in the absence of density variations, we often assume that production balances dissipation. This is a nice simplification, and we will see solutions for this later on. 


\section{Introduction to Turbulence}
Turbulence is a huge topic; this set of lecture notes barely scratches the surface, and I'm going to go into even less detail for these notes. This section will cover some very basic definitions and background. For problem solving tools, look ahead to the ``Turbulence Models and Physics" section. 

\subsection{Definitions}

The obvious question to start with is: what is turbulence? Most of us probably have an intuitive answer--it's a flow that's chaotic, messy, swirly, and difficult to predict. The more important question to ask, though, is what does turbulence do? Essentially, turbulence transfers energy among different scales of the flow. Generally, energy is input at large scales, and transfered down the turbulent cascade until it is dissipated by viscous forces at very small scales. 


One of the most important dimensionless parameters in turbulence (and fluid mechanics in general) is the Reynolds number, which is defined as:
\begin{equation}
\textrm{Re}=\frac{UD}{\nu}
\end{equation}
where $U\,[m/s]$ is velocity, $D \,[m]$ is a characteristic length scale, and $\nu\,[m^2/s]$ is the kinematic viscosity. Turbulent flow is characterized by high Reynolds numbers ($>$10,000), though a precise cutoff is difficult to define. 

One of the most important scales that we talk about in turbulence is the Kolmogorov scale, which is defined as:
\begin{equation}
\eta = \left(\frac{\nu^3}{\epsilon}\right)^{1/4}
\end{equation}
where $\eta\, [m]$ is the Kolmogorov Scale, and $\epsilon\, [m^2/s^3]$ is the dissipation rate of turbulent kinetic energy (TKE). This is the length scale of the smallest turbulent eddies, and the point where viscosity dominates, dissipating TKE into heat. 

Using various scaling arguments, the dissipation rate goes like:
\begin{equation*}
\epsilon \sim \frac{u^3}{L}
\end{equation*}
Or at the smallest scale:
\begin{equation*}
\epsilon\sim \nu\left(\frac{\partial u}{\partial x}\right)^2
\end{equation*}

The turbulent nature of flows is often examined via the ``Turbulence Spectrum". An example of this is shown below. The y-axis shows energy, while the x-axis shows the wavenumber scaled by the Kolmogorov Scale. 

\begin{center}
\includegraphics[width=3 in, height=4 in]{spectra.png}
\end{center}
Wavenumber is defined as:
\begin{equation*}
k=\frac{2\pi}{\lambda} = \frac{2\pi f}{U}
\end{equation*}
where $\lambda\,[m]$ is the wavelength, and $f\,[1/s]$ is the frequency. The largest eddies (i.e. smallest wavenumbers) contain the most energy. Energy is then transfered down the cascade to smaller and smaller scales, i.e. larger wavenumbers. In the middle region, called the ``inertial subrange", the plot follows the $-5/3$ law (denoted by red dotted line). The largest wavenumbers (i.e. smallest eddies) are in the dissipation range, as they are approaching the Kolmogorov Scale.

\subsection{Averaging Procedures}
Given the small scales (both spatial and temporal) that turbulent processes occur over, simulating turbulence in environmental flows directly is intractable from a computational standpoint. As such, we need to average Navier-Stokes in some manner in order to model turbulent behavior. The two main ways we can do this are via Large-Eddy Simulation (which involves spatial filtering), and Reynolds Averaging (which involves time averaging). Here, we're just going to look at Reynolds Averaging. 

As usual, the details are in the notes, but when we do the RANS procedure we end up with:
\begin{equation*}
\frac{\partial \overline{u_i}}{\partial t} + \frac{\partial }{\partial x_j} (\bar{u_i} \bar{u_j}) = -\frac{1}{\rho_0} \frac{\partial \overline{p}}{\partial x_i} -\frac{g}{\rho_0} \overline{\rho} \delta_{i3} + \nu \frac{\partial^2 \overline{u_i}}{\partial x_j \partial x_j} - \frac{\partial \overline{u_i' u_j'}}{\partial x_j}
\end{equation*}

You'll notice that this averaging procedure has given Navier-Stokes an extra term that wasn't there before: $\frac{\partial}{\partial x_j}\left(\overline{u_i'u_j'}\right)$. This is a divergence term, and specifically it's the divergence of the Reynolds Stress which is defined as $\overline{u_i'u_j'}$. This is a second-order tensor, and unfortunately we don't know what this is, so we have to make various assumptions and simplifications to close the equations (we will cover some of these assumptions in the next section).

\end{document}