tapsap.moments_analysis package
Submodules
tapsap.moments_analysis.active_sites_by_pulse module
- tapsap.moments_analysis.active_sites_by_pulse.active_sites_by_pulse(flux_M0: ndarray, inert_M0: ndarray, stoichiometric_coef: float, first_order: bool = True, huber_loss: bool = False) dict
A function for determining the diffusion coefficient from the moments of the flux. Note that this method only works for an irreversible process.
- Args:
flux_M0 (ndarray): An array of M0 values based on the flux.
inert_M0 (ndarray): An array of M0 values based on the inert/reference flux.
stoichiometric_coef (float): The stoichimetric coefficient of the gas species.
first_order (float): If the reaction is first ordered. If False, then the reaction will be assumed to be second order.
huber_loss (bool): Use a robust loss function rather than the standard square error loss.
- Returns:
fitted, active_sites (dict): The fitted values by pulse number and the active sites.
- Citation:
Constales et al, “Methods for determining the intrinsic kinetic characteristics of irreversible adsorption processes.”
- Implementor:
Ross Kunz
- See also:
tapsap.moments_analysis.moments
- Link:
tapsap.moments_analysis.diffusion_moments module
- tapsap.moments_analysis.diffusion_moments.diffusion_moments(moments: dict, zone_lengths: dict, zone_porosity: dict, current_mass: Optional[float] = None, new_mass: Optional[float] = None) dict
A function for determining the diffusion coefficient from the moments of the flux.
- Args:
moments (dict | dataframe): The moments of the flux
zone_lengths (dict): The zone lengths for the reactor, e.g., {0.002, 0.000001, 0.002}
zone_porosity (dict): The bed porosity within each zone
current_mass (float): The current mass of the given flux.
new_mass (float): The mass in which you are transforming the flux to have the same diffusion (typically the inert mass).
- Returns:
diffusion (dict): The diffusion coefficients per pulse.
- Citation:
Gleaves et al, “TAP-2: An interrogative kinetics approach”
- Implementor:
Ross Kunz
- See also:
tapsap.moments_analysis.moments
- Link:
tapsap.moments_analysis.isreversible module
- tapsap.moments_analysis.isreversible.isreversible(flux: ndarray, times: ndarray, inert_flux: ndarray, flux_mass: float, inert_mass: float) bool
Check to see if the flux is reversible when compared to the inert flux. This requires first that the inert flux be transformed to the same mass as the flux through Graham’s law. Afterwhich, the normalized first moment of the flux is compared to the inert to determine reversibility. If M1_flux < M1_inert, then irreversible.
- Args:
flux (float ndarray): The outlet flux.
times (float ndarray): An array of time.
inert_flux (float ndarray): The outlet flux of the inert.
flux_mass (float): The mass of the flux.
inert_mass (float): The mass of the inert flux.
- Returns:
isreversible (bool): Determine if the outlet flux is reversible.
- Citation:
Gleaves et al, “TAP-2: An interrogative kinetics approach”
Kunz et al, “A Priori Calibration of Transient Kinetics Data via Machine Learning” (In prep)
- Implementor:
Ross Kunz
- See also:
tapsap.diffusion.grahams_law
tapsap.moments_analysis.moments
- Link:
tapsap.moments_analysis.min_mean_max module
- tapsap.moments_analysis.min_mean_max.min_mean_max(flux: ndarray) dict
Calculation of the min, mean and max of the flux.
- Args:
flux (ndarray | DataFrame): The outlet flux.
- Returns:
min_mean_max (dict): The min mean and max of a flux.
- Implementor:
Ross Kunz
tapsap.moments_analysis.moments module
- tapsap.moments_analysis.moments.moments(flux: ndarray, times: ndarray, integration_time_range: Optional[list] = None) dict
Calculation of the moments using the trapezoidal rule
- Args:
flux (float ndarray | dataframe): The outlet flux.
times (float ndarray): An array of time.
integration_time_range (ints list, optional): A list contianing the start and end time to integrate the flux. If None, then set to the min and max time.
- Returns:
moments (dict): The moments of the flux
- Citation:
Gleaves et al, “TAP-2: An interrogative kinetics approach”
Constales et al, “Multi-zone TAP-reactors theory and application: I. The global transfer matrix equation”
Constales et al, “Multi-zone TAP-reactors theory and application: II. The three-dimensional theory”
- Implementor:
Ross Kunz
- See also:
tapsap.utils.trapz
- Link:
https://doi.org/10.1016/S0926-860X(97)00124-5
tapsap.moments_analysis.reactivities_product module
- tapsap.moments_analysis.reactivities_product.reactivities_product(product_moments: dict, reactant_moments: dict, inert_moments: dict, reactant_reactivities: dict, zone_residence_time: dict, diffusions: list) dict
Reactivities calculations for a product gas Zeroth reactivity is the apparent rate constant. First reactivity is the apparent gas uptake-release coefficient. Second reactivity is the delay caused by storage on the catalyst.
- Args:
product_moments (dict | dataframe): A dict of the zeroth, first and second moment of the product.
inert_moments (dict | dataframe): A dict of the zeroth, first and second moment of the inert.
reactant_moments (dict | dataframe): A dict of the zeroth, first and second moment of the reactant.
reactant_reactivities (dict | dataframe): A dict of the zeroth, first and second reactivity coefficients of the reactant.
diffusions (list): A list of the diffusion coefficients for each gas: [inert_diffusion, reactant_diffusion, product_diffusion].
zone_residence_time (dict): Residence times for each zone of the reactor.
- Returns:
product_reactivities (dict): The zeroth, first and second reactivities of the product.
- Cite:
Constales et al “Precises non-steady-state characterization of solid active materials with no prelimnary mechanistic assumptions”
Shekhtman et al “‘State defining’ experiment in chemical kinetics primary characterization of catalyst activity in a TAP experiment”
- Implementor:
Ross Kunz
- See also:
tapsap.moments_analysis.moments
tapsap.diffusion.calculate_residence_time
tapsap.diffusion.calculate_zone_diffusion
- Link:
tapsap.moments_analysis.reactivities_reactant module
- tapsap.moments_analysis.reactivities_reactant.reactivities_reactant(reactant_moments: dict, inert_moments: dict, zone_residence_time: dict) dict
Reactivities calculations for a reactant gas. Zeroth reactivity is the apparent rate constant. First reactivity is the apparent gas uptake-release coefficient. Second reactivity is the delay caused by storage on the catalyst.
- Args:
reactant_moments (dict | dataframe): A dictionary of the zeroth, first and second moment of the reactant.
inert_moments (dict | dataframe): A dictionary of the zeroth, first and second moment of the inert.
zone_residence_time (dict): Residence times for each zone of the reactor.
- Returns:
reactant_reactivities (dict): The reactivity coefficients of the reactant.
- Citation:
Constales et al “Precises non-steady-state characterization of solid active materials with no prelimnary mechanistic assumptions”
Shekhtman et al “‘State defining’ experiment in chemical kinetics primary characterization of catalyst activity in a TAP experiment”
- Implementor:
Ross Kunz
- See also:
tapsap.moments_analysis.moments
tapsap.diffusion.calculate_residence_time
- Link:
tapsap.moments_analysis.rtd_parameters module
- tapsap.moments_analysis.rtd_parameters.rtd_parameters(moments: dict) dict
Calculation of the residence time distribution parameters using the moments. This includes the shape and scale estimates assuming a Gamma distribution.
- Args:
moments (dict | DataFrame): The integral of the flux
- Returns:
rtd_parameters (dict): The mean residence time, variance residence time, gamma shape parameter, and gamma scale parameter
- Citation:
Gleaves et al, “TAP-2: An interrogative kinetics approach”
Constales et al, “Multi-zone TAP-reactors theory and application: I. The global transfer matrix equation”
Constales et al, “Multi-zone TAP-reactors theory and application: II. The three-dimensional theory”
Casella et al, “Statistical Inference”
- Implementor:
Ross Kunz
- See also:
tapsap.moments_analysis.moments
- Link:
https://doi.org/10.1016/S0926-860X(97)00124-5
https://doi.org/10.1016/S0009-2509(00)00216-5