Solar cell solvers¶
Solcore includes several methods to solve the properties of a solar cell, including optics and electrical properties. To solve the optics, Solcore
have built in a transfer matrix solver and can be linked to S4, a rigorous couple wave analysis solver. For the electrical properties, Solcore
includes from the fundamental detailed balance (DB) solver to the more rigorous Poissondriftdiffusion (PDD) equation solver. The electrical solvers apply to the individual junctions separately, and then their ouput are combined to get the properties of a multijunction device.
 The two most important elements of the solar cell solver module are the solar_cell_solver function and the default_options variable (see Solver Options). The former is the function to be called to calculate any property of any solar cell, regardless of how the junctions have been defined or the specific property of interest. It provides a common interface for any calculation. To use it, simply do:
from solcore.solar_cell_solver import solar_cell_solver solar_cell_solver(my_solar_cell_object, task, user_options)
The task has to be “optics”, “iv”, “qe”, “equilibrium” or “short_circuit”, the last two only working for PDD junctions. The sequence followed by the solver is:
 The default options are updated with the user defined options
 The solar cell structure is scanned, calculating derived information like the width of the junctions or the offset of each layer or junction with respect the front of the cell.
 The solar cell object and the updated options are sent to the corresponding solver (“optics”, “iv”, “qe”, “equilibrium” or “short_circuit”), depending on the chosen task.
 Except in the case of “Equilibrium”, all other tasks will require calculating the optics of the cell. This is done according to the chosen optics_method selected in the options. The default is “BL” (BeerLambert law). Alternative optics_method values are “TMM”, “RCWA”, “external” or None, if optics do not need to be calculated. Visit the optical methods section for information specific to the optical solvers.
 For the “iv” and “qe” tasks, each of the junctions present in the solar cell will be solved, according to the method used in their definition (“PDD”, “DA”, “2D” or “DB”). Details of each of this methods are described in the corresponding section.
 Finally, for the “iv” task, the individual IV curves of the junctions and tunnel junctions, if present, are combined to calculate the IV curve of the multijunction solar cell, taking into account radiative coupling, if required.
All of the above calculations modify the original solar cell object, adding attributes or methods to its structure. For example, after calculating the IV curve of my_solar_cell_object, this will have a new attribute called “iv” that is a dictionary with the IV of the total solar cell, the IV curves of each of the junctions, information of the Voc and Isc, if relevant, etc.
More details of the specific electrical solvers included in Solcore can be found in:
Solver Options¶
All options that need to be passed to the solvers (either electrical or optical) are passed as a dictionary via de user_options keyword to the solar_cell_solver method described above. If no options are provided, the solver will try to use the default ones, which might or might not be adequate to your specific problem. These options are common for all calculations.
The options available as well as the default values are:
 General
 T_ambient = 298
 Ambient temperature (K)
 T = 298
 Cell temperature (K). It is actually made equal to the temperature in the solar solar cell definition: my_solar_cell.T .
 Illumination spectrum
 wavelength = np.linspace(300, 1800, 251) * 1e9
 Wavelengths of the illumination spectrum (m)
 light_source = LightSource(source_type=’standard’, version=’AM1.5g’, x=default_options.wavelength, output_units=’photon_flux_per_m’)
 The illumination spectrum Air Mass 1.5 global spectrum, provided at the above wavelengths in units of photons•s^{1} m^{2}.
 IV control
 voltages = np.linspace(0, 1.2, 100)
 Voltages at which to calculate the IV curve of the complete solar cell.
 mpp = False
 If the parameters of the solar cell under illumination (Isc, Voc, Pmpp, Impp, Vmpp, fill factor and efficiency) have to be calculated. If False, all of them will have the value None.
 light_iv = False
 If the light IV curve is to be simulated.
 internal_voltages = np.linspace(6, 4, 1000)
 The voltages at which the IV curve of each of the junctions inside the cell have to be calculated. This range has to be wider than the voltages above, in general. The same voltage range will be used in all junctions.
 position = np.arange(0, solar_cell.width, 1e10)
 Positions inside the solar cell structure in which to calculate the absorption. By default, it is calculated each angstrom for the whole width of the cell. To control the depth spacing, the user can pass:
 a vector which specifies each position (in m) at which the depth should be calculated
 a single number which specifies the spacing (in m) to generate the position vector, e.g. 1e9 for 1 nm spacing
 a list of numbers which specify the spacing (in m) to be used in each layer. This list can have EITHER the length of the number of individual layers + the number of junctions in the cell object, OR the length of the total number of individual layers including layers inside junctions.
 radiative_coupling = False
 If radiative coupling has to be included in the calculation.
 Optics control
 optics_method = ‘BL’
 Default method to calculate the optical properties of the cell. Other possible values are “TMM”, “RCWA”, “external” or None.
 Rigorous couple wave analysis options
 Check the RCWA section for details on this parameters.
 size = [500, 500]
 orders = 4
 theta = 0
 phi = 0
 pol = ‘u’
 Detailed balance solver options
 db_mode = ‘boltzmann’
 If the Boltzmann approximation should be used in the detailed balance solver. Any other choice will result in using the full Plank equation, which will be slower, in general.
 Depletion approximation solver options
 da_mode = ‘bvp’
 Selects the numerical approximation method for the driftdiffusion equation in the depletion approximation solver. Possible values are “bvp” for numerical solution using the solve_bvp method of the scipy.integrate module or ‘green’ for a semianalytic solution using Green’s functions. The latter is expected to be faster.
 Poissondrift diffusion solver options
 Check the PDD section for details on this parameters.
 Mesh control
 meshpoints = 400
 growth_rate = 0.7
 coarse = 20e9
 fine = 1e9
 ultrafine = 0.2e9
 Convergence control
 clamp = 20
 nitermax = 100
 ATol = 1e14
 RTol = 1e6
 Recombination control
 srh = 1
 rad = 1
 aug = 0
 sur = 1
 gen = 0
Solar cell solver module functions¶

solcore.solar_cell_solver.
merge_dicts
(*dict_args)[source]¶ Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts.

solcore.solar_cell_solver.
solar_cell_solver
(solar_cell: solcore.solar_cell.SolarCell, task: str, user_options: Union[Dict[KT, VT], solcore.state.State, None] = None)[source]¶ Solves the properties of a solar cell object
This can be done either calculating its optical properties (R, A and T), its quantum efficiency or its current voltage characteristics in the dark or under illumination. The general options for the solvers are passed as dictionaries or state objects.
 Args:
 solar_cell: A solar_cell object
 taks: Task to perform. Some of the existing tasks might not be available for all types of junctions.
 user_options: A dictionary containing the options for the solver, which will overwrite the default options.
 Return:
 None

solcore.solar_cell_solver.
solve_optics
(solar_cell: solcore.solar_cell.SolarCell, options: solcore.state.State)[source]¶ Solves the optical properties of the structure.
It calls one of the registered optics methods, defined by the options.optics_method to calculate the reflection, absorption and transmission of the cell as well as ligth abosrbed per layer and junction. Note that not all optic methods are compatible with all junctions. Check the information spefific for each of them.
 Args:
 solar_cell: A solar_cell object options: Options for the optics solver
 Return:
 None

solcore.solar_cell_solver.
solve_iv
(solar_cell, options)[source]¶ Calculates the IV at a given voltage range, providing the IVs of the individual junctions in addition to the total IV
Parameters:  solar_cell – A solar_cell object
 options – Options for the solvers
Returns: None

solcore.solar_cell_solver.
solve_qe
(solar_cell, options)[source]¶ Calculates the QE of all the junctions
Parameters:  solar_cell – A solar_cell object
 options – Options for the solvers
Returns: None

solcore.solar_cell_solver.
solve_equilibrium
(solar_cell: solcore.solar_cell.SolarCell, options: solcore.state.State)[source]¶ Solves the electronic properfies of the cell at equilibrium conditons.
The junction objects are updated with the bandstructure and recombination profiles.
 Args:
 solar_cell: The solar cell to solve. options: Options required by the solver.

solcore.solar_cell_solver.
solve_short_circuit
(solar_cell: solcore.solar_cell.SolarCell, options: solcore.state.State)[source]¶ Solves the electronic properfies of the cell at short circuit conditons.
The junction objects are updated with the bandstructure and recombination profiles.
 Args:
 solar_cell: The solar cell to solve. options: Options required by the solver.

solcore.solar_cell_solver.
prepare_solar_cell
(solar_cell, options)[source]¶ This function scans all the layers and junctions of the cell, calculating the relative position of each of them with respect the front surface (offset). This information will later be use by the optical calculators, for example. It also processes the ‘position’ option, which determines the spacing used if the solver is going to calculate depthdependent absorption.
Parameters:  solar_cell – A solar_cell object
 options – an options (State) object with user/default options
Returns: None

solcore.solar_cell_solver.
process_position
(solar_cell, options, layer_widths)[source]¶  To control the depth spacing, the user can pass:
 a vector which specifies each position (in m) at which the depth should be calculated
 a single number which specifies the spacing (in m) to generate the position vector, e.g. 1e9 for 1 nm spacing
 a list of numbers which specify the spacing (in m) to be used in each layer. This list can have EITHER the length
of the number of individual layers + the number of junctions in the cell object, OR the length of the total number of individual layers including layers inside junctions.
Parameters:  solar_cell – a SolarCell object
 options – aan options (State) object with user/default options
 layer_widths – list of widths of the individual layers in the stack, treating the layers within junctions as individual layers
Returns: None