(58) |

where , is calculated from the current at the contacts .

(59) |

This is an efficient procedure. For some measurements however, such as transient photovoltage, the situation becomes more complex, as one has to find , to suite the desired conditions. For example when finding (or indeed performing a TPV simulation), one is looking for the value of , which will give . Clearly one way to do this would be to search a reasonable range of until the condition is met. This would however be slow, especially if one is having to repeat the procedure multiple times, such as in a time domain simulation. A better method is to first guess the value of which could cause the condition to be met (a good guess may be the value of the built in bias), then to iterate using an external newton solver, to update until the condition , is met to the desired degree of accuracy. This is more efficient than a linear search for , however it is still inefficient, as it will require two Newton solvers, one for the diode equations (described above) and one to enforce . When one couples together two Newton solvers, convergence is not guaranteed, in fact they can oscillate and diverge. Also, convergence will probably proceed in a linear fashion, rather than a super-linear fashion. The equations to external circuits, in an external newton solver is included in gpvdm as an option, mainly for debugging. Another difficulty with simulating TPV, is the precision one can solve the diode current to is of the order of - Amps, and a typical value of shunt resistance is around Ohms, this the numerical noise in the solver can very easily be amplified by the shunt resistance to a level where the whole system of equations becomes unstable. Solving, the system of equations in a coupled form expatiates this problem.

A better way to solve for the presence of external circuit elements is to, include another solution variable in the main Newton solver, namely . This avoids the need of two coupled solvers. This is a single value of potential, which defines the applied voltage to the device. The updated solution matrix will look like this

(60) |

Note, the derivatives of , , , , , which are functions of , now also have to be calculated. In practice, only the far right hand (or left) of the finite difference grid next to the contacts will be non zero. Now, to solve any external circuit under any desired condition, one simply has to couch the equation describing the external circuit in the form of a residual equation,

(61) |

For example, in the most simple case, if one wants to solve for a given internal diode voltage, one can write

(62) |

in this case,

(63) |

where , is the desired output voltage. Or for another example, if one wants to solve for one can write

(64) |

which forces the current going through the shunt resistance to equal that the diode is generating. Appropriate, derivatives of , would then have to be calculated.