Skip to content

polykin.thermo.acm¤

UNIQUAC_gamma ¤

UNIQUAC_gamma(
    x: FloatVector,
    q: FloatVector,
    r: FloatVector,
    tau: FloatSquareMatrix,
) -> FloatVector

Calculate the activity coefficients of a multicomponent mixture according to the UNIQUAC model.

\[\begin{aligned} \ln{\gamma_i} &= \ln{\gamma_i^R} + \ln{\gamma_i^C} \\ \ln{\gamma_i^R} &= q_i \left(1 - \ln{s_i} - \sum_j \theta_j\frac{\tau_{ij}}{s_j} \right) \\ \ln{\gamma_i^C} &= 1 - J_i + \ln{J_i} - 5 q_i \left(1 - \frac{J_i}{L_i} + \ln{\frac{J_i}{L_i}} \right) \end{aligned}\]

with:

\[\begin{aligned} J_i &=\frac{r_i}{\sum_j x_j r_j} \\ L_i &=\frac{q_i}{\sum_j x_j q_j} \\ \theta_i &= x_i L_i \\ s_i &= \sum_j \theta_j \tau_{ji} \end{aligned}\]

where \(x_i\) are the mole fractions, \(q_i\) and \(r_i\) denote the pure-component parameters, and \(\tau_{ij}\) are the interaction parameters.

References

  • Abrams, D.S. and Prausnitz, J.M. (1975), Statistical thermodynamics of liquid mixtures: A new expression for the excess Gibbs energy of partly or completely miscible systems. AIChE J., 21: 116-128.
  • JM Smith, HC Van Ness, MM Abbott. Introduction to chemical engineering thermodynamics, 5th edition, 1996, p. 740-741.
PARAMETER DESCRIPTION
x

Mole fractions of all components. Unit = mol/mol.

TYPE: FloatVector(N)

q

Relative surface areas of all components.

TYPE: FloatVector(N)

r

Relative volumes of all components.

TYPE: FloatVector(N)

tau

Interaction parameters, \(\tau_{ij}\). It is expected (but not checked) that \(\tau_{ii}=1\).

TYPE: FloatSquareMatrix(N, N)

RETURNS DESCRIPTION
FloatVector(N)

Activity coefficients of all components.

See also
Source code in src/polykin/thermo/acm/uniquac.py
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
def UNIQUAC_gamma(x: FloatVector,
                  q: FloatVector,
                  r: FloatVector,
                  tau: FloatSquareMatrix
                  ) -> FloatVector:
    r"""Calculate the activity coefficients of a multicomponent mixture
    according to the UNIQUAC model.

    \begin{aligned}
    \ln{\gamma_i} &= \ln{\gamma_i^R} + \ln{\gamma_i^C} \\
    \ln{\gamma_i^R} &= q_i \left(1 - \ln{s_i} - 
                       \sum_j \theta_j\frac{\tau_{ij}}{s_j} \right) \\
    \ln{\gamma_i^C} &= 1 - J_i + \ln{J_i} - 5 q_i \left(1 - \frac{J_i}{L_i} +
                      \ln{\frac{J_i}{L_i}} \right)
    \end{aligned}

    with:

    \begin{aligned}
    J_i &=\frac{r_i}{\sum_j x_j r_j} \\
    L_i &=\frac{q_i}{\sum_j x_j q_j} \\
    \theta_i &= x_i L_i \\
    s_i &= \sum_j \theta_j \tau_{ji}
    \end{aligned}

    where $x_i$ are the mole fractions, $q_i$ and $r_i$ denote the
    pure-component parameters, and $\tau_{ij}$ are the interaction parameters.

    **References**

    *   Abrams, D.S. and Prausnitz, J.M. (1975), Statistical thermodynamics of
        liquid mixtures: A new expression for the excess Gibbs energy of partly
        or completely miscible systems. AIChE J., 21: 116-128.
    *   JM Smith, HC Van Ness, MM Abbott. Introduction to chemical engineering
        thermodynamics, 5th edition, 1996, p. 740-741.

    Parameters
    ----------
    x : FloatVector (N)
        Mole fractions of all components. Unit = mol/mol.
    q : FloatVector (N)
        Relative surface areas of all components.
    r : FloatVector (N)
        Relative volumes of all components. 
    tau : FloatSquareMatrix (N,N)
        Interaction parameters, $\tau_{ij}$. It is expected (but not checked)
        that $\tau_{ii}=1$.

    Returns
    -------
    FloatVector (N)
        Activity coefficients of all components.

    See also
    --------
    * [`UNIQUAC`](UNIQUAC.md): related class.

    """

    J = r/dot(x, r)
    L = q/dot(x, q)
    theta = x*L
    s = dot(theta, tau)

    return J*exp(1 - J + q*(1 - log(s) - dot(tau, theta/s)
                            - 5*(1 - J/L + log(J/L))))