%-------------------------------------------------------------------------------

% This file is part of Code_Saturne, a general-purpose CFD tool.
%
% Copyright (C) 1998-2018 EDF S.A.
%
% This program is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation; either version 2 of the License, or (at your option) any later
% version.
%
% This program is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
% FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
% details.
%
% You should have received a copy of the GNU General Public License along with
% this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
% Street, Fifth Floor, Boston, MA 02110-1301, USA.

%-------------------------------------------------------------------------------

%-------------------------------------------------------------------------------
\section*{Disclaimer}
%-------------------------------------------------------------------------------
\CS is free software; you can redistribute it
and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.

\CS is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.\footnote{You should have
received a copy of the GNU General Public License
along with \CS; if not, write to the
Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor,
Boston, MA  02110-1301  USA}

%-------------------------------------------------------------------------------
\section{Aims of the document}
%-------------------------------------------------------------------------------

This chapter constitutes an introduction to the theory guide
associated with the kernel of \CS.
The system of equations considered consists of the
Navier-Stokes equations, with turbulence and passive scalars. Firstly, the
continuous equations for mass, momentum, turbulence and passive scalars are
presented. Secondly, information related to the time scheme is supplied.
Thirdly, the spatial discretisation is detailed: it is based on a co-located%
\footnote{%
All the variables are located at the centres of the cells.} finite volume
scheme for unstructured meshes. Fourthly, the different source terms are
described. Fifthly, boundary conditions are detailed. And finally, some algebrae
such as how to solve a non-linear convection diffusion equation and some
linear algebrae algorithms are presented.

In a second part, advanced modellings are presented with their particular
treatments.

To make the documentation suitable to the developers' needs, the appendix
has been organized into sub-sections corresponding to the major steps of the
algorithm and to some important subroutines of the code.

During the development process of the code, the documentation is naturally
updated as and when required by the evolution of the source code itself.
Suggestions for improvement are \textbf{more than} welcome. In particular,
it will be necessary to deal with some transverse subjects
(such as parallelism, periodicity) which were voluntarily left out of
the first versions, to focus on the algorithms and their implementation.

To make it easier for the developers to keep the documentation up to date
during the development process, the choice is made not to base this document
on the implementation (except in the appendix) but to keep as much as possible
a general formulation. For developers who are interested in the way theory is
implemented, please refer to the \texttt{doxygen} documentation (see \doxygenfile{index.html}{local html documentation}).
A special effort will be made to link this theory guide to the \texttt{doxygen}
documentation.

\clearpage


