{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from solcore import si, material\n",
"from solcore.structure import Junction, Layer\n",
"from solcore.solar_cell import SolarCell\n",
"from solcore.solar_cell_solver import solar_cell_solver, default_options\n",
"from solcore.light_source import LightSource\n",
"from solcore.constants import vacuum_permittivity\n",
"from solcore.optics import RCWASolverError"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"user options"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"T = 298\n",
"wl = si(np.linspace(400, 900, 80), 'nm')\n",
"light_source = LightSource(source_type='standard', version='AM1.5g', x=wl,\n",
" output_units='photon_flux_per_m', concentration=1)\n",
"opts = default_options\n",
"opts.wavelength, opts.no_back_reflection, opts.size, opts.light_source, opts.T_ambient = \\\n",
" wl, False, [400, 400], light_source, T\n",
"opts.recalculate_absorption = True\n",
"# The size of the unit cell for the RCWA structure is 400 x 400 nm"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Defining all the materials we need"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"Air = material('Air')(T=T)\n",
"p_GaAs = material('GaAs')(T=T, Na=si('4e18cm-3')) # for the GaAs cell emitter\n",
"n_GaAs = material('GaAs')(T=T, Nd=si('2e17cm-3')) # for the GaAs cell base\n",
"AlAs, GaAs = material('AlAs')(T=T), material('GaAs')(T=T) # for the DBR\n",
"SiO2 = material('SiO2', sopra=True)(T=T) # for the spacer layer\n",
"TiO2 = material('TiO2', sopra=True)(T=T) # for the nanoparticles"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"some parameters for the QE solver"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"for mat in [n_GaAs, p_GaAs]:\n",
" mat.hole_mobility, mat.electron_mobility, mat.permittivity = 3.4e-3, 5e-2, 9 * vacuum_permittivity\n",
" n_GaAs.hole_diffusion_length, p_GaAs.electron_diffusion_length = si(\"500nm\"), si(\"5um\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Define the different parts of the structure we will use. For the GaAs junction, we use the depletion approximation"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"GaAs_junction = [Junction([Layer(width=si('100nm'), material=p_GaAs, role=\"emitter\"),\n",
" Layer(width=si('400nm'), material=n_GaAs, role=\"base\")], T=T, kind='DA')]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"this creates 10 repetitions of the AlAs and GaAs layers, to make the DBR structure"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"DBR = 10 * [Layer(width=si(\"73nm\"), material=AlAs), Layer(width=si(\"60nm\"), material=GaAs)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The layer with nanoparticles"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"NP_layer = [Layer(si('50nm'), Air, geometry=[{'type': 'circle', 'mat': TiO2, 'center': (200, 200),\n",
" 'radius': 50}])]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"substrate = [Layer(width=si('50um'), material=GaAs)]\n",
"spacer = [Layer(width=si('25nm'), material=SiO2)]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"--------------------------------------------------------------------------
\n",
"solar cell with SiO2 coating"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"solar_cell = SolarCell(spacer + GaAs_junction + substrate)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"opts.optics_method = 'TMM'\n",
"solar_cell_solver(solar_cell, 'qe', opts)\n",
"TMM_EQE = solar_cell[1].eqe(opts.wavelength)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"opts.optics_method = 'BL'\n",
"solar_cell_solver(solar_cell, 'qe', opts)\n",
"BL_EQE = solar_cell[1].eqe(opts.wavelength)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"--------------------------------------------------------------------------
\n",
"as above, with a DBR on the back"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"solar_cell = SolarCell(spacer + GaAs_junction + DBR + substrate)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"opts.optics_method = 'TMM'\n",
"solar_cell_solver(solar_cell, 'qe', opts)\n",
"TMM_EQE_DBR = solar_cell[1].eqe(opts.wavelength)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"--------------------------------------------------------------------------
\n",
"cell with TiO2 nanocylinder array on the front"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"solar_cell = SolarCell(NP_layer + spacer + GaAs_junction + DBR + substrate)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"opts.optics_method = 'TMM'\n",
"solar_cell_solver(solar_cell, 'qe', opts)\n",
"TMM_EQE_NP = solar_cell[2].eqe(opts.wavelength)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"opts.optics_method = 'BL'\n",
"solar_cell_solver(solar_cell, 'qe', opts)\n",
"BL_EQE_NP = solar_cell[2].eqe(opts.wavelength)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"try:\n",
" opts.optics_method = 'RCWA'\n",
" opts.orders = 49 # number of diffraction orders to keep in the RCWA solver\n",
" solar_cell_solver(solar_cell, 'qe', opts)\n",
" RCWA_EQE_NP = solar_cell[2].eqe(opts.wavelength)\n",
" RCWA_legend = 'RCWA (GaAs SC + NP array + DBR)'\n",
"except RCWASolverError:\n",
" RCWA_EQE_NP = np.zeros_like(BL_EQE_NP)\n",
" RCWA_legend = '(RCWA solver S4 not available)'"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"plt.figure()\n",
"plt.plot(wl * 1e9, BL_EQE_NP, wl * 1e9, TMM_EQE, wl * 1e9, TMM_EQE_DBR, wl * 1e9, RCWA_EQE_NP)\n",
"plt.legend(labels=['Beer-Lambert law (all structures)', 'TMM (GaAs SC)', 'TMM (GaAs SC + DBR)',\n",
" RCWA_legend])\n",
"plt.xlabel(\"Wavelength (nm)\")\n",
"plt.ylabel(\"Quantum efficiency\")\n",
"plt.show()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}