boar.dynamic_utils package

Submodules

boar.dynamic_utils.pump module

boar.dynamic_utils.pump.gaussian_pulse_norm(t, tpulse, width)[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)

Returns:

Vector containing the gaussian pulse

Return type:

1-D sequence of floats

boar.dynamic_utils.pump.gaussian_pump(t, fpu, pulse_width, P, t0, background=0, Gfrac=1)[source]

Gaussian pump pulse

Parameters:
  • t (ndarray of shape (n,)) – array of time values in seconds

  • fpu (float) – pump frequency in Hz

  • pulse_width (float) – width of the pump pulse in seconds

  • P (float) – total volume density of generated photons m^-3

  • t0 (float) – center of the pulse in seconds

  • background (float, optional) – background volume density of generated photons, by default 0

  • Gfrac (float, optional) – scaling for the power of the pulse, by default 1

Returns:

density of generated photons m^-3 at each time point

Return type:

ndarray of shape (n,)

boar.dynamic_utils.pump.get_flux_density(P, wvl, fpu, A, alpha)[source]

From the measured power, repetition rate and area, get photons/m2 and approximate photons/m3 per pulse

Parameters:
  • P (float) – total CW power of pulse in W

  • wvl (float) – excitation wavelength in nm

  • fpu (float) – repetition rate in s^-1

  • A (float) – effective pump area in m^-2

  • alpha (float) – penetration depth in m

Returns:

  • flux (float) – flux in photons m^-2

  • density (float) – average volume density in photons m^-3

boar.dynamic_utils.pump.initial_carrier_density(t, fpu, N0, background=0, Gfrac=1)[source]

Initial carrier density

Parameters:
  • t (ndarray of shape (n,)) – array of time values in seconds

  • fpu (float) – pump frequency in Hz

  • N0 (float) – initial carrier density in m^-3

  • background (float, optional) – background carrier density, by default 0

  • Gfrac (float, optional) – scaling for the power of the pulse, by default 1

Returns:

initial carrier density in m^-3

Return type:

ndarray of shape (n,)

boar.dynamic_utils.pump.pump_from_file(t, filename, P=None, background=0, Gfrac=1, sep=None)[source]

Pump pulse from file

Parameters:
  • t (ndarray of shape (n,)) – array of time values in seconds

  • filename (str) – path to the file containing the pump pulse

  • P (float, optional) – total volume density of generated photons m^-3, by default None

  • background (float, optional) – background volume density of generated photons, by default 0

  • Gfrac (float, optional) – scaling for the power of the pulse, by default 1

  • sep (str, optional) – delimiter to use, by default None

Returns:

density of generated photons m^-3 at each time point

Return type:

ndarray of shape (n,)

boar.dynamic_utils.pump.square_pump(t, fpu, pulse_width, P, t0=0, background=0, Gfrac=1)[source]

Square pump pulse

Parameters:
  • t (ndarray of shape (n,)) – array of time values in seconds

  • fpu (float) – pump frequency in Hz

  • pulse_width (float) – width of the pump pulse in seconds

  • P (float) – total volume density of generated photons m^-3

  • t0 (float, optional) – time shift of the pump pulse, by default 0

  • background (float, optional) – background volume density of generated photons, by default 0

  • Gfrac (float, optional) – scaling for the power of the pulse, by default 1

Returns:

density of generated photons m^-3 at each time point

Return type:

ndarray of shape (n,)

boar.dynamic_utils.rate_eq module

boar.dynamic_utils.rate_eq.Bimolecular_Trapping_Detrapping_equation(ktrap, kdirect, kdetrap, Bulk_tr, p_0, t, Gpulse, tpulse, ninit=[0, 0, 0], equilibrate=True, eq_limit=0.01, maxcount=1000.0, solver_func='odeint', **kwargs)[source]

Solve the bimolecular trapping and detrapping equation :

dn/dt = G - ktrap * n * (Bulk_tr - n_t) - kdirect * n * (p + p_0) dn_t/dt = k_trap * n * (Bulk_tr - n_t) - kdetrap * n_t * (p + p_0) dp/dt = G - kdetrap * n_t * (p + p_0) - kdirect * n * (p + p_0)

Parameters:
  • ktrap (float) – Trapping rate constant in m^3 s^-1

  • kdirect (float) – Bimolecular/direct recombination rate constant in m^3 s^-1

  • kdetrap (float) – Detrapping rate constant in m^3 s^-1

  • Bulk_tr (float) – Bulk trap density in m^-3

  • p_0 (float) – Ionized p-doping concentration in m^-3

  • t (ndarray of shape (n,)) – time values in s

  • Gpulse (ndarray of shape (n,)) – array of values of the charge carrier generation rate m^-3 s^-1

  • tpulse (ndarray of shape (n,), optional) – time values for the pulse time step in case it is different from t, by default None

  • ninit (list of floats, optional) – initial electron, trapped electron and hole concentrations in m^-3, by default [0,0,0]

  • equilibrate (bool, optional) – whether to equilibrate the system, by default True

  • eq_limit (float, optional) – limit for the relative change of the last time point to the previous one to consider the system in equilibrium, by default 1e-2

  • maxcount (int, optional) – maximum number of iterations to reach equilibrium, by default 1e3

  • solver_func (str, optional) – solver function to use can be [‘odeint’,’solve_ivp’], by default ‘odeint’

  • kwargs (dict) –

    additional keyword arguments for the solver function ‘method’ : str, optional

    method to use for the solver, by default ‘RK45’

    ’rtol’float, optional

    relative tolerance, by default 1e-3

Returns:

  • ndarray of shape (n,) – electron concentration in m^-3

  • ndarray of shape (n,) – trapped electron concentration in m^-3

  • ndarray of shape (n,) – hole concentration in m^-3

boar.dynamic_utils.rate_eq.Bimolecular_Trapping_equation(ktrap, kdirect, t, Gpulse, tpulse, ninit=[0], equilibrate=True, eq_limit=0.01, maxcount=1000.0, solver_func='solve_ivp', **kwargs)[source]

Solve the bimolecular trapping equation :

dn/dt = G - ktrap * n - kdirect * n^2

Parameters:
  • t (ndarray of shape (n,)) – array of time values

  • G (ndarray of shape (n,)) – array of values of the charge carrier generation rate m^-3 s^-1

  • ktrap (float) – trapping rate constant

  • kdirect (float) – Bimolecular/direct recombination rate constant

  • tpulse (ndarray of shape (n,), optional) – array of time values for the pulse time step in case it is different from t, by default None

  • ninit (list of floats, optional) – initial value of the charge carrier density, by default [0]

  • equilibrate (bool, optional) – make sure equilibrium is reached?, by default True

  • eq_limit (float, optional) – relative change of the last time point to the previous one, by default 1e-2

  • maxcount (int, optional) – maximum number of iterations to reach equilibrium, by default 1e3

  • solver_func (str, optional) – solver function to use can be [‘odeint’,’solve_ivp’], by default ‘solve_ivp’

  • kwargs (dict) –

    additional keyword arguments for the solver function ‘method’ : str, optional

    method to use for the solver, by default ‘RK45’

    ’rtol’float, optional

    relative tolerance, by default 1e-3

Returns:

array of values of the charge carrier density m^-3

Return type:

ndarray of shape (n,)

Module contents