4. Unary Isotherms¶
4.1. Langmuir¶
The temperature-dependent unary Langmuir isotherm is expressed as
where \(f_i\), is the fugacity of component i, can be calculated assuming ideal gas
or, using the RealGas package to calculate \(\phi_i\) from \(y_i,P,T\) data,
An Arrhenius relationship for \(k_i\) is assumed as
Introducing the dimensionless parameters
The variables to be fit in dimensionless form are
So that Equation (1) becomes
4.2. Modules¶
-
class
isotherm_models.unaryisotherm.
UnaryIsotherm
(f_i, q_i, T, q_ref=None, f_ref=None, T_ref=None, **kwargs)[source]¶ Base class for Unary Isotherms
- Parameters
f_i (list) – fugacities of component i (can be calculated assuming ideal gas or real gas)
q_i (list) – loadings of component i
T (list, optional) – temperatures in [K], defaults to None
q_ref (float, optional) – reference loading, defaults to maximum loading in
q_i
f_ref (float, optional) – reference fugacity, defaults to maximum fugacity in
f_j
T_ref (float, optional) – reference temperature, defaults to maximum temperature in
T
points (list, derived from input) – state points at which a pressure and temperature are provided
f_i_star (list, derived) – dimensionless fugacitities, calculated by Equation (3)
theta (list, derived) – dimensionless loadings, calculated by Equation (2)
T_star (list, derived) – dimensionless temperatures, calculated by Equation (4)
theta_calc (pyo.Var, derived from input) – calculated dimensionless at each state point
objective (pyo.Objective, derived from input) – objective function to be minimized for isotherm fitting, calculated from
isotherm_models.unaryisotherm.UnaryIsotherm.objective_rule_pyomo()
R2 (pyo.Expression, derived) – coefficient of determination, see
isotherm_models.unaryisotherm.UnaryIsotherm.R2_rule()
q_calc (pyo.Expression, derived) – calculated loading in units
-
objective_rule_pyomo
()[source]¶ Sum of squared errors between calculated loading and predicted loading
\[\sum_i \left(\theta_i^{\text{raw}}-\theta_i^{\text{calc}}\right)^2\]where raw denotes the raw data obtained by experiment or molecular simulation and calc denotes the data calculated from the isotherm function
-
class
isotherm_models.unaryisotherm.
LangmuirUnary
(*args, **kwargs)[source]¶ Langmuir isotherm for unary mixture
Isotherm is Equation (1). Dimensionless isotherm is Equation (8). Dimensionless variables to be fit are \(H_i^\star\), \(A_i\), and \(q_{\text{m},i}^\star\), as defined in Equations (5), (6), and (7), respectively.
- Parameters
H_i_star (pyo.Var) – \(H_i^\star\), dimensionless heat of adsorption of component i
A_i (pyo.Var) – \(A_i\), dimensionless langmuir constant in logarithmic space
q_mi_star (pyo.Var) – \(q_{\text{m}i}^\star\), dimensionless saturation loading
q_mi (pyo.Expression) – langmuir saturaiton loading
k_i_inf (pyo.Expression) – langmuir adsorption constant independent of temperature
dH_i (pyo.Expression) – heat of adsorption of component i
-
dimensionless_isotherm_expression
(point)[source]¶ Dimensionless isotherm expression, see Equation (8)
-
initial_guess_A_i
()[source]¶ Initial guess for \(A_i\) variable
Todo
Come up with logical initial guess
-
initial_guess_H_i_star
()[source]¶ Initial guess for \(H_i^\star\) variable
This value of 10 corresponds to an absolute value for heat of adsorption of \(10RT\) which is approximately 25 kJ/mol
-
initial_guess_q_mi_star
()[source]¶ Initial guess for \(q_mi^\star\) variable
If \(q_\text{ref}\) is chosen to be the saturation loading, \(q_mi^\star\) will be 1. Thus, we return 1 as initial guess
5. Binary Isotherms¶
5.1. Binary Langmuir¶
Arrhenius relationships are used for \(k_i\) and \(k_j\),
and dimensionless variables are used as
illustrated in isotherm_models.unaryisotherm.LangmuirUnary
Note
This isotherm is not equivalent to the conventional extended langmuir isotherm, because both \(k_i\) and \(k_j\) are fit simultaneously to binary data.
For completeness, the relationships are repeated for the binary case below
The dimensionless parameters \(\theta_i\) and \(T^\star\) are calculated as the unary case, as shown in Equations (2) and (4), respectively. The other dimensionless parameters are
The dimensionless variables to be fit include \(H_i^\star\), \(q_{\text{m},i}^\star\), \(A_i\), \(H_j^\star\), \(q_{\text{m},j}^\star\), and \(A_j\). The former three (\(H_i^\star\), \(q_{\text{m},i}^\star\), and \(A_i\)) have the same expression as the unary case, as shown in Equations (5), (6), and (7), respectively. The latter two are expressed as
So that Equation (9) becomes
5.2. Modules¶
-
class
isotherm_models.binaryisotherm.
BinaryIsotherm
(hat_f_i, hat_f_j, q_i, T, f_ref=None, **kwargs)[source]¶ Base class for Binary Isotherms, inherits from UnaryIsotherm
The following additional dimensionless variables are used in computations
- Parameters
hat_f_j (list) – mixture fugacities of component i
hat_f_j – mixture fugacities of component j
q_i (list) – loadings of component i
T (list, optional) – temperatures in [K], defaults to None
points (list, derived from input) – state points at which a pressure and temperature are provided
hat_f_i_star (list, derived) – dimensionless fugacitities of component i, calculated by Equation (10)
hat_f_j_star (list, derived) – dimensionless fugacitities of component j, calculated by Equation (11)
theta (list, derived) – dimensionless loadings, calculated by Equation (2)
T_star (list, derived) – dimensionless temperatures, calculated by Equation (4)
theta_calc (pyo.Var, derived from input) – calculated dimensionless at each state point
objective (pyo.Objective, derived from input) – objective function to be minimized for isotherm fitting, calculated from
isotherm_models.unaryisotherm.UnaryIsotherm.objective_rule_pyomo()
R2 (pyo.Expression, derived) – coefficient of determination, see
isotherm_models.unaryisotherm.UnaryIsotherm.R2_rule()
q_calc (pyo.Expression, derived) – calculated loading in units
unary_points (list, derived) – points where only i is present, derived from where \(\hat{f}_j < 1\times10^{-12}\)
-
class
isotherm_models.binaryisotherm.
BinaryLangmuir
(*args, **kwargs)[source]¶ Temperature-dependent extended unary Langmuir isotherm, expressed as
Isotherm is Equation (9). Dimensionless isotherm is Equation (14). Dimensionless variables to be fit are \(H_i^\star\), \(A_i\), \(q_{\text{m},i}^\star\), \(H_j_star\), and \(A_j\), as defined in Equations (5), (6), (7), (12), and (13), respectively.
- Parameters
H_i_star (pyo.Var) – \(H_i^\star\), dimensionless heat of adsorption of component i
A_i (pyo.Var) – \(A_i\), dimensionless langmuir constant in logarithmic space
H_j_star (pyo.Var) – \(H_j^\star\), dimensionless heat of adsorption of component j
A_j (pyo.Var) – \(A_j\), dimensionless langmuir constant in logarithmic space
q_mi_star (pyo.Var) – \(q_{\text{m},i}^\star\), dimensionless saturation loading
q_mi (pyo.Expression) – langmuir saturation loading
k_i_inf (pyo.Expression) – langmuir adsorption constant independent of temperature
dH_i (pyo.Expression) – heat of adsorption of component i
k_j_inf (pyo.Expression) – langmuir adsorption constant independent of temperature
dH_j (pyo.Expression) – heat of adsorption of component j
-
dimensionless_isotherm_expression
(point)[source]¶ Dimensionless isotherm expression, see Equation (14)