\documentclass{article}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumitem}
\usepackage{epsfig}

\begin{document}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% COVER PAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{CS 237C(CME 306) \\ Midterm II}
\maketitle 

\vspace{2in}

\begin{center}
\begin{tabular}{|l|p{3in}|}
\hline
 & \\
Name & \\
\hline
 & \\
SUID & \\
\hline
 & \\
Signature & \\
\hline
\end{tabular}
\end{center}


\pagebreak


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SCORING PAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{tabular}{|l|l|p{.4in}|}
\hline Question & Points & Score \\
\hline 1 & 5.5 & \\
\hline 2 & 5.5 & \\
\hline 3 & 5.5 & \\
\hline 4 & 5.5 & \\
\hline 5 & 5.5 & \\
\hline 6 & 5.5 & \\
\hline 7 & 5.5 & \\
\hline 8 & 5.5 & \\
\hline 9 & 20 & \\
\hline 10 & 36 & \\
\hline Total & 100 & \\
\hline 
\end{tabular}


\pagebreak


\begin{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MULTIPLE CHOICE PROBLEMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item Consider the projection method for incompressible flow.  Which of the following statements are true?
    \begin{enumerate}[labelindent=\parindent, leftmargin=*, label=\Roman*., align=left]
    \item An elliptic equation is solved for the pressure, which is then used in computing the divergence free velocity field.
    \item The time step for the method is typically restricted by the update for $\vec{V}^{n+1}$ in the last step.
    \item The computation yields a Helmholtz-Hodge decomposition of $\vec{V}^{\star}$.
    \end{enumerate}

    \begin{enumerate}
    \item I only
    \item II only
    \item III only
    \item I and II only
    \item I and III only
    \end{enumerate}

\item In discretizing the equation $u_t = u_{xx}$,
    \begin{enumerate}
    \item Crank-Nicholson is a good method to use, since it is unconditionally stable and gives the steady-state solution as $\triangle t \rightarrow \infty$.
    \item if we use a consistent method of the form 
        \begin{displaymath}
        u^{n+1}_j = \alpha u^n_{j-1} + \beta u^n_{j} + \gamma u^n_{j+1}
        \end{displaymath}
        where $\alpha$, $\beta$, and $\gamma$ are constants the CFL condition is violated if $\triangle t = \triangle x$.
    \item we don't have to worry about a CFL condition since the equation is parabolic.
    \item the backward Euler scheme is a popular choice because it is unconditionally stable and second order accurate.
    \item None of the above.
    \end{enumerate}

\item For the Neumann problem for Poisson's equation,
    \begin{enumerate}
    \item a solution to the problem may not exist.
    \item if the problem satisfies the compatibility condition, then a unique solution exists.
    \item a solution exists, but it is unique only up to a constant.
    \item we can use a second order accurate discretization to get a symmetric negative definite linear system.
    \item None of the above.
    \end{enumerate}


\pagebreak 


\item Consider the projection method for viscous incompressible flow equations.  Which of the following statements are true?
    \begin{enumerate}[labelindent=\parindent, leftmargin=*, label=\Roman*., align=left]
    \item Viscosity is included in the computation of the intermediate velocity field.
    \item Explicit discretization of the viscosity imposes an undesirable time step restriction of $\triangle t = O(\triangle x^2)$.
    \item The numerical viscosity is typically negligible compared to the physical viscosity.
    \end{enumerate}

    \begin{enumerate}
    \item I only
    \item II only
    \item I and III only
    \item I and II only
    \item None
    \end{enumerate}

\item The main advantage of the semi-Lagrangian scheme over an ENO or upwind scheme, is that the semi-Lagrangian scheme
    \begin{enumerate}
    \item is higher order.
    \item suffers from less numerical viscosity.
    \item is unconditionally stable.
    \item more accurately approximates shock propagation speeds.
    \item None of the above.
    \end{enumerate}

\item When solving a system of conservation laws using ENO-LLF,
    \begin{enumerate}
    \item we use left eigenvectors of $J(\vec{U}_j)$ to transform the system into the 
    $N$ characteristic fields for each grid point $j$.
    \item $\vec{F}_{i+\frac{1}{2}} = R \left( \begin{array}{c} F^1_{i+\frac{1}{2}} \\ \vdots \\ F^N_{i+\frac{1}{2}} \end{array} \right)$, where $F^p_{i+\frac{1}{2}}$ is the 
          scalar numerical flux for the $p$-th characteristic field, $R$ is the matrix of right eigenvectors of $J(\vec{U}_{i+\frac{1}{2}})$, 
          and $(\vec{U}_i)_t + \frac{\vec{F}_{i+\frac{1}{2}} - \vec{F}_{i-\frac{1}{2}}}{\triangle x} = 0$.
    \item we multiply the flux by a left eigenvector in order to determine the $0^{th}$ row of our divided difference table.
    \item the method depends on the fact that the matrix $L_0 J R_0$ is exactly diagonalized in a neighborhood of $x_0$.
    \item the upwind directions for the characteristic fields do not vary in space or time.
    \end{enumerate}


\pagebreak


\item Consider a system of $m$ equations
\begin{equation}
\vec{U}_t + \vec{F}(\vec{U})_x = 0,                                                                             \label{hyperbolic_system}
\end{equation}
that is hyperbolic at each point $(x,t) \in \mathbb{R} \times [0, \infty)$ and let
\begin{displaymath}
A(\vec{U}) = \frac{\partial \vec{F}}{\partial \vec{U}}.
\end{displaymath}

Which of the following statements are true?
    \begin{enumerate}[labelindent=\parindent, leftmargin=*, label=\Roman*., align=left]
    \item If $A$ is constant, we can decouple the system (\ref{hyperbolic_system}) into $m$ scalar, constant coefficient equations.
    \item The CFL condition for the system (\ref{hyperbolic_system}) is based on the characteristic velocities of the corresponding linearized system.
    \item $A(\vec{U})$ has $m$ real eigenvalues and $m$ linearly independent left eigenvectors $\forall \vec{U} \in \mathbb{R}^m$.
    \end{enumerate}

    \begin{enumerate}
    \item I and II only
    \item I and III only
    \item III only
    \item I, II, and III
    \item None
    \end{enumerate}

\item In modeling a flow as incompressible,
    \begin{enumerate}
    \item we must specify an equation of state for the pressure in order to get a closed system.
    \item we can get a more favorable time step restriction than for compressible flow.
    \item we must solve for mass, momentum, and energy simultaneously since the equations are coupled.
    \item we are assuming that the sound speed is slow relative to the fluid velocity.
    \item None of the above.
    \end{enumerate}


\pagebreak


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% WRITTEN PROBLEMS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\item Consider the projection method for incompressible flow, where the steps are given below.
\begin{enumerate}[labelindent=\parindent, leftmargin=*, label=, align=left]
\item \begin{equation}
\frac{\vec{V}^{\star}-\vec{V}^n}{\triangle t} + \vec{V}^n \cdot \nabla \vec{V}^n = \vec{g} \label{incompressible_vstar}
\end{equation}
\item
\begin{equation}
\triangle \hat{p}^{n+1} = \nabla \cdot \vec{V}^{\star}  \label{incompressible_poisson}
\end{equation}
\item 
\begin{equation}
\vec{V}^{n+1} - \vec{V}^{\star} + \nabla \hat{p}^{n+1} = 0 \label{velocity}
\end{equation}
\end{enumerate}

\begin{enumerate}
\item Using equations (\ref{incompressible_poisson}) and (\ref{velocity}), write down the Neumann problem for $\hat{p}^{n+1}$.
Do \underline{not} assume that $\vec{V}^{\star} = \vec{V}^{n+1}$ on the boundary.

\item Consider the figure below, which depicts a MAC grid containing a point $S$ which lies next to the boundary $\Gamma$, with 
outward unit normal $\vec{N} = (-1, 0)$.
\begin{center}
%\begin{figure}[!h]
\includegraphics[scale=1,angle=0]{Midterm2_Figure1.pdf}
%\end{figure}
\end{center}

Using standard second order accurate central differencing for all derivatives, discretize the equation for $\hat{p}^{n+1}$ at the point $S$,
applying the boundary condition.

\item Explain why your discretization at the point $S$ suggests that we can set $\left. \vec{V}^{\star} \right \vert_{\Gamma} = \left. \vec{V}^{n+1} \right \vert_{\Gamma}$ 
without affecting the solution $\hat{p}^{n+1}$.
\end{enumerate}


\pagebreak


\item Find the exact solution of the system
\begin{displaymath}
\left\{
\begin{array}{l}
\left( \begin{array}{c} u \\ \phi \end{array} \right)_t + \left( \begin{array}{cc} a & 1 \\ c^2 & a \end{array} \right)\left( \begin{array}{c} u \\ \phi \end{array} \right)_x = 0 \\
u(x,0) = u_0(x) \\
\phi(x,0) = \phi_0(x)
\end{array}
\right.
\end{displaymath}
where $a$ and $c$ are real constants and $c \neq 0$.

%\item Find the exact solution of the system
%\begin{displaymath}
%\left\{
%\begin{array}{l}
%\left( \begin{array}{c} u \\ \phi \end{array} \right)_t + \left( \begin{array}{cc} \bar{u} & 1 \\ \bar{\phi} & \bar{u} \end{array} \right)\left( \begin{array}{c} u \\ \phi \end{array} \right)_x = 0 \\
%u(x,0) = u_0(x) \\
%\phi(x,0) = \phi_0(x)
%\end{array}
%\right.
%\end{displaymath}
%where $\bar{u}$ and $\bar{\phi}$ are constants and $\bar{\phi} > 0$.

\end{enumerate}

\end{document}

