% -*- latex -*-
% FILE: "/home/evmik/jobs/wm/2015_fall_practical_computing_for_scientists/midterm01/midterm01.tex"
% LAST MODIFICATION: "Sun, 04 Oct 2015 17:55:28 -0400 (evmik)"
% (C) 2010 by Eugeniy Mikhailov, <evgmik@gmail.com>
% $Id:$
\documentclass[letter,12pt]{article}

%---------------------------------------------------------------
\usepackage{listings}
\usepackage{color}
\usepackage{fullpage}
%---------------------------------------------------------------

\begin{document}
\newcommand{\problem}[1]{%
	{\flushleft  \bf #1\\}
}
\newcommand{\midterm}[1]{%
	\begin{center}
		\Large  \bf Midterm #1%
	\end{center}%
}
\newcommand{\mat}[1]{% matlab code
{\color{blue}\texttt{#1}}%
}

%---------------------------------------------------------------
\midterm{01 (100 points)}
%\author{Eugeniy E. Mikhailov}
%\date{\today}
%\date{}
%\maketitle
%---------------------------------------------------------------

{\flushleft {
One report per team is enough, but make sure everyone is listed in the
authors list.
}
}

{
\flushleft {
Discuss the relevant physics equations, describe your solution, show
results. Report page limit is 10 pages excluding listings which should be
in appendixes, font size to be no less than 12pt. 
The emailed submission must have all relevant listings in the attachments.
}
}

\vskip .5in


% -*- latex -*-


%{\bf Problem (100 points total)}
%---------------------------------------------------------------

Your company just bought a new ship (actually a barge)
with name which reads something  ``...  ... fitted''.
May be it is ``Sea worthy fitted''.

Unfortunately, not much
is known about it. You know that the ship has length $L=50$~m and exactly the
same cross section, orthogonal to the long side, through the whole length of the ship. Yep,
nobody tried to reduce the drag, looks like designers were not worried
about a fuel price tag.

Luckily, you were able to find the original designer of
this ship, and she recalled, that the ship 
cross section (orthogonal to the long side) is described by the following formula
\begin{equation}
	\label{eq:hull}
	y =  a \sqrt{1 - \left(\frac{x}{b}\right)^2} + c e^{-|x|/d}
\end{equation}
where $y$ is the position measured from the top of the hull; $x$ is the distance from
the center line (the point (0,0) is at the center top of the ship); $a, b, c$, and $d$ are some unknown parameters, but definitely
$a <0$ and $c<0$. Easy to
see, that at least there is  symmetry with respect to the $y$ axis. But none of the relevant
parameters are known. 

Being a big boss, you send a young apprentice
to do some measurements of the hull to recover the $a, b, c$, and
$d$ parameters. She comeback with a data file which has measurements only
of the starboard side of the ship. They are in the data file
\mat{'hull\_shape.dat'} where all
measurements are in meters, the first column is $x$ position and the second
one is $y$.

At this point you begins to  realize, that 
the actual name of the ship is ``To be fitted'' and nobody but you 
has the required training to do it.

\vskip .2in
%---------------------------------------------------------------
{\flushleft \bf Problem 1}

Find the unknown coefficients describing the hull shape. Do not forget the
uncertainties.

\vskip .2in
%---------------------------------------------------------------
{\flushleft \bf Problem 2}

Estimate the precision of the $y$ measurements done by the apprentice.

\vskip .2in
%---------------------------------------------------------------
{\flushleft \bf Problem 3}

Find the weight which this ship can carry when it is submerged to the very
top of the hull.
Recall the buoyancy force expression, i.e., that this force is equivalent to the
weight of the displaced water.

Note, with this ``elegant'' hull
shape, she cannot  be used in a sea voyage, so we are limited to a fresh
water environment where density of water $\rho = 1000$~kg/m${}^3$.
Assume, that your company stuck gold and bought the ship made from the exotic
nonobtanium material which is very strong and lightweight, so, in your
calculations, you can disregard volume and mass taken by the hull.




\vskip .2in
%---------------------------------------------------------------
{\flushleft \bf Problem 4}

Find the weight which this ship can carry when it submerged to the point $y_m = (a+c)/2$.
Report, how far from the center line ($y$ axis) the hull meets the water.


\vskip .2in
%---------------------------------------------------------------

{\flushleft \bf Bonus is harder but it is within reach!}

{\flushleft \bf Bonus (10 points):}

Similar to problem 3. Find a maximum load capacity  for a more elegant
hull shape cross section. The cross section is described by the same expression as equation~\ref{eq:hull}
but coefficients $b$ and $d$ have the following dependence on $z$
\begin{equation}
	b(z)=b_0 f(z), 
\end{equation}
\begin{equation}
	d(z)=d_0 f(z),
\end{equation}
where
\begin{equation}
	f(z) =
	1- \tanh \left( 10 \left(\frac{2|z|}{L}\right)^8 \right)
\end{equation}
Here $b_0$ and $d_0$ are equal to values $b$ and $d$ found in 
problem 1; $z$ is distance from the center of the ship along measured along
the long side.


%---------------------------------------------------------------
\end{document}
%---------------------------------------------------------------
