def test_light_iv(): answer = [ 142.68025180227374, 2.519346556870366, 0.9169672186977382, 329.61395441947565, 2.347826086956522, 140.3911287342211, 0.3294918264376029, ] with tempfile.TemporaryDirectory(prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, "solcore_log.txt") PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver( my_solar_cell, "iv", user_options={ "T_ambient": T, "db_mode": "boltzmann", "voltages": V, "light_iv": True, "wavelength": wl, "optics_method": "BL", "mpp": True, "internal_voltages": Vin, "light_source": light_source, }, ) output = [ my_solar_cell.iv.Isc, my_solar_cell.iv.Voc, my_solar_cell.iv.FF, my_solar_cell.iv.Pmpp, my_solar_cell.iv.Vmpp, my_solar_cell.iv.Impp, my_solar_cell.iv.Eta, ] for i in range(len(output)): assert output[i] == approx(answer[i])
def test_quantum_efficiency(): answer = [ 0.9866334968497021, 2.1512408472022467e-14, 0.9779769012349702, 0.03506561338387434, ] with tempfile.TemporaryDirectory(prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, "solcore_log.txt") PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver( my_solar_cell, "qe", user_options={ "T_ambient": T, "db_mode": "boltzmann", "voltages": V, "light_iv": True, "wavelength": wl, "optics_method": "BL", "mpp": True, "internal_voltages": Vin, "light_source": light_source, }, ) output = [ my_solar_cell[0].eqe(500e-9), my_solar_cell[0].eqe(800e-9), my_solar_cell[1].eqe(700e-9), my_solar_cell[1].eqe(900e-9), ] for i in range(len(output)): assert output[i] == approx(answer[i])
def test_92_light_iv(self): answer = [ 142.68025180227374, 2.519346556870366, 0.9169672186977382, 329.61395441947565, 2.347826086956522, 140.3911287342211, 0.3294918264376029 ] with tempfile.TemporaryDirectory( prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, 'solcore_log.txt') PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver(my_solar_cell, 'iv', user_options={ 'T_ambient': T, 'db_mode': 'boltzmann', 'voltages': V, 'light_iv': True, 'wavelength': wl, 'optics_method': 'BL', 'mpp': True, 'internal_voltages': Vin, 'light_source': light_source }) output = [ my_solar_cell.iv.Isc, my_solar_cell.iv.Voc, my_solar_cell.iv.FF, my_solar_cell.iv.Pmpp, my_solar_cell.iv.Vmpp, my_solar_cell.iv.Impp, my_solar_cell.iv.Eta ] for i in range(len(output)): self.assertAlmostEqual(output[i], answer[i])
def test_92_light_iv(self): answer = [ 141.434980729, 2.46952886616, 0.91434377329, 319.359951949, 2.29565217391, 139.115130584, 0.319241623262 ] with tempfile.TemporaryDirectory( prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, 'solcore_log.txt') PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver(my_solar_cell, 'iv', user_options={ 'T_ambient': T, 'db_mode': 'boltzmann', 'voltages': V, 'light_iv': True, 'wavelength': wl, 'optics_method': 'BL', 'mpp': True, 'internal_voltages': Vin, 'light_source': light_source }) output = [ my_solar_cell.iv.Isc, my_solar_cell.iv.Voc, my_solar_cell.iv.FF, my_solar_cell.iv.Pmpp, my_solar_cell.iv.Vmpp, my_solar_cell.iv.Impp, my_solar_cell.iv.Eta ] for i in range(len(output)): self.assertAlmostEqual(output[i], answer[i])
def test_93_qe(self): answer = [ 0.9831923128532823, 1.315965183418519e-13, 0.9672990699170962, 0.032767290395462376 ] with tempfile.TemporaryDirectory( prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, 'solcore_log.txt') PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver(my_solar_cell, 'qe', user_options={ 'T_ambient': T, 'db_mode': 'boltzmann', 'voltages': V, 'light_iv': True, 'wavelength': wl, 'optics_method': 'BL', 'mpp': True, 'internal_voltages': Vin, 'light_source': light_source }) output = [ my_solar_cell[0].eqe(500e-9), my_solar_cell[0].eqe(800e-9), my_solar_cell[1].eqe(700e-9), my_solar_cell[1].eqe(900e-9) ] for i in range(len(output)): self.assertAlmostEqual(output[i], answer[i])
def test_93_qe(self): answer = [ 0.9866334968497021, 2.1512408472022467e-14, 0.9779769012349702, 0.03506561338387434 ] with tempfile.TemporaryDirectory( prefix="tmp", suffix="_sc3TESTS") as working_directory: filename = os.path.join(working_directory, 'solcore_log.txt') PDD.log(filename) my_solar_cell = SolarCell([AlGaAs(T), default_GaAs(T)], T=T, R_series=0, substrate=substrate) solar_cell_solver(my_solar_cell, 'qe', user_options={ 'T_ambient': T, 'db_mode': 'boltzmann', 'voltages': V, 'light_iv': True, 'wavelength': wl, 'optics_method': 'BL', 'mpp': True, 'internal_voltages': Vin, 'light_source': light_source }) output = [ my_solar_cell[0].eqe(500e-9), my_solar_cell[0].eqe(800e-9), my_solar_cell[1].eqe(700e-9), my_solar_cell[1].eqe(900e-9) ] for i in range(len(output)): self.assertAlmostEqual(output[i], answer[i])