\svnidlong
{$HeadURL: $}
{$LastChangedDate: $}
{$LastChangedRevision: $}
{$LastChangedBy: $}

\odachapter{Toy models available in \oda}
\begin{tabular}{p{4cm}l}
\textbf{Origin:} & CTA memo200802\\
\textbf{Last update:}    & \svnfilemonth-\svnfileyear\\
\end{tabular}

A number of small toy models are available in \oda, meant for testing and
teaching purposes. All models are represented as a set of differential
equations where the solution is obtained numerically by using Runge-Kutta
method or Forward Euler.

\section{Oscillator model}
The oscillator model is a simple mass-spring model with friction. It has two
describing variables, which are the location of the mass $x$ and its velocity
$u$. The two variables are related according to the following equations:
\begin{eqnarray}
  \frac{dx}{dt}=u \\
  \frac{du}{dt}=-\omega^2 x - \frac{2}{T_{d}} u
\end{eqnarray}
where $\omega$ is the oscillation frequency, which depends on the mass and the
spring constant, while $T_{d}$ is the damping time.

\section{Lorenz model}
Edward Lorenz (\cite{Lorenz1963}) developed a very simplified model of
convection called the Lorenz model. The Lorenz model is defined by three
differential equations giving the time evolution of the variables $x,y,z$:
\begin{eqnarray}
  \frac{dx}{dt}=\sigma(y-x) \\
  \frac{dy}{dt}=\rho x - y -x z \\
  \frac{dz}{dt}=x y - \beta z
\end{eqnarray}
where $\sigma$ is the ratio of the kinematic viscosity divided by the thermal
diffusivity, $\rho$ the measure of stability, and $\beta$ a parameter which
depends on the wave number.

This model, although simple, is very nonlinear and has a chaotic nature. Its
solution is very sensitive to the parameters and the initial conditions: a
small difference in those values can lead to a very different solution.

\section{Lorenz96 model}
%source: Miyoshi,T.[2004]
The Lorenz96 model (\cite{LorenzEmanuel1998}) is defined by the following
equation
\begin{equation}
  \frac{dx_i}{dt}=x_{i-1}(x_{i+1}-x_{i-2})-x_{i}+F
\end{equation}
where $i=1,...,N$, $N=40$ and the boundary is cyclic, i.e. $x_{-1}=x_{N-1}$,
$x_{o}=x_{N}$, and $x_{N+1}=x_{1}$, and $F=8.0$. The first term of the right
hand side simulates ``advection'', and this model can be regarded as the time
evolution of an arbitrary one-dimensional quantity of a constant latitude
circle; that is, the subscript $i$ corresponds to longitude. This model also
behaves chaotically in the case of external forcing $F=8.0$.

\section{Heat transfer model}
%source: wikipedia http://en.wikipedia.org/wiki/Heat_equation
The model represents a special case of heat propagation in an isotropic and
homogeneous medium in the 2-dimensional space. The equation can be written as
follows:
\begin{equation}
  \frac{\partial T}{\partial t}=k(\frac{\partial^2 T}{\partial x^2}+\frac{\partial^2 T}{\partial y^2})
\end{equation}
for $x \in [0,X]$ and $y \in [0,Y]$ where $T$ is the temperature as a function
of time and space and $k$ is a material-specific quantity depending on the
thermal conductivity, the density and the heat capacity. Here $k$ is set to 1.
Neumann and Dirichlet boundary conditions are used.

\section{1-dimensional Advection model}
%source: Martin's code; Chapter 11 Ad-Diff equations and turbulence; Grima and Newman [2004]
In this study, a 1-dimensional advection model is also used and can be written as follows
\begin{eqnarray}
  \frac{\partial c}{\partial t}=u \frac{\partial c}{\partial x}
\end{eqnarray}
where $c$ typically describes the density of the particle being studied and $u$
is the velocity. On the left boundary $c$ is specified as
$c_b(t)=1+sin(\frac{2\pi}{10}t)$.

\section{Stochastic Extension}
The previous subsections describe the deterministic models available within
\oda. Especially for the implementation of Kalman filtering, we need to extend
the models into a stochastic environment. This is done, for the oscillation,
Lorenz, and Lorenz96 models, by adding a white noise process to each variable.
On the other hand, for the heat transfer and 1-d advection models, this is done
by adding a colored noise process, represented by an AR(1) process, to the
boundary condition. For the heat model the noise is also spatially correlated.
