Heat Capacity (chemicals.heat_capacity)¶
This module contains many heat capacity model equations, heat capacity estimation equations, enthalpy and entropy integrals of those heat capacity equations, enthalpy/entropy flash initialization routines, and many dataframes of coefficients.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Gas Heat Capacity Model Equations¶
- chemicals.heat_capacity.TRCCp(T, a0, a1, a2, a3, a4, a5, a6, a7)[source]¶
Calculates ideal gas heat capacity using the model developed in [1]. The ideal gas heat capacity is given by:
- Parameters
- Returns
- Cp
float
Ideal gas heat capacity, [J/mol/K]
- Cp
Notes
j is set to 8. Analytical integrals are available for this expression.
References
- 1
Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.
Examples
>>> TRCCp(300, 4.0, 7.65E5, 720., 3.565, -0.052, -1.55E6, 52., 201.) 42.065271080974654
- chemicals.heat_capacity.TRCCp_integral(T, a0, a1, a2, a3, a4, a5, a6, a7, I=0)[source]¶
Integrates ideal gas heat capacity using the model developed in [1]. Best used as a delta only. The difference in enthalpy with respect to 0 K is given by:
- Parameters
- Returns
- H-H(0)
float
Difference in enthalpy from 0 K , [J/mol]
- H-H(0)
Notes
Analytical integral as provided in [1] and verified with numerical integration.
References
- 1(1,2)
Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.
Examples
>>> TRCCp_integral(298.15, 4.0, 7.65E5, 720., 3.565, -0.052, -1.55E6, 52., ... 201., 1.2) 10802.536262068483
- chemicals.heat_capacity.TRCCp_integral_over_T(T, a0, a1, a2, a3, a4, a5, a6, a7, J=0)[source]¶
Integrates ideal gas heat capacity over T using the model developed in [1]. Best used as a delta only. The difference in ideal-gas entropy with respect to 0 K is given by:
- Parameters
- Returns
- S-S(0)
float
Difference in entropy from 0 K , [J/mol/K]
- S-S(0)
Notes
Analytical integral as provided in [1] and verified with numerical integration.
References
- 1(1,2)
Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.
Examples
>>> TRCCp_integral_over_T(300, 4.0, 124000, 245, 50.539, -49.469, ... 220440000, 560, 78) 213.80156219151888
- chemicals.heat_capacity.Shomate(T, A, B, C, D, E)[source]¶
Calculates heat capacity using the Shomate polynomial model [1]. The heat capacity is given by:
- Parameters
- Returns
- Cp
float
Heat capacity , [J/mol/K]
- Cp
Notes
Analytical integrals are available for this expression. In some sources such as [1], the equation is written with temperature in units of kilokelvin. The coefficients can be easily adjusted to be in the proper SI form.
References
- 1(1,2,3)
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
Examples
Coefficients for water vapor from [1]:
>>> water_low_gas_coeffs = [30.09200, 6.832514/1e3, 6.793435/1e6, -2.534480/1e9, 0.082139*1e6] >>> Shomate(500, *water_low_gas_coeffs) 35.21836175
- chemicals.heat_capacity.Shomate_integral(T, A, B, C, D, E)[source]¶
Calculates the enthalpy integral using the Shomate polynomial model [1]. The difference in enthalpy with respect to 0 K is given by:
- Parameters
- Returns
- H-H(0)
float
Difference in enthalpy from 0 K , [J/mol]
- H-H(0)
References
- 1(1,2)
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
Examples
Coefficients for water vapor from [1]:
>>> water_low_gas_coeffs = [30.09200, 6.832514/1e3, 6.793435/1e6, -2.534480/1e9, 0.082139*1e6] >>> Shomate_integral(500, *water_low_gas_coeffs) 15979.2447
- chemicals.heat_capacity.Shomate_integral_over_T(T, A, B, C, D, E)[source]¶
Integrates the heat capacity over T using the model developed in [1]. The difference in entropy with respect to 0 K is given by:
- Parameters
- Returns
- S-S(0)
float
Difference in entropy from 0 K , [J/mol/K]
- S-S(0)
References
- 1(1,2)
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
Examples
Coefficients for water vapor from [1]:
>>> water_low_gas_coeffs = [30.09200, 6.832514/1e3, 6.793435/1e6, -2.534480/1e9, 0.082139*1e6] >>> Shomate_integral_over_T(500, *water_low_gas_coeffs) 191.00554
- class chemicals.heat_capacity.ShomateRange(coeffs, Tmin, Tmax)[source]¶
Implementation of a range of the Shomate equation presented in [1] for calculating the heat capacity of a chemical. Implements the enthalpy and entropy integrals as well.
- Parameters
References
- 1
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
Methods
calculate
(T)Return heat capacity as a function of temperature.
calculate_integral
(Ta, Tb)Return the enthalpy integral of heat capacity from Ta to Tb.
calculate_integral_over_T
(Ta, Tb)Return the entropy integral of heat capacity from Ta to Tb.
- chemicals.heat_capacity.Poling(T, a, b, c, d, e)[source]¶
Return the ideal-gas molar heat capacity of a chemical using polynomial regressed coefficients as described by Poling et. al. [1].
- Parameters
- Returns
- Cpgm
float
Gas molar heat capacity, [J/mol/K]
- Cpgm
See also
Notes
The ideal gas heat capacity is given by:
The data is based on the Poling data bank.
References
- 1
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
Examples
Compute the gas heat capacity of Methane at 300 K:
>>> Poling(T=300., a=4.568, b=-0.008975, c=3.631e-05, d=-3.407e-08, e=1.091e-11) 35.850973388425
- chemicals.heat_capacity.Poling_integral(T, a, b, c, d, e)[source]¶
Return the integral of the ideal-gas constant-pressure heat capacity of a chemical using polynomial regressed coefficients as described by Poling et. al. [1].
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, [J/mol]
- H
See also
Notes
Integral was computed with SymPy.
References
- 1
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
Examples
Compute the gas enthalpy of Methane at 300 K (with reference to 0 K):
>>> Poling_integral(T=300., a=4.568, b=-0.008975, c=3.631e-05, d=-3.407e-08, e=1.091e-11) 10223.67533722261
- chemicals.heat_capacity.Poling_integral_over_T(T, a, b, c, d, e)[source]¶
Return the integral over temperature of the ideal-gas constant-pressure heat capacity of a chemical using polynomial regressed coefficients as described by Poling et. al. [1].
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, [J/mol/K]
- S
See also
Notes
Integral was computed with SymPy.
References
- 1
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
Examples
Compute the gas entropy of Methane at 300 K (with reference to 0 K):
>>> Poling_integral_over_T(T=300., a=4.568, b=-0.008975, c=3.631e-05, d=-3.407e-08, e=1.091e-11) 205.46526328058
- chemicals.heat_capacity.PPDS2(T, Ts, C_low, C_inf, a1, a2, a3, a4, a5)[source]¶
Calculates the ideal-gas heat capacity using the [1] emperical (parameter-regressed) method, called the PPDS 2 equation for heat capacity.
- Parameters
- T
float
Temperature of fluid [K]
- Ts
float
Fit temperature; no physical meaning [K]
- C_low
float
Fit parameter equal to Cp/R at a low temperature, [-]
- C_inf
float
Fit parameter equal to Cp/R at a high temperature, [-]
- a1
float
Regression parameter, [-]
- a2
float
Regression parameter, [-]
- a3
float
Regression parameter, [-]
- a4
float
Regression parameter, [-]
- a5
float
Regression parameter, [-]
- T
- Returns
- Cpgm
float
Gas molar heat capacity, [J/mol/K]
- Cpgm
References
- 1(1,2)
“ThermoData Engine (TDE103b V10.1) User`s Guide.” https://trc.nist.gov/TDE/TDE_Help/Eqns-Pure-Cp0/PPDS2Cp0.htm.
Examples
n-pentane at 350 K from [1]
>>> PPDS2(T=350.0, Ts=462.493, C_low=4.54115, C_inf=9.96847, a1=-103.419, a2=695.484, a3=-2006.1, a4=2476.84, a5=-1186.47) 136.46338956689
Gas Heat Capacity Estimation Models¶
- chemicals.heat_capacity.Lastovka_Shaw(T, similarity_variable, cyclic_aliphatic=False, MW=None, term_A=None)[source]¶
Calculate ideal-gas constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- Cpg
float
Gas constant-pressure heat capacity, J/mol/K if MW given; J/kg/K otherwise
- Cpg
Notes
Original model is in terms of J/g/K.
A1 = -0.1793547 text{ if cyclic aliphatic}
A1 = 0.58 text{ if not cyclic aliphatic}
A2 = 3.86944439 text{ if cyclic aliphatic}
A2 = 1.25 text{ if not cyclic aliphatic}
A3 = 0.17338003
A4 = 0.014
B11 = 0.73917383
B12 = 8.88308889
C11 = 1188.28051
C12 = 1813.04613
B21 = 0.0483019
B22 = 4.35656721
C21 = 2897.01927
C22 = 5987.80407
References
- 1(1,2)
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Examples
Estimate the heat capacity of n-decane gas in J/kg/K:
>>> Lastovka_Shaw(1000.0, 0.22491) 3730.2807601773725
Estimate the heat capacity of n-decane gas in J/mol/K:
>>> Lastovka_Shaw(1000.0, 0.22491, MW=142.28) 530.7443465580366
- chemicals.heat_capacity.Lastovka_Shaw_integral(T, similarity_variable, cyclic_aliphatic=False, MW=None, term_A=None)[source]¶
Calculate the integral of ideal-gas constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, J/mol if MW given; J/kg otherwise
- H
Notes
Original model is in terms of J/g/K. Integral was computed with SymPy.
References
- 1(1,2)
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Examples
>>> Lastovka_Shaw_integral(300.0, 0.1333) 5283095.816018478
- chemicals.heat_capacity.Lastovka_Shaw_integral_over_T(T, similarity_variable, cyclic_aliphatic=False, MW=None, term_A=None)[source]¶
Calculate the integral over temperature of ideal-gas constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, [J/mol/K if MW given; J/kg/K otherwise]
- S
See also
Notes
Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods! Integral was computed with SymPy.
References
- 1(1,2)
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Examples
>>> Lastovka_Shaw_integral_over_T(300.0, 0.1333) 3609.791928945323
- chemicals.heat_capacity.Lastovka_Shaw_T_for_Hm(Hm, MW, similarity_variable, T_ref=298.15, factor=1.0, cyclic_aliphatic=False)[source]¶
Uses the Lastovka-Shaw ideal-gas heat capacity correlation to solve for the temperature which has a specified Hm, as is required in PH flashes, as shown in [1].
- Parameters
- Hm
float
Molar enthalpy spec, [J/mol]
- MW
float
Molecular weight of the pure compound or mixture average, [g/mol]
- similarity_variable
float
Similarity variable as defined in [1], [mol/g]
- T_ref
float
,optional
Reference enthlapy temperature, [K]
- factor
float
,optional
A factor to increase or decrease the predicted value of the method, [-]
- cyclic_aliphaticbool,
optional
Whether or not chemical is cyclic aliphatic, [-]
- Hm
- Returns
- T
float
Temperature of gas to meet the molar enthalpy spec, [K]
- T
References
- 1(1,2)
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Examples
>>> Lastovka_Shaw_T_for_Hm(Hm=55000, MW=80.0, similarity_variable=0.23) 600.0943429567602
- chemicals.heat_capacity.Lastovka_Shaw_T_for_Sm(Sm, MW, similarity_variable, T_ref=298.15, factor=1.0, cyclic_aliphatic=False)[source]¶
Uses the Lastovka-Shaw ideal-gas heat capacity correlation to solve for the temperature which has a specified Sm, as is required in PS flashes, as shown in [1].
- Parameters
- Sm
float
Molar entropy spec, [J/mol/K]
- MW
float
Molecular weight of the pure compound or mixture average, [g/mol]
- similarity_variable
float
Similarity variable as defined in [1], [mol/g]
- T_ref
float
,optional
Reference enthlapy temperature, [K]
- factor
float
,optional
A factor to increase or decrease the predicted value of the method, [-]
- cyclic_aliphaticbool,
optional
Whether or not chemical is cyclic aliphatic, [-]
- Sm
- Returns
- T
float
Temperature of gas to meet the molar entropy spec, [K]
- T
References
- 1(1,2)
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Examples
>>> Lastovka_Shaw_T_for_Sm(Sm=112.80, MW=72.151, similarity_variable=0.2356) 603.429829157
- chemicals.heat_capacity.Lastovka_Shaw_term_A(similarity_variable, cyclic_aliphatic)[source]¶
Return Term A in Lastovka-Shaw equation.
- Parameters
- Returns
- term_A
float
Term A in Lastovka-Shaw equation, [J/g]
- term_A
References
- 1
Lastovka, Vaclav, and John M. Shaw. “Predictive Correlations for Ideal Gas Heat Capacities of Pure Hydrocarbons and Petroleum Fractions.” Fluid Phase Equilibria 356 (October 25, 2013): 338-370. doi:10.1016/j.fluid.2013.07.023.
Gas Heat Capacity Theory¶
- chemicals.heat_capacity.Cpg_statistical_mechanics(T, thetas, linear=False)[source]¶
Calculates the ideal-gas heat capacity using of a molecule using its characteristic temperatures, themselves calculated from each of the frequencies of vibration of the molecule. These can be obtained from spectra or quantum mechanical calculations.
In the above equation, is 1 if the molecule is linear otherwise 0.
- Parameters
- Returns
- Cpgm
float
Gas molar heat capacity at specified temperature, [J/mol/K]
- Cpgm
Notes
This equation implies that there is a maximum heat capacity for an ideal gas, and all diatomic or larger gases
Monoatomic gases have a simple heat capacity of 2.5R, the lower limit for ideal gas heat capacity. This function does not cover that type of a gas. The specific gases that are monoatomic are helium, neon, argon, krypton, xenon, radon.
At very low temperatures hydrogen behaves like a monoatomic gas as well.
References
- 1
Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Professional, 2007.
Examples
Sample calculation in [1] for ammonia:
>>> thetas = [1360, 2330, 2330, 4800, 4880, 4880] >>> Cpg_statistical_mechanics(300.0, thetas) 35.55983440173097
- chemicals.heat_capacity.Cpg_statistical_mechanics_integral(T, thetas, linear=False)[source]¶
Calculates the integral of ideal-gas heat capacity using of a molecule using its characteristic temperatures.
- Parameters
- Returns
- H
float
Integrated gas molar heat capacity at specified temperature, [J/mol]
- H
Examples
>>> thetas = [1360, 2330, 2330, 4800, 4880, 4880] >>> Cpg_statistical_mechanics_integral(300.0, thetas) 10116.6053294
- chemicals.heat_capacity.Cpg_statistical_mechanics_integral_over_T(T, thetas, linear=False)[source]¶
- Calculates the integral over T of ideal-gas heat capacity using of a
molecule using its characteristic temperatures.
- Parameters
- Returns
- S
float
Entropy integral of gas molar heat capacity at specified temperature, [J/mol/K]
- S
Examples
>>> thetas = [1360, 2330, 2330, 4800, 4880, 4880] >>> Cpg_statistical_mechanics_integral_over_T(300.0, thetas) 190.25658088
- chemicals.heat_capacity.vibration_frequency_cm_to_characteristic_temperature(frequency, scale=1.0)[source]¶
Convert a vibrational frequency in units of 1/cm to a characteristic temperature for use in calculating heat capacity.
- Parameters
- Returns
- theta
float
Characteristic temperature [K]
- theta
Notes
In the equation, k is Boltzmann’s constant, c is the speed of light, and h is the Planck constant.
A scale factor for the MP2/6-31G** method recommended by NIST is 0.9365. Using this scale factor will not improve results in all cases however.
Examples
>>> vibration_frequency_cm_to_characteristic_temperature(667) 959.6641613636505
Liquid Heat Capacity Model Equations¶
- chemicals.heat_capacity.Zabransky_quasi_polynomial(T, Tc, a1, a2, a3, a4, a5, a6)[source]¶
Calculates liquid heat capacity using the model developed in [1].
- Parameters
- Returns
- Cp
float
Liquid heat capacity, [J/mol/K]
- Cp
Notes
Used only for isobaric heat capacities, not saturation heat capacities. Designed for reasonable extrapolation behavior caused by using the reduced critical temperature. Used by the authors of [1] when critical temperature was available for the fluid. Analytical integrals are available for this expression.
References
- 1(1,2)
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> Zabransky_quasi_polynomial(330, 591.79, -3.12743, 0.0857315, 13.7282, 1.28971, 6.42297, 4.10989) 165.472878778683
- chemicals.heat_capacity.Zabransky_quasi_polynomial_integral(T, Tc, a1, a2, a3, a4, a5, a6)[source]¶
Calculates the integral of liquid heat capacity using the quasi-polynomial model developed in [1].
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, [J/mol]
- H
Notes
The analytical integral was derived with SymPy; it is a simple polynomial plus some logarithms.
References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> H2 = Zabransky_quasi_polynomial_integral(300, 591.79, -3.12743, ... 0.0857315, 13.7282, 1.28971, 6.42297, 4.10989) >>> H1 = Zabransky_quasi_polynomial_integral(200, 591.79, -3.12743, ... 0.0857315, 13.7282, 1.28971, 6.42297, 4.10989) >>> H2 - H1 14662.031376528757
- chemicals.heat_capacity.Zabransky_quasi_polynomial_integral_over_T(T, Tc, a1, a2, a3, a4, a5, a6)[source]¶
Calculates the integral of liquid heat capacity over T using the quasi-polynomial model developed in [1].
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, [J/mol/K]
- S
Notes
The analytical integral was derived with Sympy. It requires the Polylog(2,x) function, which is unimplemented in SciPy. A very accurate numerical approximation was implemented as
fluids.numerics.polylog2
. Relatively slow due to the use of that special function.References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> S2 = Zabransky_quasi_polynomial_integral_over_T(300, 591.79, -3.12743, ... 0.0857315, 13.7282, 1.28971, 6.42297, 4.10989) >>> S1 = Zabransky_quasi_polynomial_integral_over_T(200, 591.79, -3.12743, ... 0.0857315, 13.7282, 1.28971, 6.42297, 4.10989) >>> S2 - S1 59.16999297436473
- chemicals.heat_capacity.Zabransky_cubic(T, a1, a2, a3, a4)[source]¶
Calculates liquid heat capacity using the model developed in [1].
- Parameters
- Returns
- Cp
float
Liquid heat capacity, [J/mol/K]
- Cp
Notes
Most often form used in [1]. Analytical integrals are available for this expression.
References
- 1(1,2)
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> Zabransky_cubic(298.15, 20.9634, -10.1344, 2.8253, -0.256738) 75.31465144297
- chemicals.heat_capacity.Zabransky_cubic_integral(T, a1, a2, a3, a4)[source]¶
Calculates the integral of liquid heat capacity using the model developed in [1].
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, [J/mol]
- H
Notes
The analytical integral was derived with Sympy; it is a simple polynomial.
References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> Zabransky_cubic_integral(298.15, 20.9634, -10.1344, 2.8253, -0.256738) 31051.690370364
- chemicals.heat_capacity.Zabransky_cubic_integral_over_T(T, a1, a2, a3, a4)[source]¶
Calculates the integral of liquid heat capacity over T using the model developed in [1].
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, [J/mol/K]
- S
Notes
The analytical integral was derived with Sympy; it is a simple polynomial, plus a logarithm
References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Examples
>>> Zabransky_cubic_integral_over_T(298.15, 20.9634, -10.1344, 2.8253, ... -0.256738) 24.732465342840
- class chemicals.heat_capacity.ZabranskySpline(coeffs, Tmin, Tmax)[source]¶
Implementation of the cubic spline method presented in [1] for calculating the heat capacity of a chemical. Implements the enthalpy and entropy integrals as well.
- Parameters
References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Methods
calculate
(T)Return heat capacity as a function of temperature.
calculate_integral
(Ta, Tb)Return the enthalpy integral of heat capacity from Ta to Tb.
calculate_integral_over_T
(Ta, Tb)Return the entropy integral of heat capacity from Ta to Tb.
- class chemicals.heat_capacity.ZabranskyQuasipolynomial(coeffs, Tc, Tmin, Tmax)[source]¶
Quasi-polynomial object for calculating the heat capacity of a chemical. Implements the enthalpy and entropy integrals as well.
- Parameters
References
- 1
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
Methods
calculate
(T)Return the heat capacity as a function of temperature.
calculate_integral
(Ta, Tb)Return the enthalpy integral of heat capacity from Ta to Tb.
calculate_integral_over_T
(Ta, Tb)Return the entropy integral of heat capacity from Ta to Tb.
- chemicals.heat_capacity.PPDS15(T, Tc, a0, a1, a2, a3, a4, a5)[source]¶
Calculates the saturation liquid heat capacity using the [1] emperical (parameter-regressed) method, called the PPDS 15 equation for heat capacity.
- Parameters
- Returns
- Cplm
float
Liquid molar saturation heat capacity, [J/mol/K]
- Cplm
References
- 1(1,2)
“ThermoData Engine (TDE103b V10.1) User`s Guide.” https://trc.nist.gov/TDE/Help/TDE103b/Eqns-Pure-CsatL/PPDS15-Csat.htm.
Examples
Benzene at 400 K from [1]
>>> PPDS15(T=400.0, Tc=562.05, a0=0.198892, a1=24.1389, a2=-20.2301, a3=5.72481, a4=4.43613e-7, a5=-3.10751e-7) 161.8983143509
- chemicals.heat_capacity.TDE_CSExpansion(T, Tc, b, a1, a2=0.0, a3=0.0, a4=0.0)[source]¶
Calculates the saturation liquid heat capacity using the [1] CSExpansion method from NIST’s TDE:
- Parameters
- Returns
- Cplm
float
Liquid molar saturation heat capacity, [J/mol/K]
- Cplm
References
- 1(1,2)
“ThermoData Engine (TDE103b V10.1) User`s Guide.” https://trc.nist.gov/TDE/Help/TDE103b/Eqns-Pure-CsatL/CSExpansion.htm
Examples
2-methylquinoline at 550 K from [1]
>>> TDE_CSExpansion(550.0, 778.0, 0.626549, 120.705, 0.255987, 0.000381027, -3.03077e-7) 328.472042686
Liquid Heat Capacity Estimation Models¶
- chemicals.heat_capacity.Rowlinson_Poling(T, Tc, omega, Cpgm)[source]¶
Calculate liquid constant-pressure heat capacity with the [1] CSP method. This equation is not terrible accurate.
The heat capacity of a liquid is given by:
- Parameters
- Returns
- Cplm
float
Liquid constant-pressure heat capacity, [J/mol/K]
- Cplm
Notes
Poling compared 212 substances, and found error at 298K larger than 10% for 18 of them, mostly associating. Of the other 194 compounds, AARD is 2.5%.
References
- 1
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
Examples
>>> Rowlinson_Poling(350.0, 435.5, 0.203, 91.21) 143.80196224081436
- chemicals.heat_capacity.Rowlinson_Bondi(T, Tc, omega, Cpgm)[source]¶
Calculate liquid constant-pressure heat capacity with the CSP method shown in [1].
The heat capacity of a liquid is given by:
- Parameters
- Returns
- Cplm
float
Liquid constant-pressure heat capacity, [J/mol/K]
- Cplm
Notes
Less accurate than Rowlinson_Poling.
References
- 1
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
- 2
Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
- 3
J.S. Rowlinson, Liquids and Liquid Mixtures, 2nd Ed., Butterworth, London (1969).
Examples
>>> Rowlinson_Bondi(T=373.28, Tc=535.55, omega=0.323, Cpgm=119.342) 175.3976263003074
- chemicals.heat_capacity.Dadgostar_Shaw(T, similarity_variable, MW=None)[source]¶
Calculate liquid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- Cpl
float
Liquid constant-pressure heat capacity, J/mol/K if MW given; J/kg/K otherwise
- Cpl
Notes
Many restrictions on its use. Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods! a11 = -0.3416; a12 = 2.2671; a21 = 0.1064; a22 = -0.3874l; a31 = -9.8231E-05; a32 = 4.182E-04
References
- 1(1,2)
Dadgostar, Nafiseh, and John M. Shaw. “A Predictive Correlation for the Constant-Pressure Specific Heat Capacity of Pure and Ill-Defined Liquid Hydrocarbons.” Fluid Phase Equilibria 313 (January 15, 2012): 211-226. doi:10.1016/j.fluid.2011.09.015.
Examples
>>> Dadgostar_Shaw(355.6, 0.139) 1802.5291501191516
- chemicals.heat_capacity.Dadgostar_Shaw_integral(T, similarity_variable, MW=None)[source]¶
Calculate the integral of liquid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, J/mol if MW given; J/kg otherwise
- H
Notes
Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods! Integral was computed with SymPy.
References
- 1(1,2)
Dadgostar, Nafiseh, and John M. Shaw. “A Predictive Correlation for the Constant-Pressure Specific Heat Capacity of Pure and Ill-Defined Liquid Hydrocarbons.” Fluid Phase Equilibria 313 (January 15, 2012): 211-226. doi:10.1016/j.fluid.2011.09.015.
Examples
>>> Dadgostar_Shaw_integral(300.0, 0.1333) 238908.15142664989
- chemicals.heat_capacity.Dadgostar_Shaw_integral_over_T(T, similarity_variable, MW=None)[source]¶
Calculate the integral of liquid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, J/mol/K if MW given; J/kg/K otherwise
- S
See also
Notes
Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods! Integral was computed with SymPy.
References
- 1(1,2)
Dadgostar, Nafiseh, and John M. Shaw. “A Predictive Correlation for the Constant-Pressure Specific Heat Capacity of Pure and Ill-Defined Liquid Hydrocarbons.” Fluid Phase Equilibria 313 (January 15, 2012): 211-226. doi:10.1016/j.fluid.2011.09.015.
Examples
>>> Dadgostar_Shaw_integral_over_T(300.0, 0.1333) 1201.1409113147918
Solid Heat Capacity Estimation Models¶
- chemicals.heat_capacity.Perry_151(T, a, b, c, d)[source]¶
Return the solid molar heat capacity of a chemical using the Perry 151 method, as described in [1].
- Parameters
- a,b,c,d
float
Regressed coefficients.
- a,b,c,d
- Returns
- Cps
float
Solid constant-pressure heat capacity, [J/mol/K]
- Cps
Notes
The solid heat capacity is given by:
Coefficients are listed in section 2, table 151 of [1]. Note that the original model was in a Calorie basis, but has been translated to Joules.
References
- 1(1,2)
Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Professional, 2007.
Examples
Heat capacity of solid aluminum at 300 K:
>>> Perry_151(300, 4.8, 0.00322, 0., 0.) 24.124944
- chemicals.heat_capacity.Lastovka_solid(T, similarity_variable, MW=None)[source]¶
Calculate solid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
- Parameters
- Returns
- Cps
float
Solid constant-pressure heat capacity, J/mol/K if MW given; J/kg/K otherwise
- Cps
Notes
Many restrictions on its use. Trained on data with MW from 12.24 g/mol to 402.4 g/mol, C mass fractions from 61.3% to 95.2%, H mass fractions from 3.73% to 15.2%, N mass fractions from 0 to 15.4%, O mass fractions from 0 to 18.8%, and S mass fractions from 0 to 29.6%. Recommended for organic compounds with low mass fractions of hetero-atoms and especially when molar mass exceeds 200 g/mol. This model does not show and effects of phase transition but should not be used passed the triple point. Original model is in terms of J/g/K. Note that the model s for predicting mass heat capacity, not molar heat capacity like most other methods!
A1 = 0.013183
A2 = 0.249381
= 151.8675
C1 = 0.026526
C2 = -0.024942
D1 = 0.000025
D2 = -0.000123
References
- 1(1,2)
Laštovka, Václav, Michal Fulem, Mildred Becerra, and John M. Shaw. “A Similarity Variable for Estimating the Heat Capacity of Solid Organic Compounds: Part II. Application: Heat Capacity Calculation for Ill-Defined Organic Solids.” Fluid Phase Equilibria 268, no. 1-2 (June 25, 2008): 134-41. doi:10.1016/j.fluid.2008.03.018.
Examples
>>> Lastovka_solid(300, 0.2139) 1682.0637469909211
- chemicals.heat_capacity.Lastovka_solid_integral(T, similarity_variable, MW=None)[source]¶
Integrates solid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
uses an explicit form as derived with Sympy.
- Parameters
- Returns
- H
float
Difference in enthalpy from 0 K, J/mol if MW given; J/kg otherwise
- H
See also
Notes
Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods!
References
- 1(1,2)
Laštovka, Václav, Michal Fulem, Mildred Becerra, and John M. Shaw. “A Similarity Variable for Estimating the Heat Capacity of Solid Organic Compounds: Part II. Application: Heat Capacity Calculation for Ill-Defined Organic Solids.” Fluid Phase Equilibria 268, no. 1-2 (June 25, 2008): 134-41. doi:10.1016/j.fluid.2008.03.018.
Examples
>>> Lastovka_solid_integral(300, 0.2139) 283246.1519409122
- chemicals.heat_capacity.Lastovka_solid_integral_over_T(T, similarity_variable, MW=None)[source]¶
Integrates over T solid constant-pressure heat capacity with the similarity variable concept and method as shown in [1].
uses an explicit form as derived with Sympy.
- Parameters
- Returns
- S
float
Difference in entropy from 0 K, J/mol/K if MW given; J/kg/K otherwise
- S
See also
Notes
Original model is in terms of J/g/K. Note that the model is for predicting mass heat capacity, not molar heat capacity like most other methods!
References
- 1(1,2)
Laštovka, Václav, Michal Fulem, Mildred Becerra, and John M. Shaw. “A Similarity Variable for Estimating the Heat Capacity of Solid Organic Compounds: Part II. Application: Heat Capacity Calculation for Ill-Defined Organic Solids.” Fluid Phase Equilibria 268, no. 1-2 (June 25, 2008): 134-41. doi:10.1016/j.fluid.2008.03.018.
Examples
>>> Lastovka_solid_integral_over_T(300, 0.2139) 1947.5537561495564
Utility methods¶
- class chemicals.heat_capacity.PiecewiseHeatCapacity(models)[source]¶
Create a PiecewiseHeatCapacity object for calculating heat capacity and the enthalpy and entropy integrals using piecewise models.
- Parameters
- models
Iterable
[HeatCapacity
] Piecewise heat capacity objects, [-]
- models
- Attributes
- Tmax
- Tmin
- models
Methods
calculate
(T)Return the heat capacity as a function of temperature.
calculate_integral
(Ta, Tb)Return the enthalpy integral of heat capacity from Ta to Tb.
calculate_integral_over_T
(Ta, Tb)Return the entropy integral of heat capacity from Ta to Tb.
force_calculate
(T)Return the heat capacity as a function of temperature.
force_calculate_integral
(Ta, Tb)Return the enthalpy integral of heat capacity from Ta to Tb.
force_calculate_integral_over_T
(Ta, Tb)Return the entropy integral of heat capacity from Ta to Tb.
Fit Coefficients¶
All of these coefficients are lazy-loaded, so they must be accessed as an attribute of this module.
- chemicals.heat_capacity.Cp_data_Poling¶
Constains data for gases and liquids from [3]. Simple polynomials for gas heat capacity (not suitable for extrapolation) are available for 308 chemicals. Additionally, constant values in at 298.15 K are available for 348 gases. Constant values in at 298.15 K are available for 245 liquids.
- chemicals.heat_capacity.TRC_gas_data¶
A rigorous expression from [1] for modeling gas heat capacity. Coefficients for 1961 chemicals are available.
- chemicals.heat_capacity.CRC_standard_data¶
Constant values tabulated in [4] at 298.15 K. Data is available for 533 gases. Data is available for 433 liquids. Data is available for 529 solids.
- chemicals.heat_capacity.Cp_dict_PerryI¶
Simple polynomials from [5] with vaious exponents selected for each expression. Coefficients are in units of calories/mol/K. The full expression is . Data is available for 284 compounds. Some compounds have gas data, some have liquid data, and have solid (crystal structure) data, sometimes multiple coefficients for different solid phases.
- chemicals.heat_capacity.zabransky_dicts¶
Complicated fits covering different cases and with different forms from [2].
- chemicals.heat_capacity.Cp_dict_characteristic_temperatures_adjusted_psi4_2022a¶
Theoretically calculated chatacteristic temperatures from vibrational frequencies using psi4
- chemicals.heat_capacity.Cp_dict_characteristic_temperatures_psi4_2022a¶
Theoretically calculated chatacteristic temperatures from vibrational frequencies using psi4, adjusted using a recommended coefficient
- 1
Kabo, G. J., and G. N. Roganov. Thermodynamics of Organic Compounds in the Gas State, Volume II: V. 2. College Station, Tex: CRC Press, 1994.
- 2
Zabransky, M., V. Ruzicka Jr, V. Majer, and Eugene S. Domalski. Heat Capacity of Liquids: Critical Review and Recommended Values. 2 Volume Set. Washington, D.C.: Amer Inst of Physics, 1996.
- 3
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
- 4
Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton, FL]: CRC press, 2014.
- 5
Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Professional, 2007.
In [1]: import chemicals
In [2]: chemicals.heat_capacity.Cp_data_Poling
Out[2]:
Chemical Tmin ... Cpg Cpl
CAS ...
56-23-5 tetrachloromethane 200.0 ... 83.43 131.60
60-29-7 diethyl ether 100.0 ... 119.46 172.60
62-53-3 benzeneamine (aniline) 50.0 ... 107.90 191.90
64-17-5 ethanol 50.0 ... 65.21 112.25
64-18-6 methanoic acid (formic acid) 50.0 ... 53.45 99.17
... ... ... ... ... ...
14940-65-9 tritium oxide NaN ... 34.96 NaN
16747-38-9 2,3,3,4-tetramethylpentane 200.0 ... 218.30 275.70
20291-95-6 2,2,5-trimethylheptane 200.0 ... 229.20 306.40
2099474000-00-0 hydrogen, normal NaN ... 28.83 NaN
2099437000-00-0 deuterium, normal NaN ... 29.20 NaN
[367 rows x 10 columns]
In [3]: chemicals.heat_capacity.TRC_gas_data
Out[3]:
Chemical Tmin ... J Hfg
CAS ...
50-00-0 Methanal 50.0 ... 3.46 -104700.0
50-32-8 Benzo[a]pyrene 298.0 ... 13.44 324000.0
53-70-3 Dibenz[a,h]anthracene 298.0 ... 16.63 375000.0
56-23-5 Tetrachloromethane 200.0 ... 9.58 -93700.0
56-55-3 Benz[a]anthracene 298.0 ... 11.45 328000.0
... ... ... ... ... ...
800000-46-8 2,2,(3RS,4RS)-Tetramethylhexane 200.0 ... 22.45 -188600.0
800000-47-9 2,(3RS,4SR),5-Tetramethylhexane 200.0 ... 22.32 193700.0
800000-48-0 2,(3RS,4RS),5-Tetramethylhexane 200.0 ... 22.14 -194600.0
800000-56-0 1-Methylbutyl radical 200.0 ... 22.25 54600.0
800002-32-8 Propenoic acid (Dimer) 50.0 ... 13.83 -686000.0
[1961 rows x 14 columns]
In [4]: chemicals.heat_capacity.CRC_standard_data
Out[4]:
Chemical Hfs ... S0g Cpg
CAS ...
50-00-0 Formaldehyde NaN ... 218.8 35.4
50-32-8 Benzo[a]pyrene NaN ... NaN 254.8
50-69-1 D-Ribose -1047200.0 ... NaN NaN
50-78-2 2-(Acetyloxy)benzoic acid -815600.0 ... NaN NaN
50-81-7 L-Ascorbic acid -1164600.0 ... NaN NaN
... ... ... ... ... ...
92141-86-1 Cesium metaborate -972000.0 ... NaN NaN
99685-96-8 Carbon [fullerene-C60] 2327000.0 ... 544.0 512.0
114489-96-2 Isobutyl 2-chloropropanoate NaN ... NaN NaN
115383-22-7 Carbon [fullerene-C70] 2555000.0 ... 614.0 585.0
116836-32-9 sec-Butyl pentanoate NaN ... NaN NaN
[2470 rows x 13 columns]
In [5]: chemicals.heat_capacity.Cp_dict_PerryI['124-38-9'] # gas only
Out[5]:
{'g': {'Formula': 'CO2',
'Phase': 'g',
'Subphase': None,
'Const': 10.34,
'Lin': 0.00274,
'Quadinv': -195500.0,
'Quad': 0,
'Tmin': 273.0,
'Tmax': 1200.0,
'Error': '1a'}}
In [6]: chemicals.heat_capacity.Cp_dict_PerryI['7704-34-9'] # crystal and gas
Out[6]:
{'g': {'Formula': 'H2S',
'Phase': 'g',
'Subphase': None,
'Const': 7.2,
'Lin': 0.0036,
'Quadinv': 0,
'Quad': 0,
'Tmin': 300.0,
'Tmax': 600.0,
'Error': 8.0},
'c': {'Formula': 'S',
'Phase': 'c',
'Subphase': 'monoclinic',
'Const': 4.38,
'Lin': 0.0044,
'Quadinv': 0,
'Quad': 0,
'Tmin': 368.0,
'Tmax': 392.0,
'Error': 3.0}}
In [7]: chemicals.heat_capacity.Cp_dict_PerryI['7440-57-5'] # crystal and liquid
Out[7]:
{'c': {'Formula': 'Au',
'Phase': 'c',
'Subphase': None,
'Const': 5.61,
'Lin': 0.00144,
'Quadinv': 0,
'Quad': 0,
'Tmin': 273.0,
'Tmax': 1336.0,
'Error': 2.0},
'l': {'Formula': 'Au',
'Phase': 'l',
'Subphase': None,
'Const': 7.0,
'Lin': 0,
'Quadinv': 0,
'Quad': 0,
'Tmin': 1336.0,
'Tmax': 1573.0,
'Error': 5.0}}
In [8]: chemicals.heat_capacity.zabransky_dicts.keys()
Out[8]: dict_keys(['Zabransky spline, averaged heat capacity', 'Zabransky quasipolynomial, averaged heat capacity', 'Zabransky spline, constant-pressure', 'Zabransky quasipolynomial, constant-pressure', 'Zabransky spline, saturation', 'Zabransky quasipolynomial, saturation'])