%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file has been autogenerated from the LaTeX part of the   %
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
% file instead!!                                                %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

The black-\/oil model is a three-\/phase, three-\/component model widely used for oil reservoir simulation. The phases are denoted by lower index $\alpha \in \{ w, g, o \}$ (\char`\"{}water\char`\"{}, \char`\"{}gas\char`\"{} and \char`\"{}oil\char`\"{}) and the components by upper index $\kappa \in \{ W, G, O \}$ (\char`\"{}\-Water\char`\"{}, \char`\"{}\-Gas\char`\"{} and \char`\"{}\-Oil\char`\"{}). The model assumes partial miscibility\-:


\begin{itemize}
\item Water and the gas phases are immisicible and are assumed to be only composed of the water and gas components respectively-\/
\item The oil phase is assumed to be a mixture of the gas and the oil components.
\end{itemize}

The densities of the phases are determined by so-\/called {\itshape formation volume factors}\-:

\[ B_\alpha := \frac{\varrho_\alpha(1\,\text{bar})}{\varrho_\alpha(p_\alpha)} \]

Since the gas and water phases are assumed to be immiscible, this is sufficint to calculate their density. For the formation volume factor of the the oil phase $B_o$ determines the density of {\itshape saturated} oil, i.\-e. the density of the oil phase if some gas phase is present.

The composition of the oil phase is given by the {\itshape gas formation factor} $R_s$, which defined as the volume of gas at atmospheric pressure that is dissolved in saturated oil at a given pressure\-:

\[ R_s := \frac{x_o^G(p)\,\varrho_{mol,o}(p)}{\varrho_g(1\,\text{bar})}\;. \]

This allows to calculate all quantities required for the mass-\/conservation equations for each component, i.\-e.

\[ \sum_\alpha \frac{\partial\;\phi c_\alpha^\kappa S_\alpha }{\partial t} - \sum_\alpha \text{div} \left\{ c_\alpha^\kappa \mathbf{v}_\alpha \right\} - q^\kappa = 0 \;, \] where $\mathrm{v}_\alpha$ is the filter velocity of the phase $\alpha$.

By default $\mathrm{v}_\alpha$ is determined by using the standard multi-\/phase Darcy approach, i.\-e. \[ \mathbf{v}_\alpha = - \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} \left(\text{grad}\, p_\alpha - \varrho_{\alpha} \mathbf{g} \right) \;, \] although the actual approach which is used can be specified via the {\ttfamily Velocity\-Module} property. For example, the velocity model can by changed to the Forchheimer approach by
\begin{lstlisting}[style=eWomsCode]
 SET_TYPE_PROP(MyProblemTypeTag, VelocityModule,
      Ewoms::BoxForchheimerVelocityModule<TypeTag>);
\end{lstlisting}


The primary variables used by this model are\-:
\begin{itemize}
\item The pressure of the phase with the lowest index
\item The two saturations of the phases with the lowest indices
\end{itemize}

