Skip to content

Viscosity (polykin.properties.viscosity)¤

This module implements methods to calculate the viscosity of pure gases, gas mixtures, and liquid mixtures.

MULMX2_Perry ¤

MULMX2_Perry(
    x: FloatVectorLike,
    mu: FloatVectorLike,
    hydrocarbons: bool = False,
) -> float

Calculate the viscosity of a liquid mixture from the viscosities of the pure components using the mixing rules recommended in Perry's.

For hydrocarbon mixtures:

\[ \mu_m = \left ( \sum_{i=1}^N x_i \mu_i^{1/3} \right )^3 \]

and for nonhydrocarbon mixtures:

\[ \ln{\mu_m} = \sum_{i=1}^N x_i \ln{\mu_i} \]

References

  • Perry, R. H., D. W. Green, and J. Maloney. Perrys Chemical Engineers Handbook, 7th ed. 1999, p. 2-367.
PARAMETER DESCRIPTION
x

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

TYPE: FloatVectorLike

mu

Viscosities of all components, \(\mu\). Unit = Any.

TYPE: FloatVectorLike

hydrocarbons

Method selection. True for hydrocarbon mixtures, False for nonhydrocarbon mixtures.

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
float

Mixture viscosity, \(\mu_m\). Unit = [mu].

Examples:

Estimate the viscosity of a 50 mol% styrene/toluene liquid mixture at 20°C.

>>> from polykin.properties.viscosity import MULMX2_Perry
>>>
>>> x = [0.5, 0.5]
>>> mu = [0.76, 0.59] # cP, from literature
>>>
>>> mu_mix = MULMX2_Perry(x, mu)
>>>
>>> print(f"{mu_mix:.2f} cP")
0.67 cP
Source code in src/polykin/properties/viscosity/liquid.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
def MULMX2_Perry(x: FloatVectorLike,
                 mu: FloatVectorLike,
                 hydrocarbons: bool = False,
                 ) -> float:
    r"""Calculate the viscosity of a liquid mixture from the viscosities of the
    pure components using the mixing rules recommended in Perry's.

    For hydrocarbon mixtures:

    $$ \mu_m = \left ( \sum_{i=1}^N x_i \mu_i^{1/3} \right )^3 $$

    and for nonhydrocarbon mixtures:

    $$ \ln{\mu_m} = \sum_{i=1}^N x_i \ln{\mu_i} $$

    **References**

    *   Perry, R. H., D. W. Green, and J. Maloney. Perrys Chemical Engineers
        Handbook, 7th ed. 1999, p. 2-367.

    Parameters
    ----------
    x : FloatVectorLike
        Mole fractions of all components. Unit = mol/mol.
    mu : FloatVectorLike
        Viscosities of all components, $\mu$. Unit = Any.
    hydrocarbons : bool
        Method selection. `True` for hydrocarbon mixtures, `False` for
        nonhydrocarbon mixtures.

    Returns
    -------
    float
        Mixture viscosity, $\mu_m$. Unit = [mu].

    Examples
    --------
    Estimate the viscosity of a 50 mol% styrene/toluene liquid mixture at 20°C.
    >>> from polykin.properties.viscosity import MULMX2_Perry
    >>>
    >>> x = [0.5, 0.5]
    >>> mu = [0.76, 0.59] # cP, from literature
    >>>
    >>> mu_mix = MULMX2_Perry(x, mu)
    >>>
    >>> print(f"{mu_mix:.2f} cP")
    0.67 cP

    """
    x = np.asarray(x)
    mu = np.asarray(mu)

    if hydrocarbons:
        result = dot(x, cbrt(mu))**3
    else:
        result = exp(dot(x, log(mu)))
    return result

MUVMX2_Herning_Zipperer ¤

MUVMX2_Herning_Zipperer(
    y: FloatVectorLike,
    mu: FloatVectorLike,
    M: FloatVectorLike,
) -> float

Calculate the viscosity of a gas mixture from the viscosities of the pure components using the mixing rule of Wilke with the approximation of Herning and Zipperer.

\[ \mu_m = \frac{\displaystyle \sum_{i=1}^N y_i M_i^{1/2} \mu_i} {\displaystyle \sum_{i=1}^N y_i M_i^{1/2}} \]

Note

In this equation, the units of mole fraction \(y_i\) and molar mass \(M_i\) are arbitrary, as they cancel out when considering the ratio of the numerator to the denominator.

References

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

Mole fractions of all components. Unit = Any.

TYPE: FloatVectorLike

mu

Viscosities of all components, \(\mu\). Unit = Any.

TYPE: FloatVectorLike

M

Molar masses of all components. Unit = Any.

TYPE: FloatVectorLike

RETURNS DESCRIPTION
float

Mixture viscosity, \(\mu_m\). Unit = [mu].

Examples:

Estimate the viscosity of a 50 mol% ethylene/1-butene gas mixture at 120°C and 1 bar.

>>> from polykin.properties.viscosity import MUVMX2_Herning_Zipperer
>>> y = [0.5, 0.5]
>>> mu = [130e-7, 100e-7] # Pa.s, from literature
>>> M = [28.e-3, 56.e-3]  # kg/mol
>>> mu_mix = MUVMX2_Herning_Zipperer(y, mu, M)
>>> print(f"{mu_mix:.2e} Pa·s")
1.12e-05 Pa·s
Source code in src/polykin/properties/viscosity/vapor.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
def MUVMX2_Herning_Zipperer(y: FloatVectorLike,
                            mu: FloatVectorLike,
                            M: FloatVectorLike
                            ) -> float:
    r"""Calculate the viscosity of a gas mixture from the viscosities of the
    pure components using the mixing rule of Wilke with the approximation of
    Herning and Zipperer.

    $$ \mu_m = \frac{\displaystyle \sum_{i=1}^N y_i M_i^{1/2} \mu_i}
                    {\displaystyle \sum_{i=1}^N y_i M_i^{1/2}} $$

    !!! note

        In this equation, the units of mole fraction $y_i$ and molar mass
        $M_i$ are arbitrary, as they cancel out when considering the ratio of
        the numerator to the denominator.

    **References**

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

    Parameters
    ----------
    y : FloatVectorLike
        Mole fractions of all components. Unit = Any.
    mu : FloatVectorLike
        Viscosities of all components, $\mu$. Unit = Any.
    M : FloatVectorLike
        Molar masses of all components. Unit = Any.

    Returns
    -------
    float
        Mixture viscosity, $\mu_m$. Unit = [mu].

    Examples
    --------
    Estimate the viscosity of a 50 mol% ethylene/1-butene gas mixture at 120°C
    and 1 bar.
    >>> from polykin.properties.viscosity import MUVMX2_Herning_Zipperer
    >>> y = [0.5, 0.5]
    >>> mu = [130e-7, 100e-7] # Pa.s, from literature
    >>> M = [28.e-3, 56.e-3]  # kg/mol
    >>> mu_mix = MUVMX2_Herning_Zipperer(y, mu, M)
    >>> print(f"{mu_mix:.2e} Pa·s")
    1.12e-05 Pa·s
    """
    y = np.asarray(y)
    mu = np.asarray(mu)
    M = np.asarray(M)

    a = y*sqrt(M)
    a /= a.sum()
    return dot(a, mu)

MUVMXPC_Dean_Stiel ¤

MUVMXPC_Dean_Stiel(
    v: float,
    y: FloatVectorLike,
    M: FloatVectorLike,
    Tc: FloatVectorLike,
    Pc: FloatVectorLike,
    Zc: FloatVectorLike,
) -> float

Calculate the effect of pressure (or density) on the viscosity of gas mixtures using the method of Dean and Stiel for nonpolar components.

\[ (\mu_m -\mu_m^\circ)\xi = f(\rho_r) \]

where \(\mu_m\) is the dense gas mixture viscosity, \(\mu_m^\circ\) is the low-pressure gas mixture viscosity, \(\xi\) is a group of constants, and \(\rho_r = v_c / v\) is the reduced gas density. This equation is valid in the range \(0 \le \rho_r < 2.5\).

References

  • Dean, D., and Stiel, L. "The viscosity of nonpolar gas mixtures at moderate and high pressures." AIChE Journal 11.3 (1965): 526-532.
PARAMETER DESCRIPTION
v

Gas molar volume. Unit = m³/mol.

TYPE: float

y

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

TYPE: FloatVectorLike

M

Molar masses of all components. Unit = kg/mol.

TYPE: FloatVectorLike

Tc

Critical temperatures of all components. Unit = K.

TYPE: FloatVectorLike

Pc

Critical pressures of all components. Unit = Pa.

TYPE: FloatVectorLike

Zc

Critical compressibility factors of all components.

TYPE: FloatVectorLike

RETURNS DESCRIPTION
float

Residual viscosity, \((\mu_m - \mu_m^\circ)\). Unit = Pa·s.

Examples:

Estimate the residual viscosity of a 50 mol% ethylene/propylene mixture t 350 K and 100 bar.

>>> from polykin.properties.viscosity import MUVMXPC_Dean_Stiel
>>> v = 1.12e-4  # m³/mol, with Peng-Robinson
>>> y = [0.5, 0.5]
>>> M = [28.05e-3, 42.08e-3] # kg/mol
>>> Tc = [282.4, 364.9]      # K
>>> Pc = [50.4e5, 46.0e5]    # Pa
>>> Zc = [0.280, 0.274]
>>> mu_residual = MUVMXPC_Dean_Stiel(v, y, M, Tc, Pc, Zc)
>>> print(f"{mu_residual:.2e} Pa·s")
2.32e-05 Pa·s
Source code in src/polykin/properties/viscosity/vapor.py
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
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
def MUVMXPC_Dean_Stiel(v: float,
                       y: FloatVectorLike,
                       M: FloatVectorLike,
                       Tc: FloatVectorLike,
                       Pc: FloatVectorLike,
                       Zc: FloatVectorLike,
                       ) -> float:
    r"""Calculate the effect of pressure (or density) on the viscosity of
    gas mixtures using the method of Dean and Stiel for nonpolar components.

    $$ (\mu_m -\mu_m^\circ)\xi = f(\rho_r) $$

    where $\mu_m$ is the dense gas mixture viscosity, $\mu_m^\circ$ is the
    low-pressure gas mixture viscosity, $\xi$ is a group of constants, and
    $\rho_r = v_c / v$ is the reduced gas density. This
    equation is valid in the range $0 \le \rho_r < 2.5$.

    **References**

    *   Dean, D., and Stiel, L. "The viscosity of nonpolar gas mixtures at
        moderate and high pressures." AIChE Journal 11.3 (1965): 526-532.

    Parameters
    ----------
    v : float
        Gas molar volume. Unit = m³/mol.
    y : FloatVectorLike
        Mole fractions of all components. Unit = mol/mol.
    M : FloatVectorLike
        Molar masses of all components. Unit = kg/mol.
    Tc : FloatVectorLike
        Critical temperatures of all components. Unit = K.
    Pc : FloatVectorLike
        Critical pressures of all components. Unit = Pa.
    Zc : FloatVectorLike
        Critical compressibility factors of all components.

    Returns
    -------
    float
        Residual viscosity, $(\mu_m - \mu_m^\circ)$. Unit = Pa·s.

    Examples
    --------
    Estimate the residual viscosity of a 50 mol% ethylene/propylene mixture
    t 350 K and 100 bar.

    >>> from polykin.properties.viscosity import MUVMXPC_Dean_Stiel
    >>> v = 1.12e-4  # m³/mol, with Peng-Robinson
    >>> y = [0.5, 0.5]
    >>> M = [28.05e-3, 42.08e-3] # kg/mol
    >>> Tc = [282.4, 364.9]      # K
    >>> Pc = [50.4e5, 46.0e5]    # Pa
    >>> Zc = [0.280, 0.274]
    >>> mu_residual = MUVMXPC_Dean_Stiel(v, y, M, Tc, Pc, Zc)
    >>> print(f"{mu_residual:.2e} Pa·s")
    2.32e-05 Pa·s
    """

    y = np.asarray(y)
    M = np.asarray(M)
    Tc = np.asarray(Tc)
    Pc = np.asarray(Pc)
    Zc = np.asarray(Zc)

    # Mixing rules recommended in paper
    M_mix = dot(y, M)
    Tc_mix, Pc_mix, vc_mix, _, _ = pseudocritical_properties(y, Tc, Pc, Zc)

    rhor = vc_mix/v
    # xi = 1e3*Tc_mix**(1/6)/(sqrt(M_mix*1e3)*(Pc_mix/101325)**(2/3))
    xi = 6.87e4*Tc_mix**(1/6)/(sqrt(M_mix)*(Pc_mix)**(2/3))
    a = 10.8e-5*(exp(1.439*rhor) - exp(-1.111*rhor**1.858))

    return a/xi

MUVMX_Lucas ¤

MUVMX_Lucas(
    T: float,
    P: float,
    y: FloatVectorLike,
    M: FloatVectorLike,
    Tc: FloatVectorLike,
    Pc: FloatVectorLike,
    Zc: FloatVectorLike,
    dm: FloatVectorLike,
) -> float

Calculate the viscosity of a gas mixture at a given temperature and pressure using the method of Lucas.

References

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

Temperature. Unit = K.

TYPE: float

P

Pressure. Unit = Pa.

TYPE: float

y

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

TYPE: FloatVectorLike

M

Molar masses of all components. Unit = kg/mol.

TYPE: FloatVectorLike

Tc

Critical temperatures of all components. Unit = K.

TYPE: FloatVectorLike

Pc

Critical pressures of all components. Unit = Pa.

TYPE: FloatVectorLike

Zc

Critical compressibility factors of all components.

TYPE: FloatVectorLike

dm

Dipole moments of all components. Unit = debye.

TYPE: FloatVectorLike

RETURNS DESCRIPTION
float

Gas mixture viscosity, \(\mu_m\). Unit = Pa·s.

Examples:

Estimate the viscosity of a 60 mol% ethylene/nitrogen gas mixture at 350 K and 10 bar.

>>> from polykin.properties.viscosity import MUVMX_Lucas
>>> y = [0.6, 0.4]
>>> M = [28.e-3, 28.e-3]   # kg/mol
>>> Tc = [282.4, 126.2]    # K
>>> Pc = [50.4e5, 33.9e5]  # Pa
>>> Zc = [0.280, 0.290]
>>> dm = [0., 0.]
>>> mu_mix = MUVMX_Lucas(T=350., P=10e5, y=y, M=M,
...                      Tc=Tc, Pc=Pc, Zc=Zc, dm=dm)
>>> print(f"{mu_mix:.2e} Pa·s")
1.45e-05 Pa·s
Source code in src/polykin/properties/viscosity/vapor.py
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
def MUVMX_Lucas(T: float,
                P: float,
                y: FloatVectorLike,
                M: FloatVectorLike,
                Tc: FloatVectorLike,
                Pc: FloatVectorLike,
                Zc: FloatVectorLike,
                dm: FloatVectorLike
                ) -> float:
    r"""Calculate the viscosity of a gas mixture at a given temperature and
    pressure using the method of Lucas.

    **References**

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

    Parameters
    ----------
    T : float
        Temperature. Unit = K.
    P : float
        Pressure. Unit = Pa.
    y : FloatVectorLike
        Mole fractions of all components. Unit = mol/mol.
    M : FloatVectorLike
        Molar masses of all components. Unit = kg/mol.
    Tc : FloatVectorLike
        Critical temperatures of all components. Unit = K.
    Pc : FloatVectorLike
        Critical pressures of all components. Unit = Pa.
    Zc : FloatVectorLike
        Critical compressibility factors of all components.
    dm : FloatVectorLike
        Dipole moments of all components. Unit = debye.

    Returns
    -------
    float
        Gas mixture viscosity, $\mu_m$. Unit = Pa·s.

    Examples
    --------
    Estimate the viscosity of a 60 mol% ethylene/nitrogen gas mixture at 350 K
    and 10 bar.

    >>> from polykin.properties.viscosity import MUVMX_Lucas
    >>> y = [0.6, 0.4]
    >>> M = [28.e-3, 28.e-3]   # kg/mol
    >>> Tc = [282.4, 126.2]    # K
    >>> Pc = [50.4e5, 33.9e5]  # Pa
    >>> Zc = [0.280, 0.290]
    >>> dm = [0., 0.]
    >>> mu_mix = MUVMX_Lucas(T=350., P=10e5, y=y, M=M,
    ...                      Tc=Tc, Pc=Pc, Zc=Zc, dm=dm)
    >>> print(f"{mu_mix:.2e} Pa·s")
    1.45e-05 Pa·s
    """
    y = np.asarray(y)
    M = np.asarray(M)
    Tc = np.asarray(Tc)
    Pc = np.asarray(Pc)
    Zc = np.asarray(Zc)
    dm = np.asarray(dm)

    Tc_mix = dot(y, Tc)
    M_mix = dot(y, M)
    Pc_mix = R*Tc_mix*dot(y, Zc)/dot(y, R*Tc*Zc/Pc)
    FP0_mix = dot(y, _MUV_Lucas_FP0(T/Tc, Tc, Pc, Zc, dm))
    mu = _MUV_Lucas_mu(
        T/Tc_mix, P/Pc_mix, M_mix, Tc_mix, Pc_mix, FP0_mix)

    return mu

MUVPC_Jossi ¤

MUVPC_Jossi(
    rhor: float, M: float, Tc: float, Pc: float
) -> float

Calculate the effect of pressure (or density) on gas viscosity using the method of Jossi, Stiel and Thodos for nonpolar gases.

\[ \left[(\mu -\mu^\circ)\xi + 1\right]^{1/4} = 1.0230 + 0.23364\rho_r + 0.58533\rho_r^2 - 0.40758\rho_r^3 + 0.093324\rho_r^4 \]

where \(\mu\) is the dense gas viscosity, \(\mu^\circ\) is the is the low-pressure viscosity, \(\xi\) is a group of constants, and \(\rho_r = v_c / v\) is the reduced gas density. This equation is valid in the range \(0.1 < \rho_r < 3.0\).

References

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

Reduced gas density, \(\rho_r\).

TYPE: float

M

Molar mass. Unit = kg/mol.

TYPE: float

Tc

Critical temperature. Unit = K.

TYPE: float

Pc

Critical pressure. Unit = Pa.

TYPE: float

RETURNS DESCRIPTION
float

Residual viscosity, \((\mu - \mu^\circ)\). Unit = Pa·s.

Examples:

Estimate the residual viscosity of ethylene at 350 K and 100 bar.

>>> from polykin.properties.viscosity import MUVPC_Jossi
>>> vc = 130. # cm³/mol
>>> v  = 184. # cm³/mol, with Peng-Robinson
>>> rhor = vc/v
>>> mu_residual = MUVPC_Jossi(rhor=rhor, Tc=282.4, Pc=50.4e5, M=28.05e-3)
>>> print(f"{mu_residual:.2e} Pa·s")
6.76e-06 Pa·s
Source code in src/polykin/properties/viscosity/vapor.py
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
def MUVPC_Jossi(rhor: float,
                M: float,
                Tc: float,
                Pc: float
                ) -> float:
    r"""Calculate the effect of pressure (or density) on gas viscosity using
    the method of Jossi, Stiel and Thodos for nonpolar gases.

    $$ \left[(\mu -\mu^\circ)\xi + 1\right]^{1/4} = 1.0230 + 0.23364\rho_r
       + 0.58533\rho_r^2 - 0.40758\rho_r^3 + 0.093324\rho_r^4 $$

    where $\mu$ is the dense gas viscosity, $\mu^\circ$ is the is the
    low-pressure viscosity, $\xi$ is a group of constants, and
    $\rho_r = v_c / v$ is the reduced gas density. This equation is valid in
    the range $0.1 < \rho_r < 3.0$.

    **References**

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

    Parameters
    ----------
    rhor : float
        Reduced gas density, $\rho_r$.
    M : float
        Molar mass. Unit = kg/mol.
    Tc : float
        Critical temperature. Unit = K.
    Pc : float
        Critical pressure. Unit = Pa.

    Returns
    -------
    float
        Residual viscosity, $(\mu - \mu^\circ)$. Unit = Pa·s.

    Examples
    --------
    Estimate the residual viscosity of ethylene at 350 K and 100 bar.
    >>> from polykin.properties.viscosity import MUVPC_Jossi
    >>> vc = 130. # cm³/mol
    >>> v  = 184. # cm³/mol, with Peng-Robinson
    >>> rhor = vc/v
    >>> mu_residual = MUVPC_Jossi(rhor=rhor, Tc=282.4, Pc=50.4e5, M=28.05e-3)
    >>> print(f"{mu_residual:.2e} Pa·s")
    6.76e-06 Pa·s
    """
    a = 1.0230 + 0.23364*rhor + 0.58533*rhor**2 - 0.40758*rhor**3 \
        + 0.093324*rhor**4
    # 1e7*(1/((1e3)**3 * (1/101325)**4))**(1/6)
    xi = 6.872969367e8*(Tc/(M**3 * Pc**4))**(1/6)
    return (a**4 - 1.)/xi

MUV_Lucas ¤

MUV_Lucas(
    T: float,
    P: float,
    M: float,
    Tc: float,
    Pc: float,
    Zc: float,
    dm: float,
) -> float

Calculate the viscosity of a pure gas at a given temperature and pressure using the method of Lucas.

References

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

Temperature. Unit = K.

TYPE: float

P

Pressure. Unit = Pa.

TYPE: float

M

Molar mass. Unit = kg/mol.

TYPE: float

Tc

Critical temperature. Unit = K.

TYPE: float

Pc

Critical pressure. Unit = Pa.

TYPE: float

Zc

Critical compressibility factor.

TYPE: float

dm

Dipole moment. Unit = debye.

TYPE: float

RETURNS DESCRIPTION
float

Gas viscosity, \(\mu\). Unit = Pa·s.

Examples:

Estimate the viscosity of ethylene at 350 K and 10 bar.

>>> from polykin.properties.viscosity import MUV_Lucas
>>> mu = MUV_Lucas(T=350., P=10e5, M=28.05e-3,
...                Tc=282.4, Pc=50.4e5, Zc=0.280, dm=0.)
>>> print(f"{mu:.2e} Pa·s")
1.20e-05 Pa·s
Source code in src/polykin/properties/viscosity/vapor.py
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
def MUV_Lucas(T: float,
              P: float,
              M: float,
              Tc: float,
              Pc: float,
              Zc: float,
              dm: float
              ) -> float:
    r"""Calculate the viscosity of a pure gas at a given temperature and
    pressure using the method of Lucas.

    **References**

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

    Parameters
    ----------
    T : float
        Temperature. Unit = K.
    P : float
        Pressure. Unit = Pa.
    M : float
        Molar mass. Unit = kg/mol.
    Tc : float
        Critical temperature. Unit = K.
    Pc : float
        Critical pressure. Unit = Pa.
    Zc : float
        Critical compressibility factor.
    dm : float
        Dipole moment. Unit = debye.

    Returns
    -------
    float
        Gas viscosity, $\mu$. Unit = Pa·s.

    Examples
    --------
    Estimate the viscosity of ethylene at 350 K and 10 bar.

    >>> from polykin.properties.viscosity import MUV_Lucas
    >>> mu = MUV_Lucas(T=350., P=10e5, M=28.05e-3,
    ...                Tc=282.4, Pc=50.4e5, Zc=0.280, dm=0.)
    >>> print(f"{mu:.2e} Pa·s")
    1.20e-05 Pa·s
    """
    Tr = T/Tc
    Pr = P/Pc
    FP0 = _MUV_Lucas_FP0(Tr, Tc, Pc, Zc, dm)
    mu = _MUV_Lucas_mu(Tr, Pr, M, Tc, Pc, FP0)  # type: ignore
    return mu
Gas Liquid
DIPPR equations DIPPR102 DIPPR101, Yaws
Estimation methods MUV_Lucas, MUVMX_Lucas
Mixing rules MUVMX2_Herning_Zipperer MULMX2_Perry
Pressure correction MUVPC_Jossi, MUVMXPC_Dean_Stiel

Tutorial