The device equations can then be formulated in terms of the above variables, for example the equations linking the Fermi-level to the free carrier concentration can rewritten as
The band parameters can be defined as
The same can be done with all the SRH capture escape equations. Once the device equations have been written in terms of the solution variables, they can be reformulated into residual form, in the following way
We then solve for the corrections to the solution variables, using Newton's method
The boundary conditions used in solving this system of differential equations are taken as the electron/hole densities on either side of the device, and the built in potential as calculated in 3.1.1. To move from a equilibrium conditions to a state where current is flowing the potential either side of the device is updated so that the system is no longer in equilibrium. The system of equations is then resolved, and current will be flowing.