{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from solcore.solar_cell import SolarCell, default_GaAs\n", "from solcore.structure import Layer, Junction\n", "from solcore import si\n", "from solcore import material\n", "from solcore.light_source import LightSource\n", "from solcore.solar_cell_solver import solar_cell_solver" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "TODO The purpose of this example needs to be clarified. It is messy" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "T = 298" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "substrate = material('GaAs')(T=T)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "def AlGaAs(T):\n", " # We create the other materials we need for the device\n", " window = material('AlGaAs')(T=T, Na=5e24, Al=0.8)\n", " p_AlGaAs = material('AlGaAs')(T=T, Na=1e24, Al=0.4)\n", " n_AlGaAs = material('AlGaAs')(T=T, Nd=8e22, Al=0.4)\n", " bsf = material('AlGaAs')(T=T, Nd=2e24, Al=0.6)\n", " output = Junction([Layer(width=si('30nm'), material=window, role=\"Window\"),\n", " Layer(width=si('150nm'), material=p_AlGaAs, role=\"Emitter\"),\n", " Layer(width=si('1000nm'), material=n_AlGaAs, role=\"Base\"),\n", " Layer(width=si('200nm'), material=bsf, role=\"BSF\")], sn=1e6, sp=1e6, T=T, kind='PDD')\n", " return output" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "Vin = np.linspace(-2, 2.61, 201)\n", "V = np.linspace(0, 2.6, 300)\n", "wl = np.linspace(350, 1000, 301) * 1e-9\n", "light_source = LightSource(source_type='standard', version='AM1.5g', x=wl, output_units='photon_flux_per_m',\n", " concentration=1)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "solar_cell_solver(my_solar_cell, 'equilibrium')\n", "\n", "plt.figure(1)\n", "for j in my_solar_cell.junction_indices:\n", " zz = my_solar_cell[j].equilibrium_data.Properties['x'] + my_solar_cell[j].offset\n", " n = my_solar_cell[j].equilibrium_data.Properties['Nd']\n", " p = my_solar_cell[j].equilibrium_data.Properties['Na']\n", " plt.semilogy(zz, n, 'b')\n", " plt.semilogy(zz, p, 'r')\n", "\n", " zz = my_solar_cell[j].equilibrium_data.Bandstructure['x'] + my_solar_cell[j].offset\n", " n = my_solar_cell[j].equilibrium_data.Bandstructure['n']\n", " p = my_solar_cell[j].equilibrium_data.Bandstructure['p']\n", " plt.semilogy(zz, n, 'b--')\n", " plt.semilogy(zz, p, 'r--')\n", "\n", "plt.xlabel('Position (m)')\n", "plt.ylabel('Carrier density (m$^{-3}$)')\n", "\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.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }