1 Introduction
Photoelectrochemical studies in dye-sensitized solar cells (DSSCs) have remained vibrant since their officially recognized introduction in O’Regan and Grätzel’s seminal paper [Reference Oldham and Spanier34]. DSSCs relieve traditional solar cell designs of their dependence on high-purity semiconductors such as silicon, opting instead for the significantly cheaper titanium dioxide ( $\text {TiO}_2$ ). Typically, DSSCs utilize four primary components to generate sunlight: a photosensitive dye, a nanoporous semiconductor, a counter electrode and an electrolyte couple [Reference Oldham and Spanier34].
Sunlight excites the dye molecules, which inject electrons to the nanoporous semiconductor. Injected electrons are sent to power a load and are reintroduced into the DSSC via the counter electrode. Finally, the electrolyte couple transfers electrons from the counter electrode back to the photosensitive dye by a pair of redox reactions.
DSSCs are liable to suffer recombination effects. Injected electrons may be absorbed by the dye or regenerate the electrolyte couple instead of powering the load, which reduces the overall effectiveness of the device. Figure 1 shows a DSSC in operation, denoting the processes encouraging electricity generation by green arrows and recombination by red arrows [Reference Maldon and Thamwattana28].
Södergren et al. [Reference Södergren, Hagfeldt, Olsson and Lindquist36] pioneered diffusion-based mathematical modelling for DSSCs, using the electron density to calculate the current–voltage relationship and the efficiency of a given DSSC. Cao et al. [Reference Cao, Oskam, Meyer and Searson7] augmented the diffusion model with time dependence and introduced nonlinear diffusivity to capture the role of trap states in the $\text {TiO}_2$ network, which was studied further by Anta et al. [Reference Anta, Casanueva and Oskam2] and Maldon et al. [Reference Maldon, Lamichhane, Thamwattana, Lamichhane, Tran and Bunder25].
Nigmatullin [Reference Nigmatullin33] proposed one of the first fractional diffusion models to study the influence of the fractal geometry of a material on its diffusion processes (particularly, the transfer equation for particles in a porous medium). Nelson [Reference Nelson31] and Benkstein et al. [Reference Benkstein, Kopidakis, van de Lagemaat and Frank5] explored the electron diffusion process on $\text {TiO}_2$ , with the latter motivated by its effect on DSSCs. Benkstein et al. [Reference Benkstein, Kopidakis, van de Lagemaat and Frank5] established a critical link between the porosity of the $\text {TiO}_2$ , its resultant fractal geometry and the electron transport in $\text {TiO}_2$ with continuous-time random walk (CTRW) simulations. Henry and Wearne [Reference Henry and Wearne18] developed a sub-diffusion equation based on CTRW simulations to create a novel fractional partial differential equation (FPDE), from which Maldon and Thamwattana [Reference Maldon, Lamichhane and Thamwattana27] derived a new fractional diffusion equation for DSSCs that accounted for the fractal geometry of the $\text {TiO}_2$ semiconductor.
Fractional diffusion equations are well posed and special cases of pure diffusion also possess analytical solutions [Reference Luchko23]. Chen et al. [Reference Chen, Meerschaert and Nane9] used separation of variables to analytically solve the time-fractional heat equation on a bounded spatial domain. Tomovski and Sandev [Reference Tomovski and Sandev38] analytically solved the generalized time-fractional diffusion equation under a variety of boundary conditions.
Laplace transform methods remain a popular method for numerically solving FPDEs, as fractional derivatives are well suited for Laplace transformation [Reference Campos and Huet6]. Duan et al. [Reference Duan, Fu and Wang11] also used Laplace transform methods to numerically solve fractional diffusion-wave equations.
Spline collocation methods are also commonly employed to numerically solve fractional diffusion problems. Maldon et al. [Reference Maldon, Thamwattana and Edwards26] provided numerical solutions with a cubic B-spline method to discretize space and an implicit finite-difference method to discretize time. El Danaf [Reference El Danaf12] used spline functions to numerically solve the time-fractional and space-fractional diffusion equation on a bounded interval under Dirichlet boundary conditions. Zahra and Elkholy [Reference Zahra and Elkholy41] applied cubic B-splines to numerically solve a fractional ordinary differential equation which was used to model fluid flow.
In this paper, we numerically solve a fractional diffusion model. We discretize space with a finite-difference method and a finite-element method and discretize time using an implicit finite-difference method. To elucidate the effectiveness of each scheme, we estimate the numerical errors by comparison to a fine grid solution to serve as a pseudo-analytical solution.
2 Mathematical model
Given a DSSC of thickness d, the electron density $n(x, t)$ at position $x \in [0, d]$ and time $t \geq 0$ satisfies the FPDE [Reference Maldon, Lamichhane and Thamwattana27]
where $D_{0}$ is the diffusion coefficient, $\gamma $ is the exponent in the mean-square displacement of the CTRW simulation of the semiconductor, $\varphi $ is the incident photon flux, $\alpha $ is the dye absorption coefficient, $k_R$ is the recombination constant and $n_{\text {eq}}$ is the dark equilibrium electron density. Equation (2.1) is subject to the boundary conditions
where q is the electron charge, $V_B$ is the bias voltage, $m_I$ is the diode ideality factor, $k_B$ is Boltzmann’s constant [Reference Anta, Idígoras, Guillén, Villanueva-Cab, Mandujano-Ramirez, Oskam, Pellejá and Palomares3] and T is the temperature of the DSSC.
We note that under the special case $\gamma = 1$ , we recover the standard linear diffusion model studied by Maldon et al. [Reference Maldon, Lamichhane, Thamwattana, Lamichhane, Tran and Bunder25], as the mean-square displacement in CTRW simulations is usually proportional to time [Reference Henry and Wearne18]. Given that the exponents $\beta $ in the mean-square displacement (studied by Benkstein et al. [Reference Benkstein, Kopidakis, van de Lagemaat and Frank5]) lie in the range $0 < \beta \leq 0.5$ , this model only considers sub-diffusion ( $0 < \gamma \leq 1$ ). Lower values of $\gamma $ result in fewer electron jumps, which consequently slows the diffusion process [Reference Benkstein, Kopidakis, van de Lagemaat and Frank5].
In this paper, we employ the Caputo fractional derivative [Reference Caputo8] for its easy adoption of traditional boundary conditions [Reference Garrappa, Kaslik and Popolizio15, Reference Maldon, Lamichhane and Thamwattana27]. Langlands et al. [Reference Langlands, Henry and Wearne20] noted that the use of the Riemann–Liouville fractional derivative leads to an FPDE that is not positivity preserving (see also the article by Baeumer et al. [Reference Baeumer, Kovács, Meerschaert and Sankaranarayanan4]). Without a spatially dependent source term, Langlands et al. [Reference Langlands, Henry and Wearne20] suggested the alternative FPDE
where k is the reaction coefficient. For other fractional reaction–diffusion equations featuring the Riemann–Liouville derivative and the influence of chemical reactions, we refer the reader to the work of Méndez et al. [Reference Méndez, Fedotov and Horsthemke30, Section 3.4]. We also refer the reader to the paper by Meerschaert and Sikorskii [Reference Meerschaert and Sikorskii29, Ch. 7] for the Langlands model, which is another model to study CTRW motion.
The diode equation is commonly used to compute the current–density relationship for solar cells, in which the current J as a function of bias voltage $V_{B}$ is given by [Reference Södergren, Hagfeldt, Olsson and Lindquist36]
where $J_{0}$ is the dark saturation current density, given by
To compute the short-circuit current density $J_{\text {sc}}$ , we use
noting that the usual electron flux is recovered in the linear diffusion special case $\gamma = 1$ .
Given that the open-circuit voltage $V_{\text {oc}}$ satisfies $J(V_{\text {oc}}) = 0$ , we may compute the open-circuit voltage with
Maximizing the power output $P(V_{B}) = V_{B}J(V_{B})$ over $V_{B}$ , we obtain the maximum power point $V_{\max }$ by
where W is the Lambert W-function [Reference Maldon, Lamichhane and Thamwattana27] and $J_{\max } = J(V_{\max })$ . With $P_{\max } = V_{\max }J_{\max }$ , we compute the efficiency $\eta $ of the DSSC by
where $P_{i}$ is the power of incident light.
In this paper, we use parameter values presented in Table 1 to numerically solve equation (2.1) unless otherwise stated.
3 Numerical methods
Let $t_f> 0$ be the final simulation time. Discretizing $[0, t_f]$ into $N_t$ temporal nodes and $[0, d]$ into $N_x$ spatial nodes, we let
for each $k = 1,\ldots , N_x + 1$ and $m = 1, \ldots , N_t$ . To numerically estimate the fractional derivative of a function f of order $1 - \gamma $ , we use [Reference O’Regan and Grätzel35]
where $\Gamma $ denotes the usual Gamma function
The finite-difference approximation given in equation (3.1) provides a first-order estimate for the fractional time derivative [Reference Esen, Ucar, Yagmurlu and Tasbozan13]. By using an implicit finite-difference method to discretize time, we obtain an unconditionally stable numerical solution [Reference Langlands and Henry19]. For a second-order approximation, we refer the reader to the paper by Dimitrov [Reference Dimitrov10].
3.1 Finite-difference method
To solve equation (2.1) under the boundary conditions (2.2)–(2.4), we use a finite-difference method (FDM) to discretize space and equation (3.1) to discretize time. In the literature, Esen et al. [Reference Esen, Ucar, Yagmurlu and Tasbozan13] numerically solved the space–time fractional heat equation. Yuste and Acedo [Reference Yuste and Acedo40] proposed an explicit and conditionally stable FDM scheme using Grünwald–Letnikov discretization for the fractional derivative. Lynch et al. [Reference Lynch, Carreras, del-Castillo-Negrete, Ferreira-Mejias and Hicks24] employed a semi-implicit finite-difference method for solving FPDEs, which outperforms standard explicit methods on stability and accuracy. For further details on the consistency, stability and convergence properties of FDM schemes for numerically solving FPDEs, we refer the reader to Li and Zeng’s review paper [Reference Li and Zeng22]. To account for the Neumann boundary condition at $x = d$ , we also employ a ‘ghost node’ at $x = d + \Delta x$ . Let $y_{m, k}$ denote the numerical solution at $(x_k, t_m)$ . That is,
for each $k = 1, \ldots , N_x + 1$ and $m = 1, \ldots , N_t$ .
3.1.1 Nodes determined by boundary conditions
To satisfy the initial condition (2.4), we set
for all $k = 1, \ldots , N_x$ . For the Dirichlet boundary condition (2.2) at $x = 0$ , we set
for all $m = 1, \ldots , N_t$ . Finally, for the Neumann boundary condition (2.3) at $x = d$ , we use a central difference approximation for the first derivative at $x = d$ to set
for all $m = 1,\ldots , N_t$ . Here $N_x + 1$ corresponds to the ghost node at $x = d + \Delta x$ .
3.1.2 Algorithm
For each $m = 2,\ldots , N_t$ , we set
Using the backward Euler method [Reference Griffiths17], a central difference approximation and equation (3.1) to estimate $\partial {n}/\partial {t}$ , $\partial ^2{n}/\partial {x}^{2}$ and the fractional derivative, respectively,
Upon simplification,
which results in $N_x + 1$ equations in $N_x + 1$ unknowns, when combined with the boundary conditions (2.2) and (2.3).
Figure 2 shows the numerical solution to (2.1) under boundary conditions (2.2)–(2.4) using the data from Table 1, $N_x = 100$ , $N_t = 100$ and $t_f = 1$ . From Figure 2, we see that the electron density assumes its shape from the interaction of the Dirichlet boundary condition, the exponential source term and diffusion. Note that Figure 2 shows good agreement with the explicit finite-difference method used by Maldon and Thamwattana [Reference Maldon, Lamichhane and Thamwattana27] while significantly improving stability with the use of an implicit finite-difference method.
3.2 Finite-element method
We also solve equation (2.1) under (2.2)–(2.4) using a finite-element method (FEM) adapted from Alberty et al. [Reference Alberty, Carstensen and Funken1]. Esen et al. [Reference Esen, Ucar, Yagmurlu and Tasbozan13] provided a finite-element basis for the time-fractional diffusion equation under Dirichlet boundary conditions. Yuan and Chen [Reference Yuan and Chen39] solved a mixed diffusion problem featuring the two-sided Riemann–Liouville fractional derivatives by an FEM scheme. Li and Wang [Reference Li and Wang21] solved time-fractional reaction–diffusion and diffusion-wave equations, using Galerkin FEM schemes [Reference Thomée37] which enjoy unconditional stability.
3.2.1 Weak formulation
Letting $\rho = n - n_0$ , we solve the equivalent problem
subject to
Upon multiplying by a test function w and integrating over $[0, d]$ ,
Integrating by parts and using the commutativity of the Caputo derivative,
Given that $w(0) = 0$ and $({\partial \rho }/{\partial x})|_{x = d} = 0$ , the weak formulation for equation (3.2) is given by
To solve equation (3.2) using this weak formulation, we employ the basis $\{\phi _1, \phi _2, \ldots , \phi _{N_x - 1} \}$ , where $\phi _j$ is given by
for $j = 1, \ldots , N_x - 2$ and $\phi _{N_x - 1}$ is given by
3.3 Algorithm
At each time step $t_m$ , we set
where $g_{j}$ are the coefficients of the basis functions. In matrix form, the weak formulation of equation (3.2) under the basis $\{\phi _1, \phi _2, \ldots , \phi _{N_x - 1} \}$ is given by
where the coefficient vector $\vec {g}$ , the mass matrix M, the stiffness matrix A and the load vector $\vec {C}$ components are given by
for each $m = 1, \ldots , N_t$ , $i = 1,\ldots , N_x - 1$ and $j = 1, \ldots , N_x - 1$ . Applying the implicit finite-difference method to discretize time, we obtain the system
where
Figure 3 shows the numerical solution to equation (2.1) under the conditions (2.2)–(2.4) using the data from Table 1, $N_x = 100$ , $N_t = 100$ and $t_f = 1$ .
4 Efficiency calculations
To elucidate the effect of the $\text {TiO}_2$ nanoporous semiconductor on efficiency through the parameter $\gamma $ , we calculate $\eta $ using equation (2.5) and the numerical solution obtained by the finite-difference method.
4.1 Electron flux calculation
To calculate the short-circuit current density, we estimate the time-fractional derivative with equation (3.1) and the electron flux at $x = 0$ with the $10$ -point estimate from Maldon and Thamwattana [Reference Maldon, Lamichhane and Thamwattana27]. Therefore, under the finite-difference method the short-circuit current density is given by
where each coefficient is given by
4.1.1 Efficiency calculations
In Table 2, we calculate the efficiency $\eta $ under several values for the parameter $\gamma $ and the numerical data provided in Table 1. From the table, we see that efficiency decreases as $\gamma $ increases, which is indicative of longer waiting times in the CTRW simulation [Reference Maldon, Lamichhane and Thamwattana27].
5 Error calculation
In lieu of an analytical solution, we compute the accuracy of each method using a comparison to a fine grid solution from the same numerical method. We calculate the errors for $t_f = 1$ under the parameter data in Table 1. For the reference solution, we use a finite-difference solution and finite element with $1000$ spatial nodes and $1000$ temporal nodes.
To calculate the error $\epsilon $ for both schemes under refinement, we use
where $\vec {u}_C$ is the coarse grid solution vector, $\vec {u}_{F}$ is the interpolated fine grid solution vector, $\Delta x$ and $\Delta t$ are calculated in the coarse grid and $||\cdot ||$ denotes the usual root-mean-square error. We scale $\epsilon $ by $n_0^{-1}$ to account for the high magnitude of the numerical solution.
From Table 3, we see that the error decreases by a factor of two when the number of temporal nodes doubles, which confirms that equation (3.1) provides a first-order approximation for the fractional time derivative in equation (2.1) for both numerical schemes. Table 4 shows that the error for both schemes decreases by a factor of four when the number of spatial nodes doubles, confirming that the finite-difference method and finite-element method provide second-order spatial discretizations. From Tables 3 and 4, we see that the finite-element scheme is consistently more accurate than the finite-difference scheme, since the weak formulation of the finite-element method naturally satisfies the Dirichlet and Neumann boundary conditions.
6 Summary
We solve the fractional partial differential equation (2.1) using a finite-difference method and a finite-element method to discretize space and an implicit finite-difference method to discretize time. Our numerical results are in good agreement with the literature. Error analysis indicates that the finite-difference method and finite-element method feature respectively first- and second-order spatial approximations while equation (3.1) provides an unconditionally stable finite- difference approximation for Caputo fractional derivatives of order $0 < \gamma \leq 1$ .
Finally, we use the numerical schemes to compute the efficiency of a DSSC under several values of $\gamma $ to elucidate the effect of electron diffusion in the nanoporous semiconductor. We find that lower values of $\gamma $ lead to lower efficiencies due to the slower diffusion process associated with longer waiting times in the CTRW simulation.
Acknowledgements
This research has been conducted with the support of an Australian Government Research Training Program Scholarship. The authors are grateful to the Australian Research Council for the funding of Discovery Project DP170102705. The authors are also grateful for the suggestions made by the referees of this paper.