which can be integrated between the mesh point and to give
where the definition has been used, then using the Bernoulli relation
one can reformulate the equation as
Care has to be taken to evaluating the Bernoulli expression about zero, so the Taylor expansion is used. Note, picking the right number of terms has a significant impact on numerical noise in the solver.
The argument to the Bernoulli expression is is given as
A thermal driving term can also be added to the expression, and should be reformulated as an effective mass when a temperature gradient is present in the device, due to it's thermal dependence.
An analogous procedure can be used to derive the the hole current flux which will give
The standard finite difference scheme can then be used to rewrite the above equations ready for a computer to solve.