Multi-component adsorption modelling#
IAST#
Module calculating IAST, given the pure-component adsorption isotherm model.
- pygaps.iast.pgiast.iast_binary_vle(isotherms, total_pressure, branch='ads', npoints=30, adsorbed_mole_fraction_guess=None, warningoff=False, verbose=False, ax=None)[source]#
Perform IAST calculations to predict the vapour-liquid equilibrium curve at a fixed pressure, over the entire range of gas phase composition (0-1 of the first component).
Pass a list of two of pure-component adsorption isotherms isotherms, with the first one being selected as a basis.
- Parameters:
isotherms (list of ModelIsotherms or PointIsotherms) -- Model adsorption isotherms. e.g. [methane_isotherm, ethane_isotherm]
total_pressure (float) -- Pressure at which the vapour-liquid equilibrium is to be calculated.
npoints (int) -- Number of points in the resulting curve. More points will be more computationally intensive.
branch (str) -- which branch of the isotherm to use
adsorbed_mole_fraction_guess (array or list, optional) -- Starting guesses for adsorbed phase mole fractions that iast solves for.
warningoff (bool, optional) -- When False, logger.warning will print when the IAST calculation result required extrapolation of the pure-component adsorption isotherm beyond the highest pressure in the data.
verbose (bool, optional) -- Print off a extra information, as well as a graph.
ax (matplotlib axes object, optional) -- The axes object where to plot the graph if a new figure is not desired.
- Returns:
dict --
- Dictionary with two components:
y the mole fraction of the selected adsorbate in the gas phase
x mole fraction of the selected adsorbate in the adsorbed phase
- pygaps.iast.pgiast.iast_binary_svp(isotherms, mole_fractions, pressures, branch='ads', warningoff=False, adsorbed_mole_fraction_guess=None, verbose=False, ax=None)[source]#
Perform IAST calculations to predict the selectivity of one of the components as a function of pressure.
Pass a list of two of pure-component adsorption isotherms isotherms, with the first one being selected as a basis.
- Parameters:
isotherms (list of ModelIsotherms or PointIsotherms) -- Model adsorption isotherms. e.g. [methane_isotherm, ethane_isotherm]
mole_fractions (float) -- Fraction of the gas phase for each component. Must add to 1. e.g. [0.1, 0.9]
pressures (list) -- Pressure values at which the selectivity should be calculated.
branch (str) -- which branch of the isotherm to use
warningoff (bool, optional) -- When False, logger.warning will print when the IAST calculation result required extrapolation of the pure-component adsorption isotherm beyond the highest pressure in the data.
adsorbed_mole_fraction_guess (array or list, optional) -- Starting guesses for adsorbed phase mole fractions that iast solves for.
verbose (bool, optional) -- Print off a extra information, as well as a graph.
ax (matplotlib axes object, optional) -- The axes object where to plot the graph if a new figure is not desired.
- Returns:
dict --
- Dictionary with two components:
selectivity the selectivity of the selected component
pressure the pressure for each selectivity
- pygaps.iast.pgiast.iast_point_fraction(isotherms, gas_mole_fraction, total_pressure, branch='ads', verbose=False, warningoff=False, adsorbed_mole_fraction_guess=None)[source]#
Perform IAST calculation to predict multi-component adsorption isotherm from pure component adsorption isotherms.
The material is now in equilibrium with a mixture of gases with partial pressures in the array partial_pressures in units corresponding to those passed in the list of isotherms.
Pass a list of pure-component adsorption isotherms isotherms.
- Parameters:
isotherms (list of ModelIsotherms or PointIsotherms) -- Model adsorption isotherms. e.g. [methane_isotherm, ethane_isotherm, ...]
gas_mole_fraction (array or list) -- Fractions of gas components, e.g. [0.5, 0.5].
total_pressure (float) -- Total gas phase pressure, e.g. 5 (bar)
branch (str) -- which branch of the isotherm to use
verbose (bool, optional) -- Print off a lot of information.
warningoff (bool, optional) -- When False, logger.warning will print when the IAST calculation result required extrapolation of the pure-component adsorption isotherm beyond the highest pressure in the data.
adsorbed_mole_fraction_guess (array or list, optional) -- Starting guesses for adsorbed phase mole fractions that iast solves for.
- Returns:
loading (array) -- Predicted uptakes of each component (mmol/g or equivalent in isotherm units).
- pygaps.iast.pgiast.iast_point(isotherms, partial_pressures, branch='ads', verbose=False, warningoff=False, adsorbed_mole_fraction_guess=None)[source]#
Perform IAST calculation to predict multi-component adsorption isotherm from pure component adsorption isotherms.
The material is now in equilibrium with a mixture of gases with partial pressures in the array partial_pressures in units corresponding to those passed in the list of isotherms.
Pass a list of pure-component adsorption isotherms isotherms.
- Parameters:
isotherms (list of ModelIsotherms or PointIsotherms) -- e.g. [methane_isotherm, ethane_isotherm, ...]
partial_pressures (array or list) -- Partial pressures of gas components, e.g. [1.5, 5].
branch (str) -- which branch of the isotherm to use
verbose (bool, optional) -- Print off a lot of information.
warningoff (bool, optional) -- When False, logger.warning will print when the IAST calculation result required extrapolation of the pure-component adsorption isotherm beyond the highest pressure in the data.
adsorbed_mole_fraction_guess (array or list, optional) -- Starting guesses for adsorbed phase mole fractions that iast solves for.
- Returns:
loading (array) -- Predicted uptakes of each component (mmol/g or equivalent in isotherm units).
- pygaps.iast.pgiast.reverse_iast(isotherms, adsorbed_mole_fractions, total_pressure, branch='ads', verbose=False, warningoff=False, gas_mole_fraction_guess=None)[source]#
Perform reverse IAST to predict gas phase composition at total pressure total_pressure that will yield adsorbed mole fractions adsorbed_mole_fractions.
Pass a list of pure-component adsorption isotherms isotherms.
- Parameters:
isotherms (list) -- Pure-component adsorption isotherms. e.g. [ethane_isotherm, methane_isotherm]
adsorbed_mole_fractions (array) -- Desired adsorbed mole fractions, e.g. [.5, .5]
total_pressure (float) -- Total bulk gas pressure.
branch (str) -- which branch of the isotherm to use
verbose (bool) -- Print extra information.
warningoff (bool) -- When False, logger.warning will print when the IAST calculation result required extrapolation of the pure-component adsorption isotherm beyond the highest pressure in the data.
gas_mole_fraction_guess (array or list) -- Starting guesses for gas phase mole fractions that iast.reverse_iast solves for.
- Returns:
gas_mole_fractions (array) -- Bulk gas mole fractions that yield desired adsorbed mole fractions adsorbed_mole_fractions at total_pressure.
loadings (array) -- Adsorbed component loadings according to reverse IAST (mmol/g or equivalent in isotherm units).