# Fortran Poisson Drift-Diffusion solver (PDD)¶

This section documents the functionality of the original, Fortran-based Poisson Drift-Diffusion Solver included in Solcore. For the newer interface to the Python-based Sesame solver, which also solves the PDD equations, see sesame. While the two solvers should in principle have the same functionality, the Fortran solver was developed specifically to deal with solar cells containing quantum wells (QWs), where the abrupt and frequent change in material parameters can cause convergence issues. The Sesame solver has not been tested for the QW use case. The Fortran solver is less suitable for cells containing thick (> 10 microns or so) layers, as it was designed for III-V cells. The Sesame solver was designed for silicon-based cells and thus can handle thicker layers. The Fortran solver can handle only constant values of doping per layer, while the Sesame solver also accepts depth-dependent doping profiles defined by the user.

Example 1: Example of a simple 2J solar cell calculated with the PDD solver

Example 2: Tutorial: 2J solar cell with QWs in the bottom cell

The PDD package provide all tools necesary to build a solar cell structure and calculate its properties by solving
simultaneously the Poisson equation and the drfit diffusion equations. Normally, these functions will not need to be
accessed directly, but are called internally by `Solcore`

when using the higher level methods in the
solar cell solver.

For using the PDD package, it is enough to include the following line in your code:

```
import solcore.poisson_drift_diffusion as PDD
```

With this, all the functionality of the package will be available to the user. The actual functions and calculations are spread in several modules:

File:solcore/PDD/DriftDiffusionUtilities.pyContains the python interface that dumps all the information of the device structure into the fortran variables and that executes the chosen calculation, getting the data from the fortran variables at the end. This module contains the following methods called internally by the solar_cell_solver:

equilibrium_pdd

short_circuit_pdd

iv_pdd

qe_pdd

File:solcore/PDD/DeviceStructure.pyContains several functions necessary to build a structure that can be read by the PDD solver. The most important of this functions is

CreateDeviceStructurethat scans the junction layers and extracts from the materials database all the parameters required by the PDD solver. Finally, it contains the default properties that are used if they are not found for a particular material. In general, these default properties correspond to those of GaAs at 293 K.

File:solcore/PDD/QWunit.pyContains utilities that transform the sequence of layers into a

structurethat, in turn, can be used to solve the Schrodinger equation and the kp model. It also prepares the properties of the structure (bandedges, efective density of states, etc) in order to have a meaningful set of properties for the DD solver, using theGetEffectiveQW.

**Drift Diffusion Fortran solver****File:**solcore/PDD/DDmodel-current.f95

This is the current version of the Fortran code that, once compiled, performs all the heavy numerical calculations. Normally you would not need to care about this file except if you intend to modify the numerical solver itself.

-——————–