Previously, we have solved the classical Poisson equation, using a primal formulation.
If this approach produces good results in most cases, it has a major drawback.
Indeed, when using for instance 1st order Lagrange elements for the pressure p,
the gradient ∇p is piecewise constant per element.
In particular, the normal flux is not conserved at the interface between two elements.
In the case of a mass flux, this means that the local mass balance is not necessarily satisfied.
Mass balanced is only ensured in an averaged sense.
When conductivity is low, this can lead to spurious oscillations in the solution, as we shall demonstrate hereafter.
Introducing a so-called mixed formulation (with pressure and flux both unknown) can solve this issue by using vector elements for the
flux which preserve the normal component of the flux between elements, ensuring local mass balance.
In the boundary integral, we can split in two terms, on ΓD where u is known and ΓN where the flux w is known.
We realize that the essential boundary condition u=u0 on ΓD from the primal formulation actually becomes a natural boundary condition in the mixed formulation, whereas the natural boundary conditions from the primal formulation become essential boundary conditions on the flux w: