virial¶
All data and equations related to the calculation of virial coefficients
References
- 1
Pitzer, Kenneth S., and R. F. Curl. “The Volumetric and Thermodynamic Properties of Fluids. III. Empirical Equation for the Second Virial Coefficient1.” Journal of the American Chemical Society 79, no. 10 (May 1, 1957): 2369-70. doi:10.1021/ja01567a007.
- 2(1,2)
Smith, H. C. Van Ness Joseph M. Introduction to Chemical Engineering Thermodynamics 4E 1987.
- 3
Tsonopoulos, Constantine. “An Empirical Correlation of Second Virial Coefficients.” AIChE Journal 20, no. 2 (March 1, 1974): 263-72. doi:10.1002/aic.690200209.
- 4
Tsonopoulos, C., and J. L. Heidman. “From the Virial to the Cubic Equation of State.” Fluid Phase Equilibria 57, no. 3 (1990): 261-76. doi:10.1016/0378-3812(90)85126-U
- 5
Tsonopoulos, Constantine, and John H. Dymond. “Second Virial Coefficients of Normal Alkanes, Linear 1-Alkanols (and Water), Alkyl Ethers, and Their Mixtures.” Fluid Phase Equilibria, International Workshop on Vapour-Liquid Equilibria and Related Properties in Binary and Ternary Mixtures of Ethers, Alkanes and Alkanols, 133, no. 1-2 (June 1997): 11-34. doi:10.1016/S0378-3812(97)00058-7.
-
thermosteam.properties.virial.
BVirial_Pitzer_Curl
(T, Tc, Pc, omega, order=0)[source]¶ Calculates the second virial coefficient using the model in 1. Designed for simple calculations.
\[ \begin{align}\begin{aligned}B_r=B^{(0)}+\omega B^{(1)}\\B^{(0)}=0.1445-0.33/T_r-0.1385/T_r^2-0.0121/T_r^3\\B^{(1)} = 0.073+0.46/T_r-0.5/T_r^2 -0.097/T_r^3 - 0.0073/T_r^8\end{aligned}\end{align} \]- Parameters
T (float) – Temperature of fluid [K]
Tc (float) – Critical temperature of fluid [K]
Pc (float) – Critical pressure of the fluid [Pa]
omega (float) – Acentric factor for fluid, [-]
order (int, optional) – Order of the calculation. 0 for the calculation of B itself; for 1/2/3, the first/second/third derivative of B with respect to temperature; and for -1/-2, the first/second indefinite integral of B with respect to temperature. No other integrals or derivatives are implemented, and a ValueError is raised if any other order is given.
- Returns
B – Second virial coefficient in density form or its integral/derivative if specified, [m^3/mol or m^3/mol/K^order]
- Return type
float
Notes
Analytical models for derivatives and integrals are available for orders -2, -1, 1, 2, and 3, all obtained with SymPy.
For first temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d B^{(0)}}{dT} = \frac{33 Tc}{100 T^{2}} + \frac{277 Tc^{2}}{1000 T^{3}} + \frac{363 Tc^{3}}{10000 T^{4}}\\\frac{d B^{(1)}}{dT} = - \frac{23 Tc}{50 T^{2}} + \frac{Tc^{2}}{T^{3}} + \frac{291 Tc^{3}}{1000 T^{4}} + \frac{73 Tc^{8}}{1250 T^{9}}\end{aligned}\end{align} \]For the second temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^2 B^{(0)}}{dT^2} = - \frac{3 Tc}{5000 T^{3}} \left(1100 + \frac{1385 Tc}{T} + \frac{242 Tc^{2}}{T^{2}}\right)\\\frac{d^2 B^{(1)}}{dT^2} = \frac{Tc}{T^{3}} \left(\frac{23}{25} - \frac{3 Tc}{T} - \frac{291 Tc^{2}}{250 T^{2}} - \frac{657 Tc^{7}}{1250 T^{7}}\right)\end{aligned}\end{align} \]For the third temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^3 B^{(0)}}{dT^3} = \frac{3 Tc}{500 T^{4}} \left(330 + \frac{554 Tc}{T} + \frac{121 Tc^{2}}{T^{2}}\right)\\\frac{d^3 B^{(1)}}{dT^3} = \frac{3 Tc}{T^{4}} \left(- \frac{23}{25} + \frac{4 Tc}{T} + \frac{97 Tc^{2}}{50 T^{2}} + \frac{219 Tc^{7}}{125 T^{7}}\right)\end{aligned}\end{align} \]For the first indefinite integral of B:
\[ \begin{align}\begin{aligned}\int{B^{(0)}} dT = \frac{289 T}{2000} - \frac{33 Tc}{100} \log{\left (T \right )} + \frac{1}{20000 T^{2}} \left(2770 T Tc^{2} + 121 Tc^{3}\right)\\\int{B^{(1)}} dT = \frac{73 T}{1000} + \frac{23 Tc}{50} \log{\left (T \right )} + \frac{1}{70000 T^{7}} \left(35000 T^{6} Tc^{2} + 3395 T^{5} Tc^{3} + 73 Tc^{8}\right)\end{aligned}\end{align} \]For the second indefinite integral of B:
\[ \begin{align}\begin{aligned}\int\int B^{(0)} dT dT = \frac{289 T^{2}}{4000} - \frac{33 T}{100} Tc \log{\left (T \right )} + \frac{33 T}{100} Tc + \frac{277 Tc^{2}}{2000} \log{\left (T \right )} - \frac{121 Tc^{3}}{20000 T}\\\int\int B^{(1)} dT dT = \frac{73 T^{2}}{2000} + \frac{23 T}{50} Tc \log{\left (T \right )} - \frac{23 T}{50} Tc + \frac{Tc^{2}}{2} \log{\left (T \right )} - \frac{1}{420000 T^{6}} \left(20370 T^{5} Tc^{3} + 73 Tc^{8}\right)\end{aligned}\end{align} \]Examples
Example matching that in BVirial_Abbott, for isobutane.
>>> BVirial_Pitzer_Curl(510., 425.2, 38E5, 0.193) -0.0002084535541385102
-
thermosteam.properties.virial.
BVirial_Abbott
(T, Tc, Pc, omega, order=0)[source]¶ Calculates the second virial coefficient using the model in 2. Simple fit to the Lee-Kesler equation.
\[ \begin{align}\begin{aligned}B_r=B^{(0)}+\omega B^{(1)}\\B^{(0)}=0.083+\frac{0.422}{T_r^{1.6}}\\B^{(1)}=0.139-\frac{0.172}{T_r^{4.2}}\end{aligned}\end{align} \]- Parameters
T (float) – Temperature of fluid [K]
Tc (float) – Critical temperature of fluid [K]
Pc (float) – Critical pressure of the fluid [Pa]
omega (float) – Acentric factor for fluid, [-]
order (int, optional) – Order of the calculation. 0 for the calculation of B itself; for 1/2/3, the first/second/third derivative of B with respect to temperature; and for -1/-2, the first/second indefinite integral of B with respect to temperature. No other integrals or derivatives are implemented, and a ValueError is raised if any other order is given.
- Returns
B – Second virial coefficient in density form or its integral/derivative if specified, [m^3/mol or m^3/mol/K^order]
- Return type
float
Notes
Analytical models for derivatives and integrals are available for orders -2, -1, 1, 2, and 3, all obtained with SymPy.
For first temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d B^{(0)}}{dT} = \frac{0.6752}{T \left(\frac{T}{Tc}\right)^{1.6}}\\\frac{d B^{(1)}}{dT} = \frac{0.7224}{T \left(\frac{T}{Tc}\right)^{4.2}}\end{aligned}\end{align} \]For the second temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^2 B^{(0)}}{dT^2} = - \frac{1.75552}{T^{2} \left(\frac{T}{Tc}\right)^{1.6}}\\\frac{d^2 B^{(1)}}{dT^2} = - \frac{3.75648}{T^{2} \left(\frac{T}{Tc}\right)^{4.2}}\end{aligned}\end{align} \]For the third temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^3 B^{(0)}}{dT^3} = \frac{6.319872}{T^{3} \left(\frac{T}{Tc}\right)^{1.6}}\\\frac{d^3 B^{(1)}}{dT^3} = \frac{23.290176}{T^{3} \left(\frac{T}{Tc}\right)^{4.2}}\end{aligned}\end{align} \]For the first indefinite integral of B:
\[ \begin{align}\begin{aligned}\int{B^{(0)}} dT = 0.083 T + \frac{\frac{211}{300} Tc}{\left(\frac{T}{Tc}\right)^{0.6}}\\\int{B^{(1)}} dT = 0.139 T + \frac{0.05375 Tc}{\left(\frac{T}{Tc}\right)^{3.2}}\end{aligned}\end{align} \]For the second indefinite integral of B:
\[ \begin{align}\begin{aligned}\int\int B^{(0)} dT dT = 0.0415 T^{2} + \frac{211}{120} Tc^{2} \left(\frac{T}{Tc}\right)^{0.4}\\\int\int B^{(1)} dT dT = 0.0695 T^{2} - \frac{\frac{43}{1760} Tc^{2}}{\left(\frac{T}{Tc}\right)^{2.2}}\end{aligned}\end{align} \]Examples
Example is from 2, p. 93, and matches the result exactly, for isobutane.
>>> BVirial_Abbott(510., 425.2, 38E5, 0.193) -0.00020570178037383633
-
thermosteam.properties.virial.
BVirial_Tsonopoulos
(T, Tc, Pc, omega, order=0)[source]¶ Calculates the second virial coefficient using the model in 3.
\[ \begin{align}\begin{aligned}B_r=B^{(0)}+\omega B^{(1)}\\B^{(0)}= 0.1445-0.330/T_r - 0.1385/T_r^2 - 0.0121/T_r^3 - 0.000607/T_r^8\\B^{(1)} = 0.0637+0.331/T_r^2-0.423/T_r^3 -0.423/T_r^3 - 0.008/T_r^8\end{aligned}\end{align} \]- Parameters
T (float) – Temperature of fluid [K]
Tc (float) – Critical temperature of fluid [K]
Pc (float) – Critical pressure of the fluid [Pa]
omega (float) – Acentric factor for fluid, [-]
order (int, optional) – Order of the calculation. 0 for the calculation of B itself; for 1/2/3, the first/second/third derivative of B with respect to temperature; and for -1/-2, the first/second indefinite integral of B with respect to temperature. No other integrals or derivatives are implemented, and a ValueError is raised if any other order is given.
- Returns
B – Second virial coefficient in density form or its integral/derivative if specified, [m^3/mol or m^3/mol/K^order]
- Return type
float
Notes
A more complete expression is also available, in BVirial_Tsonopoulos_extended.
Analytical models for derivatives and integrals are available for orders -2, -1, 1, 2, and 3, all obtained with SymPy.
For first temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d B^{(0)}}{dT} = \frac{33 Tc}{100 T^{2}} + \frac{277 Tc^{2}}{1000 T^{3}} + \frac{363 Tc^{3}}{10000 T^{4}} + \frac{607 Tc^{8}}{125000 T^{9}}\\\frac{d B^{(1)}}{dT} = - \frac{331 Tc^{2}}{500 T^{3}} + \frac{1269 Tc^{3}}{1000 T^{4}} + \frac{8 Tc^{8}}{125 T^{9}}\end{aligned}\end{align} \]For the second temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^2 B^{(0)}}{dT^2} = - \frac{3 Tc}{125000 T^{3}} \left(27500 + \frac{34625 Tc}{T} + \frac{6050 Tc^{2}}{T^{2}} + \frac{1821 Tc^{7}}{T^{7}}\right)\\\frac{d^2 B^{(1)}}{dT^2} = \frac{3 Tc^{2}}{500 T^{4}} \left(331 - \frac{846 Tc}{T} - \frac{96 Tc^{6}}{T^{6}}\right)\end{aligned}\end{align} \]For the third temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^3 B^{(0)}}{dT^3} = \frac{3 Tc}{12500 T^{4}} \left(8250 + \frac{13850 Tc}{T} + \frac{3025 Tc^{2}}{T^{2}} + \frac{1821 Tc^{7}}{T^{7}}\right)\\\frac{d^3 B^{(1)}}{dT^3} = \frac{3 Tc^{2}}{250 T^{5}} \left(-662 + \frac{2115 Tc}{T} + \frac{480 Tc^{6}}{T^{6}}\right)\end{aligned}\end{align} \]For the first indefinite integral of B:
\[ \begin{align}\begin{aligned}\int{B^{(0)}} dT = \frac{289 T}{2000} - \frac{33 Tc}{100} \log{\left (T \right )} + \frac{1}{7000000 T^{7}} \left(969500 T^{6} Tc^{2} + 42350 T^{5} Tc^{3} + 607 Tc^{8}\right)\\\int{B^{(1)}} dT = \frac{637 T}{10000} - \frac{1}{70000 T^{7}} \left(23170 T^{6} Tc^{2} - 14805 T^{5} Tc^{3} - 80 Tc^{8}\right)\end{aligned}\end{align} \]For the second indefinite integral of B:
\[ \begin{align}\begin{aligned}\int\int B^{(0)} dT dT = \frac{289 T^{2}}{4000} - \frac{33 T}{100} Tc \log{\left (T \right )} + \frac{33 T}{100} Tc + \frac{277 Tc^{2}}{2000} \log{\left (T \right )} - \frac{1}{42000000 T^{6}} \left(254100 T^{5} Tc^{3} + 607 Tc^{8}\right)\\\int\int B^{(1)} dT dT = \frac{637 T^{2}}{20000} - \frac{331 Tc^{2}}{1000} \log{\left (T \right )} - \frac{1}{210000 T^{6}} \left(44415 T^{5} Tc^{3} + 40 Tc^{8}\right)\end{aligned}\end{align} \]Examples
Example matching that in BVirial_Abbott, for isobutane.
>>> BVirial_Tsonopoulos(510., 425.2, 38E5, 0.193) -0.00020935288308483694
-
thermosteam.properties.virial.
BVirial_Tsonopoulos_extended
(T, Tc, Pc, omega, a, b, species_type, dipole, order)[source]¶ Calculates the second virial coefficient using the comprehensive model in 4 5. See the notes for the calculation of a and b.
\[ \begin{align}\begin{aligned}\frac{BP_c}{RT_c} = B^{(0)} + \omega B^{(1)} + a B^{(2)} + b B^{(3)}\\B^{(0)}=0.1445-0.33/T_r-0.1385/T_r^2-0.0121/T_r^3\\B^{(1)} = 0.0637+0.331/T_r^2-0.423/T_r^3 -0.423/T_r^3 - 0.008/T_r^8\\B^{(2)} = 1/T_r^6\\B^{(3)} = -1/T_r^8\end{aligned}\end{align} \]- Parameters
T (float) – Temperature of fluid [K]
Tc (float) – Critical temperature of fluid [K]
Pc (float) – Critical pressure of the fluid [Pa]
omega (float) – Acentric factor for fluid, [-]
a (float, optional) – Fit parameter, calculated based on species_type if a is not given and species_type matches on of the supported chemical classes.
b (float, optional) – Fit parameter, calculated based on species_type if a is not given and species_type matches on of the supported chemical classes.
species_type (str, optional) – See notes.
dipole (float) – dipole moment, optional, [Debye]
order (int, optional) – Order of the calculation. 0 for the calculation of B itself; for 1/2/3, the first/second/third derivative of B with respect to temperature; and for -1/-2, the first/second indefinite integral of B with respect to temperature. No other integrals or derivatives are implemented, and a ValueError is raised if any other order is given.
- Returns
B – Second virial coefficient in density form or its integral/derivative if specified, [m^3/mol or m^3/mol/K^order]
- Return type
float
Notes
Analytical models for derivatives and integrals are available for orders -2, -1, 1, 2, and 3, all obtained with SymPy.
To calculate a or b, the following rules are used:
For ‘simple’ or ‘normal’ fluids:
\[ \begin{align}\begin{aligned}a = 0\\b = 0\end{aligned}\end{align} \]For ‘ketone’, ‘aldehyde’, ‘alkyl nitrile’, ‘ether’, ‘carboxylic acid’, or ‘ester’ types of chemicals:
\[ \begin{align}\begin{aligned}a = -2.14\times 10^{-4} \mu_r - 4.308 \times 10^{-21} (\mu_r)^8\\b = 0\end{aligned}\end{align} \]For ‘alkyl halide’, ‘mercaptan’, ‘sulfide’, or ‘disulfide’ types of chemicals:
\[ \begin{align}\begin{aligned}a = -2.188\times 10^{-4} (\mu_r)^4 - 7.831 \times 10^{-21} (\mu_r)^8\\b = 0\end{aligned}\end{align} \]For ‘alkanol’ types of chemicals (except methanol):
\[ \begin{align}\begin{aligned}a = 0.0878\\b = 0.00908 + 0.0006957 \mu_r\end{aligned}\end{align} \]For methanol:
\[ \begin{align}\begin{aligned}a = 0.0878\\b = 0.0525\end{aligned}\end{align} \]For water:
\[ \begin{align}\begin{aligned}a = -0.0109\\b = 0\end{aligned}\end{align} \]If required, the form of dipole moment used in the calculation of some types of a and b values is as follows:
\[\mu_r = 100000\frac{\mu^2(Pc/101325.0)}{Tc^2}\]For first temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d B^{(0)}}{dT} = \frac{33 Tc}{100 T^{2}} + \frac{277 Tc^{2}}{1000 T^{3}} + \frac{363 Tc^{3}}{10000 T^{4}} + \frac{607 Tc^{8}}{125000 T^{9}}\\\frac{d B^{(1)}}{dT} = - \frac{331 Tc^{2}}{500 T^{3}} + \frac{1269 Tc^{3}}{1000 T^{4}} + \frac{8 Tc^{8}}{125 T^{9}}\\\frac{d B^{(2)}}{dT} = - \frac{6 Tc^{6}}{T^{7}}\\\frac{d B^{(3)}}{dT} = \frac{8 Tc^{8}}{T^{9}}\end{aligned}\end{align} \]For the second temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^2 B^{(0)}}{dT^2} = - \frac{3 Tc}{125000 T^{3}} \left(27500 + \frac{34625 Tc}{T} + \frac{6050 Tc^{2}}{T^{2}} + \frac{1821 Tc^{7}}{T^{7}}\right)\\\frac{d^2 B^{(1)}}{dT^2} = \frac{3 Tc^{2}}{500 T^{4}} \left(331 - \frac{846 Tc}{T} - \frac{96 Tc^{6}}{T^{6}}\right)\\\frac{d^2 B^{(2)}}{dT^2} = \frac{42 Tc^{6}}{T^{8}}\\\frac{d^2 B^{(3)}}{dT^2} = - \frac{72 Tc^{8}}{T^{10}}\end{aligned}\end{align} \]For the third temperature derivative of B:
\[ \begin{align}\begin{aligned}\frac{d^3 B^{(0)}}{dT^3} = \frac{3 Tc}{12500 T^{4}} \left(8250 + \frac{13850 Tc}{T} + \frac{3025 Tc^{2}}{T^{2}} + \frac{1821 Tc^{7}}{T^{7}}\right)\\\frac{d^3 B^{(1)}}{dT^3} = \frac{3 Tc^{2}}{250 T^{5}} \left(-662 + \frac{2115 Tc}{T} + \frac{480 Tc^{6}}{T^{6}}\right)\\\frac{d^3 B^{(2)}}{dT^3} = - \frac{336 Tc^{6}}{T^{9}}\\\frac{d^3 B^{(3)}}{dT^3} = \frac{720 Tc^{8}}{T^{11}}\end{aligned}\end{align} \]For the first indefinite integral of B:
\[ \begin{align}\begin{aligned}\int{B^{(0)}} dT = \frac{289 T}{2000} - \frac{33 Tc}{100} \log{\left (T \right )} + \frac{1}{7000000 T^{7}} \left(969500 T^{6} Tc^{2} + 42350 T^{5} Tc^{3} + 607 Tc^{8}\right)\\\int{B^{(1)}} dT = \frac{637 T}{10000} - \frac{1}{70000 T^{7}} \left(23170 T^{6} Tc^{2} - 14805 T^{5} Tc^{3} - 80 Tc^{8}\right)\\\int{B^{(2)}} dT = - \frac{Tc^{6}}{5 T^{5}}\\\int{B^{(3)}} dT = \frac{Tc^{8}}{7 T^{7}}\end{aligned}\end{align} \]For the second indefinite integral of B:
\[ \begin{align}\begin{aligned}\int\int B^{(0)} dT dT = \frac{289 T^{2}}{4000} - \frac{33 T}{100} Tc \log{\left (T \right )} + \frac{33 T}{100} Tc + \frac{277 Tc^{2}}{2000} \log{\left (T \right )} - \frac{1}{42000000 T^{6}} \left(254100 T^{5} Tc^{3} + 607 Tc^{8}\right)\\\int\int B^{(1)} dT dT = \frac{637 T^{2}}{20000} - \frac{331 Tc^{2}}{1000} \log{\left (T \right )} - \frac{1}{210000 T^{6}} \left(44415 T^{5} Tc^{3} + 40 Tc^{8}\right)\\\int\int B^{(2)} dT dT = \frac{Tc^{6}}{20 T^{4}}\\\int\int B^{(3)} dT dT = - \frac{Tc^{8}}{42 T^{6}}\end{aligned}\end{align} \]Examples
Example from Perry’s Handbook, 8E, p2-499. Matches to a decimal place.
>>> BVirial_Tsonopoulos_extended(430., 405.65, 11.28E6, 0.252608, a=0, b=0, species_type='ketone', dipole=1.469) -9.679715056695323e-05