pySIMsalabim.aux_funcs package

Submodules

pySIMsalabim.aux_funcs.SCLC_funcs module

pySIMsalabim.aux_funcs.SCLC_funcs.Make_SCLC_plot(ax, data_JV, x='Vext', y=['Jext'], show_tangent=[1, 2, 3], xlimits=[], ylimits=[], plot_type=0, labels='', colors='b', line_type=['-'], mark='', legend=True, plot_jvexp=False, data_JVexp=Empty DataFrame Columns: [] Index: [], save_yes=False, pic_save_name='JV.jpg')[source]

Make typical plot for SCLC measurement analysis for SIMsalabim

Parameters:
  • num_fig (int) – number of the fig to plot JV

  • data_JV (DataFrame) – Panda DataFrame containing JV_file

  • x (str, optional) – xaxis data (default = ‘Vext’), by default ‘Vext’

  • y (list of str, optional) – yaxis data can be multiple like [‘Jext’,’Jbimo’] (default = [‘Jext’]), by default [‘Jext’]

  • show_tangent (list of int, optional) – show tangent line at V1,Vinf,V2 (default = [1,2,3]), by default [1,2,3]

  • xlimits (list, optional) – x axis limits if = [] it lets python chose limits, by default []

  • ylimits (list, optional) – y axis limits if = [] it lets python chose limits, by default []

  • plot_type (int, optional) – type of plot 1 = logx, 2 = logy, 3 = loglog else linlin (default = linlin), by default 0

  • labels (str, optional) – label of the JV, by default ‘’

  • colors (str, optional) – color for the JV line, by default ‘b’

  • line_type (list, optional) – type of line for simulated data plot size line_type need to be = size(y), by default [‘-‘]

  • mark (str, optional) – type of Marker for the JV, by default ‘’

  • legend (bool, optional) – Display legend or not, by default True

  • plot_jvexp (bool, optional) – plot an experimental JV or not, by default False

  • data_JVexp ([type], optional) – Panda DataFrame containing experimental JV_file with ‘V’ the voltage and ‘J’ the current, by default pd.DataFrame()

  • save_yes (bool, optional) – If True, save JV as an image with the file name defined by “pic_save_name”, by default False

  • pic_save_name (str, optional) – name of the file where the figure is saved, by default ‘JV.jpg’

Returns:

  • Vslopef (list) – list of of the Voltage values after filtering

  • Jslopef (list) – list of of the current values after filtering

  • slopesf (list) – list of logarithmic slopes of the JV after filtering

  • get_tangentf (bool) – True if tangents are calculated i.e. if max(slopef) > 2, False if not

  • idx_maxf (int) – index of the max slope of the JV after filtering

  • max_slopesf (float) – max slope of the JV after filtering

  • tang_val_V1f (list) – list of the tangent values of the JV after filtering for the first tangent point. Typically crossing between the ohmic and Trap filled limited regime.

  • tang_val_V2f (list) – list of the tangent values of the JV after filtering for the second tangent point (here the inflexion point)

  • tang_val_V3f (list) – list of the tangent values of the JV after filtering for the third tangent point. Typically crossing between the Trap filled limited regime and the Mott-Gurney regime.

  • V1f (float) – Voltage value of the first crossing point

  • J1f (float) – current value of the first crossing point

  • V2f (float) – Voltage value of the second crossing point

  • J2f (float) – current value of the second crossing point

  • Vinf (float) – Voltage value of the inflexion point

  • Jinf (float) – current value of the inflexion point

pySIMsalabim.aux_funcs.SCLC_funcs.MottGurney(V, mu, eps_r, Vbi, L)[source]

Mott-Gurney equation typically used to fit single carrier devices JVs to get the mobility.

J = (9/8)*eps_0*eps_r*mu*((V-Vbi)**2)/(L**3)

Refs: Mott N F and Gurney R W 1940 Electronic Processes in Ionic Crystals (Oxford: Oxford University Press) Nice paper to read on MG ==> J. Phys.: Condens. Matter 30 (2018) 105901

Parameters:
  • V (1-D sequence of floats) – Array containing the voltages (V)

  • mu (float) – Mobility (m^2/(Vs))

  • eps_r (float) – Relative dielectric constant

  • Vbi (float) – Built-in voltage (V)

  • L (float) – Thickness (m)

Returns:

Array containing the current-density (A m^-2)

Return type:

1-D sequence of floats

pySIMsalabim.aux_funcs.SCLC_funcs.SCLC_get_data_plot(volt, curr)[source]

Get the data for the SCLC plot

Parameters:
  • volt (1-D sequence of floats) – Voltage data

  • curr (1-D sequence of floats) – Current data

Returns:

  • V_slopef (1-D sequence of floats) – Voltage data after filtering

  • J_slopef (1-D sequence of floats) – Current data after filtering

  • slopesf (1-D sequence of floats) – logarithmic slopes of the JV after filtering

  • get_tangentf (bool) – True if tangents are calculated i.e. if max(slopef) > 2, False if not

  • idx_maxf (int) – index of the max slope of the JV after filtering

  • max_slopesf (float) – max slope of the JV after filtering

  • tang_val_V1f (1-D sequence of floats) – tangent values of the JV after filtering for the first tangent point. Typically crossing between the ohmic and Trap filled limited regime.

  • tang_val_V2f (1-D sequence of floats) – tangent values of the JV after filtering for the second tangent point (here the inflexion point)

  • tang_val_V3f (1-D sequence of floats) – tangent values of the JV after filtering for the third tangent point. Typically crossing between the Trap filled limited regime and the Mott-Gurney regime.

  • V1f (float) – Voltage value of the first crossing point

  • J1f (float) – current value of the first crossing point

  • V2f (float) – Voltage value of the second crossing point

  • J2f (float) – current value of the second crossing point

  • Vinf (float) – Voltage value of the inflexion point

  • Jinf (float) – current value of the inflexion point

pySIMsalabim.aux_funcs.SCLC_funcs.calc_Vnet_with_ions(ions, traps, L, eps_r)[source]

Calculate Vnet for SCLC measurement in the presence of Ions as defined in equation (4) in ACS Energy Lett. 2021, 6, 3, 1087–1094 https://doi.org/10.1021/acsenergylett.0c02599

Vnet = q * n_net * L**2 /( 2 * eps_0 * eps_r) = q * (traps-ions) * L**2 /( 2 * eps_0 * eps_r)

Parameters:
  • ions (float) – Ion density (m^-3)

  • traps (float) – Trap density (m^-3)

  • L (float) – Thickness (m)

  • eps_r (float) – Relative dielectric constant

Returns:

returns vnet as defined in

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.calc_Vsat(L, Nc, phi, eps_r, T)[source]

Calculate Vsat for SCLC measurement as defined in equation (15) in https://doi.org/10.1021/acsenergylett.0c02599

Vsat = (8/9) * ((q*Nc*L**2)/(eps_0*eps_r))*exp(-q*phi/k*T)

Parameters:
  • L (float) – Thickness (m)

  • Nc (float) – Effective density of states (m^-3)

  • phi (float) – Injection barrier (V)

  • eps_r (float) – Relative dielectric constant

  • T (float) – Temperature (K)

Returns:

returns Vsat as defined in

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.calc_Vtfl(traps, L, eps_r)[source]

Calculate VTFL for SCLC measurement as defined in equation (2) in ACS Energy Lett. 2021, 6, 3, 1087–1094 https://doi.org/10.1021/acsenergylett.0c02599

Vnet = q * n_traps * L**2 /( 2 * eps_0 * eps_r)

Parameters:
  • traps (float) – Trap density (m^-3)

  • L (float) – Thickness (m)

  • eps_r (float) – Relative dielectric constant

Returns:

returns vnet as defined in

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.calc_net_charge(Vnet, L, eps_r)[source]

Calculate the net charge for SCLC measurement as defined in equation (4) in ACS Energy Lett. 2021, 6, 3, 1087–1094 https://doi.org/10.1021/acsenergylett.0c02599

Vnet = q * n_net * L**2 /( 2 * eps_0 * eps_r)

Note that if there are not ions or dopant n_net = traps

Parameters:
  • Vnet (float) – Vnet see ref

  • L (float) – Thickness (m)

  • eps_r (float) – Relative dielectric constant

Returns:

net-charge in the bulk

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.calc_nt_min(L, eps_r, T)[source]

Calculate the minimum appearant trap density for SCLC measurement as defined in equation (3) in ACS Energy Lett. 2021, 6, 3, 1087–1094 https://doi.org/10.1021/acsenergylett.0c02599

Ntmin = 4*np.Pi()**2*((k*T)/(q**2))*((eps_0*eps_r)/(L**2))

Parameters:
  • L (float) – Thickness (m)

  • eps_r (float) – Relative dielectric constant

  • T (float) – Temperature (K)

Returns:

minimum appearant trap density

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.calc_trap_charge(Vnet, L, eps_r)[source]

Calculate the trap charges for SCLC measurement as defined in equation (2) in ACS Energy Lett. 2021, 6, 3, 1087–1094 https://doi.org/10.1021/acsenergylett.0c02599

Vnet = q * n_trap * L**2 /( 2 * eps_0 * eps_r)

Note that if there are not ions or dopant n_net = traps

Parameters:
  • Vtfl (float) – Vtfl see ref

  • L (float) – Thickness (m)

  • eps_r (float) – Relative dielectric constant

Returns:

trapped charges in the bulk

Return type:

float

pySIMsalabim.aux_funcs.SCLC_funcs.deriv(x, y)[source]

Get the derivative of input data dy/dx

Parameters:
  • x (1-D sequence of floats) – x-axis data

  • y (1-D sequence of floats) – y-axis data

Returns:

dy/dx

Return type:

1-D sequence of floats

pySIMsalabim.aux_funcs.SCLC_funcs.fit_MottGurney(V, J, mu, eps_r, Vbi, L, var2fit=['mu'])[source]

Fit the Mott-Gurney equation to the data

Parameters:
  • V (1-D sequence of floats) – Array containing the voltages (V)

  • J (1-D sequence of floats) – Array containing the current-density (A m^-2)

  • mu (float) – Mobility (m^2/(Vs))

  • eps_r (float) – Relative dielectric constant

  • Vbi (float) – Built-in voltage (V)

  • L (float) – Thickness (m)

  • var2fit (list, optional) – Chose variable to fit (can be multiple), by default [‘mu’]

Returns:

list of the fitted values in the same order than var2fit

Return type:

list

pySIMsalabim.aux_funcs.SCLC_funcs.log_slope(x, y)[source]

Get the slope of the logarithmic data

Parameters:
  • x (1-D sequence of floats) – x-axis data

  • y (1-D sequence of floats) – y-axis data

Returns:

slope of the logarithmic data

Return type:

1-D sequence of floats

pySIMsalabim.aux_funcs.addons module

Useful helper functions for pySIMsalabim

pySIMsalabim.aux_funcs.addons.get_FF(Volt, Curr)[source]

Get the fill factor (FF) from solar cell JV-curve by calculating the maximum power point

Parameters:
  • Volt (1-D sequence of floats) – Array containing the voltages.

  • Curr (1-D sequence of floats) – Array containing the current-densities.

Returns:

FF – Fill factor value

Return type:

float

pySIMsalabim.aux_funcs.addons.get_Jsc(Volt, Curr)[source]

Get the short-circuit current (Jsc) from solar cell JV-curve by interpolating the current at 0 V

Parameters:
  • Volt (1-D sequence of floats) – Array containing the voltages.

  • Curr (1-D sequence of floats) – Array containing the current-densities.

Returns:

Jsc – Short-circuit current value

Return type:

float

pySIMsalabim.aux_funcs.addons.get_PCE(Volt, Curr, suns=1)[source]

Get the power conversion efficiency (PCE) from solar cell JV-curve

Parameters:
  • Volt (1-D sequence of floats) – Array containing the voltages.

  • Curr (1-D sequence of floats) – Array containing the current-densities.

Returns:

PCE – Power conversion efficiency value.

Return type:

float

pySIMsalabim.aux_funcs.addons.get_Voc(Volt, Curr)[source]

Get the Open-circuit voltage (Voc) from solar cell JV-curve by interpolating the Voltage when the current is 0

Parameters:
  • Volt (1-D sequence of floats) – Array containing the voltages.

  • Curr (1-D sequence of floats) – Array containing the current-densities.

Returns:

Voc – Open-circuit voltage value

Return type:

float

pySIMsalabim.aux_funcs.addons.get_ideality_factor(suns, Vocs, T=295)[source]

Returns ideality factor from suns-Voc data linear fit of Voc = (nIF/Vt)*log(suns) + intercept

Parameters:
  • suns (1-D sequence of floats) – Array containing the intensity in sun.

  • Vocs (1-D sequence of floats) – Array containing the open-circuit voltages.

  • T (float optional) – Temperature in Kelvin (Default = 295 K).

Returns:

  • nIF (float) – Ideality factor value.

  • intercept (float) – Intercept of the regression line.

  • rvalue (float) – Correlation coefficient.

  • pvalue (float) – Two-sided p-value for a hypothesis test whose null hypothesis is that the slope is zero, using Wald Test with t-distribution of the test statistic.

  • stderr (float) – Standard error of the estimated gradient.

pySIMsalabim.aux_funcs.addons.sci_notation(number, sig_fig=2)[source]

Make proper scientific notation for graphs

Parameters:
  • number (float) – Number to put in scientific notation.

  • sig_fig (int, optional) – Number of significant digits (Defaults = 2).

Returns:

output – String containing the number in scientific notation

Return type:

str

Module contents