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.TandemSimulator2T(eqe, electrical_parameters: Dict, subcell_names: List[str], eqe_back: Optional[float] = None, bifacial: bool = False)[source]#

Bases: pv_tandem.solarcell_models._TandemSimulator

A 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 Energy Yield for Tandem Solar Cell 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 Energy Yield for Tandem Solar Cell 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._TandemSimulator

A 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 Energy Yield for Tandem Solar Cell 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 Energy Yield for Tandem Solar Cell for a usage example.