Flow Solver for a single phase

The flow equations consist of the mass conservation equation

\[\nabla\cdot {\bf u}=q\]

and the Darcy law

\[{\bf u} =- \frac{1}{\mu}K\nabla p.\]

Here, ${\bf u}$ denotes the velocity and $p$ the pressure. The permeability tensor is given by $K$ and $\mu$ denotes the viscosity.

We solve the flow equations for a Cartesian grid and we set the source term $q$ be zero except at the left-lower and right-upper corner, where it is equal with opposite sign (inflow equal to outflow).

Program walk-through.

We construct a Cartesian grid

int dim = 3;
int nx = 40;
int ny = 40;
int nz = 1;
Opm::GridManager grid(nx, ny, nz);