{ "cells": [ { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "f2rzc-rFNvlV" }, "source": [ "# Substrate Example" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "OFKOOFXT4WwQ" }, "source": [ " \n", "TMM and RCWA solvers can take into account the presence of a substrate if it is specified in the solar_cell object.\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "ovDputlQMyPI" }, "outputs": [], "source": [ "from solcore import material\n", "from solcore import si\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "from solcore.solar_cell import default_GaAs, SolarCell, Layer, Junction\n", "from solcore.solar_cell_solver import solar_cell_solver\n", "from solcore.absorption_calculator import OptiStack\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "M6N72zXGN4XF" }, "outputs": [], "source": [ "T = 298\n", "\n", "GaAs = material('GaAs')(T = T)\n", "\n", "thin_GaAs = SolarCell([Layer(material = GaAs, width=si('500nm'))])\n", "\n", "GaAs_on_substrate = SolarCell([Layer(material = GaAs, width=si('500nm'))], substrate = GaAs)\n", "\n", "wl = si(np.linspace(300, 900, 200), 'nm')" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "QI_YPVKfOAdi" }, "source": [ "Thin solar cell, no substrate - will get significant absorption enhancement from reflection at the GaAs/air interface at the back MUST specify no_back_reflection = False, so that Solcore does not automatically suppress reflections from the back (currently, the default setting in solcore is to suppress reflections from the back, so no_back_reflection = True" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "gE06vNF3OBx1" }, "outputs": [], "source": [ "solar_cell_solver(thin_GaAs, 'optics', user_options={'wavelength': wl, 'optics_method': 'TMM', 'no_back_reflection': False})\n", "z_pos = np.linspace(0, thin_GaAs.width, 201)\n", "profiles_thin = thin_GaAs[0].absorbed(z_pos)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "uesGm8N3OHHx" }, "source": [ "Same thin solar cell, but now on a GaAs substrate. In this case, we get the same result whether or not we specify no_back_reflection to be True or False, since with a GaAs on GaAs cell we don't get any reflection at the back interface anyway" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "s6H3g81COJcw" }, "outputs": [], "source": [ "solar_cell_solver(GaAs_on_substrate, 'optics', user_options={'wavelength': wl, 'optics_method': 'TMM'})\n", "profiles_thick = GaAs_on_substrate[0].absorbed(z_pos)\n", "plt.figure()\n", "plt.plot(wl * 1e9, thin_GaAs[0].layer_absorption)\n", "plt.plot(wl * 1e9, GaAs_on_substrate[0].layer_absorption)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "hrrIk1iwONuX" }, "source": [ "Now we consider the thin solar cell without substrate again but ask Solcore to suppress back reflections. We must also ask Solcore to recalculate the absorption, otherwise it will just use the results calculated above which are already in the thin_GaAs object What no_back_reflection = True actually does is add a highly absorbing layer based on the final layer in the stack so that nothing is reflected." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "WN-wqB7pOTYc" }, "outputs": [], "source": [ "solar_cell_solver(thin_GaAs, 'optics', user_options={'wavelength': wl, 'optics_method': 'TMM', 'no_back_reflection': True,\n", " 'recalculate_absorption': True})\n", "\n", "plt.plot(wl * 1e9, thin_GaAs[0].layer_absorption, '--')\n", "plt.legend(labels=['No substrate (air below)', 'On GaAs substrate', 'No substrate, suppress back reflection'])\n", "plt.xlabel(\"Wavelength (nm)\")\n", "plt.ylabel(\"Absorption\")\n", "plt.show()" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "ApbdiC7KOWIZ" }, "source": [ "We can see that, correctly, the results for the cell with an explicitly specified GaAs substrate and for the thin cell purposely suppressing back reflections are the same, while the thin cell with back reflections shows thin-film oscillations in the absorption spectrum.\n", "\n", "Let's look at what the absorption profile looks like... absorption profile around 750 nm incident wavelength:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": {}, "colab_type": "code", "id": "nu8gFJd1OcDL" }, "outputs": [], "source": [ "plt.figure()\n", "plt.plot(z_pos*1e9, profiles_thin[:,150])\n", "plt.plot(z_pos*1e9, profiles_thick[:,150])\n", "plt.xlabel(\"Depth in GaAs junction (nm)\")\n", "plt.ylabel('Local absorption')\n", "plt.show()" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "substrate_example.ipynb", "provenance": [] }, "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 }