boar.SIMsalabim_utils package
Submodules
boar.SIMsalabim_utils.CalcFom module
- boar.SIMsalabim_utils.CalcFom.Theta_B(ParStrDic, ParFileDic)[source]
Calculate theta bimolecular from the ‘Device_parameters.txt’ file and input parameters.
Theta_B = (Gamma*Gehp*(L**4))/(mun_0*mup_0*(Vint**2))
Theta bimolecular is define in equation (10) of the article below:
Bartesaghi, D., Pérez, I., Kniepert, J. et al.
Competition between recombination and extraction of free charges determines the fill factor of organic solar cells.
Nat Commun 6, 7083 (2015). https://doi.org/10.1038/ncomms8083
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.Theta_T(ParStrDic, ParFileDic)[source]
Calculate theta trap from the ‘Device_parameters.txt’ file and input parameters.
Theta_T = (Bulk_tr*C_eff*(Lac**2))/(mu_eff*Vint)
TO DO: try Theta_T = (Bulk_tr*Cn*Cp*Gehp*(Lac**6))/(mun_0**2*mup_0*Vint**3)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.Theta_T2(ParStrDic, ParFileDic)[source]
Calculate theta trap from the ‘Device_parameters.txt’ file and input parameters.
Theta_T = (Bulk_tr*C_eff*(Lac**2))/(mu_eff*Vint)
TO DO: try Theta_T = (Bulk_tr*Cn*Cp*Gehp*(Lac**6))/(mun_0**2*mup_0*Vint**3)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.Vbi(ParStrDic, ParFileDic, relative=True)[source]
Calculate the built-in voltage from the ‘Device_parameters.txt’ file and input parameters.
Vbi = abs(W_L-W_R)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
relative (bool) – If True, CB_LTL and VB_RTL are relative to CB and VB respectively and W_L and W_R are relative to CB_LTL and VB_RTL respectively
- boar.SIMsalabim_utils.CalcFom.delta_B(ParStrDic, ParFileDic)[source]
Calculate delta bimolecular from the ‘Device_parameters.txt’ file and input parameters.
delta_B = (Gamma*(Nc**2))/Gehp
delta bimolecular is define in equation (12) of the article below:
Koster, V. D. Mihailetchi, R. Ramaker, and P. W. M. Blom ,
“Light intensity dependence of open-circuit voltage of polymer:fullerene solar cells”,
Appl. Phys. Lett. 86, 123509 (2005) https://doi.org/10.1063/1.1889240
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.delta_T(ParStrDic, ParFileDic)[source]
Calculate delta trap from the ‘Device_parameters.txt’ file and input parameters.
delta_T = (Bulk_tr*C_eff*Nc)/(Gehp)
TO DO: try delta_T = (Bulk_tr*Cn*Cp*Nc**2)/(Gehp**2)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.get_Rseries(ParStrDic, ParFileDic)[source]
Get the series resistance from the ‘Device_parameters.txt’ file
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.get_Rshunt(ParStrDic, ParFileDic)[source]
Get the shunt resistance from the ‘Device_parameters.txt’ file
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- boar.SIMsalabim_utils.CalcFom.w_int_L(ParStrDic, ParFileDic, relative=False)[source]
Calculate surface trap FOM from the ‘Device_parameters.txt’ file and input parameters.
w_int = miin(Cn,Cp)*St_L*(Nc_LTL/Nc)*exp((CB_LTL-CB)/kb*T)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
relative (bool) – If True, CB_LTL is relative to CB
- boar.SIMsalabim_utils.CalcFom.w_int_R(ParStrDic, ParFileDic, relative=False)[source]
Calculate surface trap FOM from the ‘Device_parameters.txt’ file and input parameters.
w_int = miin(Cn,Cp)*St_R*(Nc_RTL/Nc)*exp((VB_RTL-VB)/kb*T)
- Parameters:
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
relative (bool) – If True, VB_RTL is relative to VB
boar.SIMsalabim_utils.CleanFolder module
- boar.SIMsalabim_utils.CleanFolder.Store_output_in_folder(filenames, folder_name, path)[source]
Move output files from the simulation into new folder
- Parameters:
filenames (list of str) – list of string containing the name of the files to move
folder_name (str) – name of the folder where we store the output files
path (str) – directory of the folder_name (creates one if it does not already exist)
boar.SIMsalabim_utils.CompileProg module
- boar.SIMsalabim_utils.CompileProg.fpc_prog(prog_name, path2prog, show_term_output=True, force_fpc=True, verbose=True)[source]
Compile program using fpc
- Parameters:
prog_name (str) – Program name (e.g. ‘SimSS’, ‘zimt’, ‘SIMsalabim)
path2prog (str) – String of the absolute path to the program
show_term_output (bool, optional) – show terminal output from the compilation, by default True
force_fpc (bool, optional) – force recompile with fpc even if compiled program already exists, by default True
verbose (bool, optional) – print output of the compilation, by default True
boar.SIMsalabim_utils.Download_SIMsalabim module
- boar.SIMsalabim_utils.Download_SIMsalabim.download_simsalabim(path2prog=None, verbose=True)[source]
Download SIMsalabim from GitHub and extract the files to the current working directory
- Parameters:
path (str, optional) – Path to the directory where SIMsalabim will be downloaded, by default NoneIf None, SIMsalabim will be downloaded to the current working directory in a folder named ‘SIMsalabim’
verbose (bool, optional) – Print the download progress, by default True
boar.SIMsalabim_utils.GetInputPar module
- boar.SIMsalabim_utils.GetInputPar.ChosePar(parname, ParStrDic, ParFileDic)[source]
Chose if we use parameter from ‘Device_parameters.txt’ or from the command string for SIMsalabim and ZimT
- Parameters:
parname (str) – Parameter name as defined in ‘Device_parameters.txt’ file
ParStrDic (dict) – Contains the parameters and values from the command string
ParFileDic (dict) – Contains the parameters and values from the ‘Device_parameters.txt’
- Returns:
String of the parameter value (need to be converted to float if needed)
- Return type:
str
- boar.SIMsalabim_utils.GetInputPar.GetParFromStr(str2run)[source]
Get parameters from command string for SIMsalabim or ZimT
- Parameters:
str2run (STR) – Command string for SIMsalabim or ZimT
- Returns:
Contains the parameters and values from the command string
- Return type:
dict
- boar.SIMsalabim_utils.GetInputPar.ReadParameterFile(path2file)[source]
Get all the parameters from the ‘Device_parameters.txt’ file for SIMsalabim and ZimT :param path2file: Path to the ‘Device_parameters.txt’ :type path2file: str
- Returns:
Contains the parameters and values from the ‘Device_parameters.txt’
- Return type:
dict
boar.SIMsalabim_utils.MakeDevParFile module
- boar.SIMsalabim_utils.MakeDevParFile.CheckProgVersion(path2file)[source]
Check for the program version number in device_parameters.txt
- Parameters:
path2file (str) – path to the device_parameters.txt file
- boar.SIMsalabim_utils.MakeDevParFile.MakeDevParFileCopy(path2file, path2file_copy)[source]
Make a copy of the file ‘path2file in ‘path2file_copy
- Parameters:
path2file (str) – absolute path to the simulation folder that contains the device_parameters.txt file.
path2file_copy (_type_) – absolute path to the simulation folder that will contain the device_parameters_old.txt file.
- boar.SIMsalabim_utils.MakeDevParFile.UpdateDevParFile(ParFileDic, path2file, MakeCopy=True)[source]
Update the device_parameters.txt with the values contained in ParFileDic Has to be used with SIMsalabim v4.33 or higher
- Parameters:
ParFileDic (dic) – Dictioanry containing the values to be written in the file.
path2file (str) – absolute path to the simulation folder that contains the device_parameters.txt file.
MakeCopy (bool, optional) – Make a copy of the previous device_parameters.txt file in device_parameters_old.txt, by default True
boar.SIMsalabim_utils.PlotInputPar module
- boar.SIMsalabim_utils.PlotInputPar.VisualizeDevParFile(ParFileDic, num_fig=0)[source]
Visualize the parameters in the ParFileDic.
- Parameters:
ParFileDic (dic) – Dictionary of the parameters in the ParFile.
num_fig (int, optional) – figure number , by default 0
- boar.SIMsalabim_utils.PlotInputPar.plot_input_SRH_lifetime(ParFileDic, ax, dens=['Bulk_tr'], x_unit='nm', y_unit='s', y2_unit='m')[source]
Plot the input mobility from the device_parameters.txt
- Parameters:
ParFileDic (dic) – dictionary of the device_parameters.txt file
ax (axes) – axes object where the plot will be done
dens (list, optional) – list of the densities type to plot, can be [‘Bulk_tr’,’CNI’,’CPI’,’St_L’,’St_R’], by default [‘Bulk_tr’]
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
y_unit (str, optional) – unit to plot the y-axis, can be [‘nm’,’um’,’s’], by default ‘s’
y2_unit (str, optional) – unit to plot the y2-axis, can be [‘ns’,’us’,’s’], by default ‘m’
- boar.SIMsalabim_utils.PlotInputPar.plot_input_dens(ParFileDic, ax, dens=['Bulk_tr'], x_unit='nm', y_unit='m', y2_unit='m')[source]
Plot the input mobility from the device_parameters.txt
- Parameters:
ParFileDic (dic) – dictionary of the device_parameters.txt file
ax (axes) – axes object where the plot will be done
dens (list, optional) – list of the densities type to plot, can be [‘Bulk_tr’,’CNI’,’CPI’,’St_L’,’St_R’], by default [‘Bulk_tr’]
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
y_unit (str, optional) – unit to plot the y-axis, can be [‘cm’,’m’], by default ‘m’
y_unit – unit to plot the y2-axis, can be [‘cm’,’m’], by default ‘m’
- boar.SIMsalabim_utils.PlotInputPar.plot_input_mob(ParFileDic, ax, x_unit='nm', y_unit='m')[source]
Plot the input mobility from the device_parameters.txt
- Parameters:
ParFileDic (dic) – dictionary of the device_parameters.txt file
ax (axes) – axes object where the plot will be done
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
y_unit (str, optional) – unit to plot the y-axis, can be [‘cm’,’m’], by default ‘m’
- boar.SIMsalabim_utils.PlotInputPar.plot_input_nrj_diag(ParFileDic, ax, x_unit='nm')[source]
Plot the input energy diagram from the device_parameters.txt
- Parameters:
ParFileDic (dic) – dictionary of the device_parameters.txt file
ax (axes) – axes object where the plot will be done
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
boar.SIMsalabim_utils.RunSim module
- boar.SIMsalabim_utils.RunSim.DegradationPrepareSimuInputs(Path2Simu, parameters=None, fixed_str=None, CodeName='SimSS', output_Var=False, cropname=True, verbose=False)[source]
Prepare the command strings to run and the fixed parameters and output files This procedure will make command with fixed_str and all the possible combinations of the input parameters in parameters. (see itertools.product)
- Parameters:
Path2Simu (str) – path to the folder containing the simulation program.
parameters (list, optional) – list of dictionaries containing the parameters to simulate, by default None Structure example: [{‘name’:’Gfrac’,’values’:list(np.geomspace(1e-3,5,3))},{‘name’:’mun_0’,’values’:list(np.geomspace(1e-8,1e-7,3))}]
fixed_str (_type_, optional) – Add any fixed string to the simulation command, by default None
CodeName (str, optional) – code name, can be [‘SimSS’,’simss’,’ZimT’,’zimt’], by default ‘SimSS’
output_Var (bool, optional) – Output the Var file?, by default False
cropname (bool, optional) – Crop the name of the output files to a random uuid (use this is you generate filenames too long), by default True
verbose (bool, optional) – Verbose?, by default False
- Returns:
list of lists containing the command strings to run the simulations, the output files and the fixed parameters str_lst, JV_files, Var_files, scPars_files, code_name_lst, path_lst, labels
- Return type:
list
- boar.SIMsalabim_utils.RunSim.PrepareSimuInputs(Path2Simu, parameters=None, fixed_str=None, CodeName='SimSS', output_Var=False, cropname=True, verbose=False)[source]
Prepare the command strings to run and the fixed parameters and output files This procedure will make command with fixed_str and all the possible combinations of the input parameters in parameters. (see itertools.product)
- Parameters:
Path2Simu (str) – path to the folder containing the simulation program.
parameters (list, optional) – list of dictionaries containing the parameters to simulate, by default None Structure example: [{‘name’:’Gfrac’,’values’:list(np.geomspace(1e-3,5,3))},{‘name’:’mun_0’,’values’:list(np.geomspace(1e-8,1e-7,3))}]
fixed_str (_type_, optional) – Add any fixed string to the simulation command, by default None
CodeName (str, optional) – code name, can be [‘SimSS’,’simss’,’ZimT’,’zimt’], by default ‘SimSS’
output_Var (bool, optional) – Output the Var file?, by default False
cropname (bool, optional) – Crop the name of the output files to a random uuid (use this is you generate filenames too long), by default True
verbose (bool, optional) – Verbose?, by default False
- Returns:
list of lists containing the command strings to run the simulations, the output files and the fixed parameters str_lst, JV_files, Var_files, scPars_files, code_name_lst, path_lst, labels
- Return type:
list
- boar.SIMsalabim_utils.RunSim.RunSimulation(Simulation_Inputs, max_jobs=2, do_multiprocessing=True, verbose=False, ignore_error_code=False)[source]
RunSimulation runs the simulation code using the inputs provided by PrepareSimuInputs function.
- Parameters:
Simulation_inputs (list) – needed inputs for the simulations, see PrepareSimuInputs function for an example of the input
max_jobs (int, optional) – number of parallel thread to run the simulations, by default os.cpu_count()-2
do_multiprocessing (bool, optional) – whether to do multiprocessing when possible , by default True
verbose (bool, optional) – Display text message, by default False
ignore_error_code (bool, optional) – Ignore all error codes from SIMsalabim, this can lead to imcomplete or wrong data, by default False
- boar.SIMsalabim_utils.RunSim.run_code(name_prog, path2prog, str2run='', show_term_output=False, verbose=False, ignore_error_code=False)[source]
Run program ‘name_prog’ in the folder specified by ‘path2prog’.
- Parameters:
name_prog (str) – name of the program to run.
path2prog (str) – path to the folder containing the simulation program. (for example ‘./zimt’ in Linux and ‘zimt.exe’ in Windows ).
st2run (str) – String to run for the name_prog.
show_term_output (bool, optional) – If True, show the terminal output of the program, by default False.
verbose (bool, optional) – Verbose?, by default False.
ignore_error_code (bool, optional) – Ignore all error codes from SIMsalabim, this can lead to imcomplete or wrong data, by default False
- boar.SIMsalabim_utils.RunSim.run_multiprocess_simu(prog2run, code_name_lst, path_lst, str_lst, max_jobs=3)[source]
run_multiprocess_simu runs simulations in parrallel (if possible) on max_jobs number of threads
- Parameters:
prog2run (function) – name of the function that runs the simulations
code_name_lst (list of str) – list of names of the codes to run
str_lst (list of str) – List containing the strings to run for the simulations
path_lst (list of str) – List containing the path to the folder containing the simulation program
max_jobs (int, optional) – Number of threads used to run the simulations, by default os.cpu_count()-1
- boar.SIMsalabim_utils.RunSim.run_parallel_simu(code_name_lst, path_lst, str_lst, max_jobs=3, verbose=False, ignore_error_code=False)[source]
Runs simulations in parrallel on max_jobs number of threads using the GNU Parallel program. (https://www.gnu.org/software/parallel/). If this command is used please cite: Tange, O. (2021, August 22). GNU Parallel 20210822 (‘Kabul’). Zenodo. https://doi.org/10.5281/zenodo.5233953
To Install GNU Parallel on linux: (not available on Windows) sudo apt update sudo apt install parallel
- Parameters:
prog2run (function) – name of the function that runs the simulations
code_name_lst (list of str) – list of names of the codes to run
str_lst (list of str) – List containing the strings to run for the simulations
path_lst (list of str) – List containing the path to the folder containing the simulation program
max_jobs (int, optional) – Number of threads used to run the simulations, by default os.cpu_count()-1
verbose (bool, optional) – Display text message, by default False
ignore_error_code (bool, optional) – Ignore all error codes from SIMsalabim, this can lead to imcomplete or wrong data, by default False
boar.SIMsalabim_utils.SimSS_plots module
- boar.SIMsalabim_utils.SimSS_plots.PlotDensSimSS(Var_files, labels, colors=[], num_fig=0, Vext=['nan'], y=['n', 'p'], xlimits=[], ylimits=[], x_unit='nm', y_unit='cm^-3', plot_type=0, colorbar_type='None', colorbar_display=False, line_type=['-', '--'], legend=True, save_fig=False, fig_name='density.jpg', verbose=True)[source]
Make Var_plot for SIMsalabim
- Parameters:
Var_files (list) – List of files containing the Var filenames.
labels (str, optional) – List of labels for the Var_files.
colors (str, optional) – List of colors for the Var_files, by default [].
num_fig (int) – number of the fig to plot JV
Vext (float) – float to define the voltage at which the densities will be plotted. if Vext=[‘nan’] then takes Vext as max(t), / if Vext=[‘all’] then plots all the Vext,/ if Vext does not exist we plot the closest voltage, default [‘nan’]
y (list of str, optional) – yaxis data can be multiple like [‘n’,’p’], by default [‘n’,’p’]
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 []
x_unit (str, optional) – specify unit of the x-axis either [‘nm’,’um’,’m’], by default ‘nm’
y_unit (str, optional) – specify unit of the y-axis either [‘cm^-3’,’m^-3’], by default ‘cm^-3’
plot_type (int, optional) – type of plot 1 = logx, 2 = logy, 3 = loglog else linlin (default = linlin), by default 0
labels – label of the line, by default ‘’
colors – color for the line, by default ‘b’
colorbar_type (str, optional) – define the type of colorbar to use for the plot [‘None’,’log’,’lin’], by default ‘None’
colorbar_display (bool, optional) – chose to display colormap or not, by default False
line_type (list, optional) – type of line for the plot size line_type need to be = size(y), by default [‘-‘]
legend (bool, optional) – Display legend or not, by default True
save_fig (bool, optional) – If True, save density plot as an image with the file name defined by “fig_name”, by default False
fig_name (str, optional) – name of the file where the figure is saved, by default ‘density.jpg’
verbose (bool, optional) – If True, print some information, by default True
- boar.SIMsalabim_utils.SimSS_plots.PlotDensWithTime(Var_files, labels, colors=[], num_fig=0, time=['nan'], y=['n', 'p'], xlimits=[], ylimits=[], x_unit='s', y_unit='cm^-3', t_unit='s', plot_type=0, colorbar_type='None', colorbar_display=False, line_type=['-', '--'], legend=True, save_fig=False, fig_name='density.jpg', verbose=True)[source]
Make Var_plot for SIMsalabim
- Parameters:
Var_files (list) – List of files containing the Var filenames.
labels (str, optional) – List of labels for the Var_files.
colors (str, optional) – List of colors for the Var_files, by default [].
num_fig (int) – number of the fig to plot JV
time (float) – float to define the voltage at which the densities will be plotted. if time=[‘nan’] then takes time as max(time), / if time=[‘all’] then plots all the time,/ if time does not exist we plot the closest voltage, default [‘nan’]
y (list of str, optional) – yaxis data can be multiple like [‘n’,’p’], by default [‘n’,’p’]
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 []
x_unit (str, optional) – specify unit of the x-axis either [‘ns’,’us’,’ms’,’s’], by default ‘s’
y_unit (str, optional) – specify unit of the y-axis either [‘cm^-3’,’m^-3’], by default ‘cm^-3’
t_unit (str, optional) – specify unit of the time either [‘ns’,’us’,’ms’,’s’], by default ‘s’
plot_type (int, optional) – type of plot 1 = logx, 2 = logy, 3 = loglog else linlin (default = linlin), by default 0
labels – label of the line, by default ‘’
colors – color for the line, by default ‘b’
colorbar_type (str, optional) – define the type of colorbar to use for the plot [‘None’,’log’,’lin’], by default ‘None’
colorbar_display (bool, optional) – chose to display colormap or not, by default False
line_type (list, optional) – type of line for the plot size line_type need to be = size(y), by default [‘-‘]
legend (bool, optional) – Display legend or not, by default True
save_fig (bool, optional) – If True, save density plot as an image with the file name defined by “fig_name”, by default False
fig_name (str, optional) – name of the file where the figure is saved, by default ‘density.jpg’
verbose (bool, optional) – If True, print some information, by default True
- boar.SIMsalabim_utils.SimSS_plots.PlotJV(JV_files, labels=None, data_type=0, colors=[], num_fig=0, x='Vext', y=['Jext'], xlimits=[], ylimits=[], x_unit='V', y_unit='A/m^2', absx=False, absy=False, plot_type=0, line_type=['-'], mark='', legend=True, save_fig=False, fig_name='JV.jpg', verbose=True)[source]
Make JV_plot for SIMsalabim Either from a list of JV files or from a dataframe containing JV data
- Parameters:
JV_files (list) – List of files containing the JV filenames.
labels (list) – List of labels for the JV_files or string when plotting the data dataframe.
data_type (int, optional) – Type of data to plot. Either 0 a list of JV filenames or 1 a dataframe with the JV data. The default is 0.
colors (list, optional) – List of colors for the JV_files or string when plotting the data dataframe, by default [].
num_fig (int) – number of the fig to plot JV, by default 0.
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’]
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 []
x_unit (str, optional) – unit to plot the x-axis, can be [‘mV’,’V’], by default ‘V’
y_unit (str, optional) – unit to plot the y-axis, can be [‘mA/cm^2’,’A/m^2’], by default ‘A/m^2’
absx (bool, optional) – if True, plot the absolute value of x, by default False
absy (bool, optional) – if True, plot the absolute value of y, by default False
plot_type (int, optional) – type of plot 1 = logx, 2 = logy, 3 = loglog else linlin (default = linlin), by default 0
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
save_fig (bool, optional) – If True, save JV as an image with the file name defined by “fig_name”, by default False
fig_name (str, optional) – name of the file where the figure is saved, by default ‘JV.jpg’
verbose (bool, optional) – If True, print some information, by default True
- boar.SIMsalabim_utils.SimSS_plots.PlotJVPerf(x, scPars_files, y='PCE', Gfrac=[], color='b', xlabel='Time [s]', ylabel='PCE [%]', norm_plot=True, norm_factor=0, legend='', num_fig=5, plot_type=0, xlimits=[], ylimits=[], save_fig=True, fig_name='JV_perf.png', mark='o', line_type=['-'], verbose=True)[source]
Plot the performance of the JV curve from the scPars files
- Parameters:
x (list) – x-axis values
scPars_files (list) – list of filenames containing the scPars
y (str, optional) – performance name to plot, see scPars output to check available names, by default ‘PCE’
Gfrac (list, optional) – list of Gfrac to correct MPP for light intensity and calculate PCE, need to be the same size as scPars_file, by default []
color (str, optional) – color of the plot, by default ‘b’
xlabel (str, optional) – x-axis label, by default ‘Time [s]’
ylabel (str, optional) – y-axis label, by default ‘PCE [%]’
norm_plot (bool, optional) – whether of not to normalize the plot, by default True
norm_factor (float, optional) – normalization factor if 0 then normalize using the maximum, by default 0
legend (str, optional) – legend, by default ‘’
num_fig (int, optional) – number of the fig to plot, by default 5
plot_type (int, optional) – type of plot 1 = logx, 2 = logy, 3 = loglog else linlin (default = linlin), by default 0, by default 0
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 []
save_fig (bool, optional) – If True, save density plot as an image with the file name defined by “fig_name”, by default False
fig_name (str, optional) – name of the file where the figure is saved, by default ‘perf.jpg’
mark (str, optional) – type of marker for the plot, by default ‘o’
line_type (list, optional) – type of line for the plot size line_type need to be = size(y), by default [‘-‘]
verbose (bool, optional) – If True, print some information, by default True
- boar.SIMsalabim_utils.SimSS_plots.PlotNrjDiagSimSS(Var_files, labels, path2simu, colors=[], num_fig=0, Vext='nan', x_unit='nm', Background_color=True, show_axis=True, legend=True, fig_name='energy_diagram.jpg', save_fig=False, verbose=True)[source]
“Make energy diagram plot from Var_file output SimSS
- Parameters:
Var_files (list) – List of files containing the Var filenames.
labels (list) – List of labels for the Var_files.
path2simu (str) – Path to the simulation folder.
colors (list, optional) – List of colors for the Var_files, by default [].
num_fig (int) – number of the fig to plot JV, by default 0.
Vext (float) – float to define the voltage at which the densities will be plotted if Vext=’nan’ then take Vext as max(Vext), if Vext does not exist we plot the closest voltage, default ‘nan’
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
Background_color (bool, optional) – Add nice background color to highlight the layer structure, default True
show_axis (bool, optional) – Choose to show axis or not, default True
legend (bool, optional) – Display legend or not, by default True
fig_name (str) – name of the file where the figure is saved, default ‘energy_diagram.jpg’
save_fig (bool) – If True, save energy diagram as an image with the file name defined by “fig_name” , default False
verbose (bool, optional) – If True, print some information, by default True
- boar.SIMsalabim_utils.SimSS_plots.PlotNrjDiagWithTime(Var_files, labels, path2simu, colors=[], num_fig=0, time='nan', x_unit='nm', Background_color=True, show_axis=True, legend=True, fig_name='energy_diagram.jpg', save_fig=False, verbose=True)[source]
“Make energy diagram plot from Var_file output SimSS
- Parameters:
Var_files (list) – List of files containing the Var filenames.
labels (list) – List of labels for the Var_files.
path2simu (str) – Path to the simulation folder.
colors (list, optional) – List of colors for the Var_files, by default [].
num_fig (int) – number of the fig to plot JV, by default 0.
time (float) – float to define the time at which the densities will be plotted if time=’nan’ then take time as max(time), if time does not exist we plot the closest time, default ‘nan’
x_unit (str, optional) – unit to plot the x-axis, can be [‘nm’,’um’,’m’], by default ‘nm’
Background_color (bool, optional) – Add nice background color to highlight the layer structure, default True
show_axis (bool, optional) – Choose to show axis or not, default True
legend (bool, optional) – Display legend or not, by default True
fig_name (str) – name of the file where the figure is saved, default ‘energy_diagram.jpg’
save_fig (bool) – If True, save energy diagram as an image with the file name defined by “fig_name” , default False
verbose (bool, optional) – If True, print some information, by default True
boar.SIMsalabim_utils.ZimT_plots module
- boar.SIMsalabim_utils.ZimT_plots.zimt_Voltage_transient_plot(num_fig, data_tj, x='t', y=['Vext'], xlimits=[], ylimits=[], plot_type=0, labels='', colors='b', line_type=['-'], mark='', legend=True, save_yes=False, pic_save_name='transient_volt.jpg')[source]
Make tj_file transientvoltage curve plot for ZimT Default time on the x axis in $mu$s
- Parameters:
num_fig (int) – number of the fig to plot tj
data_tj (DataFrame) – Panda DataFrame containing tj_file
x (str, optional) – xaxis data, by default ‘t’
y (list of str, optional) – yaxis data can be multiple like [‘Vext’,’Va’], by default [‘Vext’]
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 tj, by default ‘’
colors (str, optional) – color for the JV line, by default ‘b’
line_type (list, optional) – type of line used for the plot size line_type need to be = size(y), by default [‘-‘]
mark (str, optional) – type of Marker used for the plot, by default ‘’
legend (bool, optional) – Display legend or not, by default True
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 ‘transient_volt.jpg’
- boar.SIMsalabim_utils.ZimT_plots.zimt_dens_plot(num_fig, data_Var, time=['nan'], y=['n', 'p'], xlimits=[], ylimits=[], x_unit='nm', y_unit='cm^-3', plot_type=0, labels='', colors='b', colorbar_type='None', colorbar_display=False, line_type=['-', '--'], legend=True, save_yes=False, pic_save_name='density.jpg')[source]
Make Var_plot for ZimT
- Parameters:
num_fig (int) – number of the fig to plot JV
data_JV (DataFrame) – Panda DataFrame containing JV_file
time (float) – float to define the voltage at which the densities will be plotted if t=’nan’ then takettime as max(t), ifttime does not exist we plot the closest voltage, default [‘nan’]
y (list of str, optional) – yaxis data can be multiple like [‘n’,’p’], by default [‘n’,’p’]
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 []
x_unit (str, optional) – specify unit of the x-axis either [‘nm’,’um’,’m’], by default ‘nm’
y_unit (str, optional) – specify unit of the y-axis either [‘cm^-3’,’m^-3’], by default ‘cm^-3’
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 line, by default ‘’
colors (str, optional) – color for the line, by default ‘b’
colorbar_type (str, optional) – define the type of colorbar to use for the plot [‘None’,’log’,’lin’], by default ‘None’
colorbar_display (bool, optional) – chose to display colormap or not, by default False
line_type (list, optional) – type of line for the plot size line_type need to be = size(y), by default [‘-‘]
legend (bool, optional) – Display legend or not, by default True
save_yes (bool, optional) – If True, save density plot 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 ‘density.jpg’
- boar.SIMsalabim_utils.ZimT_plots.zimt_tj_JV_plot(num_fig, data_tj, x='Vext', y=['Jext'], xlimits=[], ylimits=[], plot_type=0, labels='', colors='b', line_type=['-'], mark='', legend=True, save_yes='False', pic_save_name='transient_JV.jpg')[source]
Make tj_file transient current-voltage curve plot for ZimT Default Voltage on the x axis
- Parameters:
num_fig (int) – number of the fig to plot tj
data_tj (DataFrame) – Panda DataFrame containing tj_file
x (str, optional) – xaxis data, by default ‘Vext’
y (list of str, optional) – yaxis data can be multiple like [‘Jext’,’Jncat’], by default [‘Jext’]
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 tj, by default ‘’
colors (str, optional) – color for the JV line, by default ‘b’
line_type (list, optional) – type of line used for the plot size line_type need to be = size(y), by default [‘-‘]
mark (str, optional) – type of Marker used for the plot, by default ‘’
legend (bool, optional) – Display legend or not, by default True
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 ‘transient_JV.jpg’
- boar.SIMsalabim_utils.ZimT_plots.zimt_tj_plot(num_fig, data_tj, x='t', y=['Jext'], xlimits=[], ylimits=[], plot_type=0, labels='', colors='b', line_type=['-'], mark='', legend=True, save_yes=False, pic_save_name='transient.jpg')[source]
Make tj_file transient plot for ZimT Default time on the x axis in $mu$s
- Parameters:
num_fig (int) – number of the fig to plot tj
data_tj (DataFrame) – Panda DataFrame containing tj_file
x (str, optional) – xaxis data, by default ‘t’
y (list of str, optional) – yaxis data can be multiple like [‘Jext’,’Jncat’], by default [‘Jext’]
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 tj, by default ‘’
colors (str, optional) – color for the JV line, by default ‘b’
line_type (list, optional) – type of line used for the plot size line_type need to be = size(y), by default [‘-‘]
mark (str, optional) – type of Marker used for the plot, by default ‘’
legend (bool, optional) – Display legend or not, by default True
pic_save_name (str, optional) – name of the file where the figure is saved, by default ‘transient.jpg’
boar.SIMsalabim_utils.aux_func module
- boar.SIMsalabim_utils.aux_func.LinearFunc(t, a, b)[source]
Linear function f(t) = a*t + b
- Parameters:
t (1-D sequence of floats) – time
a (float) – slope
b (float) – offset
- Returns:
f(t)
- Return type:
1-D sequence of floats
- boar.SIMsalabim_utils.aux_func.MonoExpDecay(t, tau, f0, finf)[source]
Monoexponential decay function f(t) = (f0-finf) * np.exp(-(t/tau) ) + finf
- Parameters:
t (1-D sequence of floats) – time
k (float) – lifetime
f0 (float) – initial quantity
finf (float) – offset
- Returns:
f(t)
- Return type:
1-D sequence of floats
- boar.SIMsalabim_utils.aux_func.MonoExpInc(t, tau, f0, finf)[source]
Monoexponential Inc function f(t) = (finf-f0) *(1-np.exp(-(t/tau))) + f0)
- Parameters:
t (1-D sequence of floats) – time
k (float) – lifetime
f0 (float) – initial quantity
finf (float) – offset
- Returns:
f(t)
- Return type:
1-D sequence of floats
- boar.SIMsalabim_utils.aux_func.StretchedExp(t, tau, h, A, B)[source]
Stretched decay function f(t) = A * np.exp(- (t/tau)^h ) + B
- Parameters:
t (1-D sequence of floats) – time
tau (float) – lifetime
h (float) – heterogeneity parameter
A (float) – initial quantity
B (float) – offset
- Returns:
f(t)
- Return type:
1-D sequence of floats
- boar.SIMsalabim_utils.aux_func.conduction_urbach(CB, VB, Eu, num_points)[source]
Creates a Urbach tail for the conduction band (from CB to CB+(VB-CB)/2) to be used as a BulkTrapFile or IntTrapFile for SIMsalabim
- Parameters:
CB (float) – Conduction band edge value in eV
VB (float) – Valence band edge value in eV
Eu (float) – Urbach energy in eV
num_points (int) – Number of points to be generated
- Returns:
E (1-D sequence of floats) – Array containing the energy values in eV
frac (1-D sequence of floats) – Array containing the fraction of traps at each energy value
- boar.SIMsalabim_utils.aux_func.double_urbach(CB, VB, Eu, num_points)[source]
Creates a Urbach tail on both sides of the bandgap to be used as a BulkTrapFile or IntTrapFile for SIMsalabim
- Parameters:
CB (float) – Conduction band edge value in eV
VB (float) – Valence band edge value in eV
Eu (float) – Urbach energy in eV
num_points (int) – Number of points to be generated
- Returns:
E (1-D sequence of floats) – Array containing the energy values in eV
frac (1-D sequence of floats) – Array containing the fraction of traps at each energy value
- boar.SIMsalabim_utils.aux_func.double_urbach_midgap(CB, VB, Eu, fracmid, num_points)[source]
Creates a Urbach tail on both sides of the bandgap and add a state mid-gap to be used as a BulkTrapFile or IntTrapFile for SIMsalabim
- Parameters:
CB (float) – Conduction band edge value in eV
VB (float) – Valence band edge value in eV
Eu (float) – Urbach energy in eV
fracmid (float) – Fraction of traps at mid-gap
num_points (int) – Number of points to be generated
- Returns:
E (1-D sequence of floats) – Array containing the energy values in eV
frac (1-D sequence of floats) – Array containing the fraction of traps at each energy value
- boar.SIMsalabim_utils.aux_func.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
- boar.SIMsalabim_utils.aux_func.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
- boar.SIMsalabim_utils.aux_func.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
- boar.SIMsalabim_utils.aux_func.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
- boar.SIMsalabim_utils.aux_func.get_alpha_factor(suns, Jscs)[source]
Returns alpha from suns-Jsc data linear fit of log(Jsc) = alpha*log(suns) + b
- 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.
- Returns:
alpha (float) – Alpha 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.
- boar.SIMsalabim_utils.aux_func.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.
- boar.SIMsalabim_utils.aux_func.get_random_value(val_min, val_max, scale='lin')[source]
Get random value between two boundaries
- Parameters:
val_min (float) – min value
val_max (float) – max value
scale (str, optional) – scale type, by default ‘lin’
- Returns:
random value
- Return type:
float
- boar.SIMsalabim_utils.aux_func.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
- boar.SIMsalabim_utils.aux_func.valence_urbach(CB, VB, Eu, num_points)[source]
Creates a Urbach tail for the valence band (from VB to VB-(VB-CB)/2) to be used as a BulkTrapFile or IntTrapFile for SIMsalabim
Fomula: frac = exp(-(VB-E)/Eu)
- Parameters:
CB (float) – Conduction band edge value in eV
VB (float) – Valence band edge value in eV
Eu (float) – Urbach energy in eV
num_points (int) – Number of points to be generated
- Returns:
E (1-D sequence of floats) – Array containing the energy values in eV
frac (1-D sequence of floats) – Array containing the fraction of traps at each energy value
boar.SIMsalabim_utils.plot_settings_screen module
boar.SIMsalabim_utils.tVG_gen module
- boar.SIMsalabim_utils.tVG_gen.gaussian_pulse(t, tpulse, width, Imax)[source]
Returns a gaussian pulse
- Parameters:
t (1-D sequence of floats) – t time axis (unit: s)
tpulse (float) – tpulse center of the pulse (unit: s)
width (float) – width of the pulse (unit: s)
Imax (float) – Imax maximum of the pulse
- Returns:
Vector containing the gaussian pulse
- Return type:
1-D sequence of floats
- boar.SIMsalabim_utils.tVG_gen.zimt_BACE(tmin, tmax, Gen, Vpre, Vextr, tLp=2e-08, tVp=1e-08, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for bias-assisted charge extraction (BACE)
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gen (float) – initial generation rate (i.e. light intensity) (unit: m^-3 s^-1)
Vpre (float) – initial applied voltage (or pre-bias) (unit: V)
Vextr (float) – extraction voltage (unit: V)
tLp (float, optional) – LED pulse fall/rise time (unit: s), by default 20e-9
tVp (float, optional) – Voltage pulse fall/rise time (unit: s), by default 10e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_CELIV(tmin, tmax, Voffset, slopeV, Gen, tpulse, tstep, tdelay, width_pulse=2e-09, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for charge extraction by linearly increasing voltage (CELIV) experiment
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Voffset (float) – initial applied voltage (steady-state) (unit: V)
slopeV (float) – slope of the applied voltage increase (V/s)
Gen (float) – Total number of carrier generated by the gaussian pulse (unit: m^-3)
tpulse (float) – middle of the gaussian pulse (unit: s)
tstep (float) – time step for the linear regime (unit: s)
tdelay (float) – delay between middle of laser pulse and voltage switch (unit: s)
width_pulse (float, optional) – width of the light pulse (unit: s), by default 2e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_JV_double_sweep(Vstart, Vfinal, scan_speed, Gen, steps, Vacc=-0.1, time_exp=False, tVG_name='tVG.txt')[source]
Make tVG file for double JV sweep experiment Scan voltage back and forth
- Parameters:
Vstart (float) – initial applied voltage (steady-state) (unit: V)
Vfinal (float) – final applied voltage (unit: V)
scan_speed (float) – scan speed (unit: V/s)
Gen (float) – constant generation rate (i.e. light intensity) (unit: m^-3 s^-1)
steps (int) – number of JV points
Vacc (float, optional) – point of accumulation of row of V’s, note: Vacc should be slightly larger than Vmax or slightly lower than Vmin (unit: V)
time_exp (bool, optional) – If True exponential time step is used, else linear time step, by default False
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_JV_sweep(Vstart, Vfinal, scan_speed, Gen, steps, time_exp=False, tVG_name='tVG.txt')[source]
Make tVG file for one JV sweep experiment
- Parameters:
Vstart (float) – initial applied voltage (steady-state) (unit: V)
Vfinal (float) – final applied voltage (unit: V)
scan_speed (float) – scan speed (unit: V/s)
Gen (float) – constant generation rate (i.e. light intensity) (unit: m^-3 s^-1)
steps (int) – number of JV points
time_exp (bool, optional) – If True exponential time step is used, else linear time step, by default False
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_TPC_Gauss_pulse(tmin, tmax, Gen_pulse, G0, tpulse, width_pulse=2e-09, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for transient photocurrent (TPC) experiment with a gaussian pulse for the light excitation.
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gen_pulse (float) – Total number of carrier generated by the gaussian pulse (unit: m^-3)
G0 (float) – background generation rate (i.e. light intensity) (unit: m^-3 s^-1)
tpulse (float) – middle of the gaussian pulse (unit: s)
width_pulse (float, optional) – width of the light pulse (unit: s), by default 2e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_TPC_square_pulse(tmin, tmax, Gen_pulse, G0, width_pulse, tLp=2e-08, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for transient photocurrent (TPC) experiment with a gaussian pulse for the light excitation.
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gen_pulse (float) – Generation rate at the top of the squared pulse __–__ (i.e. light intensity) (unit: m^-3 s^-1)
G0 (float) – background generation rate (i.e. light intensity) (unit: m^-3 s^-1)
width_pulse (float) – width of the light pulse (unit: s)
tLp (float, optional) – LED pulse fall/rise time (unit: s), by default 20e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_TPV(tmin, tmax, Gen_pulse, G0, tpulse, width_pulse=2e-09, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for transient photovoltage (TPV) experiment
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gen_pulse (float) – Total number of carrier generated by the gaussian pulse (unit: m^-3)
G0 (float) – background generation rate (i.e. light intensity) (unit: m^-3 s^-1)
tpulse (float) – middle of the gaussian pulse (unit: s)
width_pulse (float, optional) – width of the light pulse (unit: s), by default 2e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_TrPL(tmin, tmax, Gen, G0, Vapp, tstep, tpulse, width_pulse=2e-09, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for transient photovoltage (TPV) experiment
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gen (float) – Total number of carrier generated by the gaussian pulse (unit: m^-3)
G0 (float) – background generation rate (i.e. light intensity) (unit: m^-3 s^-1)
Vapp (float) – Applied voltage (unit: V)
tstep (float) – time step for the linear regime (unit: s)
tpulse (float) – middle of the gaussian pulse (unit: s)
width_pulse (float, optional) – width of the light pulse (unit: s), by default 2e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_impedance(Vapp, Vamp, freq, Gen, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for impedance experiment
- Parameters:
Vapp ([type]) – offset applied voltage (steady-state) (unit: V)
Vamp ([type]) – amplitude of the voltage perturbation (unit: V)
freq ([type]) – frequency of the oscillation (unit: Hz)
Gen ([type]) – max generation rate (i.e. light intensity) of the gaussian pulse (unit: m^-3 s^-1)
steps (int, optional) – number of time step, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_light_decay(tmin, tmax, Gstart, Gfinal, Va, steps=100, trf=2e-08, time_exp=False, tVG_name='tVG.txt')[source]
Make tVG file for light decay experiment
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Gstart (float) – initial generation rate, i.e. light intensity (steady-state) (unit: m^-3 s^-1)
Gfinal (float) – final generation rate (unit: m^-3 s^-1)
Va (float) – applied voltage (unit: V)
steps (float) – number of time steps
trf (float, optional) – LED/laser fall/rise time, by default 20e-9 (unit: s)
time_exp (bool, optional) – If True exponential time step is used, else linear time step, by default False
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_tdcf(tmin, tmax, Vpre, Vcol, Gen, tpulse, tstep, tdelay, width_pulse=2e-09, tVp=1e-08, time_exp=False, steps=100, tVG_name='tVG.txt')[source]
Make tVG file for time-delayed collection field (TDCF)
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Vpre (float) – initial applied voltage (steady-state) or pre-bias in typical TDCF language (unit: V)
Vcol (float) – final applied voltage or collection bias in typical TDCF language (unit: V)
Gen (float) – Total number of carrier generated by the gaussian pulse (unit: m^-3)
tpulse (float) – middle of the gaussian pulse (unit: s)
tstep (float) – time step for the linear regime (unit: s)
tdelay (float) – delay between middle of laser pulse and voltage switch (unit: s)
width_pulse (float, optional) – width of the light pulse (unit: s), by default 2e-9
tVp (float, optional) – Voltage pulse fall/rise time (unit: s), by default 10e-9
time_exp (bool, optional) – if True chose exponential time step else keep time step linear, by default False
steps (int, optional) – if time_exp = True number of exponential time step after voltage switch, by default 100
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’
- boar.SIMsalabim_utils.tVG_gen.zimt_voltage_step(tmin, tmax, Vstart, Vfinal, Gen, steps=100, trf=1e-08, time_exp=False, tVG_name='tVG.txt')[source]
Make tVG file for Voltage decay experiment
- Parameters:
tmin (float) – first time step after 0 (unit: s)
tmax (float) – final time step (unit: s)
Vstart (float) – initial applied voltage (steady-state) (unit: V)
Vfinal (float) – final applied voltage (unit: V)
Gen (float) – constant generation rate (i.e. light intensity) (unit: m^-3 s^-1)
steps (int, optional) – number of time steps, by default 100
trf (float, optional) – Voltage pulse fall/rise time , by default 10e-9 (unit: s)
time_exp (bool, optional) – If True exponential time step is used, else linear time step, by default False
tVG_name (str, optional) – tVG_file name, by default ‘tVG.txt’