API#
- pv_tandem.utils.calc_current(spec: pandas.core.frame.DataFrame, eqe: pandas.core.frame.DataFrame) numpy.ndarray[source]#
Calculates the photocurrent from timeseries of impinging spectrum (W/nm/m²) and eqe.
- Parameters
spec (pandas.Dataframe) – Time series of spectral irradiance in the plane of the solar cell. The names columns of the DataFrame have to be the wavelength of the incidenting light in nm.
eqe (pandas.Dataframe) – External quantum efficiency of the solar cell.
- Returns
current – Current generated in the solar cell in A/m²
- Return type
numpy.array
- pv_tandem.utils.calc_j0_RT(eqe, bandgap_shift=None, lqe_ele=0.01)[source]#
Function to calculate J0 for the detailed balance limit at room temperature. E_bg: Bandgap of model materials lqe_eqe: Electroluminescent emission efficiency. For Shockley–Queisser equals 1.
return: J0 (dark current) (mA/cm²)
- pv_tandem.utils.calc_temp_from_NOCT(noct, ambient_temp, irrad_poa)[source]#
Calculates the cell temperature based on the irradiance in the plane of array, ambient temperature and NOCT (nominal operating cell temperature)
- Parameters
noct (numeric or array-like) – NOCT (nominal operating cell temperature) of the cell
ambient_temp (numeric or array-like) – DESCRIPTION.
irrad_poa (numeric or array-like) – irradiance in the plane of the pv module
- Returns
cell_temp – operating temperaure of the cell
- Return type
numeric or array-like
- pv_tandem.utils.interp_eqe_to_spec(eqe: pandas.core.frame.DataFrame, spec: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]#
- pv_tandem.utils.interp_spec_to_eqe(eqe: pandas.core.frame.DataFrame, spec: pandas.core.frame.DataFrame) pandas.core.frame.DataFrame[source]#
- class pv_tandem.solarcell_models.OneDiodeModel(tcJsc, tcVoc, R_shunt, R_series, n, j0)[source]#
Bases:
objectA class to calculate the performance of a solar cell with a one diode model.
- Parameters
tcJsc (float or np.ndarray) – The temperature coefficient of the short-circuit current.
tcVoc (float or np.ndarray) – The temperature coefficient of the open-circuit voltage.
R_shunt (float or np.ndarray) – The shunt resistance.
R_series (float or np.ndarray) – The series resistance.
n (float or np.ndarray) – The diode ideality factor.
j0 (float or np.ndarray) – The reverse saturation current.
- Return type
None
- calc_iv_params(Jsc, cell_temp, j_arr=array([0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2., 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3., 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 4., 4.1, 4.2, 4.3, 4.4, 4.5, 4.6, 4.7, 4.8, 4.9, 5., 5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9, 6., 6.1, 6.2, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 6.9, 7., 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8, 7.9, 8., 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 8.7, 8.8, 8.9, 9., 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9, 10., 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 11., 11.1, 11.2, 11.3, 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12., 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 13., 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 14., 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8, 14.9, 15., 15.1, 15.2, 15.3, 15.4, 15.5, 15.6, 15.7, 15.8, 15.9, 16., 16.1, 16.2, 16.3, 16.4, 16.5, 16.6, 16.7, 16.8, 16.9, 17., 17.1, 17.2, 17.3, 17.4, 17.5, 17.6, 17.7, 17.8, 17.9, 18., 18.1, 18.2, 18.3, 18.4, 18.5, 18.6, 18.7, 18.8, 18.9, 19., 19.1, 19.2, 19.3, 19.4, 19.5, 19.6, 19.7, 19.8, 19.9, 20., 20.1, 20.2, 20.3, 20.4, 20.5, 20.6, 20.7, 20.8, 20.9, 21., 21.1, 21.2, 21.3, 21.4, 21.5, 21.6, 21.7, 21.8, 21.9, 22., 22.1, 22.2, 22.3, 22.4, 22.5, 22.6, 22.7, 22.8, 22.9, 23., 23.1, 23.2, 23.3, 23.4, 23.5, 23.6, 23.7, 23.8, 23.9, 24., 24.1, 24.2, 24.3, 24.4, 24.5, 24.6, 24.7, 24.8, 24.9, 25., 25.1, 25.2, 25.3, 25.4, 25.5, 25.6, 25.7, 25.8, 25.9, 26., 26.1, 26.2, 26.3, 26.4, 26.5, 26.6, 26.7, 26.8, 26.9, 27., 27.1, 27.2, 27.3, 27.4, 27.5, 27.6, 27.7, 27.8, 27.9, 28., 28.1, 28.2, 28.3, 28.4, 28.5, 28.6, 28.7, 28.8, 28.9, 29., 29.1, 29.2, 29.3, 29.4, 29.5, 29.6, 29.7, 29.8, 29.9, 30., 30.1, 30.2, 30.3, 30.4, 30.5, 30.6, 30.7, 30.8, 30.9, 31., 31.1, 31.2, 31.3, 31.4, 31.5, 31.6, 31.7, 31.8, 31.9, 32., 32.1, 32.2, 32.3, 32.4, 32.5, 32.6, 32.7, 32.8, 32.9, 33., 33.1, 33.2, 33.3, 33.4, 33.5, 33.6, 33.7, 33.8, 33.9, 34., 34.1, 34.2, 34.3, 34.4, 34.5, 34.6, 34.7, 34.8, 34.9, 35., 35.1, 35.2, 35.3, 35.4, 35.5, 35.6, 35.7, 35.8, 35.9, 36., 36.1, 36.2, 36.3, 36.4, 36.5, 36.6, 36.7, 36.8, 36.9, 37., 37.1, 37.2, 37.3, 37.4, 37.5, 37.6, 37.7, 37.8, 37.9, 38., 38.1, 38.2, 38.3, 38.4, 38.5, 38.6, 38.7, 38.8, 38.9, 39., 39.1, 39.2, 39.3, 39.4, 39.5, 39.6, 39.7, 39.8, 39.9, 40., 40.1, 40.2, 40.3, 40.4, 40.5, 40.6, 40.7, 40.8, 40.9, 41., 41.1, 41.2, 41.3, 41.4, 41.5, 41.6, 41.7, 41.8, 41.9, 42., 42.1, 42.2, 42.3, 42.4, 42.5, 42.6, 42.7, 42.8, 42.9, 43., 43.1, 43.2, 43.3, 43.4, 43.5, 43.6, 43.7, 43.8, 43.9, 44., 44.1, 44.2, 44.3, 44.4, 44.5, 44.6, 44.7, 44.8, 44.9, 45.]))[source]#
- class pv_tandem.solarcell_models.TandemSimulator2T(eqe, electrical_parameters: Dict, subcell_names: List[str], eqe_back: Optional[float] = None, bifacial: bool = False)[source]#
Bases:
pv_tandem.solarcell_models._TandemSimulatorA class to represent a Tandem Simulator.
- Parameters
electrical_parameters (dict) – Electrical parameters of the One Diode Models.
subcell_names (list) – Names of the subcells.
eqe (pandas.Dataframe) – External quantum efficiency. The index of the DataFrame has to represent the wavelenghts in nm and the columns have to be named with the names used in the subcell_names list
eqe_back (pandas.Dataframe, optional) – Backside external quantum efficiency if bifacial illumination is to be considered.
bifacial (bool) – Flag to represent if the simulator is bifacial.
electrical_models (dict) – Electrical models for each subcell.
j_arr (ndarray) – Array that specifies for which current densities (mA/cm2) the voltage is evaluated.
Examples
>>> eqe = pd.DataFrame(index=np.arange(300,1205,5)) >>> # Unphysical EQE, just for demonstration >>> eqe[['pero','si']] = 0.4 >>> electrical_parameters = { >>> "Rsh": {"pero": 1000, "si": 3000}, >>> "RsTandem": 3, >>> "j0": {"pero": 2.7e-18, "si": 1e-12}, >>> "n": {"pero": 1.1, "si": 1}, >>> "Temp": {"pero": 25, "si": 25}, >>> "noct": {"pero": 48, "si": 48}, >>> "tcJsc": {"pero": 0.0002, "si": 0.00032}, >>> "tcVoc": {"pero": -0.002, "si": -0.0041}, >>> } >>> tandem = TandemSimulator(eqe=eqe, >>> electrical_parameters=electrical_parameters, >>> subcell_names=["pero", "si"]) >>> iv_df = tandem.calc_IV_stc() >>> power = iv_df.tandem * iv_df.index >>> idx_power_max = power.idxmax() >>> print(f''' >>> Maximum efficiency: {power.max():.1f} %, >>> Vmpp tandem: {iv_df.loc[idx_power_max,"tandem"]:.2f} V >>> Vmpp perovskite: {iv_df.loc[idx_power_max,"pero"]:.2f} V >>> Vmpp silicon: {iv_df.loc[idx_power_max,"si"]:.2f} V >>> ''') Maximum efficiency: 30.4 %, Vmpp tandem: 1.78 V Vmpp perovskite: 1.09 V Vmpp silicon: 0.69 V
- calc_IV(Jsc, cell_temps, return_subsells=False)[source]#
Calculates the IV curves on the grid spcified by j_arr from the photocurrent of the individual cells.
- Parameters
Jsc (pandas.Dataframe) – Time series of spectral irradiance in the plane of the solar cell back side in case of a bifacial tandem. The names columns of the DataFrame have to be the wavelength of the incidenting light in nm.
cell_temps (pandas.Dataframe) – Time series of the cell temperatures. The columns of the dataframe expected to be named like the subcell_names.
return_subsells (Bool) – Defines if the voltage of the subcells should be returned alongside the tandem voltage.
- Returns
If return_subsells is False
V_tandem (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns the current generated by the cells (in mA/cm2)
If return_subsells is True
V_tandem (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns the current generated by the cells (in mA/cm2)
V (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns are a multiindex, where the first level represents the subcells and the second level the current generated by the cells (in mA/cm2)
Example
See sphx_glr_auto_examples_plot_tandem_ey.py for a usage example.
- calc_IV_stc(backside_current=None)[source]#
Calculates the voltage for the IV curve of the tandem solar cell under standart test conditions at the respective current density defined by j_arr.
- Parameters
backside_current (dict) – Manual backside current contribution (in mA/cm2) for bifacial tandem.
- Returns
Voltage – DataFrame with the subcell and combined tandem voltage at the respective current density (mA/cm2) as index.
- Return type
pd.DataFrame
Example
>>> eqe = pd.DataFrame(index=np.arange(300,1205,5)) >>> # Unphysical EQE, just for demonstration >>> eqe[['pero','si']] = 0.4 >>> electrical_parameters = { >>> "Rsh": {"pero": 1000, "si": 3000}, >>> "RsTandem": 3, >>> "j0": {"pero": 2.7e-18, "si": 1e-12}, >>> "n": {"pero": 1.1, "si": 1}, >>> "Temp": {"pero": 25, "si": 25}, >>> "noct": {"pero": 48, "si": 48}, >>> "tcJsc": {"pero": 0.0002, "si": 0.00032}, >>> "tcVoc": {"pero": -0.002, "si": -0.0041}, >>> } >>> tandem = TandemSimulator(eqe=eqe, >>> electrical_parameters=electrical_parameters, >>> subcell_names=["pero", "si"]) >>> iv_df = tandem.calc_IV_stc() >>> power = iv_df.tandem * iv_df.index >>> idx_power_max = power.idxmax() >>> print(f''' >>> Maximum efficiency: {power.max():.1f} %, >>> Vmpp tandem: {iv_df.loc[idx_power_max,"tandem"]:.2f} V >>> Vmpp perovskite: {iv_df.loc[idx_power_max,"pero"]:.2f} V >>> Vmpp silicon: {iv_df.loc[idx_power_max,"si"]:.2f} V >>> ''') Maximum efficiency: 30.4 %, Vmpp tandem: 1.78 V Vmpp perovskite: 1.09 V Vmpp silicon: 0.69 V
- calc_power(spec_irrad: pandas.core.frame.DataFrame, cell_temps: pandas.core.frame.DataFrame, backside_current: Optional[pandas.core.frame.DataFrame] = None) pandas.core.series.Series[source]#
Calculates the maximum power output density from timeseries of impinging spectrum (W/nm/m²) and the cell temperature.
- Parameters
spec_irrad_front (pandas.Dataframe) – Time series of spectral irradiance in the plane of the solar cell front side. The names columns of the DataFrame have to be the wavelength of the incidenting light in nm.
cell_temps (pandas.Dataframe) – Time series of the cell temperatures. The columns of the dataframe expected to be named like the subcell_names.
backside_current (pandas.Dataframe) – Manual backside current contribution (in mA/cm2) for bifacial tandem. The DataFrame needs to contain a column for each subcell in the tandem.
- Returns
Power – Time series of power output density at the maximum power point.
- Return type
pd.Series
Example
See sphx_glr_auto_examples_plot_tandem_ey.py for a usage example.
- class pv_tandem.solarcell_models.TandemSimulator4T(eqe, electrical_parameters: Dict, subcell_names: List[str], eqe_back: Optional[float] = None, bifacial: bool = False)[source]#
Bases:
pv_tandem.solarcell_models._TandemSimulatorA class to represent a 4 terminal Tandem Simulator.
- Parameters
electrical_parameters (dict) – Electrical parameters of the One Diode Models.
subcell_names (list) – Names of the subcells.
eqe (pandas.Dataframe) – External quantum efficiency. The index of the DataFrame has to represent the wavelenghts in nm and the columns have to be named with the names used in the subcell_names list
eqe_back (pandas.Dataframe, optional) – Backside external quantum efficiency if bifacial illumination is to be considered.
bifacial (bool) – Flag to represent if the simulator is bifacial.
electrical_models (dict) – Electrical models for each subcell.
j_arr (ndarray) – Array that specifies for which current densities (mA/cm2) the voltage is evaluated.
Examples
>>> eqe = pd.DataFrame(index=np.arange(300,1205,5)) >>> # Unphysical EQE, just for demonstration >>> eqe[['pero','si']] = 0.4 >>> electrical_parameters = { >>> "Rsh": {"pero": 1000, "si": 3000}, >>> "RsTandem": 3, >>> "j0": {"pero": 2.7e-18, "si": 1e-12}, >>> "n": {"pero": 1.1, "si": 1}, >>> "Temp": {"pero": 25, "si": 25}, >>> "noct": {"pero": 48, "si": 48}, >>> "tcJsc": {"pero": 0.0002, "si": 0.00032}, >>> "tcVoc": {"pero": -0.002, "si": -0.0041}, >>> } >>> tandem = TandemSimulator(eqe=eqe, >>> electrical_parameters=electrical_parameters, >>> subcell_names=["pero", "si"]) >>> iv_df = tandem.calc_IV_stc() >>> power = iv_df.tandem * iv_df.index >>> idx_power_max = power.idxmax() >>> print(f''' >>> Maximum efficiency: {power.max():.1f} %, >>> Vmpp tandem: {iv_df.loc[idx_power_max,"tandem"]:.2f} V >>> Vmpp perovskite: {iv_df.loc[idx_power_max,"pero"]:.2f} V >>> Vmpp silicon: {iv_df.loc[idx_power_max,"si"]:.2f} V >>> ''') Maximum efficiency: 30.4 %, Vmpp tandem: 1.78 V Vmpp perovskite: 1.09 V Vmpp silicon: 0.69 V
- calc_IV(Jsc, cell_temps, return_subsells=False)[source]#
Calculates the IV curves on the grid spcified by j_arr from the photocurrent of the individual cells.
- Parameters
Jsc (pandas.Dataframe) – Time series of spectral irradiance in the plane of the solar cell back side in case of a bifacial tandem. The names columns of the DataFrame have to be the wavelength of the incidenting light in nm.
cell_temps (pandas.Dataframe) – Time series of the cell temperatures. The columns of the dataframe expected to be named like the subcell_names.
- Returns
If return_subsells is False
V_tandem (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns the current generated by the cells (in mA/cm2)
If return_subsells is True
V_tandem (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns the current generated by the cells (in mA/cm2)
V (pd.DataFrame) – Dataframe containing IV data where the rows represent the timestamps of the Jsc timeseries and the columns are a multiindex, where the first level represents the subcells and the second level the current generated by the cells (in mA/cm2)
Example
See sphx_glr_auto_examples_plot_tandem_ey.py for a usage example.
- calc_IV_stc(backside_current=None)[source]#
Calculates the voltage for the IV curve of the tandem solar cell under standart test conditions at the respective current density defined by j_arr.
- Parameters
backside_current (dict) – Manual backside current contribution (in mA/cm2) for bifacial tandem.
- Returns
Voltage – DataFrame with the subcell and combined tandem voltage at the respective current density (mA/cm2) as index.
- Return type
pd.DataFrame
Example
>>> eqe = pd.DataFrame(index=np.arange(300,1205,5)) >>> # Unphysical EQE, just for demonstration >>> eqe[['pero','si']] = 0.4 >>> electrical_parameters = { >>> "Rsh": {"pero": 1000, "si": 3000}, >>> "RsTandem": 3, >>> "j0": {"pero": 2.7e-18, "si": 1e-12}, >>> "n": {"pero": 1.1, "si": 1}, >>> "Temp": {"pero": 25, "si": 25}, >>> "noct": {"pero": 48, "si": 48}, >>> "tcJsc": {"pero": 0.0002, "si": 0.00032}, >>> "tcVoc": {"pero": -0.002, "si": -0.0041}, >>> } >>> tandem = TandemSimulator(eqe=eqe, >>> electrical_parameters=electrical_parameters, >>> subcell_names=["pero", "si"]) >>> iv_df = tandem.calc_IV_stc() >>> power = iv_df.tandem * iv_df.index >>> idx_power_max = power.idxmax() >>> print(f''' >>> Maximum efficiency: {power.max():.1f} %, >>> Vmpp tandem: {iv_df.loc[idx_power_max,"tandem"]:.2f} V >>> Vmpp perovskite: {iv_df.loc[idx_power_max,"pero"]:.2f} V >>> Vmpp silicon: {iv_df.loc[idx_power_max,"si"]:.2f} V >>> ''') Maximum efficiency: 30.4 %, Vmpp tandem: 1.78 V Vmpp perovskite: 1.09 V Vmpp silicon: 0.69 V
- calc_power(spec_irrad: pandas.core.frame.DataFrame, cell_temps: pandas.core.frame.DataFrame, backside_current: Optional[pandas.core.frame.DataFrame] = None) pandas.core.series.Series[source]#
Calculates the maximum power output density from timeseries of impinging spectrum (W/nm/m²) and the cell temperature.
- Parameters
spec_irrad_front (pandas.Dataframe) – Time series of spectral irradiance in the plane of the solar cell front side. The names columns of the DataFrame have to be the wavelength of the incidenting light in nm.
cell_temps (pandas.Dataframe) – Time series of the cell temperatures. The columns of the dataframe expected to be named like the subcell_names.
backside_current (pandas.Dataframe) – Manual backside current contribution (in mA/cm2) for bifacial tandem. The DataFrame needs to contain a column for each subcell in the tandem.
- Returns
Power – Time series of power output density at the maximum power point.
- Return type
pd.Series
Example
See sphx_glr_auto_examples_plot_tandem_ey.py for a usage example.