ivcurves.precise.diff_lhs_rhs#

ivcurves.precise.diff_lhs_rhs(v, i, il, io, rs, rsh, n, vth, ns)#

Calculates the difference between the left hand side and right hand side of the single diode equation.

Parameters:
  • v (numeric) – Voltage [V]

  • i (numeric) – Current [A]

  • il (numeric) – Light-generated current \(I_L\) (photocurrent) [A]

  • io (numeric) – Diode saturation \(I_0\) current under desired IV curve conditions. [A]

  • rs (numeric) – Series resistance \(R_s\) under desired IV curve conditions. [ohm]

  • rsh (numeric) – Shunt resistance \(R_{sh}\) under desired IV curve conditions. [ohm]

  • n (numeric) – Diode ideality factor \(n\)

  • vth (numeric) – Thermal voltage of the cell \(V_{th}\) [V] The thermal voltage of the cell (in volts) may be calculated as \(k_B T_c / q\), where \(k_B\) is Boltzmann’s constant (J/K), \(T_c\) is the temperature of the p-n junction in Kelvin, and \(q\) is the charge of an electron (coulombs).

  • ns (numeric) – Number of cells in series \(N_s\)

Returns:

Difference between the left hand and right hand sides of the single diode equation.

Return type:

mpmath float