Conservation of charge carriers is forced by solving the charge carrier continuity equations for both electrons,
where
and
are the net recombination and generation rates per unit volume respectively.
To obtain the internal potential distribution within the device Poisson's equation is solved,