The Poisson equation forms the basis of electrostatics and is of the form,
where \(\phi\) is the electric potential, \(\epsilon(x)\) is the materials dielectric constant, \(\rho(x, t)\) is a charge distribution (possibly varying with time), and the \(x\) subscripts indicate a spatial partial derivative. Note that this equation is reaction-diffusion equation with the diffusion flux \(\mathcal{F} = -\epsilon(x) \phi_x\). As with the advection-diffusion equation, this expression holds over the whole domain, therefore it must also hold over a subdomain \(\Omega_j=(x_{j-1/2}, x_{j+1/2})\). Integrating over the subdomain,
The cell averaged values are therefore,
To determine the flux at the cell faces we will take the mean of the fluxes in cells adjacent to the interfaces,
Substituting the definition of the fluxes into the integrated equation and factoring for the electrical potential terms yields,
Neumann boundary conditions applied to the finite volume form of the Poisson equation are naturally resolved; that is to say that ghost cell or extrapolation approaches are not needed. Consider the integral form of the Poisson equation at the last cell of the domain on the right hand side,
The Neumann boundary condition defines the derivative of \(\phi\) at the the right hand boundary,
This boundary condition appears naturally as a term in the integral equation. Therefore the boundary condition can be satisfied by substitution into the integral form of the equation at the right hand boundary,
Fixed value, or Dirichlet, boundary conditions are not naturally resolved and can only be applied to the discretised form of the equation. We need to apply a Dirichlet condition to the left hand side, such that full equation for the cell \(j=1\) reads,
Clearly, this is trivial as all that is required is fix the first row of the matrix equation to be the boundary condition.
Defining the (vector) coefficients,
With Dirichlet boundary condition on the left hand side and a Neumann boundary condition on the right hand side the Poisson equation can be written in matrix form,