
\section{Modelling}
%
\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{./Figs/MBARI_WEC_cap.pdf}
\caption{Conceptual model of the MBARI ocean's wave energy converter. $x_1$, $x_2$ and $x_3$ are local coordinate systems
and the zero is at the equilibrium positions without waves.}
\label{fig:MBARI_conptual}
\end{figure}
%
The equations of motion for the MBARI power buoy are written in terms of the vertical coordinates $x_i$ 
defining the position of body $i$ $(i = 1, 2, 3)$, with $x_i = 0$ in the
absence of waves and $x_i$ increasing upwards. 
The floater is denoted as 1, the piston as 2 and the submerged plate as 3, see Fig.~\ref{fig:MBARI_conptual}.
%
\subsection{The floater}
%
\par
The equation of motion for the floater is
%
\begin{equation}
\label{eq:floater}
	( m_1 + A_1^\infty ) \ddot{x}_1
	=
	- \rho g S x_1 + F_\text{ext} - F_\text{rad} +  F_\text{gas} + F_\text{M},
\end{equation}
%
where a dot represents time derivative. Here, $g$ is the acceleration of gravity, $\rho$ is water density,  $A_i^\infty = \lim\limits_{\omega \rightarrow\infty} A_i(\omega)$, where $A_i(\omega)$ is the frequency dependent added mass coefficient for body~$i$
%
and $F_\text{ext}$ is the excitation force modeled as in \cite{Henriques201231}.
%
The radiation force $F_\text{rad}$ is computed in the time domain as
%
\begin{equation}
\label{eq:F_rad}
  F_\text{rad} = \int\limits_{-\infty}^t K_1 ( t- \tau ) \, \dot{x}_1 (\tau) \, d\tau,
\end{equation}
%
see \cite{Henriques201301} for further details. 
%
\par The force acting on the piston is modeled assuming an isentropic compression/expansion
$(p V^\gamma = p_0 V_0^\gamma)$ resulting, after some manipulation, in
%
\begin{equation}
  F_\text{gas} =
  	  F_\text{pu0} \left( 1 - \frac{x_2-x_1}{l_\text{pu}} \right)^{-\gamma}
  	- F_\text{pl0} \left( 1 + \frac{x_2-x_1}{l_\text{pl}} \right)^{-\gamma},
\end{equation}
%
where $F_\text{pu0} = p_\text{pu0} A_\text{pu}$ and $F_\text{pl0} = p_\text{pl0} A_\text{pl}$.
%
As in Fig.~\ref{fig:MBARI_conptual}, subscripts pu, pl refer to the pneumatic upper chamber and the pneumatic lower chamber, respectively. The subscript 0 denotes mid-stroke conditions.
%
\par
Assuming oil as an incompressible fluid, the force on the hydraulic cylinder is given by
%
\begin{equation}
F_\text{M} = A_\text{oil} \, \Delta p_\text{oil},
\end{equation}
%
where $A_\text{oil} = A_\text{piston}-A_\text{bore}$ is the wet piston area.
%
\subsection{Hydraulic piston} 
%
The equation of motion for the piston is
%
\begin{equation}
\label{eq:piston}
	m_2\, \ddot{x}_2
	=
	- F_\text{gas} - F_\text{M} - F_\text{mg,2} - F_\text{cable}.
\end{equation}
%
$F_\text{mg,2} = m_2\,g$ is the weight of the piston and rods. The tether force is given by
%
\begin{equation}
\label{eq:cable}
F_\text{cable} = k_c \max \! \left( x_2 - x_3, 0 \right).
\end{equation}
%
\subsection{Hydraulic motor}
%
The theoretical volume flow rate and torque of the motor are given by
%
\begin{equation}
Q_m = D_m \, \omega_m,
\end{equation}
%
\begin{equation}
T_m = D_m \, \Delta p_\text{oil},
\end{equation}
%
where $D_m$ is the volumetric displacement of the motor.
%
The theoretical volume flow rate of the motor is related to the cylinder motion (actual volume flow rate) through
%
\begin{equation}
D_m \, \omega_m = A_\text{oil} \, \left( \dot{x}_2 - \dot{x}_1 \right).
\end{equation}
%
The generator motion is modeled using
%
\begin{equation}
J \dot{\omega}_m = T_m - T_\text{gen},
\end{equation}
%
which yields
%
\begin{equation}
\label{eq:generator_1}
\frac{J A_\text{oil}}{D_m} \, \left( \ddot{x}_2 - \ddot{x}_1 \right) = D_m \Delta p_\text{oil} - T_\text{gen},
\end{equation}
%
where the generator torque is given by the control relationship
%
\begin{equation}
T_\text{gen} =  C_\text{gen} \, \left( \dot{x}_2 - \dot{x}_1 \right),
\end{equation}
%
and $C_\text{gen}$ is a user defined constant.
%
\par
Eq. \eqref{eq:generator_1} can be written in a more appropriate form for the computations
%
\begin{equation}
\label{eq:motor}
F_\text{M} = m_J \, \ddot{x}_2 - m_J \, \ddot{x}_1 + F_\text{gen},
\end{equation}
%
where $m_J = J A_\text{oil}^2 D_m^{-2}$ and $F_\text{gen} = A_\text{oil} T_\text{gen} D_m^{-1}$.
%
\subsection{Submerged plate}
%
The motion of the submerged plate is given by
\begin{equation}
\label{eq:plate}
	\left( m_3 + A_3^\infty \right) \ddot{x}_3
	=
	F_\text{cable} - F_\text{mg,3} - F_\text{drag},
\end{equation}
%
where $F_\text{mg,3} = m_3\,g$, $F_\text{drag} = \frac{1}{2} \rho \, \dot{x}_3 |\dot{x}_3| A_p C_D$ and $A_p$ is the plate area.
%
\subsection{Numerical solution}
%
The numerical model comprises the system of equations \eqref{eq:floater}, \eqref{eq:piston}, \eqref{eq:motor} and \eqref{eq:plate}.
The system is solved using the numerical method described in \cite{Henriques201231}. A distinction must be made when the cable is in tension $(F_\text{cable}>0)$ or when it is slack $(F_\text{cable}=0)$, see Eq. \eqref{eq:cable}. 
%


