Heat Capacity (thermo.heat_capacity)¶
This module contains implementations of TDependentProperty
representing liquid, vapor, and solid heat capacity. A variety of estimation
and data methods are available as included in the chemicals library.
Additionally liquid, vapor, and solid mixture heat capacity predictor objects
are implemented subclassing MixtureProperty
.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Pure Liquid Heat Capacity¶
- class thermo.heat_capacity.HeatCapacityLiquid(CASRN='', MW=None, similarity_variable=None, Tc=None, omega=None, Cpgm=None, extrapolation='linear', **kwargs)[source]¶
Bases:
thermo.utils.t_dependent_property.TDependentProperty
Class for dealing with liquid heat capacity as a function of temperature. Consists of seven coefficient-based methods, two constant methods, one tabular source, two CSP methods based on gas heat capacity, one simple estimator, and the external library CoolProp.
- Parameters
- CASRN
str
,optional
The CAS number of the chemical
- MW
float
,optional
Molecular weight, [g/mol]
- similarity_variable
float
,optional
similarity variable, n_atoms/MW, [mol/g]
- Tc
float
,optional
Critical temperature, [K]
- omega
float
,optional
Acentric factor, [-]
- Cpgm
float
orcallable
,optional
Idea-gas molar heat capacity at T or callable for the same, [J/mol/K]
- load_databool,
optional
If False, do not load property coefficients from data sources in files [-]
- extrapolation
str
orNone
None to not extrapolate; see
TDependentProperty
for a full list of all options, [-]- method
str
orNone
,optional
If specified, use this method by default and do not use the ranked sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
- CASRN
See also
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_liquid_methods
.ZABRANSKY_SPLINE, ZABRANSKY_QUASIPOLYNOMIAL, ZABRANSKY_SPLINE_C, and ZABRANSKY_QUASIPOLYNOMIAL_C:
Rigorous expressions developed in [1] following critical evaluation of the available data. The spline methods use the form described in
Zabransky_cubic
over short ranges with varying coefficients to obtain a wider range. The quasi-polynomial methods use the form described inZabransky_quasi_polynomial
, more suitable for extrapolation, and over then entire range. Respectively, there is data available for 588, 146, 51, and 26 chemicals. ‘C’ denotes constant- pressure data available from more precise experiments. The others are heat capacity values averaged over a temperature changed.ZABRANSKY_SPLINE_SAT and ZABRANSKY_QUASIPOLYNOMIAL_SAT:
Rigorous expressions developed in [1] following critical evaluation of the available data. The spline method use the form described in
Zabransky_cubic
over short ranges with varying coefficients to obtain a wider range. The quasi-polynomial method use the form described inZabransky_quasi_polynomial
, more suitable for extrapolation, and over their entire range. Respectively, there is data available for 203, and 16 chemicals. Note that these methods are for the saturation curve!VDI_TABULAR:
Tabular data up to the critical point available in [5]. Note that this data is along the saturation curve.
ROWLINSON_POLING:
CSP method described in
Rowlinson_Poling
. Requires a ideal gas heat capacity value at the same temperature as it is to be calculated.ROWLINSON_BONDI:
CSP method described in
Rowlinson_Bondi
. Requires a ideal gas heat capacity value at the same temperature as it is to be calculated.COOLPROP:
CoolProp external library; with select fluids from its library. Range is limited to that of the equations of state it uses, as described in [3]. Very slow.
DADGOSTAR_SHAW:
A basic estimation method using the similarity variable concept; requires only molecular structure, so is very convenient. See
Dadgostar_Shaw
for details.POLING_CONST:
Constant values in [2] at 298.15 K; available for 245 liquids.
CRCSTD:
Constant values tabulated in [4] at 298.15 K; data is available for 433 liquids.
- WEBBOOK_SHOMATE:
Shomate form coefficients from [6] for ~200 compounds.
- HEOS_FIT:
A series of higher-order polynomial fits to the calculated results from fundamental helmholtz equations of state as calculated with REFPROP
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.
- 2
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
- 3
Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
- 4
Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton, FL]: CRC press, 2014.
- 5
Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
- 6
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
Examples
>>> CpLiquid = HeatCapacityLiquid(CASRN='142-82-5', MW=100.2, similarity_variable=0.2295, Tc=540.2, omega=0.3457, Cpgm=165.2)
Methods
calculate
(T, method)Method to calculate heat capacity of a liquid at temperature T with a given method.
test_method_validity
(T, method)Method to test the validity of a specified method for a given temperature.
- calculate(T, method)[source]¶
Method to calculate heat capacity of a liquid at temperature T with a given method.
This method has no exception handling; see
T_dependent_property
for that.
- name = 'Liquid heat capacity'¶
- property_max = 10000.0¶
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be obscenely high.
- property_min = 1¶
Allow very low heat capacities; arbitrarily set; liquid heat capacity should always be somewhat substantial.
- ranked_methods = ['HEOS_FIT', 'ZABRANSKY_SPLINE', 'ZABRANSKY_QUASIPOLYNOMIAL', 'ZABRANSKY_SPLINE_C', 'ZABRANSKY_QUASIPOLYNOMIAL_C', 'ZABRANSKY_SPLINE_SAT', 'ZABRANSKY_QUASIPOLYNOMIAL_SAT', 'WEBBOOK_SHOMATE', 'JANAF', 'UNARY', 'VDI_TABULAR', 'COOLPROP', 'DADGOSTAR_SHAW', 'ROWLINSON_POLING', 'ROWLINSON_BONDI', 'POLING_CONST', 'CRCSTD']¶
Default rankings of the available methods.
- test_method_validity(T, method)¶
Method to test the validity of a specified method for a given temperature. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation check here.
- units = 'J/mol/K'¶
- thermo.heat_capacity.heat_capacity_liquid_methods = ['HEOS_FIT', 'ZABRANSKY_SPLINE', 'ZABRANSKY_QUASIPOLYNOMIAL', 'ZABRANSKY_SPLINE_C', 'ZABRANSKY_QUASIPOLYNOMIAL_C', 'ZABRANSKY_SPLINE_SAT', 'ZABRANSKY_QUASIPOLYNOMIAL_SAT', 'WEBBOOK_SHOMATE', 'VDI_TABULAR', 'UNARY', 'ROWLINSON_POLING', 'ROWLINSON_BONDI', 'COOLPROP', 'DADGOSTAR_SHAW', 'POLING_CONST', 'CRCSTD']¶
Holds all methods available for the
HeatCapacityLiquid class
, for use in iterating over them.
Pure Gas Heat Capacity¶
- class thermo.heat_capacity.HeatCapacityGas(CASRN='', MW=None, similarity_variable=None, extrapolation='linear', iscyclic_aliphatic=False, **kwargs)[source]¶
Bases:
thermo.utils.t_dependent_property.TDependentProperty
Class for dealing with gas heat capacity as a function of temperature. Consists of three coefficient-based methods, two constant methods, one tabular source, one simple estimator, one group-contribution estimator, one component specific method, and the external library CoolProp.
- Parameters
- CASRN
str
,optional
The CAS number of the chemical
- MW
float
,optional
Molecular weight, [g/mol]
- similarity_variable
float
,optional
similarity variable, n_atoms/MW, [mol/g]
- load_databool,
optional
If False, do not load property coefficients from data sources in files [-]
- extrapolation
str
orNone
None to not extrapolate; see
TDependentProperty
for a full list of all options, [-]- method
str
orNone
,optional
If specified, use this method by default and do not use the ranked sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
- CASRN
See also
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_gas_methods
.- TRCIG:
A rigorous expression derived in [1] for modeling gas heat capacity. Coefficients for 1961 chemicals are available.
- POLING_POLY:
Simple polynomials in [2] not suitable for extrapolation. Data is available for 308 chemicals.
- COOLPROP:
CoolProp external library; with select fluids from its library. Range is limited to that of the equations of state it uses, as described in [3]. The heat capacity and enthalpy are implemented analytically and fairly fast; the entropy integral has no analytical integral and so is numerical. CoolProp’s amazing coefficient collection is used directly in Python.
- LASTOVKA_SHAW:
A basic estimation method using the similarity variable concept; requires only molecular structure, so is very convenient. See
Lastovka_Shaw
for details.- CRCSTD:
Constant values tabulated in [4] at 298.15 K; data is available for 533 gases.
- POLING_CONST:
Constant values in [2] at 298.15 K; available for 348 gases.
- VDI_TABULAR:
Tabular data up to the critical point available in [5]. Note that this data is along the saturation curve.
- WEBBOOK_SHOMATE:
Shomate form coefficients from [6] for ~700 compounds.
- JOBACK:
An estimation method for organic substances in [7]
- HEOS_FIT:
A series of higher-order polynomial fits to the calculated results from fundamental helmholtz equations of state as calculated with REFPROP
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.
- 2(1,2)
Poling, Bruce E. The Properties of Gases and Liquids. 5th edition. New York: McGraw-Hill Professional, 2000.
- 3
Bell, Ian H., Jorrit Wronski, Sylvain Quoilin, and Vincent Lemort. “Pure and Pseudo-Pure Fluid Thermophysical Property Evaluation and the Open-Source Thermophysical Property Library CoolProp.” Industrial & Engineering Chemistry Research 53, no. 6 (February 12, 2014): 2498-2508. doi:10.1021/ie4033999. http://www.coolprop.org/
- 4
Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton, FL]: CRC press, 2014.
- 5
Gesellschaft, V. D. I., ed. VDI Heat Atlas. 2nd edition. Berlin; New York:: Springer, 2010.
- 6
Shen, V.K., Siderius, D.W., Krekelberg, W.P., and Hatch, H.W., Eds., NIST WebBook, NIST, http://doi.org/10.18434/T4M88Q
- 7
Joback, K.G., and R.C. Reid. “Estimation of Pure-Component Properties from Group-Contributions.” Chemical Engineering Communications 57, no. 1-6 (July 1, 1987): 233-43. doi:10.1080/00986448708960487.
Examples
>>> CpGas = HeatCapacityGas(CASRN='142-82-5', MW=100.2, similarity_variable=0.2295) >>> CpGas(700) 317.305
Methods
calculate
(T, method)Method to calculate surface tension of a liquid at temperature T with a given method.
test_method_validity
(T, method)Method to test the validity of a specified method for a given temperature.
- calculate(T, method)[source]¶
Method to calculate surface tension of a liquid at temperature T with a given method.
This method has no exception handling; see
T_dependent_property
for that.
- name = 'gas heat capacity'¶
- property_max = 10000.0¶
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be obscenely high.
- property_min = 0¶
Heat capacities have a minimum value of 0 at 0 K.
- ranked_methods = ['HEOS_FIT', 'TRCIG', 'WEBBOOK_SHOMATE', 'JANAF', 'POLING_POLY', 'COOLPROP', 'JOBACK', 'LASTOVKA_SHAW', 'CRCSTD', 'POLING_CONST', 'VDI_TABULAR']¶
Default rankings of the available methods.
- test_method_validity(T, method)¶
Method to test the validity of a specified method for a given temperature. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation check here.
- units = 'J/mol/K'¶
- thermo.heat_capacity.heat_capacity_gas_methods = ['HEOS_FIT', 'COOLPROP', 'TRCIG', 'WEBBOOK_SHOMATE', 'POLING_POLY', 'LASTOVKA_SHAW', 'CRCSTD', 'POLING_CONST', 'JOBACK', 'VDI_TABULAR']¶
Holds all methods available for the
HeatCapacityGas
class, for use in iterating over them.
Pure Solid Heat Capacity¶
- class thermo.heat_capacity.HeatCapacitySolid(CASRN='', similarity_variable=None, MW=None, extrapolation='linear', **kwargs)[source]¶
Bases:
thermo.utils.t_dependent_property.TDependentProperty
Class for dealing with solid heat capacity as a function of temperature. Consists of two temperature-dependent expressions, one constant value source, and one simple estimator.
- Parameters
- similarity_variable
float
,optional
similarity variable, n_atoms/MW, [mol/g]
- MW
float
,optional
Molecular weight, [g/mol]
- CASRN
str
,optional
The CAS number of the chemical
- load_databool,
optional
If False, do not load property coefficients from data sources in files [-]
- extrapolation
str
orNone
None to not extrapolate; see
TDependentProperty
for a full list of all options, [-]- method
str
orNone
,optional
If specified, use this method by default and do not use the ranked sorting; an exception is raised if this is not a valid method for the provided inputs, [-]
- similarity_variable
Notes
A string holding each method’s name is assigned to the following variables in this module, intended as the most convenient way to refer to a method. To iterate over all methods, use the list stored in
heat_capacity_solid_methods
.- PERRY151:
Simple polynomials with vaious exponents selected for each expression. Coefficients are in units of calories/mol/K. The full expression is:
Data is available for 284 solids, from [2].
- CRCSTD:
Values tabulated in [1] at 298.15 K; data is available for 529 solids.
- LASTOVKA_S:
A basic estimation method using the similarity variable concept; requires only molecular structure, so is very convenient. See
Lastovka_solid
for details.- WEBBOOK_SHOMATE:
Shomate form coefficients from [3] for ~300 compounds.
References
- 1
Haynes, W.M., Thomas J. Bruno, and David R. Lide. CRC Handbook of Chemistry and Physics. [Boca Raton, FL]: CRC press, 2014.
- 2
Green, Don, and Robert Perry. Perry’s Chemical Engineers’ Handbook, Eighth Edition. McGraw-Hill Professional, 2007.
- 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
>>> CpSolid = HeatCapacitySolid(CASRN='142-82-5', MW=100.2, similarity_variable=0.2295) >>> CpSolid(200) 131.205824
Methods
calculate
(T, method)Method to calculate heat capacity of a solid at temperature T with a given method.
test_method_validity
(T, method)Method to test the validity of a specified method for a given temperature.
- calculate(T, method)[source]¶
Method to calculate heat capacity of a solid at temperature T with a given method.
This method has no exception handling; see
T_dependent_property
for that.
- name = 'solid heat capacity'¶
- property_max = 10000.0¶
Maximum value of Heat capacity; arbitrarily set.
- property_min = 0¶
Heat capacities have a minimum value of 0 at 0 K.
- ranked_methods = ['WEBBOOK_SHOMATE', 'JANAF_FIT', 'JANAF', 'UNARY', 'PERRY151', 'CRCSTD', 'LASTOVKA_S']¶
Default rankings of the available methods.
- test_method_validity(T, method)¶
Method to test the validity of a specified method for a given temperature. Demo function for testing only; must be implemented according to the methods available for each individual method. Include the interpolation check here.
- units = 'J/mol/K'¶
- thermo.heat_capacity.heat_capacity_solid_methods = ['JANAF_FIT', 'WEBBOOK_SHOMATE', 'PERRY151', 'CRCSTD', 'LASTOVKA_S']¶
Holds all methods available for the
HeatCapacitySolid
class, for use in iterating over them.
Mixture Liquid Heat Capacity¶
- class thermo.heat_capacity.HeatCapacityLiquidMixture(MWs=[], CASs=[], HeatCapacityLiquids=[], **kwargs)[source]¶
Bases:
thermo.utils.mixture_property.MixtureProperty
Class for dealing with liquid heat capacity of a mixture as a function of temperature, pressure, and composition. Consists only of mole weighted averaging, and the Laliberte method for aqueous electrolyte solutions.
- Parameters
- MWs
list
[float
],optional
Molecular weights of all species in the mixture, [g/mol]
- CASs
str
,optional
The CAS numbers of all species in the mixture
- HeatCapacityLiquids
list
[HeatCapacityLiquid
],optional
HeatCapacityLiquid objects created for all species in the mixture [-]
- MWs
Notes
To iterate over all methods, use the list stored in
heat_capacity_liquid_mixture_methods
.- LALIBERTE:
Electrolyte model equation with coefficients; see
thermo.electrochem.Laliberte_heat_capacity
for more details.- LINEAR:
Mixing rule described in
mixing_simple
.
Methods
calculate
(T, P, zs, ws, method)Method to calculate heat capacity of a liquid mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
test_method_validity
(T, P, zs, ws, method)Method to test the validity of a specified method for the given conditions.
- Tmax¶
Maximum temperature at which no method can calculate the property above.
- Tmin¶
Minimum temperature at which no method can calculate the property under.
- calculate(T, P, zs, ws, method)[source]¶
Method to calculate heat capacity of a liquid mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
This method has no exception handling; see
mixture_property
for that.- Parameters
- Returns
- Cplm
float
Molar heat capacity of the liquid mixture at the given conditions, [J/mol]
- Cplm
- name = 'Liquid heat capacity'¶
- property_max = 10000.0¶
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be obscenely high.
- property_min = 1¶
Allow very low heat capacities; arbitrarily set; liquid heat capacity should always be somewhat substantial.
- ranked_methods = ['LALIBERTE', 'LINEAR']¶
- test_method_validity(T, P, zs, ws, method)[source]¶
Method to test the validity of a specified method for the given conditions.
- Parameters
- Returns
- validitybool
Whether or not a specifid method is valid
- units = 'J/mol'¶
- thermo.heat_capacity.heat_capacity_liquid_mixture_methods = ['LALIBERTE', 'LINEAR']¶
Holds all methods available for the
HeatCapacityLiquidMixture
class, for use in iterating over them.
Mixture Gas Heat Capacity¶
- class thermo.heat_capacity.HeatCapacityGasMixture(CASs=[], HeatCapacityGases=[], MWs=[], **kwargs)[source]¶
Bases:
thermo.utils.mixture_property.MixtureProperty
Class for dealing with the gas heat capacity of a mixture as a function of temperature, pressure, and composition. Consists only of mole weighted averaging.
- Parameters
Notes
To iterate over all methods, use the list stored in
heat_capacity_gas_mixture_methods
.- LINEAR:
Mixing rule described in
mixing_simple
.
Methods
calculate
(T, P, zs, ws, method)Method to calculate heat capacity of a gas mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
test_method_validity
(T, P, zs, ws, method)Method to test the validity of a specified method for the given conditions.
- Tmax¶
Maximum temperature at which no method can calculate the property above.
- Tmin¶
Minimum temperature at which no method can calculate the property under.
- calculate(T, P, zs, ws, method)[source]¶
Method to calculate heat capacity of a gas mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
This method has no exception handling; see
mixture_property
for that.- Parameters
- Returns
- Cpgm
float
Molar heat capacity of the gas mixture at the given conditions, [J/mol]
- Cpgm
- name = 'Gas heat capacity'¶
- property_max = 10000.0¶
Maximum valid of Heat capacity; arbitrarily set. For fluids very near the critical point, this value can be obscenely high.
- property_min = 0¶
Heat capacities have a minimum value of 0 at 0 K.
- ranked_methods = ['LINEAR']¶
- test_method_validity(T, P, zs, ws, method)[source]¶
Method to test the validity of a specified method for the given conditions.
- Parameters
- Returns
- validitybool
Whether or not a specifid method is valid
- units = 'J/mol'¶
- thermo.heat_capacity.heat_capacity_gas_mixture_methods = ['LINEAR']¶
Holds all methods available for the
HeatCapacityGasMixture
class, for use in iterating over them.
Mixture Solid Heat Capacity¶
- class thermo.heat_capacity.HeatCapacitySolidMixture(CASs=[], HeatCapacitySolids=[], MWs=[], **kwargs)[source]¶
Bases:
thermo.utils.mixture_property.MixtureProperty
Class for dealing with solid heat capacity of a mixture as a function of temperature, pressure, and composition. Consists only of mole weighted averaging.
- Parameters
Notes
To iterate over all methods, use the list stored in
heat_capacity_solid_mixture_methods
.- LINEAR:
Mixing rule described in
mixing_simple
.
Methods
calculate
(T, P, zs, ws, method)Method to calculate heat capacity of a solid mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
test_method_validity
(T, P, zs, ws, method)Method to test the validity of a specified method for the given conditions.
- Tmax¶
Maximum temperature at which no method can calculate the property above.
- Tmin¶
Minimum temperature at which no method can calculate the property under.
- calculate(T, P, zs, ws, method)[source]¶
Method to calculate heat capacity of a solid mixture at temperature T, pressure P, mole fractions zs and weight fractions ws with a given method.
This method has no exception handling; see
mixture_property
for that.- Parameters
- Returns
- Cpsm
float
Molar heat capacity of the solid mixture at the given conditions, [J/mol]
- Cpsm
- name = 'Solid heat capacity'¶
- property_max = 10000.0¶
Maximum value of Heat capacity; arbitrarily set.
- property_min = 0¶
Heat capacities have a minimum value of 0 at 0 K.
- ranked_methods = ['LINEAR']¶
- test_method_validity(T, P, zs, ws, method)[source]¶
Method to test the validity of a specified method for the given conditions.
- Parameters
- Returns
- validitybool
Whether or not a specifid method is valid
- units = 'J/mol'¶
- thermo.heat_capacity.heat_capacity_solid_mixture_methods = ['LINEAR']¶
Holds all methods available for the
HeatCapacitySolidMixture
class, for use in iterating over them.