flowtube.kinetics
Kinetics calculations for flow tube experiments.
Functions
|
Calculate correction factor for uptake coefficient - eq. |
|
Calculate penetration (unitless) - eq. |
|
Calculate diffusion limited rate constant (s-1) - eq. |
|
Calculate diffusion limited effective uptake coefficient - eq. |
|
Fits the observed loss to a first order kinetic model to extract the uptake coefficient. |
|
Calculate effective uptake coefficient from rate constant. |
|
Calculate observed loss rate (s-1) - eq. |
- flowtube.kinetics.diffusion_limited_rate_constant(obj, N_eff_Shw, diameter)[source]
Calculate diffusion limited rate constant (s-1) - eq. 10 from Knopf et al., 2015.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
N_eff_Shw (float) – Effective Sherwood number.
diameter (float) – Diameter of the cylinder (cm).
- Returns:
Diffusion limited rate constant (s-1).
- Return type:
float
- flowtube.kinetics.diffusion_limited_uptake_coefficient(obj, diameter, k_diff)[source]
Calculate diffusion limited effective uptake coefficient - eq. 19 from Knopf et al., 2015.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
diameter (float) – Diameter of the cylinder (cm).
k_diff (float) – Diffusion limited rate constant (s-1).
- Returns:
Diffusion limited effective uptake coefficient (cm s-1).
- Return type:
float
- flowtube.kinetics.correction_factor(N_eff_Shw, Kn, gamma)[source]
Calculate correction factor for uptake coefficient - eq. 20 from Knopf et al., 2015.
- Parameters:
N_eff_Shw (float) – Effective Sherwood number (unitless).
Kn (float) – Knudsen number (unitless).
hypothetical_gamma (float) – Hypothetical uptake coefficient (unitless).
gamma (ndarray[tuple[Any, ...], dtype[float64]] | float)
- Returns:
Correction factor (unitless).
- Return type:
float
- flowtube.kinetics.observed_loss_rate(obj, diameter, gamma_eff)[source]
Calculate observed loss rate (s-1) - eq. 19 from Knopf et al., 2015.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
diameter (float) – Diameter of the cylinder (cm).
gamma_eff (float) – Effective uptake coefficient (unitless).
- Returns:
Observed loss rate (s-1).
- Return type:
float
- flowtube.kinetics.cylinder_loss(obj, diameter, N_eff_Shw, Kn, gamma, time)[source]
Calculate penetration (unitless) - eq. 21 from Knopf et al., 2015.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
time (float) – Residence time in cylinder (s).
diameter (float)
N_eff_Shw (float)
Kn (float)
gamma (ndarray[tuple[Any, ...], dtype[float64]] | float)
- Returns:
- Penetration - fraction of initial reactant after passing
through cylinder (unitless).
- Return type:
float
- flowtube.kinetics.gamma_from_k(obj, k, diameter)[source]
Calculate effective uptake coefficient from rate constant.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
k (float) – Rate constant (s-1).
diameter (float) – Diameter of the cylinder (cm).
- Returns:
Effective uptake coefficient (unitless).
- Return type:
float
- flowtube.kinetics.fit_first_order_kinetics(obj, concentrations, exposure, exposure_units)[source]
Fits the observed loss to a first order kinetic model to extract the uptake coefficient.
- Parameters:
obj (full_attrs) – Object with full attributes (P in Pa, T in K, reactant_diffusion_rate in cm2 s-1, carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3).
concentrations (NDArray[np.float64]) – Array of observed concentrations (unitless).
exposure (NDArray[np.float64]) – Array of exposures (s or cm).
exposure_units (str) – Units of exposure (“s”, “sec”, “second”, “seconds”, “cm”, “centimeter”, “centimeters”).
- Returns:
- Tuple containing the
slope, intercept, r-value, p-value, and standard error of the regression.
- Return type:
tuple[float, float, float, float, float]