Dye-sensitized solar cells consistently provide a cost-effective avenue for sources of renewable energy, primarily due to their unique utilization of nanoporous semiconductors. Through mathematical modelling, we are able to uncover insights into electron transport to optimize the operating efficiency of the dye-sensitized solar cells. In particular, fractional diffusion equations create a link between electron density and porosity of the nanoporous semiconductors. We numerically solve a fractional diffusion model using a finite-difference method and a finite-element method to discretize space and an implicit finite-difference method to discretize time. Finally, we calculate the accuracy of each method by evaluating the numerical errors under grid refinement.