sesame.solvers.default.IVcurve

default.IVcurve(system, voltages, file_name, guess=None, tol=1e-06, periodic_bcs=True, maxiter=300, verbose=True, htp=1, fmt='npz')

Solve the Drift Diffusion Poisson equations for the voltages provided. The results are stored in files with .npz format by default (See below for saving in Matlab format). The steady state current is computed at the end of the voltage loop and returned. Note that the potential is always applied on the right contact.

Parameters:

system: Builder :

The discretized system.

voltages: array-like :

List of voltages for which the current should be computed.

file_name: string :

Name of the file to write the data to. The file name will be appended the index of the voltage list, e.g. file_name_0.npz.

guess: dictionary of numpy arrays of floats (optional) :

Starting point of the solver. Keys of the dictionary must be ‘efn’, ‘efp’, ‘v’ for the electron and quasi-Fermi levels, and the electrostatic potential respectively.

tol: float :

Accepted error made by the Newton-Raphson scheme.

periodic_bcs: boolean :

Defines the choice of boundary conditions in the y-direction. True (False) corresponds to periodic (abrupt) boundary conditions.

maxiter: integer :

Maximum number of steps taken by the Newton-Raphson scheme.

verbose: boolean :

The solver returns the step number and the associated error at every step, and this function prints the current applied voltage if set to True (default).

htp: integer :

Number of homotopic Newton loops to perform.

fmt: string :

Format string for the data files. Use mat to save the data in a Matlab format (version 5 and above).

Returns:

J: numpy array of floats :

Steady state current computed for each voltage value.

Notes

The data files can be loaded and used as follows:

>>> results = np.load('file.npz')
>>> efn = results['efn']
>>> efp = results['efp']
>>> v = results['v']