IonMonger: a free and fast planar perovskite solar cell simulator with coupled ion vacancy and charge carrier dynamics

  • N. E. CourtierEmail author
  • J. M. Cave
  • A. B. Walker
  • G. Richardson
  • J. M. Foster
Open Access


Details of an open-source planar perovskite solar cell simulator, which includes ion vacancy migration within the perovskite layer coupled to charge carrier transport throughout the perovskite and adjoining transport layers in one dimension, are presented. The model equations are discretised in space using a finite element scheme, and temporal integration of the resulting system of differential algebraic equations is carried out in MATLAB. The user is free to modify device parameters, as well as the incident illumination and applied voltage. Time-varying voltage and/or illumination protocols can be specified, e.g. to simulate current–voltage sweeps, or to track the open-circuit conditions as the illumination is varied. Typical simulations, e.g. current–voltage sweeps, only require computation times of seconds to minutes on a modern personal computer. An example set of hysteretic current–voltage curves is presented.


Perovskite solar cell Drift–diffusion Device simulation Ion vacancy migration 

1 Introduction

Perovskite solar cells (PSCs) are a promising thin-film technology that, due to their rapid rise in power conversion efficiency to 22.7% [15], are attracting a lot of interest and research effort in the photovoltaic community. However, PSCs display unusual transient behaviour (exemplified by current–voltage hysteresis) in the order of seconds to days which affects the power output of the device [24]. The consensus in the literature is that this slow (compared to the timescale of electronic motion) behaviour is due to the motion of mobile ion vacancies within the perovskite layer. The species of ion vacancy deemed most likely to be responsible for the behaviour observed in the order of seconds to minutes is that of the halide (e.g. iodide, I\(^-\)) ion vacancy due to its high mean density and high diffusion coefficient (compared to the other ionic species) predicted by DFT calculations [8, 26]. Visual evidence of iodide ion migration within a perovskite film has also been obtained experimentally [7]. Recent reviews of the outstanding challenges in the field of perovskite solar cells have been given by Snaith [23], Egger et al. [9] and Phung and Abate [17].

Due to the existence of mobile ion vacancies, the perovskite layer must be treated as a mixed ionic–electronic conductor for the purpose of device simulation. The first works [2, 11, 25] to apply numerical methods to PSC modelling reported that their simulations suffered from prohibitively long calculation times and inaccuracies in solution for realistic values of the parameters. A combined analytic/numerical method was used by Richardson et al. [5, 18] to reveal how iodide ion vacancies accumulate/deplete in very narrow layers (called Debye layers) adjacent to the perovskite boundaries. The associated rapid change in solution across these Debye layers is a significant source of spatial stiffness, while the disparity in timescales between the motion of electronic and ionic charges is a source of temporal stiffness [6], rendering the task of finding solutions to realistic models of PSCs very challenging.

Courtier et al. [6] developed a finite element scheme, implemented in MATLAB [14], that is able to cope with the spatial and temporal stiffness of the problem and obtain accurate solutions to a coupled model for ion migration and charge carrier transport within the perovskite layer of a PSC. Since then, alternative numerical methods have also appeared in [13, 27]. Walter et al. [27] have developed a solver that includes the motion of both cations and anions. Their scheme is based on the freely available software Quokka3 [10], originally designed for the solution of models of silicon-based photovoltaic devices. While this provides a thoroughly tested and validated framework for their results, the model being solved only explicitly models the perovskite absorber and there is strong evidence suggesting that the adjacent transport layers play a key role in determining device behaviour [4]. Meanwhile, Jacobs et al. [13] use the proprietary COMSOL package via a MATLAB interface to simulate three layers of a PSC over a range of timescales. However, the details of the modelling and solutions techniques are not given in full, making their results difficult to reproduce and compare with alternatives.

In this work, we present the extension of the finite element code presented in [6] for a single-layer model of a PSC to a model that explicitly describes the three core layers of a PSC: the electron transport layer (ETL), perovskite absorber layer and hole transport layer (HTL). Full details of the charge transport model equations and the implementation of the code are given. The code is freely available on GitHub at (under an AGPL-3.0 copyleft license) and can be used to simulate a variety of different experimental protocols. Current density–voltage (\(J\)\(V\)) curves are the typical measurement that is performed to assess solar cell performance including, for perovskite solar cells, the extent of \(J\)\(V\) hysteresis displayed at a particular scan rate. In addition to \(J\)\(V\) curves, the code can be used to simulate photocurrent transients (during which the applied voltage and/or the illumination intensity is varied over time) and photovoltage transients (during which the cell is held at open circuit and the illumination intensity is varied) that occur on timescales of microseconds to minutes. Uncovering the links between model parameters and the results of such simulations will help to improve understanding of the underlying physics of PSCs and hence guide further improvements in their design. One such investigation, into how the extent of observable hysteresis depends on material properties of the two transport layers, has been conducted by Courtier et al. [4]. The investigation is based upon simulations of the same1 three-layer model as that considered in this work.

In Sect. 2, we show an example set of simulation results obtained using the code. In Sect. 3, we present and discuss the governing equations in each of the three layers as well as the boundary and interface conditions through which the equations couple together. A non-dimensionalisation is also presented which is geared to study the behaviour of the cell on the timescales associated with anion vacancy motion and aids in obtaining uniformly well-resolved solutions by ensuring that the numerical tolerances are applied equally to each of the model variables. In Sect. 4, we detail the finite element discretisation of the system and highlight the differences between how open-circuit and applied voltage protocols are imposed at the discrete level. The focus of Sect. 5 is a discussion of the how the time-stepping is carried out and how the output current density is calculated from the numerical solution. In Sect. 6, we validate the results of the numerical scheme upon which IonMonger is based. Finally, in Sect. 7, we draw our conclusions.

2 Application example

The main purpose of this paper is to provide the perovskite solar cell community with a high-quality, free and useful tool with which to better understand PSC behaviour, and not to provide a detailed analysis or interpretation of the device physics. The power of the solver in advancing our physical understanding of PSCs is demonstrated in Courtier et al. [4], in which an investigation of the effects of material properties of the transport layers on cell performance is detailed. There it is found that two material properties in particular, namely the permittivity and the effective doping density of the transport layers, have a significant role to play in determining the extent of \(J\)\(V\) hysteresis exhibited by a PSC. In addition, characteristics of simulations that can be used to identify the dominant recombination mechanism in a PSC are discussed. Results from two other simulations, also computed using the capabilities offered by IonMonger, have been presented by Idígoras et al. [12] in a study of the role of surface (also often termed interfacial or interface) recombination, which occurs on the interfaces between the perovskite layer and the adjacent transport layers, on PSC performance. However, further work in this area is vital for the future development and optimisation of PSCs. Here, we show how IonMonger can be used to both simulate the most common measurement protocol for assessing the performance of a solar cell, namely a \(J\)\(V\) curve, and reveal how each type of recombination included in the model contributes to the observed behaviour.

Figure 1a shows the \(J\)\(V\) output for an example simulation of a typical \(J\)\(V\) measurement protocol performed on a planar, standard-architecture PSC (see Fig. 2 for the cell geometry). The cell is initially preconditioned for 5 s before the applied voltage is scanned from 1.2 V to short circuit (0 V) and back to 1.2 V at a scan rate of 100 mV/s. In addition, Fig.  1a displays the corresponding current losses due to the two types of interface recombination included in the model. Note that bulk recombination occurring within the perovskite layer is also included in the model but is not shown. By comparing the shape of the current-loss curves to the \(J\)\(V\) curve, it is clear that, for this example, the observed behaviour is controlled primarily by the rate of recombination at the ETL/perovskite interface (the blue line), while the rate of recombination at the perovskite/HTL interface (the red line) has little effect on the performance of the cell. The parameter values used in the simulation are equal to those given in Tables 1 and 2(b) of [4] except that here the effective doping densities \(d_{\rm E} = d_{\rm H} = 10^{24} \hbox { m}^{-3}\) and the effective densities of state \(g_{\rm{c}}^{E} = g_{\rm{v}}^{H} = 5\times 10^{24} \hbox { m}^{-3}\). The input file for this simulation, along with a GUIDE and documentation to aid in using the code, is provided in the main folder of the IonMonger GitHub repository so that users can utilise these as a starting point for investigations of their own.
Fig. 1

Example simulation results: a A \(J\)\(V\) curve measured at 100 mV/s from 1.2 V to short-circuit and back, after a 5-s preconditioning step. The simulation uses the parameters given in Tables 1 and 2(b) of [4] except that here the effective doping densities \(d_{\rm E} = d_{\rm H} = 10^{24} \hbox { m}^{-3}\) and the effective densities of state \(g_{\rm{c}}^{E} = g_{\rm{v}}^{H} = 5\times 10^{24} \hbox { m}^{-3}\). The purple lines show the current-density output, while the blue and red lines show the current losses due to interface recombination at the ETL/perovskite and perovskite/HTL interfaces, respectively. Losses due to bulk recombination are not shown. The direction of scan is indicated by both the arrows and the style of each line: solid for the reverse scan and dashed for the subsequent forward scan. b A set of three \(J\)\(V\) curves. Here, the example in panel (a) is plotted alongside two other \(J\)\(V\) curves measured at scan rates of 50 mV/s and 200 mV/s, but for otherwise identical input parameters. These results demonstrate the ability of the model to reproduce the scan rate-dependent \(J\)\(V\) hysteresis commonly exhibited by PSCs due to the migration of ion vacancies within the perovskite layer (Color figure online)

Fig. 2

A schematic of the three-layer geometry of the PSC model detailed in Sect. 3. The symbols in each layer indicate which variables are explicitly modelled in that region. The markers along the x-axis represent the non-uniform grid spacing used by IonMonger

In Fig. 1b, the example \(J\)\(V\) curve from panel (a) is shown alongside the corresponding results for two other simulations. The only difference in the input parameters between the three simulations is the rate at which the applied voltage is scanned back and forth to measure the \(J\)\(V\) curve. The three scan rates are 50, 100 and 200 mV/s. Harvesting the full set of results in Fig. 1b required a total of 34 s of computation time on a standard desktop machine, i.e. approximately 11 s per simulation including the calculation of appropriate initial conditions and the preconditioning step. See Sect. 6 for figures showing how the accuracy of the solution and the computation time vary with respect to the number of grid points on which the solution is computed. Next, the equations that underlie these simulations are detailed.

3 The charge transport model

In this section, the charge transport model for a planar lead halide perovskite solar cell consisting of a perovskite absorber layer sandwiched between an electron transport layer (ETL) and a hole transport layer (HTL) is presented. Tables of the model variables and parameters along with their definitions are given in the SI. The structure of the cell is shown in Fig. 2. The non-dimensionalisation used by the code is also given.

3.1 Model equations

Perovskite absorber layer (\(0<x<b\)) A model for the perovskite layer consists of equations for the conservation of conduction (free) electrons, holes and halide ion vacancies coupled with the Poisson equation for the electric potential, \(\phi (x,t)\). We denote the halide ion vacancy density by P(xt), its flux by \({{F}^P}(x,t)\) and define \(\hat{N_0}\) as the mean ion vacancy density. It is assumed that an equal, uniform density \(\hat{N_0}\) of immobile cation vacancies also exists within the perovskite layer. The electron and hole concentrations are denoted by n and p with current densities \({j^n}\) and \({j^p}\), respectively. The functions G(xt) and R(np) denote the charge carrier photogeneration and bulk recombination rates, respectively. In the perovskite layer, we thus have
$$\begin{aligned}&\frac{\partial p}{\partial t} + \frac{1}{q} \frac{\partial {j^p}}{\partial x} = G(x,t) - R(n,p), \\ & {j^p}=-qD_p \left( \frac{\partial p}{\partial x} + \frac{p}{V_{\mathrm{T}}} \frac{\partial \phi }{\partial x} \right) , \end{aligned}$$
$$\begin{aligned}&\frac{\partial n}{\partial t} - \frac{1}{q} \frac{\partial {j^n}}{\partial x} = G(x,t) - R(n,p) , \\& {j^n}=qD_n \left( \frac{\partial n}{\partial x} - \frac{n}{V_{\mathrm{T}}} \frac{\partial \phi }{\partial x} \right) , \end{aligned}$$
$$\begin{aligned}&\frac{\partial P}{\partial t} + \frac{\partial {{F}^P}}{\partial x} = 0, \\& {{F}^P}= -D_{\mathrm{I}}\left( \frac{\partial P}{\partial x}+\frac{P}{ V_{\mathrm{T}}}\frac{\partial \phi }{\partial x}\right) , \end{aligned}$$
with Poisson’s equation,
$$\begin{aligned}&\frac{\partial ^2 \phi }{\partial x^2} = \frac{q}{\varepsilon _{\rm A}}(\hat{N_0}-P+n-p). \end{aligned}$$

Here, \(D_{\mathrm{I}}\) denotes the diffusion coefficient of the iodide ion vacancies and \(\varepsilon _{\rm A}\) is the permittivity of the perovskite absorber layer. These differential equations are supplemented by continuity conditions at the interfaces with the transport layers (given at the end of this section).

Electron transport layer

(\(-b_{\rm E}<x<0\)) The majority carriers through the ETL are free electrons. The model for the electrical behaviour of this layer thus consists only of a conservation equation for the free electrons which couples to Poisson’s equation. Here, \(D_{\rm E}\) denotes the electron diffusion coefficient, \(\varepsilon _{\rm E}\) the permittivity and \(d_{\rm E}\) the intrinsic free electron density (due to the doping) in the ETL.
$$\begin{aligned}&\frac{\partial n}{\partial t} - \frac{1}{q} \frac{\partial {j^n}}{\partial x} = 0 , \quad {j^n}=qD_{\rm E} \left( \frac{\partial n}{\partial x} - \frac{n}{V_{\mathrm{T}}} \frac{\partial \phi }{\partial x} \right) , \end{aligned}$$
$$\begin{aligned}&\frac{\partial ^2 \phi }{\partial x^2} = \frac{q}{\varepsilon _{\rm E}}(n-d_{\rm E}). \end{aligned}$$
These equations couple to the perovskite equations via four continuity conditions at the interface (given at the end of this section). On the external boundary with the metal contact, we impose Ohmic boundary conditions. These read
$$\begin{aligned} n = d_{\rm E}, \quad \phi = \frac{V_{\mathrm{bi}}-V(t)}{2} \quad \text{ on } x=-b_{\rm E}, \end{aligned}$$
where V(t) is the applied voltage and \(V_{\mathrm{bi}}\) denotes the cell’s built-in voltage, which is defined in (17).

Hole transport layer (\(b<x<b+b_{\rm H}\))

The majority carriers in the HTL are holes, and analogously to the case in the ETL, we need specify only two equations, specifically
$$\begin{aligned}&\frac{\partial p}{\partial t} + \frac{1}{q} \frac{\partial {j^p}}{\partial x} = 0 , \quad {j^p}= -qD_{\rm H} \left( \frac{\partial p}{\partial x} + \frac{p}{V_{\mathrm{T}}} \frac{\partial \phi }{\partial x} \right) , \end{aligned}$$
$$\begin{aligned}&\frac{\partial ^2 \phi }{\partial x^2} = \frac{q}{\varepsilon _{\rm H}}(d_{\rm H}-p). \end{aligned}$$
Here, \(D_{\rm H}\) is the hole diffusion coefficient, \(\varepsilon _{\rm H}\) is the permittivity and \(d_{\rm H}\) is the intrinsic hole density (due to the doping) in the HTL. These equations couple to the equations in the perovskite via four continuity conditions at the interface (given at the end of this section) and satisfy the following Ohmic contact conditions on the metal contact.
$$\begin{aligned} p = d_{\rm H}, \quad \phi = -\frac{V_{\mathrm{bi}}-V(t)}{2} \quad \text{ on } x=b+b_{\rm H}. \end{aligned}$$

Continuity conditions on the interfaces (\(x=0\) and \(x=b\))

At the interface between the perovskite and the ETL, (1) the electron flux (and its associated current density) is conserved, (2) the hole flux (and its associated current density) is conserved, (3) there is no flux of halide ion vacancies, (4) and (5) both the electrostatic potential and electric displacement field are continuous, and (6) the majority carrier density (in this case the electrons) at the edge of the ETL is related to the neighbouring carrier density in the perovskite by a factor, \(k_{\rm E}\), which depends upon the relevant band offset and change in effective density of states [11]. Therefore, at the interface between the ETL and the perovskite, the following conditions are applied
$$\begin{aligned}&\left.\begin{array}{r} {j^n}|_{x=0^-} = {j^n}|_{x=0^+}-\bar{R_{\rm{l}}}\\ {j^p}= -q \bar{R_{\rm{l}}}\\ {{F}^P}= 0\\ \phi |_{x=0^-} = \phi |_{x=0^+}\\ \varepsilon _{E}\frac{\partial \phi }{\partial x}\Big |_{x=0^-} = \varepsilon _{\rm A}\frac{\partial \phi }{\partial x}\Big |_{x=0^+}\\ k_{\rm E}n|_{x=0^-} = n|_{x=0^+} \end{array} \right\} \ \text{ on } \ \ x=0. \end{aligned}$$
Analogous conditions are applied at the interface between the perovskite and the HTL (where the holes are the majority carrier). These read
$$\begin{aligned}&\left. \begin{array}{r} {j^p}|_{x=b^-}-\bar{R_{\rm{r}}}= {j^p}|_{x=b^+}\\ {j^n}= -q \bar{R_{\rm{r}}}\\ {{F}^P}= 0\\ \phi |_{x=b^-} = \phi |_{x=b^+}\\ \varepsilon _{\rm A}\frac{\partial \phi }{\partial x}\Big |_{x=b^-} = \varepsilon _{\rm H}\frac{\partial \phi }{\partial x}\Big |_{x=b^+}\\ p|_{x=b^-} = k_{\rm H}p|_{x=b^+} \end{array} \right\} \ \text{ on } \ \ x=b. \end{aligned}$$
Here, the superscripts of ± denote quantities evaluated at either the left- or right-hand side of the perovskite/transport layer interfaces, respectively; \(\bar{R_{\rm{l}}}\) and \(\bar{R_{\rm{r}}}\) are the recombination fluxes at the left (ETL/perovskite) and right (perovskite/HTL) interface, respectively; and \(k_{\rm E}\) and \(k_{\rm H}\) are constants of proportionality between the charge carrier concentrations on each side of the interfaces according to Boltzmann statistics, given by
$$\begin{aligned}&k_{\rm E} = \frac{g_{\rm{c}}}{g_{\rm{c}}^{E}}\exp \left( -\frac{E_{\rm{c}}-E_{\rm{c}}^{E}}{k_{\rm{B}}T}\right) , \end{aligned}$$
$$\begin{aligned}&k_{\rm H} = \frac{g_{\rm{v}}}{g_{\rm{v}}^{H}}\exp \left( \frac{E_{\rm{v}}-E_{\rm{v}}^{H}}{k_{\rm{B}}T}\right) . \end{aligned}$$

In these expressions, \(g_{\rm{c,v}}\) denote the effective conduction/valence band density of states; \(E_{\rm{c,v}}\) are the energies of the conduction/valence band edges; and the superscripts E or H indicate to which transport layer a quantity relates. The validity of each of these expressions relies on the validity of using the Boltzmann approximation to describe the distribution of electrons in a non-degenerate semiconductor. Consequently, users should choose an effective doping density which is less than 20 times smaller than the effective density of states in each transport layer in order to ensure that the equilibrium Fermi level is more than a few thermal voltages away from the band edges, see (15)–(16).

Built-in voltage

The cell’s built-in voltage is equal to the difference between the workfunctions of the two metal contacts. Assuming that the contacts form ideal Ohmic contacts with the adjacent transport layer, this difference is equal to the difference between the equilibrium Fermi levels of the two transport layers which are approximated, using Boltzmann statistics, by
$$E_{\rm f}^{E} = E_{\rm{c}}^{E} - k_{\rm{B}}T\log \left( \frac{g_{\rm{c}}^{E}}{d_{\rm E}}\right),$$
$$E_{\rm f}^{H} = E_{\rm{v}}^{H} + k_{\rm{B}}T\log \left( \frac{g_{\rm{v}}^{H}}{d_{\rm H}}\right).$$
Hence, the built-in voltage is given by
$$V_{\mathrm{bi}} = E_{\rm{c}}^{E}-E_{\rm{v}}^{H}-k_{\rm{B}}T\log \left( \frac{g_{\rm{c}}^{E}g_{\rm{v}}^{H}}{d_{\rm E}d_{\rm H}}\right).$$

3.2 Carrier generation and recombination rates

For the rate of charge carrier generation within the perovskite layer, we use a simplified Beer–Lambert model of light absorption [16] in which it is assumed that absorption can be characterised by a single absorption coefficient (\(\alpha\)) and photon flux that are independent of the wavelength of light. Taking into account the possibility of choosing either a standard or inverted architecture (i.e. applying the light to either the ETL- or HTL-side of the cell, respectively), this rate can be written as
$$\begin{aligned} G(x,t) = I_{\rm s}(t)F_{\rm{ph}} \alpha \exp \left( -\alpha \left[ \frac{b}{2}+l\left( x-\frac{b}{2}\right) \right] \right) , \end{aligned}$$
in which \(F_{\rm{ph}}\) denotes the flux of photons incident on the light-facing perovskite surface (after accounting for reflection) under the equivalent of 1 Sun illumination; the function \(I_{\rm s}(t)\) is the intensity of the illumination in Sun equivalents; and the parameter l can be set equal to either \(+1\) for light from the left (through the ETL) or \(-1\) for light from the right (through the HTL) by making use of the Inverted option in the parameter input file.
We allow bulk recombination to be described by a combination of bimolecular and trap-assisted Shockley–Read–Hall (SRH) recombination mechanisms from, for example, Nelson [16] §4.5.5. Hence, the volumetric bulk recombination rate is
$$\begin{aligned}&R(n,p) = \beta \left( np-n_i^2\right) +\frac{np-n_i^2}{\tau _n(p+p_t)+\tau _p (n+n_t)}, \end{aligned}$$
in which \(\beta\) is the bimolecular rate constant, \(n_i\) is the intrinsic carrier concentration, \(\tau _n\) and \(\tau _p\) are the charge carrier lifetimes and we assume that the trap state energy level lies close to the intrinsic potential energy of the perovskite such that we can apply the approximation that \(p_t = n_t = n_i\).
Similarly, the interfacial recombination fluxes (\(\bar{R_{\rm{l}}}\) and \(\bar{R_{\rm{r}}}\)) can be chosen as a combination of bimolecular and SRH recombination as follows, noting the use of recombination velocities rather than carrier lifetimes in the SRH recombination rates (see Nelson [16, Sect. 4.5.6]),
$$\begin{aligned} \bar{R}_{\mathrm{l,r}}(n^-,p^+)&= \beta ^{E,H} \left( n^-p^+-n_i^-n_i^+\right) \\&+\frac{n^-p^+-n_i^-n_i^+}{\frac{1}{\nu _n^{E,H}}(p^++p_t^+)+\frac{1}{\nu _p^{E,H}}(n^-+n_t^-)}, \end{aligned}$$
in which the superscripts of ± denote quantities evaluated at either the left- or right-hand side of the perovskite/transport layer interfaces, respectively; \(\beta ^{E,H}\) are the bimolecular rate constants; and \(\nu _n^{E,H}\) and \(\nu _p^{E,H}\) are the electron and hole recombination velocities, respectively. In order to satisfy the principle of detailed balance, we assume that the intrinsic carrier density in the ETL \(n_i^{E} = \frac{n_i}{k_{\rm E}}\) and the intrinsic carrier density in the HTL \(n_i^{H} = \frac{n_i}{k_{\rm H}}\) for consistency with the continuity conditions in (11f) and (12f). Then, in order to keep the number of input parameters to a minimum, we approximate \(p_t = n_t = n_i\) in analogy with the approximation made to the bulk recombination rate above. Therefore, the interface recombination rates used by the code are equivalent to
$$\begin{aligned}&\bar{R_{\rm{l}}}\left( \frac{n}{k_{\rm E}},p\right) = \frac{\beta ^{E}}{k_{\rm E}} \left( np-n_i^2\right) \\&\quad +\frac{np-n_i^2}{\frac{k_{\rm E}}{\nu _n^{E}}(p+n_i)+\frac{1}{\nu _p^{E}}(n+n_i)} \quad \text{ on } x=0^+, \end{aligned}$$
$$\begin{aligned}&\bar{R_{\rm{r}}}\left( n,\frac{p}{k_{\rm H}}\right) = \frac{\beta ^{H}}{k_{\rm H}} \left( np-n_i^2\right) \\&\quad +\frac{np-n_i^2}{\frac{1}{\nu _n^{H}}(p+n_i)+\frac{k_{\rm H}}{\nu _p^{H}}(n+n_i)} \quad \text{ on } x=b^-. \end{aligned}$$

3.3 Calculation of the total current density

In order to calculate the total current density from a numerical solution of the drift–diffusion model, we derive an expression that can be evaluated at any point in the domain. The code automatically calculates the current density at the midpoint of the perovskite layer, where the grid spacing is larger and the solution varies more smoothly than in the Debye layers, to minimise numerical error. By subtracting Eq. (2a) from Eq. (1a), we get
$$\begin{aligned} \frac{\partial }{\partial t}(p-n) + \frac{1}{q}\frac{\partial }{\partial x}\left( {j^p}+{j^n}\right) = 0. \end{aligned}$$
Then, by substituting the difference in the carrier concentrations (\(p-n\)) using Poisson’s equation for the perovskite layer, given in (4), and multiplying by q, we get
$$\begin{aligned} \frac{\partial }{\partial x}\left( {j^p}+{j^n}\right) - \frac{\partial }{\partial t}\left( \varepsilon _{\rm A}\frac{\partial ^2 \phi }{\partial x^2}-q(\hat{N_0}-P)\right) = 0. \end{aligned}$$
Applying the time derivative to the last term in the brackets allows us to eliminate \(\hat{N_0}\) (the constant and uniform cation vacancy density) and to use the ion vacancy conservation equation in (3) to make a substitution for the time derivative of P, which gives
$$\begin{aligned} \frac{\partial }{\partial x}\left( {j^p}+{j^n}\right) - \frac{\partial }{\partial t}\left( \varepsilon _{\rm A}\frac{\partial ^2 \phi }{\partial x^2}\right) + q\frac{\partial {{F}^P}}{\partial x} = 0. \end{aligned}$$
Similarly, for the transport layers, we have
$$\begin{aligned}&\frac{\partial {j^n}}{\partial x} - \frac{\partial }{\partial t}\left( \varepsilon _{\rm E}\frac{\partial ^2 \phi }{\partial x^2}\right) = 0, \end{aligned}$$
$$\begin{aligned}&\frac{\partial {j^p}}{\partial x} - \frac{\partial }{\partial t}\left( \varepsilon _{\rm H}\frac{\partial ^2 \phi }{\partial x^2}\right) = 0. \end{aligned}$$
After swapping the order of spatial and temporal differentiation, it is possible to integrate these three equations with respect to the spatial variable x. By integrating and applying the continuity conditions and the Ohmic boundary conditions at either metal contact, we get an expression for the total current density which is independent of x and given by
$$\begin{aligned}&J(t) = \left\{ \begin{array}{ll} {j^n}+{j^p}-\frac{\partial }{\partial t}\left( \varepsilon _{\rm A}\frac{\partial \phi }{\partial x}\right) +q{{F}^P}, &\quad \text {for } 0<x<b, \\ {j^n}-\frac{\partial }{\partial t}\left( \varepsilon _{\rm E}\frac{\partial \phi }{\partial x}\right) , &\quad{\text { for }} -b_{\rm E}<x<0,\\ {j^p}-\frac{\partial }{\partial t}\left( \varepsilon _{\rm H}\frac{\partial \phi }{\partial x}\right) , &\quad {\text { for }} b<x<b+b_{\rm H}. \end{array} \right. \end{aligned}$$

The term involving a time derivative in each equation is the displacement current density. It should be noted that the magnitude of the displacement current density is usually even smaller than the magnitude of the expected numerical error in the solution, see Sect. 6.

3.4 Boundary conditions for open-circuit conditions

It is possible to simulate open-circuit conditions, rather than a fixed voltage protocol, by changing just two of the model equations. The two conditions that describe the application of a fixed potential difference are (7b) and (10b). The model for simulation of a device at open circuit instead includes boundary conditions to ensure that there is zero flux of electrons across the metal/ETL boundary (and hence no photocurrent) and that the values of the electric potential at each contact are equal and opposite. This amounts to imposing, in place of (7b) and (10b),
$$\begin{aligned}&{j^n}|_{x=-{b_{\rm E}}{^-}} = 0,&\phi |_{x=-b_{\rm E}} = -\phi |_{x=b+b_{\rm H}}. \end{aligned}$$

3.5 Non-dimensionalisation

The code is programmed to solve a non-dimensional form of the model equations. Note, however, that all input parameter values are non-dimensionalised automatically and the output is re-dimensionalised prior to output. Details of the non-dimensionalisation are given here to allow the possibility that users can adapt the equations that underlie the model described here. The non-dimensionalisation is given by:
$$\begin{aligned} \begin{array}{ccc} x = b x^*, &{}t = \tau _{\mathrm{ion}}t^*, &{}\phi = V_{\mathrm{T}} \phi ^*, \\ p = d_{\rm H}p^*, &{}n = d_{\rm E}n^*, &{}P = \hat{N_0}P^*, \\ {j^p}= qG_0b{{j^p}}^*, &{}{j^n}=q G_0 b {{j^n}}^*, &{} {{F}^P}= \frac{D_{\mathrm{I}} \hat{N_0}}{b} {{F}^P}^*, \end{array} \end{aligned}$$
where \(G_0\) is a typical value of G (the rate of photogeneration of charge pairs per unit volume) and \(\tau _{\mathrm{ion}}\) is the characteristic timescale for ion motion into the Debye layers, given by
$$\begin{aligned}&G_0=\frac{F^{\mathrm{ph}}}{b}(1-\mathrm {e}^{-\alpha b}),&\tau _{\mathrm{ion}} = \frac{b}{D_{\mathrm{I}}}\sqrt{\frac{V_{\mathrm{T}}\varepsilon _{\rm A}}{q\hat{N_0}}}. \end{aligned}$$
The perovskite (ionic) Debye length is defined as
$$\begin{aligned} L_{\rm D} = \sqrt{\frac{V_{\mathrm{T}}\varepsilon _{\rm A}}{q\hat{N_0}}}. \end{aligned}$$
The other input functions and constants are rescaled as follows:
$$\begin{aligned} \begin{array}{cccc} V = V_{\mathrm{T}}\varPhi , &{}V_{\mathrm{bi}} = V_{\mathrm{T}}\varPhi _{\mathrm{bi}}, &{}G = G_0G^*, \\ R = G_0R^*, &{}\bar{R_{\rm{l}}}= bG_0\bar{R_{\rm{l}}}^*, &{}\bar{R_{\rm{r}}}= bG_0\bar{R_{\rm{r}}}^*, \\ \sigma = \frac{d_{\rm E}}{G_0\tau _{\mathrm{ion}}}, &{}\chi = \frac{d_{\rm H}}{d_{\rm E}}, &{} \kappa _p = \frac{D_pd_{\rm H}}{G_0b^2}, \\ \kappa _n = \frac{D_nd_{\rm E}}{G_0b^2}, &{}\kappa _{\rm E} = \frac{D_{\rm E}\kappa _n}{D_n}, &{}\kappa _{\rm H} = \frac{D_{\rm H}\kappa _p}{D_p}, \\ w_{\rm E} = \frac{b_{\rm E}}{b}, &{}w_{\rm H} = \frac{b_{\rm H}}{b}, &{}r_{\rm E} = \frac{\varepsilon _{\rm E}}{\varepsilon _{\rm A}},\\ r_{\rm H} = \frac{\varepsilon _{\rm H}}{\varepsilon _{\rm A}}, &{}\delta = \frac{d_{\rm E}}{\hat{N_0}}, &{}\lambda = \frac{L_{\rm D}}{b}, \\ \lambda _{\rm E} =\sqrt{ \frac{\varepsilon _{\rm E}\hat{N_0}}{\varepsilon _{\rm A}d_{\rm E}}}\lambda , &{}\lambda _{\rm H} = \sqrt{ \frac{\varepsilon _{\rm H}\hat{N_0}}{\varepsilon _{\rm A}d_{\rm H}}}\lambda . \end{array} \end{aligned}$$

The star notation is dropped in the following sections.

4 Discretisation

The numerical method upon which our code is based was developed by Courtier et al. [6] to solve a simplified model description of a perovskite solar cell in which it was assumed that the transport layers were so highly doped that the potential within them was uniform, thereby reducing the model to equations in the perovskite absorber layer only. In that work, the speed and accuracy of the method are compared against those of two previously used alternatives. It is shown that the method we adopt here is superior to both of these methods for both metrics of performance. Here, we adapt the finite element-based scheme to solve the dimensionless three-layer model set out in the previous section. We do not use the Scharfetter–Gummel scheme [19], commonly used for the solution of drift–diffusion equations, because it is tailored to deal with issues related to charge carrier transport rather than accurately resolving solutions in narrow Debye layers, which is the main difficulty in the present work.

4.1 Spatial grid

The discretisation is formulated on a computational grid comprised of \(N+N_{\rm E}+N_{\rm H}+1\) non-uniformly positioned grid points which partition the (non-dimensional) domain \(x\in [-w_{\rm E},1+w_{\rm H}]\) into \(N+N_{\rm E}+N_{\rm H}\) subintervals. The perovskite layer (including interfaces) contains \(N+1\) grid points denoted by \(x=x_i\) for \(i=0,\ldots ,N\) with subinterval widths denoted by \(\varDelta _{i+1/2}=x_{i+1}-x_{i}\). The transport layer domains (excluding interfaces) contain \(N_{\rm E}\) and \(N_{\rm H}\) grid points, respectively, with grid points denoted by \(x=x^{E}_i\) for \(i=0,\ldots ,N_{\rm E}-1\) and \(x=x^{H}_i\) for \(i=1,\ldots ,N_{\rm H}\), respectively, with corresponding subinterval notation.

It is known that the largest gradients in the solution appear in narrow Debye layers adjacent to the material interfaces [5]. This motivates the use of a grid in which points are concentrated near the domain boundaries and at internal interfaces so that computational resolution is focused there and not wasted where it is not required. One such grid can be created by extending the tanh grid used in [6] to the three-layer cell geometry displayed in Fig. 2. Specifically, we set
$$\begin{aligned}&x_i = \frac{1}{2} \left( \frac{\tanh \left[ s\left( \frac{2i}{N}-1\right) \right] }{\tanh (s)}+1\right) , \\& \qquad \text{ for } i=0,\ldots ,N, \end{aligned}$$
$$\begin{aligned}&x^{E}_i = \frac{w_{\rm E}}{2} \left( \frac{\tanh \left[ s\left( \frac{2i}{N_{\rm E}}-1\right) \right] }{\tanh (s)}-1\right) , \\& \qquad \text{ for } i=0,\ldots ,N_{\rm E}-1, \end{aligned}$$
$$\begin{aligned}&x^{H}_i = 1+\frac{w_{\rm H}}{2} \left( \frac{\tanh \left[ s\left( \frac{2i}{N_{\rm H}}-1\right) \right] }{\tanh (s)}+1\right) , \\& \qquad \text{ for } i=1,\ldots ,N_{\rm H}. \end{aligned}$$
Our numerical experiments indicate that a good rule of thumb for deciding on a judicious choice for the value for s can be to calculate a value which leads to 20% of the grid points falling within one Debye length of each interface within the perovskite layer (i.e. the intervals \(x \in [0,\lambda ]\) and \(x \in [1-\lambda ,1]\)), via numerical solution of
$$\begin{aligned} \lambda = \frac{1}{2} \left( \frac{\tanh \left( 0.6\right) }{\tanh (s)}+1\right) . \end{aligned}$$

The code is set up so that the numbers of grid points \(N_{\rm E}\) and \(N_{\rm H}\) are chosen based on the input parameter N to give approximately equal spacing immediately either side of the interface.

4.2 Finite element scheme

As in [6], we employ a common finite element approach, in which each of the dependent variables is approximated as a linear combination of piecewise linear basis functions with compact support. For a generic dependent variable, \(u\), defined within the perovskite, i.e. for \(x \in (0,1)\), we write
$$u(x,t) = \sum _{i=0}^{i=N} u_i(t) \varphi _i(x)$$
$$\varphi _i(x) = {\left\{\begin{array}{ll} \frac{x-x_{i-1}}{x_i-x_{i-1}} &\quad{} {\text {if }}x \in (x_{i-1},x_i)\\ \frac{x_{i+1} - x}{x_{i+1}-x_i} &\quad{} {\text {if }}x \in (x_{i},x_{i+1}) \\ 0 &\quad{} {\text {if }}x \notin (x_{i-1},x_{i+1}) \end{array}\right. }$$
in which \(\varphi _i(x)\) are referred to as the basis functions. Each of the governing equations of interest can be manipulated into the form
$$\begin{aligned} A \frac{\partial u}{\partial t} = B \frac{\partial }{\partial x} \left( \frac{\partial u}{\partial x} \pm u\frac{\partial \phi }{\partial x} \right) + S(x,t,u,v_1,v_2,v_3), \end{aligned}$$
in which A and B are constants and the function \(S(x,t,u,v_1,v_2,v_3)\) is a source term which depends upon the spatial variable x, the temporal variable t, the generic variable \(u\) and a series of other generic dependent variables \(v_i\) for \(i=1,2,3\). The electron, hole and halide ion vacancy conservation equations, (1), (2) and (3), are rewritten in this form by eliminating the attendant electron or hole current densities, or the halide ion vacancy flux, respectively. Poisson’s equation in the perovskite, (4), is already in this form.
The spatially discretised equations in the perovskite are derived by multiplying (40) through each of the test functions \(\varphi _j(x)\) (for \(j=0,\ldots ,N\)), integrating over the domain \(x \in (0,1)\) (using integration by parts where appropriate) and substituting form (38) for each of the dependent variables. On doing so, we arrive at
$$\begin{aligned}&A \sum _{i=0}^{i=N} \frac{\mathrm {d}u_i}{\mathrm {d}t} \int _0^1 \varphi _i \varphi _j \,\mathrm {d}x \\ & \quad = B \left( \frac{\partial u}{\partial x} \pm u\frac{\partial \phi }{\partial x} \right) \varphi _j \Big |_{x=0}^{x=1} \\ & - B \left\{ \sum _{i=0}^{i=N} u_i \int _0^1 \varphi _i' \varphi _j' \,\mathrm {d}x \right. \\ & \left. \pm \sum _{i=0}^{i=N} \sum _{k=0}^{k=N} u_i \phi _k \int _0^1 \varphi _i \varphi _j' \varphi _k' \,\mathrm {d}x \right\} \\ & + \int _0^1 S(x,t,u,v_1,v_2,v_3) \varphi _j \,\mathrm {d}x. \end{aligned}$$
Each of the integrals containing expressions that depend solely on the basis functions and/or their derivatives can be computed exactly. Likewise, terms containing quantities evaluated on the boundaries \(x=0,1\) can be computed exactly using the continuity conditions (11)–(12), else the relevant equation is replaced by the corresponding Dirichlet condition. The one remaining term that is not so readily computed is the final integral in (41) that depends on the source terms S. For the anion vacancy conservation, \(S\equiv 0\) and so this term is zero. For Poisson’s equation, this term is a linear combination of dependent variables and so can be computed exactly. However, for the electron and hole conservation equations, (2) and (1), the source term comprises both the generation and bulk recombination rates, G(x) and R(np), which are highly nonlinear, see Sect. 3.2. In order that the integral contained in the final term of (41) can be integrated (at least approximately) regardless of the functional form of the source term, we make a further approximation, that is, to replace the dependent variables in the integrand by functions that are piecewise constant over each subinterval, \(x\in (x_i,x_{i+1})\), and have a value equal to that of the full series (38) at the midpoint of that interval. In short, we make the additional approximation
$$\begin{aligned}&\int _0^{1} ( G - R(n,p)) \varphi _j \,\mathrm {d}x \approx \\&{\left\{ \begin{array}{ll} \frac{\varDelta _{j-\frac{1}{2}}}{2} \left( G|_{x=x_{j-\frac{1}{2}}} - R\left( n|_{x=x_{j-\frac{1}{2}}},p|_{x=x_{j-\frac{1}{2}}} \right) \right) \\ + \frac{\varDelta _{j+\frac{1}{2}}}{2} \left( G|_{x=x_{j+\frac{1}{2}}} - R\left( n|_{x=x_{j+\frac{1}{2}}},p|_{x=x_{j+\frac{1}{2}}} \right) \right) , \\ \qquad {\text {if }}j=1,\ldots ,N-1, \\ \frac{\varDelta _{\frac{1}{2}}}{2} \left( G|_{x=x_{\frac{1}{2}}} - R\left( n|_{x=x_{\frac{1}{2}}},p|_{x=x_{\frac{1}{2}}} \right) \right) , \\ \qquad {\text {if }}j=0, \\ \frac{\varDelta _{N-\frac{1}{2}}}{2} \left( G|_{x=x_{N-\frac{1}{2}}} - R\left( n|_{x=x_{N-\frac{1}{2}}},p|_{x=x_{N-\frac{1}{2}}} \right) \right) , \\ \qquad {\text {if }}j=N. \end{array}\right. } \end{aligned}$$

The additional error incurred as a result of this approximation is comparable to the error associated with the original piecewise linear approximation for the dependent variables. Thus, even though some additional error is introduced, the scheme retains its second-order local accuracy, as demonstrated in Sect. 6. We note that this approach to deal with the nonlinear source terms is a special case of the method used in the work of Skeel and Berzins [22], but we emphasise that in contrast to their method, we only use this additional approximation for treatment of the source terms while the rest of the terms are integrated exactly.

An analogous methodology is used to derive the discrete equations in the transport layers. The only difference is that the basis and test functions are piecewise linear functions with compact support defined within the ETL and HTL, respectively.

For notational convenience, we introduce three discrete operators: a difference operator, \(\mathfrak {D}_i\); an interpolation operator, \(\mathfrak {I}_i\); and, a linear operator \(\mathfrak {L}_i\). For a generic dependent variable \(u\), these three operators are defined as follows, in which the midpoint \(x=x_{i+1/2}=x_i/2+x_{i+1}/2\) is halfway between \(x=x_i\) and \(x=x_{i+1}\).
$$\frac{\partial u}{\partial x}\Big |_{x=x_{i+1/2}} \approx \mathfrak {D}_{i+1/2}(u) = \frac{u_{i+1}-u_i}{\varDelta _{i+1/2}},$$
$$\begin{aligned}&u|_{x=x_{i+1/2}} \approx \quad \mathfrak {I}_{i+1/2}(u) = \frac{1}{2}(u_{i+1}+u_i), \end{aligned}$$
$$\begin{aligned}\mathfrak {L}_i(u) &= \frac{1}{6}\varDelta _{i+1/2}u_{i+1}+\frac{1}{3}\left( \varDelta _{i+1/2}+\varDelta _{i-1/2}\right) u_i \\& \quad +\frac{1}{6}\varDelta _{i-1/2}u_{i-1}. \end{aligned}$$
These discrete operators can be used to obtain discretised versions of the ion flux and carrier current densities in the perovskite layer, given in dimensional form in (3b), (2b) and (1b), as follows:
$$\begin{aligned}&{{F}^P}_{i+1/2} =-\left[ \mathfrak {D}_{i+1/2}(P)+\mathfrak {I}_{i+1/2}(P)\mathfrak {D}_{i+1/2}(\phi )\right] , \end{aligned}$$
$$\begin{aligned}&{j^n}_{i+1/2} = \kappa _n\left[ \mathfrak {D}_{i+1/2}(n)-\mathfrak {I}_{i+1/2}(n)\mathfrak {D}_{i+1/2}(\phi )\right] , \end{aligned}$$
$$\begin{aligned}&{j^p}_{i+1/2} = -\kappa _p\left[ \mathfrak {D}_{i+1/2}(p)+\mathfrak {I}_{i+1/2}(p)\mathfrak {D}_{i+1/2}(\phi )\right] . \end{aligned}$$
for \(i=0, \ldots , N-1\). The electron current density in the ETL (\({j^n}^{,E}\)) and hole current density in the HTL (\({j^p}^{,H}\)) can be expressed in an equivalent way.
The carrier generation and bulk recombination terms are approximated to be linear on each interval, and to take the value at the midpoint, hence we define
$$\begin{aligned} G_{i+1/2}&= G(\mathfrak {I}_{i+1/2}(x),t), \end{aligned}$$
$$\begin{aligned} R_{i+1/2}&= R(\mathfrak {I}_{i+1/2}(n),\mathfrak {I}_{i+1/2}(p)). \end{aligned}$$

Perovskite absorber layer

The discretised equations governing the evolution of the halide ion vacancy density subject to no-flux boundary conditions, corresponding to (3), (11c) and (12c), are
$$\begin{aligned}&\varDelta _{1/2}\left[ \frac{1}{3}\frac{\mathrm {d}P_0}{\mathrm {d}t}+\frac{1}{6}\frac{\mathrm {d}P_1}{\mathrm {d}t}\right] = -\lambda {{F}^P}_{1/2} , \end{aligned}$$
$$\begin{aligned}&\mathfrak {L}_i\left( \frac{\mathrm {d}P}{\mathrm {d}t}\right) = -\lambda \left[ {{F}^P}_{i+1/2}-{{F}^P}_{i-1/2}\right] , \qquad \text {for } i=1,\ldots ,N-1, \end{aligned}$$
$$\begin{aligned}&\varDelta _{N-1/2}\left[ \frac{1}{6}\frac{\mathrm {d}P_{N-1}}{\mathrm {d}t}+\frac{1}{3}\frac{\mathrm {d}P_N}{\mathrm {d}t}\right] = \lambda {{F}^P}_{N-1/2}. \end{aligned}$$
The discretisation of Poisson’s equation, from (4), becomes
$$\begin{aligned} &0 = \lambda ^2\left[ \mathfrak {D}_{i+1/2}(\phi )-\mathfrak {D}_{i-1/2}(\phi )\right] +\mathfrak {L}_i(P) -\frac{1}{2}\left[ \varDelta _{i+1/2}+\varDelta _{i-1/2}\right] +&\delta \left[ \chi \mathfrak {L}_i(p)-\mathfrak {L}_i(n)\right] \\ &\quad\text {for} \, \, i=1,\ldots ,N-1. \end{aligned}$$
The conservation equations for the electrons and holes and the carrier current density boundary conditions, corresponding to (1a), (2a), (11b) and (12b), become
$$\begin{aligned}&\sigma \mathfrak {L}_i\left( \frac{\mathrm {d}n}{\mathrm {d}t}\right) = {j^n}_{i+1/2}-{j^n}_{i-1/2} \\&\quad + \frac{\varDelta _{i+1/2}}{2}\left[ G_{i+1/2} - R_{i+1/2}\right] + \frac{\varDelta _{i-1/2}}{2}\left[ G_{i-1/2} - R_{i-1/2}\right] , \\& \qquad \text {for } i=1,\ldots ,N-1, \end{aligned}$$
$$\begin{aligned}&\sigma \varDelta _{N-1/2}\left[ \frac{1}{6}\frac{\mathrm {d}n_{N-1}}{\mathrm {d}t}+\frac{1}{3}\frac{\mathrm {d}n_N}{\mathrm {d}t}\right] = -{j^n}_{N-1/2} \\&\quad + \frac{\varDelta _{N-1/2}}{2}\left[ G_{N-1/2}- R_{N-1/2}\right] -\bar{R_{\rm{r}}}(n_N,p^{H}_0), \end{aligned}$$
$$\begin{aligned}&\sigma \chi \varDelta _{1/2}\left[ \frac{1}{3}\frac{\mathrm {d}p_0}{\mathrm {d}t}+\frac{1}{6}\frac{\mathrm {d}p_1}{\mathrm {d}t}\right] = -{j^p}_{1/2} \\&\quad + \frac{\varDelta _{1/2}}{2}\left[ G_{1/2} - R_{1/2}\right] -\bar{R_{\rm{l}}}(n^{E}_{N_{\rm E}},p_0), \end{aligned}$$
$$\begin{aligned}&\sigma \chi \mathfrak {L}_i\left( \frac{\mathrm {d}p}{\mathrm {d}t}\right) = -{j^p}_{i+1/2}+{j^p}_{i-1/2} \\&\quad + \frac{\varDelta _{i+1/2}}{2}\left[ G_{i+1/2} - R_{i+1/2}\right] + \frac{\varDelta _{i-1/2}}{2}\left[ G_{i-1/2} - R_{i-1/2}\right] , \\& \quad \quad \text {for} \, \, i=1,\ldots ,N-1. \end{aligned}$$

Electron transport layer

The equations and Dirichlet boundary conditions for the electric potential and the electron density in the ETL, from (5a), (6) and (7), become
$$\begin{aligned}&0 = \phi ^{E}_0 - \frac{\varPhi -\varPhi _{\mathrm{bi}}}{2}, \end{aligned}$$
$$\begin{aligned}&0 = \lambda _{\rm E}^2\left[ \mathfrak {D}^{E}_{i+1/2}(\phi ^{E})-\mathfrak {D}^{E}_{i-1/2}(\phi ^{E})\right] \\&\quad +\frac{1}{2}\left[ \varDelta ^{E}_{i+1/2}+\varDelta ^{E}_{i-1/2}\right] -\mathfrak {L}^{E}_i(n^{E}), \quad \text {for } i=1,\ldots ,N_{\rm E}-1, \end{aligned}$$
$$\begin{aligned}&0 = n^{E}_0 - 1, \end{aligned}$$
$$\begin{aligned}&\sigma \mathfrak {L}^{E}_i\left( \frac{\mathrm {d}n^{E}}{\mathrm {d}t}\right) = {j^n}^{,E}_{i+1/2}-{j^n}^{,E}_{i-1/2}, \qquad \text {for} \, \, i=1,\ldots ,N_{\rm E}-1. \end{aligned}$$

Hole transport layer

Similarly, for the electric potential and hole density in the HTL from (8a), (9) and (10),
$$\begin{aligned}0 &= \lambda _{\rm H}^2\left[ \mathfrak {D}^{H}_{i+1/2}(\phi ^{H})-\mathfrak {D}^{H}_{i-1/2}(\phi ^{H})\right] +\mathfrak {L}^{H}_i(p^{H}) \\&\quad -\frac{1}{2}\left[ \varDelta _{i+1/2}+\varDelta _{i-1/2}\right] , \quad \text {for } i=1,\ldots ,N_{\rm H}-1, \end{aligned}$$
$$0 = \phi ^{H}_{N_{\rm H}} + \frac{\varPhi -\varPhi _{\mathrm{bi}}}{2},$$
$$\begin{aligned}&\sigma \chi \mathfrak {L}^{H}_i\left( \frac{\mathrm {d}p^{H}}{\mathrm {d}t}\right) = -\left[ {j^p}^{,H}_{i+1/2}-{j^p}^{,H}_{i-1/2}\right] , \qquad \text {for } i=1,\ldots ,N_{\rm H}-1, \end{aligned}$$
$$0 = p^{H}_{N_{\rm H}}-1.$$

Continuity conditions

The carrier relations and continuity of the potential across the interfaces from (11d, f) and (12d, f) are applied directly as follows:
$$\phi ^{E}_{N_{\rm E}} = \phi _0, \quad k_{\rm E}n^{E}_{N_{\rm E}} = n_0, \quad \phi _N = \phi ^{H}_0, \quad p_N = k_{\rm H}p^{H}_0.$$
The continuity of the displacement field and that of the electric potential across the interfaces, from (11e) and (12e), are ensured via
$$\begin{aligned}&0 = \mathfrak {D}_{1/2}(\phi )-r_{\rm E}\mathfrak {D}^{E}_{N_{\rm E}-1/2}(\phi ^{E}) \\&\quad -\frac{\varDelta _{1/2}}{\lambda ^2}\left( \frac{1}{2}-\frac{P_1}{3}-\frac{P_2}{6}+\delta \left[ \frac{n_1}{3}+\frac{n_2}{6}-\frac{p_1}{3}-\frac{p_2}{6}\right] \right) \\&\quad -r_{\rm E}\frac{\varDelta ^{E}_{N_{\rm E}-1/2}}{\lambda _{\rm E}^2}\left( \frac{n^{E}_{N_{\rm E}-1}}{6}+\frac{n_0}{3k_{\rm E}}-\frac{1}{2}\right) , \end{aligned}$$
$$\begin{aligned}&0 = r_{\rm H}\mathfrak {D}^{H}_{1/2}(\phi ^{H})-\mathfrak {D}_{N-1/2}(\phi ) \\&\quad -\frac{\varDelta _{N-1/2}}{\lambda ^2}\left( \frac{1}{2}-\frac{P_{N-1}}{6}-\frac{P_N}{3}+\delta \left[ \frac{n_{N-1}}{6}+\frac{n_N}{3}-\frac{p_{N-1}}{6}-\frac{p_N}{3}\right] \right) \\&\quad -r_{\rm H}\frac{\varDelta ^{H}_{1/2}}{\lambda _{\rm H}^2}\left( \frac{1}{2}-\frac{p_N}{3k_{\rm H}}-\frac{p^{H}_1}{6}\right) . \end{aligned}$$
Interface recombination is included in the equations for the continuity of carrier current densities, corresponding to (11a) and (12a), as follows:
$$\begin{aligned}&\sigma \left( \frac{1}{6}\varDelta ^{E}_{N_{\rm E}-1/2}\frac{\mathrm {d}n^{E}_{N_{\rm E}-1}}{\mathrm {d}t}+\frac{1}{3}\left( \frac{\varDelta ^{E}_{N_{\rm E}-1/2}}{k_{\rm E}}+\varDelta _{1/2}\right) \frac{\mathrm {d}n_0}{\mathrm {d}t}+\frac{1}{6}\varDelta _{1/2}\frac{\mathrm {d}n_1}{\mathrm {d}t}\right) \\&\quad = -\left[ {j^n}^{,E}_{N_{\rm E}-1/2}-{j^n}_{1/2}\right] \\ &\quad \quad + \frac{\varDelta _{1/2}}{2}\left[ G_{1/2} - R_{1/2}\right] -\bar{R_{\rm{l}}}(n^{E}_{N_{\rm E}},p_0), \end{aligned}$$
$$\begin{aligned}&\sigma \chi \left( \frac{1}{6}\varDelta _{N-1/2}\frac{\mathrm {d}p_{N-1}}{\mathrm {d}t}+\frac{1}{3}\left( \varDelta _{N-1/2}+\frac{\varDelta ^{H}_{1/2}}{k_{\rm H}}\right) \frac{\mathrm {d}p_N}{\mathrm {d}t}+\frac{1}{6}\varDelta ^{H}_{1/2}\frac{\mathrm {d}p^{H}_1}{\mathrm {d}t}\right) \\& \quad = {j^p}_{N-1/2}-{j^p}^{,H}_{1/2} \\&\quad \quad+ \frac{\varDelta _{N-1/2}}{2}\left[ G_{N-1/2} - R_{N-1/2}\right] -\bar{R_{\rm{r}}}(n_N,p^{H}_0). \end{aligned}$$

4.3 Boundary conditions for modelling open-circuit conditions

In order to simulate open-circuit conditions using the alternative boundary conditions given in (29), we simply replace (59) and (64) by
$$\begin{aligned}&\sigma \varDelta ^{E}_{1/2}\left[ \frac{1}{3}\frac{\mathrm {d}n^{E}_0}{\mathrm {d}t}+\frac{1}{6}\frac{\mathrm {d}n^{E}_1}{\mathrm {d}t}\right] = {j^n}^{,E}_{1/2}, \end{aligned}$$
$$\begin{aligned}&0 = \phi ^{E}_1+\phi ^{H}_{N_{\rm H}}. \end{aligned}$$

5 Implementation

In this section, we outline the steps performed by the code. We begin by describing the procedure that is used to integrate forward in time. Next, we outline how the parameters, operating protocol and initial conditions are set. Finally, we outline how IonMonger post-processes the results so that quantities of interest, e.g. the dimensional current output, can be extracted and visualised.

5.1 Integration in time using MATLAB’s ode15s

The system of differential algebraic equations formulated in Sect. 4.2 is evolved forward in time using MATLAB’s ode15s [20, 21]. A prerequisite for leveraging this algorithm is assembling the state variables into a column vector, \(\mathbf {u}(t)\). A significant decrease in computational cost (proportional to the length of \(\mathbf {u}(t)\) squared) is available if the size of \(\mathbf {u}(t)\) can be reduced, and so we eliminate superfluous variables, namely \({{F}^P}\)\({j^n}\), \({j^p}\) and E between equations (46)–(73) before assembling the \(4N+2N_{\rm E}+2N_{\rm H}+4\) remaining unknown functions of time, into the column vector \(\mathbf {u}(t)\) as follows:
$$\begin{aligned} \mathbf {u}(t) =&\left[ P_{0}, \cdots , P_{N}, \phi _0, \cdots , \phi _N, \right. \\& n_0, \cdots , n_N, p_0, \cdots , p_N, \\& \phi ^{E}_0,\cdots ,\phi ^{E}_{N_{\rm E}-1}, n^{E}_0, \cdots , n^{E}_{N_{\rm E}-1}, \\& \left. \phi ^{H}_1, \cdots , \phi ^{H}_{N_{\rm H}}, p^{H}_1, \cdots , p^{H}_{N_{\rm H}} \right] ^{\text {T}} \end{aligned}$$
$$\begin{aligned} =&\left[ \mathbf {P}(t)^{\text {T}} \, \, \varvec{\Phi }(t)^{\text {T}} \, \, \mathbf {n}(t)^{\text {T}} \, \, \mathbf {p}(t)^{\text {T}} \, \, \right. \\& \left. \varvec{\Phi }^{E}(t)^{\text {T}} \, \, \mathbf {n}^{E}(t)^{\text {T}} \, \,\varvec{\Phi }^{H}(t)^{\text {T}} \, \, \mathbf {p}^{H}(t)^{\text {T}} \right] ^{\text {T}}, \end{aligned}$$
where a superscript T denotes a transpose. In (75), \(\mathbf {P}\), \(\varvec{\Phi }\), \(\mathbf {n}\) and \(\mathbf {p}\) are column vectors of length \(N+1\); \(\varvec{\Phi }^{E}\) and \(\mathbf {n}^{E}\) are column vectors of length \(N_{\rm E}\); and \(\varvec{\Phi }^{H}\) and \(\mathbf {p}^{H}\) are column vectors of length \(N_{\rm H}\). The problem to be solved can now be written in the form
$$\begin{aligned} \mathbf {M}\frac{\mathrm {d}\mathbf {u}}{\mathrm {d}t} = \mathbf {f}(\mathbf {u}) \quad \text {with} \quad \mathbf {u}|_{t=0}=\mathbf {u}_0, \end{aligned}$$
in which \(\mathbf {f}(\mathbf {u})\) is a nonlinear vector function of length \(4N+2N_{\rm E}+2N_{\rm H}+4\) whose entries are the right-hand sides of (51)–(71) and \({\mathbf {M}}\) is a singular diagonal mass matrix whose entries are the coefficients of the time derivative terms in the same equations.

Another useful strategy for speeding up computations, and one that we make use of in IonMonger, is to exploit ode15s’s jpattern option. This facilitates additional savings in computational cost by specifying entries in the Jacobian of the vector function \(\mathbf {f}\) which are known to always equal zero a priori, thereby preventing the algorithm from having to numerically approximate their value as the integration in time proceeds. The function Jac creates a sparse matrix that indicates which entries of the Jacobian need to be numerically approximated at each time step and which are always equal to zero.

5.2 Parameter input and initial conditions

The necessary dimensional parameters, the illumination protocol G(xt), voltage protocol V(t) and solver options are passed between functions in a MATLAB structure called params. A params structure can most easily be created using the script called parameters.m.

Finding initial conditions which satisfy the requisite boundary conditions is non-trivial. In the code, we opt to supply initial conditions that correspond to a device which has been left to reach a quasi-equilibrium with the applied voltage held equal to either a fixed value or the open-circuit voltage such that there is no output current from the cell. In either case, the task of finding initial conditions amounts to finding a valid steady-state solution to the PSC model and we start by finding initial conditions corresponding to when the applied voltage is set equal to the built-in voltage, as defined in (17). This task is tackled by the function initial_conditions.m. In order to start the simulation protocol from a different value of the applied voltage or from open-circuit conditions, an additional call is then made to either precondition.m or find_Voc.m, respectively. All three of these routines find discrete representations of the (dimensionless) initial conditions which can be written as
$$\begin{aligned}&P|_{t=0} = \hat{P}(x), \quad {\text { for }}\,\, 0\le x\le 1, \end{aligned}$$
$$\begin{aligned}&\phi |_{t=0} = \hat{\phi }(x), \quad {\text { for }}\,\, -w_{\rm E}\le x\le 1+w_{\rm H}, \end{aligned}$$
$$\begin{aligned}&n|_{t=0} = \hat{n}(x),\quad {\text { for }}\,\, -w_{\rm E}\le x \le 1, \end{aligned}$$
$$\begin{aligned}&p|_{t=0} = \hat{p}(x),\quad {\text { for }}\,\, 0\le x \le 1+w_{\rm H}, \end{aligned}$$
where the initial profiles \(\hat{P}(x)\), \(\hat{\phi }(x)\), \(\hat{n}(x)\) and \(\hat{p}(x)\) satisfy (up to numerical tolerances) the discrete counterpart of the steady-state PDEs. This is achieved by invoking MATLAB’s root-finding tools (i.e. fsolve) which act on the nonlinear system \(\mathbf {f}(\mathbf {u})=\mathbf{0}\), defined in (76), with one minor alteration. An additional integral constraint, namely \(\int _0^1 P\,\mathrm {d}x = 1\), is imposed to ensure that the overall number of anion vacancies is maintained within the perovskite. In order to preserve the system as a square system, we therefore replace the last anion vacancy conservation equation (53) in the nonlinear system \(\mathbf {f}(\mathbf {u})=\mathbf{0}\) with the equation
$$\begin{aligned} \sum _{i=0}^{i=N-1} \mathfrak {I}_{i+1/2}(P) \varDelta _{i+1/2} = 1. \end{aligned}$$

We note that in the original PDE setting, the electric potential, \(\phi\), satisfies an elliptic equation, namely Poisson’s equation, and therefore does not require an initial condition, since the initial potential is uniquely defined by the initial densities. After spatial discretisation, Poisson’s equation is translated into a set of algebraic equations, see (54), (60) and (63), and as such, one would not expect initial conditions on the electric potential to be required. However, it is a requirement of ode15s that initial conditions for all components of a DAE system are specified. It is this feature of the integrator that requires us to find and specify the initial potential profile \(\hat{\phi }(x)\); this profile is chosen to satisfy the algebraic equations derived from the discretisation of Poisson’s equation, and its boundary conditions, into which the initial conditions for P, n and p have been substituted.

5.3 Calculation of current densities and output

In order to calculate the total (dimensionless) current density J(t) from the dimensionless solution generated by IonMonger, from (28), we use
$$\begin{aligned}J(t) &= {j^n}_{k+1/2}+{j^p}_{k+1/2} \\&\quad - \frac{\varepsilon _{\rm A}V_{\mathrm{T}}}{\hat{t}qG_0b^2\tau _{\mathrm{ion}}}\left( \frac{\phi _{k+1}-\phi _k}{\varDelta _{k+1/2}}\bigg |_{t}-\frac{\phi _{k+1}-\phi _k}{\varDelta _{k+1/2}}\bigg |_{t-\hat{t}}\right) \\&\quad +\frac{D_{\mathrm{I}}\hat{N_0}}{G_0b^2}{{F}^P}_{k+1/2}, \end{aligned}$$
where \(k = \text {ceil}\left( \frac{N+1}{2}\right)\) is the index of the grid point at (or nearest to) the midpoint of the perovskite layer and \(\hat{t}\) denotes the time since the previous time point. The quantities denoted by \({j^n}_{k+1/2}\), \({j^p}_{k+1/2}\) and \({{F}^P}_{k+1/2}\) are defined in (47), (48) and (46), respectively. Note that the contributions from the third and fourth terms are usually negligibly small in comparison with the sum of the first two terms.
In addition to the total current density, the (dimensionless) current density losses due to interface recombination (\(J_{\rm{l}}\) and \(J_{\rm{r}}\)) are calculated prior to re-dimensionalisation as follows:
$$\begin{aligned}&J_{\rm{l}}(t) = -\bar{R_{\rm{l}}}\left( \frac{n_1}{k_{\rm E}},p_1\right) , \end{aligned}$$
$$\begin{aligned}&J_{\rm{r}}(t) = -\bar{R_{\rm{r}}}\left( n_N,\frac{p_N}{k_{\rm H}}\right) . \end{aligned}$$

The final steps of the solution procedure carried out by IonMonger are to re-dimensionalise (see Sect. 3.5) and then save the solution variables (\(\mathbf {P}\), \(\varvec{\Phi }\), \(\mathbf {n}\), \(\mathbf {p}\), \(\varvec{\Phi }^{E}\), \(\mathbf {n}^{E}\), \(\varvec{\Phi }^{H}\) and \(\mathbf {p}^{H}\)), spatial vectors (\(\mathbf {x}\), xE and xH), time (time), evolution of the applied voltage (V) and evolution of the current densities defined above (\(\mathbf {J}\), \(\mathbf {J_{\rm{l}}}\) and \(\mathbf {J_{\rm{r}}}\)). These data are saved into a .mat data file along with the input structure (params).

The saved data can be further analysed and plotted in MATLAB in any way chosen by the user. One example plotting script is included in the IonMonger GitHub repository, and instructions for its use are given in the GUIDE. This script can be used to plot the current density generated by a PSC during the reverse and forward scans of a \(J\)\(V\) curve, alongside the current losses due to recombination at each of the perovskite/transport layer interfaces, as shown in Fig. 1a. Such a plot can enable the user to identify the limiting recombination mechanism for a particular set of input parameters as described in Sect. 2.

6 Validation

Fig. 3

a A measure of the error in each of eight solution variables (listed in the legend) for five simulations versus the number of grid points in the domain on a logarithmic scale. Dotted lines show the expected rate of convergence aligned to the rightmost data point. b The computation time for each of the same five simulations versus the number of grid points on a logarithmic scale. Here, a dotted line is shown as a guide for the eye. For each of the five simulations performed for both panels a and b, the input parameter N equals 100, 200, 400, 800 and 1600, while the other parameters are identical to those used for Fig. 1a (for which \(N=400\)). The number of grid points is equal to \(N+N_{\rm E}+N_{\rm H}+1\) where \(N_{\rm E}\) and \(N_{\rm H}\) are automatically computed from N (see Sect. 4.1) (Color figure online)

For the purpose of verifying the results generated by IonMonger, in Fig. 3a, we plot a measure of the error in eight different solution variables against the number of grid points (\(N+N_{\rm E}+N_{\rm H}+1\)) on a logarithmic scale for five example simulations. The only input parameter that is varied between the five simulations is N, which takes values of 100, 200, 400, 800 and 1600, while all other input parameters are the same as those used for Fig. 1. Due to the lack of an exact solution, the errors are calculated with respect to another simulation performed on an even finer spatial grid consisting of 5613 points (for which the input parameter N is set equal to 3200). The chosen error measure is the sum (an \(l_1\) norm) of the differences between the value of the variable computed by the example simulation and that computed by the 5613-point simulation, averaged over all 300 time points of the simulation protocol after \(t=0\). The same error measure was used in [6] to compare the same solution method applied to a single-layer version of the model against two other methods on different spatial grids. Here, the eight solution variables for which the error is calculated are the (dimensionless) ion vacancy density, electric potential, electron concentration and hole concentration at the ETL/perovskite and perovskite/HTL interfaces located at \(x=0\) and \(x=1\), respectively, as listed in the legend. The results demonstrate the expected second-order pointwise convergence of the finite element scheme on which IonMonger is based [6]. The variation in the magnitude of the error between the eight solution variables is due to differences in the magnitude of the dimensionless variables themselves.

Figure 3b shows the computation times associated with each of the five simulations in panel (a), also plotted against the number of grid points on a logarithmic scale. Note that the computation time will also depend upon the length of the simulation protocol. The temporal tolerances for the integration in time performed by MATLAB’s ode15s were fixed for all simulations at values of \(10^{-6}\) for the relative tolerance and \(10^{-10}\) for the absolute tolerance.

A comprehensive verification of the single-layer finite element scheme, from which this code was developed, is provided in Sections 5 and 6 of [6]. This work includes plots of each solution variable across the perovskite layer against corresponding asymptotic results, which show very good agreement between the two approaches for realistic values of the input parameters.

6.1 Comparison to asymptotic results

Further validation of the numerical scheme, against results obtained using an alternative (although approximate) solution method, is given in Fig. 4. Here, we compare the simulation results for the typical \(J\)\(V\) measurement displayed in Fig. 1 to the equivalent quantities computed using a combined asymptotic/numerical method. This alternative method is described in detail for a single-layer model in [5] and has been used to explain trends in experimental observations in [4]. Excellent agreement is shown between the current densities computed using the two methods.
Fig. 4

A comparison between the current density calculated using the IonMonger code (purple lines) and an alternative, combined asymptotic/numerical method from [4, 5] (green circles) for the same simulation of a \(J\)\(V\) measurement as shown in Fig. 1 (Color figure online)

7 Conclusions

We have built a fast and robust numerical solver for coupled ionic–electronic charge transport in a realistic three-layer perovskite solar cell architecture. The scheme is able to simulate a variety of relevant device operating regimes, including current–voltage sweeps and open-circuit transients, both with the possibility of having time-dependent illumination. Simulations of this sort can be carried out in seconds to minutes of computation time on a standard modern personal computer. The only prerequisite for making use of this tool is access to MATLAB and its suite of routines for time integration of ordinary differential equations, specifically the ode15s routine.

This work therefore provides a tool that is capable of playing a major role in guiding the development of perovskite solar cells. Our IonMonger code provides the possibility of independently varying each of the device parameters, so that their roles in determining cell performance can be discerned, something that is difficult, or even impossible, to achieve experimentally. One area of particular practical interest is understanding what can be done to mitigate the amount of parasitic recombination in PSCs, thereby further improving their performance. As demonstrated in [4], it is possible to suppress these losses via careful tuning of the cell’s constituent material properties, and we anticipate that further studies in the same spirit will be made possible using the computational tool provided here. A second area where such a simulation tool is surely needed is in understanding the long-term degradation processes that occur within PSCs on timescales of between hours and weeks. While the current version of the code cannot simulate degradation, it can be used to predict the effects of different device parameters on some of the proposed causes of degradation. For example, degradation due to chemical reactions at the perovskite/transport layer interfaces [3] is likely to be exacerbated by iodide ion accumulation in the Debye layers, while degradation due to the penetration of extrinsic ions, e.g. oxygen, into the perovskite may be enhanced by an accumulation of ion vacancies [1]. The development of IonMonger to include additional physical processes that occur on longer timescales would allow researchers to investigate long-term behaviour and stability much more quickly than is possible via experimentation, and hence it will be the subject of future work.

The authors are committed to maintaining and expanding the functionality of the code, and any updates will be hosted on the GitHub repository which can be accessed at While we cannot promise a high level of technical support to all users, we are happy to receive any suggestions on ways in which the features of the code can be improved and/or expanded, and it is our intention that the code will grow as the research priorities of the perovskite community evolve. Contact details for current code developers can be found in the README file in the main folder of the IonMonger GitHub repository.


  1. 1.

    The simulations in [4] are based on the same mathematical model as described in this work; however, the definitions of the constants of proportionality \(k_{\rm E}\) and \(k_{\rm H}\) and the built-in voltage \(V_{\mathrm{bi}}\) vary between the two works; the definitions in this work are compatible with Boltzmann statistics for non-degenerate semiconductors, see (13)–(17).



NEC and JMC were supported by EPSRC-funded studentships from the CDT in New and Sustainable Photovoltaics (with reference EP/L01551X/1). NEC was subsequently supported by an EPSRC Doctoral Prize (Ref. EP/R513325/1). NEC would like to thank Dr. Sam Mangham from the University of Southampton’s Research Software Group for his advice on sustainable code design.

Supplementary material

10825_2019_1396_MOESM1_ESM.pdf (162 kb)
Supplementary material 1 (pdf 163 KB)


  1. 1.
    Aristidou, N., Eames, C., Sanchez-Molina, I., Bu, X., Kosco, J., Islam, M., Haque, S.A.: Fast oxygen diffusion and iodide defects mediate oxygen-induced degradation of perovskite solar cells. Nat. Commun. 8, 15218 (2017)CrossRefGoogle Scholar
  2. 2.
    Calado, P., Telford, A.M., Bryant, D., Li, X., Nelson, J., O’Regan, B.C., Barnes, P.R.F.: Evidence for ion migration in hybrid perovskite solar cells with minimal hysteresis. Nat. Commun. 7, 13831 (2016)CrossRefGoogle Scholar
  3. 3.
    Carrillo, J., Guerrero, A., Rahimnejad, S., Almora, O., Zarazua, I., Mas-Marza, E., Bisquert, J., Garcia-Belmonte, G.: Ionic reactivity at contacts and aging of methylammonium lead triiodide perovskite solar cells. Adv. Energy Mater. (2016). Google Scholar
  4. 4.
    Courtier, N.E., Cave, J.M., Foster, J.M., Walker, A.B., Richardson, G.: How transport layer properties affect perovskite solar cell performance: insights from a coupled charge transport/ion migration model. Energy Environ. Sci. Adv. 12(1), 396–409 (2019)CrossRefGoogle Scholar
  5. 5.
    Courtier, N.E., Foster, J.M., O’Kane, S.E.J., Walker, A.B., Richardson, G.: Systematic derivation of a surface polarisation model for planar perovskite solar cells. Eur. J. Appl. Math. 30, 427–457 (2019)MathSciNetCrossRefGoogle Scholar
  6. 6.
    Courtier, N.E., Richardson, G., Foster, J.M.: A fast and robust numerical scheme for solving models of charge carrier transport and ion vacancy motion in perovskite solar cells. Appl. Math. Model. 63, 329–348 (2018)MathSciNetCrossRefGoogle Scholar
  7. 7.
    de Quilettes, D.W., Zhang, W., Burlakov, V.M., Graham, D.J., Leijtens, T., Osherov, A., Bulović, V., Snaith, H.J., Ginger, D.S., Stranks, S.D.: Photo-induced halide redistribution in organic–inorganic perovskite films. Nat. Commun. 7, 11683 (2016)CrossRefGoogle Scholar
  8. 8.
    Eames, C., Frost, J.M., Barnes, P.R.F., O’Regan, B.C., Walsh, A., Islam, M.S.: Ionic transport in hybrid lead iodide perovskite solar cells. Nat. Commun. 6, 7497 (2015)CrossRefGoogle Scholar
  9. 9.
    Egger, D.A., Bera, A., Cahen, D., Hodes, G., Kirchartz, T., Kronik, L., Lovrincic, R., Rappe, A.M., Reichman, D.R., Yaffe, O.: What remains unexplained about the properties of halide perovskites? Adv. Mater. 30, 1–11 (2018)CrossRefGoogle Scholar
  10. 10.
    Fell, A., Schön, J., Schubert, M.C., Glunz, S.W.: The concept of skins for silicon solar cell modeling. Sol. Energy Mater. Sol. Cells 173, 128–133 (2017)CrossRefGoogle Scholar
  11. 11.
    Foster, J.M., Snaith, H.J., Leijtens, T., Richardson, G.: A model for the operation of perovskite based hybrid solar cells: formulation, analysis, and comparison to experiment. SIAM J. Appl. Math. 74, 1935–1966 (2014)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Idígoras, J., Contreras-Bernal, L., Cave, J.M., Courtier, N.E., Barranco, A., Borras, A., Sánchez-Valencia, J.R., Anta, J.A., Walker, A.B.: The role of surface recombination on the performance of perovskite solar cells: effect of morphology and crystalline phase of TiO2 contact. Adv. Mater. Interfaces 5(21), 1801076 (2018). CrossRefGoogle Scholar
  13. 13.
    Jacobs, D.A., Shen, H., Pfeffer, F., Peng, J., White, T.P., Beck, F.J., Catchpole, K.R.: The two faces of capacitance: new interpretations for electrical impedance measurements of perovskite solar cells and their relation to hysteresis. J. Appl. Phys. 124, 225702 (2018)CrossRefGoogle Scholar
  14. 14.
    MATLAB version (R2017b) (2017)Google Scholar
  15. 15.
    National Renewable Energy Laboratory (NREL) research cell record efficiency chart. (2018). Accessed 17 June 2019
  16. 16.
    Nelson, J.: The Physics of Solar Cells. Imperial College Press, London (2003)CrossRefGoogle Scholar
  17. 17.
    Phung, N., Abate, A.: The impact of nano- and microstructure on the stability of perovskite solar cells. Small 14, 1–11 (2018)CrossRefGoogle Scholar
  18. 18.
    Richardson, G., O’Kane, S.E.J., Niemann, R.G., Peltola, T.A., Foster, J.M., Cameron, P.J., Walker, A.B.: Can slow-moving ions explain hysteresis in the current–voltage curves of perovskite solar cells? Energy Environ. Sci. 9, 1476–1485 (2016)CrossRefGoogle Scholar
  19. 19.
    Scharfetter, D.L., Gummel, H.K.: Large-signal analysis of a silicon read diode oscillator. IEEE Trans. Electron. Devices 16, 64–77 (1969)CrossRefGoogle Scholar
  20. 20.
    Shampine, L.F., Reichelt, M.W.: The MATLAB ODE suite. SIAM J. Sci. Comput. 18, 1–22 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Shampine, L.F., Reichelt, M.W., Kierzenka, J.A.: Solving index-1 DAEs in MATLAB and Simulink. SIAM Rev. 41, 538–552 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 22.
    Skeel, R.D., Berzins, M.: A method for the spatial discretization of parabolic equations in one space variable. SIAM J. Sci. Stat. Comput. 11, 1–32 (1990)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Snaith, H.J.: Present status and future prospects of perovskite photovoltaics. Nat. Mater. 17, 372–376 (2018)CrossRefGoogle Scholar
  24. 24.
    Snaith, H.J., Abate, A., Ball, J.M., Eperon, G.E., Leijtens, T.C., Noel, N.K., Stranks, S.D., Wang, J.T.-W., Wojciechowski, K., Zhang, W.: Anomalous hysteresis in perovskite solar cells. J. Phys. Chem. Lett. 5, 1511–1515 (2014)CrossRefGoogle Scholar
  25. 25.
    van Reenen, S., Kemerink, M., Snaith, H.J.: Modeling anomalous hysteresis in perovskite solar cells. J. Phys. Chem. Lett. 6, 3808–3814 (2015)CrossRefGoogle Scholar
  26. 26.
    Walsh, A., Scanlon, D.O., Chen, S., Gong, X.G., Wei, S.-H.: Self-regulation mechanism for charged point defects in hybrid halide perovskites. Angew. Chem. Int. Ed. 54, 1791–1794 (2015)CrossRefGoogle Scholar
  27. 27.
    Walter, D., Fell, A., Wu, Y., Duong, T., Barugkin, C., Wu, N., White, T.P., Weber, K.: Transient photovoltage in perovskite solar cells: interaction of trap-mediated recombination and migration of multiple ionic species. J. Phys. Chem. C 122, 11270–11281 (2018)CrossRefGoogle Scholar

Copyright information

© The Author(s) 2019

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  1. 1.Mathematical SciencesUniversity of SouthamptonSouthamptonUK
  2. 2.Department of PhysicsUniversity of BathBathUK
  3. 3.School of Mathematics and PhysicsUniversity of PortsmouthPortsmouthUK

Personalised recommendations