{ "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 material, si" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from solcore.solar_cell import SolarCell, Layer, Junction\n", "from solcore.solar_cell_solver import solar_cell_solver, prepare_solar_cell\n", "from solcore.state import State" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "GaInP = material(\"GaInP\")(In=0.5)\n", "GaAs = material(\"GaAs\")()\n", "Ge = material(\"Ge\")()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "optical_struct = SolarCell(\n", " [\n", " Layer(material=GaInP, width=si(\"5000nm\")),\n", " Junction(\n", " [\n", " Layer(material=GaAs, width=si(\"200nm\")),\n", " Layer(material=GaAs, width=si(\"5um\")),\n", " ],\n", " kind=\"DA\",\n", " ),\n", " Layer(material=Ge, width=si(\"50um\")),\n", " ]\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "wl = np.linspace(250, 1700, 300) * 1e-9" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "options = State()\n", "options.wavelength = wl\n", "options.optics_method = \"TMM\"\n", "options.no_back_reflection = False\n", "options.BL_correction = True\n", "options.recalculate_absorption = True\n", "options.positions = [1e-8, 1e-9, 1e-8, 1e-7]\n", "options.theta = 0" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "c_list = [\n", " [\"c\", \"c\", \"c\", \"c\"],\n", " [\"c\", \"c\", \"c\", \"i\"],\n", " [\"c\", \"i\", \"i\", \"c\"],\n", " [\"i\", \"i\", \"i\", \"i\"],\n", "]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "titles = [\n", " \"All coherent\",\n", " \"Bottom Ge layer explicity incoherent\",\n", " \"Both layers of GaAs junction incoherent\",\n", " \"All layers incoherent\",\n", "]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "for i1, cl in enumerate(c_list):\n", " plt.figure(i1)\n", " options.coherency_list = cl\n", " solar_cell_solver(optical_struct, \"optics\", options)\n", " plt.plot(wl * 1e9, optical_struct[0].layer_absorption)\n", " plt.plot(wl * 1e9, optical_struct[1].layer_absorption)\n", " plt.plot(wl * 1e9, optical_struct[2].layer_absorption)\n", " plt.plot(wl * 1e9, optical_struct.reflected, \"--\")\n", " plt.plot(wl * 1e9, optical_struct.transmitted, \"--\")\n", " plt.plot(\n", " wl * 1e9,\n", " optical_struct[0].layer_absorption\n", " + optical_struct[1].layer_absorption\n", " + optical_struct[2].layer_absorption\n", " + optical_struct.reflected\n", " + optical_struct.transmitted,\n", " )\n", " plt.legend([\"GaInP\", \"GaAs\", \"Ge\", \"R\", \"T\", \"R+A+T\"], loc=\"upper left\")\n", " plt.title(titles[i1])\n", " plt.xlabel(\"Wavelength (nm)\")\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 }