Diode modelling  In electronics, diode modelling refers to the mathematical models used to approximate the actual behaviour of real diodes to enable calculations and circuit analysis. A diode's I-V curve is nonlinear (it is well described by the Shockley diode law). This nonlinearity complicates calculations in circuits involving diodes  so simpler models are often required. This article discusses the modelling of p-n junction diodes, but the techniques may be generalized to other solid state diodes. The Shockley diode equation relates the diode current formula_1 of a p-n junction diode to the diode voltage formula_2. This relationship is the diode "I-V characteristic":  where formula_4 is the "saturation current" or "scale current" of the diode (the magnitude of the current that flows for negative formula_2 in excess of a few formula_6, typically 10−12A). The scale current is proportional to the cross-sectional area of the diode. Continuing with the symbols: formula_6 is the thermal voltage (formula_8, about 26 mV at normal temperatures), and formula_9 is known as the diode ideality factor (for silicon diodes formula_9 is approximately 1 to 2). When formula_11 the formula can be simplified to:  This expression is, however, only an approximation of a more complex I-V characteristic. Its applicability is particularly limited in case of ultrashallow junctions, for which better analytical models exist. To illustrate the complications in using this law, consider the problem of finding the voltage across the diode in Figure 1. Because the current flowing through the diode is the same as the current throughout the entire circuit, we can lay down another equation. By Kirchhoff's laws, the current flowing in the circuit is  These two equations determine the diode current and the diode voltage. To solve these two equations, we could substitute the current formula_1 from the second equation into the first equation, and then try to rearrange the resulting equation to get formula_2 in terms of formula_16. A difficulty with this method is that the diode law is nonlinear. Nonetheless, a formula expressing formula_1 directly in terms of formula_16 without involving formula_2 can be obtained using the Lambert "W"-function , which is the inverse function of formula_20, that is, formula_21. This solution is discussed next.