flowtube.kinetics ================= .. py:module:: flowtube.kinetics .. autoapi-nested-parse:: Kinetics calculations for flow tube experiments. Citations: Knopf, D.A., Pöschl, U., Shiraiwa, M., 2015. Radial Diffusion and Penetration of Gas Molecules and Aerosol Particles through Laminar Flow Reactors, Denuders, and Sampling Tubes. Anal. Chem. 87, 3746–3754. https://doi.org/10.1021/ac5042395 Functions --------- .. autoapisummary:: flowtube.kinetics.diffusion_limited_rate_constant flowtube.kinetics.diffusion_limited_uptake_coefficient flowtube.kinetics.correction_factor_from_gamma flowtube.kinetics.correction_factor_from_effective_gamma flowtube.kinetics.observed_loss_rate flowtube.kinetics.cylinder_loss flowtube.kinetics.gamma_from_k flowtube.kinetics.fit_first_order_kinetics Module Contents --------------- .. py:function:: diffusion_limited_rate_constant(obj: flowtube.flow_calc.full_attrs, N_eff_Shw: float, diameter: float) -> float Calculate diffusion limited rate constant (s-1) - eq. 10 from Knopf et al., 2015. :param obj: 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). :type obj: full_attrs :param N_eff_Shw: Effective Sherwood number. :type N_eff_Shw: float :param diameter: Diameter of the cylinder (cm). :type diameter: float :returns: Diffusion limited rate constant (s-1). :rtype: float .. py:function:: diffusion_limited_uptake_coefficient(obj: flowtube.flow_calc.full_attrs, diameter: float, k_diff: float) -> float Calculate diffusion limited effective uptake coefficient - eq. 19 from Knopf et al., 2015. :param obj: 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). :type obj: full_attrs :param diameter: Diameter of the cylinder (cm). :type diameter: float :param k_diff: Diffusion limited rate constant (s-1). :type k_diff: float :returns: Diffusion limited effective uptake coefficient (cm s-1). :rtype: float .. py:function:: correction_factor_from_gamma(N_eff_Shw: float, Kn: float, gamma: numpy.typing.NDArray[numpy.float64] | float) -> numpy.typing.NDArray[numpy.float64] | float Calculate correction factor (gamma_eff/gamma)for uptake coefficient - eq. 15 from Knopf et al., 2015. :param N_eff_Shw: Effective Sherwood number (unitless). :type N_eff_Shw: float :param Kn: Knudsen number (unitless). :type Kn: float :param hypothetical_gamma: Hypothetical uptake coefficient (unitless). :type hypothetical_gamma: float :returns: Correction factor (unitless). :rtype: float .. py:function:: correction_factor_from_effective_gamma(N_eff_Shw: float, Kn: float, effective_gamma: numpy.typing.NDArray[numpy.float64] | float) -> numpy.typing.NDArray[numpy.float64] | float Calculate correction factor (gamma_eff/gamma) for uptake coefficient - eq. 20 from Knopf et al., 2015. :param N_eff_Shw: Effective Sherwood number (unitless). :type N_eff_Shw: float :param Kn: Knudsen number (unitless). :type Kn: float :param effective_gamma: Effective uptake coefficient (unitless). :type effective_gamma: float :returns: Correction factor (unitless). :rtype: float .. py:function:: observed_loss_rate(obj: flowtube.flow_calc.full_attrs, diameter: float, gamma_eff: numpy.typing.NDArray[numpy.float64] | float) -> numpy.typing.NDArray[numpy.float64] | float Calculate observed loss rate (s-1) - eq. 19 from Knopf et al., 2015. :param obj: 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). :type obj: full_attrs :param diameter: Diameter of the cylinder (cm). :type diameter: float :param gamma_eff: Effective uptake coefficient (unitless). :type gamma_eff: float :returns: Observed loss rate (s-1). :rtype: float .. py:function:: cylinder_loss(obj: flowtube.flow_calc.full_attrs, diameter: float, N_eff_Shw: float, Kn: float, gamma: numpy.typing.NDArray[numpy.float64] | float, time: float) -> numpy.typing.NDArray[numpy.float64] | float Calculate penetration (unitless) - eq. 21 from Knopf et al., 2015. :param obj: 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). :type obj: full_attrs :param time: Residence time in cylinder (s). :type time: float :returns: Penetration - fraction of initial reactant after passing through cylinder (unitless). :rtype: float .. py:function:: gamma_from_k(obj: flowtube.flow_calc.full_attrs, k: float, diameter: float) -> float Calculate effective uptake coefficient from rate constant. :param obj: 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). :type obj: full_attrs :param k: Rate constant (s-1). :type k: float :param diameter: Diameter of the cylinder (cm). :type diameter: float :returns: Effective uptake coefficient (unitless). :rtype: float .. py:function:: fit_first_order_kinetics(obj: flowtube.flow_calc.carrier_attrs, concentrations: numpy.typing.ArrayLike, exposure: numpy.typing.ArrayLike, exposure_units: str) -> tuple[float, float, float, float, float] Fits the observed loss to a first order kinetic model to extract the uptake coefficient. :param obj: Object with carrier attributes (flow_velocity in cm s-1 needed). carrier_dynamic_viscosity in kg m-1 s-1, carrier_density in kg m-3). :type obj: carrier_attrs :param concentrations: Array of observed concentrations (unitless). :type concentrations: ArrayLike :param exposure: Array of exposures (s or cm). :type exposure: ArrayLike :param exposure_units: Units of exposure ("s", "sec", "second", "seconds", "cm", "centimeter", "centimeters"). :type exposure_units: str :returns: Slope of the linear regression. float: Intercept of the linear regression. float: R-value of the linear regression. float: P-value of the linear regression. float: Standard error of the linear regression. :rtype: float