Skip to content

polykin.thermo.eos¤

This module implements equations of state (EOS) for gas and liquid mixtures.

B_pure ¤

B_pure(
    T: float | FloatArray, Tc: float, Pc: float, w: float
) -> Union[float, FloatArray]

Estimate the second virial coefficient of a nonpolar or slightly polar gas.

\[ \frac{B P_c}{R T_c} = B^{(0)}(T_r) + \omega B^{(1)}(T_r) \]

where \(B\) is the second virial coefficient, \(P_c\) is the critical pressure, \(T_c\) is the critical temperature, \(T_r=T/T_c\) is the reduced temperature, and \(\omega\) is the acentric factor.

References

  • RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids 4th edition, 1986, p. 40.
PARAMETER DESCRIPTION
T

Temperature. Unit = K.

TYPE: float | FloatArray

Tc

Critical temperature. Unit = K.

TYPE: float

Pc

Critical pressure. Unit = Pa.

TYPE: float

w

Acentric factor.

TYPE: float

RETURNS DESCRIPTION
float | FloatArray

Second virial coefficient, \(B\). Unit = m³/mol.

Source code in src/polykin/thermo/eos/virial.py
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
def B_pure(T: Union[float, FloatArray],
           Tc: float,
           Pc: float,
           w: float
           ) -> Union[float, FloatArray]:
    r"""Estimate the second virial coefficient of a nonpolar or slightly polar
    gas.

    $$ \frac{B P_c}{R T_c} = B^{(0)}(T_r) + \omega B^{(1)}(T_r) $$

    where $B$ is the second virial coefficient, $P_c$ is the critical pressure,
    $T_c$ is the critical temperature, $T_r=T/T_c$ is the reduced temperature,
    and $\omega$ is the acentric factor.

    **References**

    *   RC Reid, JM Prausniz, and BE Poling. The properties of gases & liquids
        4th edition, 1986, p. 40.

    Parameters
    ----------
    T : float | FloatArray
        Temperature. Unit = K.
    Tc : float
        Critical temperature. Unit = K.
    Pc : float
        Critical pressure. Unit = Pa.
    w : float
        Acentric factor.

    Returns
    -------
    float | FloatArray
        Second virial coefficient, $B$. Unit = m³/mol.
    """
    Tr = T/Tc
    B0 = 0.083 - 0.422/Tr**1.6
    B1 = 0.139 - 0.172/Tr**4.2
    return R*Tc/Pc*(B0 + w*B1)