Governing equations on integral form
\section{Governing Equations on Integral Form}
\begin{figure}[ht!] \begin{center} \includegraphics[]{figures/standalone-figures/Chapter02/pdf/control-volume.pdf} \caption{Generic control volume} \label{fig:generic:cv} \end{center} \end{figure}
\noindent The governing equations stems from mass conservation, conservation of momentum and conservation of energy
\subsection{The Continuity Equation}
\vspace*{1cm} \begin{center} {\emph{Mass can be neither created nor destroyed, which implies that mass is conserved}}\\ \end{center} \vspace*{1cm}
\noindent The net massflow into the control volume $\Omega$ in Fig. \ref{fig:generic:cv} is obtained by integrating mass flux over the control volume surface $\partial \Omega$\\
\[-\oiint_{\partial \Omega}\rho \mathbf{v}\cdot \mathbf{n} dS\]\\
\noindent Now, let's consider a small infinitesimal volume $d\mathscr{V}$ inside $\Omega$. The mass of $d\mathscr{V}$ is $\rho d\mathscr{V}$. Thus, the mass enclosed within $\Omega$ can be calculated as\\
\[\iiint_{\Omega} \rho d\mathscr{V}\]\\
\noindent The rate of change of mass within $\Omega$ is obtained as\\
\[\frac{d}{dt}\iiint_{\Omega} \rho d\mathscr{V}\]\\
\noindent Mass is conserved, which means that the rate of change of mass within $\Omega$ must equal the net flux over the control volume surface.\\
\[\frac{d}{dt}\iiint_{\Omega} \rho d\mathscr{V}=-\oiint_{\partial \Omega}\rho \mathbf{v}\cdot \mathbf{n} dS\]\\
or\\
\begin{equation} \frac{d}{dt}\iiint_{\Omega} \rho d\mathscr{V}+\oiint_{\partial \Omega}\rho \mathbf{v}\cdot \mathbf{n} dS=0 \label{eq:governing:integral:cont} \end{equation}\\
\noindent which is the integral form of the continuity equation.\\
%\newpage
\subsection{The Momentum Equation}
\vspace*{1cm} \begin{center} {\emph{The time rate of change of momentum of a body equals the net force exerted on it}} \end{center} \vspace*{1cm}
\[\frac{d}{dt}(m\mathbf{v})=\mathbf{F}\]\\
\noindent What type of forces do we have?\\
\begin{itemize} \item Body forces acting on the fluid inside $\Omega$ \begin{itemize} \item gravitation \item electromagnetic forces \item Coriolis forces \end{itemize} \item Surface forces: pressure forces and shear forces \end{itemize}
\noindent Body forces inside $\Omega$:\\
\[\iiint_{\Omega}\rho \mathbf{f}d\mathscr{V}\]\\
\noindent Surface force on $\partial \Omega$:\\
\[-\oiint_{\partial \Omega} p\mathbf{n}dS\]\\
\noindent Since we are considering inviscid flow, there are no shear forces and thus we have the net force as\\
\[\mathbf{F}=\iiint_{\Omega}\rho \mathbf{f}d\mathscr{V}-\oiint_{\partial \Omega} p\mathbf{n}dS\]\\
\noindent The fluid flowing through $\Omega$ will carry momentum and the net flow of momentum out from $\Omega$ is calculated as\\
\[\oiint_{\partial \Omega} (\rho\mathbf{v}\cdot\mathbf{n}dS)\mathbf{v}=\oiint_{\partial \Omega} (\rho\mathbf{v}\cdot\mathbf{n})\mathbf{v}dS\]\\
\noindent Integrated momentum inside $\Omega$\\
\[\iiint_{\Omega} \rho \mathbf{v} d\mathscr{V}\]\\
\noindent Rate of change of momentum due to unsteady effects inside $\Omega$\\
\[\frac{d}{dt}\iiint_{\Omega} \rho \mathbf{v} d\mathscr{V}\]\\
\noindent Combining the rate of change of momentum, the net momentum flux and the net forces we get\\
\[\frac{d}{dt}\iiint_{\Omega} \rho \mathbf{v} d\mathscr{V}+\oiint_{\partial \Omega} (\rho\mathbf{v}\cdot\mathbf{n})\mathbf{v}dS=\iiint_{\Omega}\rho \mathbf{f}d\mathscr{V}-\oiint_{\partial \Omega} p\mathbf{n}dS\]\\
\noindent combining the surface integrals, we get\\
\begin{equation} \frac{d}{dt}\iiint_{\Omega} \rho \mathbf{v} d\mathscr{V}+\oiint_{\partial \Omega} \left[(\rho\mathbf{v}\cdot\mathbf{n})\mathbf{v}+p\mathbf{n}\right]dS=\iiint_{\Omega}\rho \mathbf{f}d\mathscr{V} \label{eq:governing:integral:mom} \end{equation}\\
\noindent which is the momentum equation on integral form.\\
\newpage
\subsection{The Energy Equation}
\vspace*{1cm} \begin{center} {\emph{Energy can be neither created nor destroyed; it can only change in form}} \end{center} \vspace*{1cm}
\[E_1+E_2=E_3\]\\
\begin{itemize} \item[$E_1$:] Rate of heat added to the fluid in $\Omega$ from the surroundings \begin{itemize} \item heat transfer \item radiation \end{itemize} \item[$E_2$:] Rate of work done on the fluid in $\Omega$ \item[$E_3$:] Rate of change of energy of the fluid as it flows through $\Omega$ \end{itemize}
\[E_1=\iiint_{\Omega} \dot{q}\rho d\mathscr{V}\]\\
\noindent where $\dot{q}$ is the rate of heat added per unit mass\\
\noindent The rate of work done on the fluid in $\Omega$ due to pressure forces is obtained from the pressure force term in the momentum equation.\\
\[E_{2_{pressure}}=-\oiint_{\partial \Omega}(p\mathbf{n}dS)\cdot\mathbf{v}=-\oiint_{\partial \Omega} p\mathbf{v}\cdot\mathbf{n}dS\]\\
\noindent The rate of work done on the fluid in $\Omega$ due to body forces is\\
\[E_{2_{body\ forces}}=\iiint_{\Omega}(\rho\mathbf{f}d\mathscr{V})\cdot\mathbf{v}=\iiint_{\Omega}\rho\mathbf{f}\cdot\mathbf{v}d\mathscr{V}\]\\
\[E_2=E_{2_{pressure}}+E_{2_{body\ forces}}=-\oiint_{\partial \Omega} p\mathbf{v}\cdot\mathbf{n}dS+\iiint_{\Omega}\rho\mathbf{f}\cdot\mathbf{v}d\mathscr{V}\]\\
\noindent The energy of the fluid per unit mass is the sum of internal energy $e$ (molecular energy) and the kinetic energy $V^2/2$ and the net energy flux over the control volume surface is calculated by the following integral\\
\[\oiint_{\partial \Omega}(\rho \mathbf{v}\cdot\mathbf{n}dS)\left(e+\frac{V^2}{2}\right)\]\\
\noindent Analogous to mass and momentum, the total amount of energy of the fluid in $\Omega$ is calculated as\\
\[\iiint_{\Omega}\rho\left(e+\frac{V^2}{2}\right)d\mathscr{V}\]\\
\noindent The time rate of change of the energy of the fluid in $\Omega$ is obtained as\\
\[\frac{d}{dt}\iiint_{\Omega}\rho\left(e+\frac{V^2}{2}\right)d\mathscr{V}\]\\
\noindent Now, $E_3$ is obtained as the sum of the time rate of change of energy of the fluid in $\Omega$ and the net flux of energy carried by fluid passing the control volume surface.\\
\[E_3=\frac{d}{dt}\iiint_{\Omega}\rho\left(e+\frac{V^2}{2}\right)d\mathscr{V}+\oiint_{\partial \Omega}(\rho \mathbf{v}\cdot\mathbf{n}dS)\left(e+\frac{V^2}{2}\right)\]\\
\noindent With all elements of the energy equation defined, we are now ready to finally compile the full equation\\
\begin{equation} \frac{d}{dt}\iiint_{\Omega}\rho\left(e+\frac{V^2}{2}\right)d\mathscr{V}+\oiint_{\partial \Omega}\left[\rho\left(e+\frac{V^2}{2}\right)(\mathbf{v}\cdot\mathbf{n}) + p\mathbf{v}\cdot\mathbf{n}\right]dS=\iiint_{\Omega}\rho\mathbf{f}\cdot\mathbf{v}d\mathscr{V}+\iiint_{\Omega} \dot{q}\rho d\mathscr{V} \label{eq:governing:integral:energy} \end{equation}\\
\noindent The surface integral in the energy equation may be rewritten as\\
\[\oiint_{\partial \Omega}\left[\rho\left(e+\frac{V^2}{2}\right)(\mathbf{v}\cdot\mathbf{n}) + p\mathbf{v}\cdot\mathbf{n}\right]dS=\oiint_{\partial \Omega}\rho\left[e+\frac{p}{\rho}+\frac{V^2}{2}\right](\mathbf{v}\cdot\mathbf{n})dS\]\\
\noindent and with the definition of enthalpy $h=e+p/\rho$, we get\\
\[\oiint_{\partial \Omega}\rho\left[h+\frac{V^2}{2}\right](\mathbf{v}\cdot\mathbf{n})dS\]\\
\noindent Furthermore, introducing total internal energy $e_o$ and total enthalpy $h_o$ defined as\\
\[e_o=e+\frac{1}{2}V^2\]\\
and\\
\[h_o=h+\frac{1}{2}V^2\]\\
\noindent the energy equation is written as\\
\begin{equation} \frac{d}{dt}\iiint_{\Omega}\rho e_o d\mathscr{V}+\oiint_{\partial \Omega}\rho h_o(\mathbf{v}\cdot\mathbf{n})dS=\iiint_{\Omega}\rho\mathbf{f}\cdot\mathbf{v}d\mathscr{V}+\iiint_{\Omega} \dot{q}\rho d\mathscr{V} \label{eq:governing:integral:energy:b} \end{equation}\\
\subsection{Summary}
\noindent The integral form of the governing equations for inviscid compressible flow has been derived\\
\noindent Continuity:\\
\[\frac{d}{dt}\iiint_{\Omega} \rho d\mathscr{V}+\oiint_{\partial \Omega}\rho \mathbf{v}\cdot \mathbf{n} dS=0\]\\
\noindent Momentum:\\
\[\frac{d}{dt}\iiint_{\Omega} \rho \mathbf{v} d\mathscr{V}+\oiint_{\partial \Omega} \left[(\rho\mathbf{v}\cdot\mathbf{n})\mathbf{v}+p\mathbf{n}\right]dS=\iiint_{\Omega}\rho \mathbf{f}d\mathscr{V}\]\\
\noindent Energy:\\
\[\frac{d}{dt}\iiint_{\Omega}\rho e_o d\mathscr{V}+\oiint_{\partial \Omega}\rho h_o(\mathbf{v}\cdot\mathbf{n})dS=\iiint_{\Omega}\rho\mathbf{f}\cdot\mathbf{v}d\mathscr{V}+\iiint_{\Omega} \dot{q}\rho d\mathscr{V}\]
