Air: Fundamental Equation of State for Air (chemicals.air)¶
This module contains various thermodynamic functions for air and humid air.
For reporting bugs, adding feature requests, or submitting pull requests, please use the GitHub issue tracker.
Dry Air Basic Solvers¶
- chemicals.air.lemmon2000_rho(T, P)[source]¶
Calculate the density of air according to the Lemmon (2000) [1] given a temperature T and pressure P.
- Parameters
- Returns
- rho
float
Molar density of air, [mol/m^3]
- rho
Notes
This solution is iterative due to the nature of the equation. This solver has been tested only for gas solutions.
References
- 1(1,2)
Lemmon, Eric W., Richard T. Jacobsen, Steven G. Penoncello, and Daniel G. Friend. “Thermodynamic Properties of Air and Mixtures of Nitrogen, Argon, and Oxygen From 60 to 2000 K at Pressures to 2000 MPa.” Journal of Physical and Chemical Reference Data 29, no. 3 (May 1, 2000): 331-85. https://doi.org/10.1063/1.1285884.
Examples
>>> lemmon2000_rho(T=300.0, P=1e6) 402.046613509
2 GPa and 2000 K are suggested as upper limits of [1] although there are no hardcoded limits for temperature and pressure.
>>> lemmon2000_rho(T=2000.0, P=2e9) 32892.9327834
- chemicals.air.lemmon2000_P(T, rho)[source]¶
Calculate the pressure of air according to the (2000) given a temperature T and molar density rho.
- Parameters
- Returns
- P
float
Pressure, [Pa]
- P
Notes
Helmholtz equations of state are explicit with inputs of temperature and density, so this is a direct calculation with no iteration required.
References
- 1
Lemmon, Eric W., Richard T. Jacobsen, Steven G. Penoncello, and Daniel G. Friend. “Thermodynamic Properties of Air and Mixtures of Nitrogen, Argon, and Oxygen From 60 to 2000 K at Pressures to 2000 MPa.” Journal of Physical and Chemical Reference Data 29, no. 3 (May 1, 2000): 331-85. https://doi.org/10.1063/1.1285884.
Examples
>>> lemmon2000_P(330.0, lemmon2000_rho(T=330.0, P=8e5)) 8e5 >>> lemmon2000_P(823.0, 40) 273973.0024911
- chemicals.air.lemmon2000_T(P, rho)[source]¶
Calculate the temperature of air according to the Lemmon (2000) [1] given a pressure P and molar density rho .
- Parameters
- Returns
- T
float
Temperature, [K]
- T
Notes
This solution is iterative due to the nature of the equation. This solver has been tested only for gas solutions.
References
- 1
Lemmon, Eric W., Richard T. Jacobsen, Steven G. Penoncello, and Daniel G. Friend. “Thermodynamic Properties of Air and Mixtures of Nitrogen, Argon, and Oxygen From 60 to 2000 K at Pressures to 2000 MPa.” Journal of Physical and Chemical Reference Data 29, no. 3 (May 1, 2000): 331-85. https://doi.org/10.1063/1.1285884.
Examples
>>> lemmon2000_T(P=1e5, rho=20.0) 601.1393854499
Dry Air Bubble/Dew Points¶
- chemicals.air.lemmon2000_air_P_dew(T)[source]¶
Calculates the dew pressure of standard dry air according to Lemmon (2000).
Notes
The stated range of this ancillary equation is 59.75 K <= T <= 132.6312 K.
Examples
>>> lemmon2000_air_P_dew(100.0) 567424.1338937
- chemicals.air.lemmon2000_air_P_bubble(T)[source]¶
Calculates the bubble pressure of standard dry air according to Lemmon (2000).
Notes
The stated range of this ancillary equation is 59.75 K <= T <= 132.6312 K.
Examples
>>> lemmon2000_air_P_bubble(100.0) 663128.589440
- chemicals.air.lemmon2000_air_rho_dew(T)[source]¶
Calculates the dew molar density of standard dry air according to Lemmon (2000).
Notes
The stated range of this ancillary equation is 59.75 K <= T <= 132.6312 K.
Examples
>>> lemmon2000_air_rho_dew(100.0) 785.7863223794999
Dry Air Constants¶
- chemicals.air.lemmon2000_air_T_reducing = 132.6312¶
Reducing temperature in K for the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_rho_reducing = 10447.7¶
Reducing molar density in mol/m^3 for the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_P_reducing = 3785020.0¶
Reducing pressure in Pa for the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_MW = 28.9586¶
Molecular weight of air in g/mol for the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_R = 8.31451¶
Molar gas constant in Jlemmon2000_air_R/(mol*K) used in the the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_T_max = 2000.0¶
Maximum temperature in K valid for the Lemmon (2000) EOS for dry air
- chemicals.air.lemmon2000_air_P_max = 2000000000.0¶
Maximum pressure in Pa valid for the Lemmon (2000) EOS for dry air
Dry Air Ideal Gas Terms¶
- chemicals.air.lemmon2000_air_A0(tau, delta)[source]¶
Calculates the ideal gas Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- A0
float
Ideal gas dimensionless Helmholtz energy A0/(RT) [-]
- A0
Notes
The coefficients are as follows:
Ns = [0.605719400E-7, -0.210274769E-4, -0.158860716E-3, -13.841928076, 17.275266575, -0.195363420E-3, 2.490888032, 0.791309509, 0.212236768, -0.197938904, 25.36365, 16.90741, 37.31279]
Examples
>>> lemmon2000_air_A0(132.6312/200.0, 13000/10447.7) -14.65173785639
- chemicals.air.lemmon2000_air_dA0_dtau(tau, delta)[source]¶
Calculates the first temperature derivative of ideal gas Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- dA0_dtau
float
First derivative of A0/(RT) Ideal gas dimensionless Helmholtz energy with respect to tau [-]
- dA0_dtau
Examples
>>> lemmon2000_air_dA0_dtau(132.6312/200.0, 13000/10447.7) 3.749095669249
- chemicals.air.lemmon2000_air_d2A0_dtau2(tau, delta)[source]¶
Calculates the second temperature derivative of ideal gas Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- d2A0_dtau2
float
Second derivative of A0/(RT) Ideal gas dimensionless Helmholtz energy with respect to tau [-]
- d2A0_dtau2
Examples
>>> lemmon2000_air_d2A0_dtau2(132.6312/200.0, 13000/10447.7) -5.66675499015
- chemicals.air.lemmon2000_air_d3A0_dtau3(tau, delta)[source]¶
Calculates the third temperature derivative of ideal gas Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- d3A0_dtau3
float
Third derivative of A0/(RT) Ideal gas dimensionless Helmholtz energy with respect to tau [-]
- d3A0_dtau3
Examples
>>> lemmon2000_air_d3A0_dtau3(132.6312/200.0, 13000/10447.7) 17.10538866838
- chemicals.air.lemmon2000_air_d4A0_dtau4(tau, delta)[source]¶
Calculates the fourth temperature derivative of ideal gas Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- d4A0_dtau4
float
Fourth derivative of A0/(RT) Ideal gas dimensionless Helmholtz energy with respect to tau [-]
- d4A0_dtau4
Examples
>>> lemmon2000_air_d4A0_dtau4(126.192/200.0, 13000/10447.7) -94.815532727
Dry Air Residual Terms¶
- chemicals.air.lemmon2000_air_Ar(tau, delta)[source]¶
Calculates the residual Helmholtz energy of air according to Lemmon (2000).
- Parameters
- Returns
- Ar
float
Residual dimensionless Helmholtz energy Ar/(RT) [-]
- Ar
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt and many multiplies/adds.
Examples
>>> lemmon2000_air_Ar(132.6312/200.0, 13000/10447.7) -0.34683017661 >>> lemmon2000_air_Ar(0.36842, 0.15880050154579475) 0.0047988122806
- chemicals.air.lemmon2000_air_dAr_dtau(tau, delta)[source]¶
Calculates the first derivative of residual Helmholtz energy of air with respect to tau according to Lemmon (2000).
- Parameters
- Returns
- dAr_dtau
float
First derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to tau, [-]
- dAr_dtau
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 1 divisions and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_dAr_dtau(132.6312/200.0, 13000/10447.7) -1.8112257495223263
- chemicals.air.lemmon2000_air_d2Ar_dtau2(tau, delta)[source]¶
Calculates the second derivative of residual Helmholtz energy of air with respect to tau according to Lemmon (2000).
- Parameters
- Returns
- d2Ar_dtau2
float
Second derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to tau, [-]
- d2Ar_dtau2
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 2 divisions and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d2Ar_dtau2(132.6312/200.0, 13000/10447.7) -0.7632109061747
- chemicals.air.lemmon2000_air_d3Ar_dtau3(tau, delta)[source]¶
Calculates the third derivative of residual Helmholtz energy of air with respect to tau according to Lemmon (2000).
- Parameters
- Returns
- d3Ar_dtau3
float
Third derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to tau, [-]
- d3Ar_dtau3
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 4 divisions and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d3Ar_dtau3(132.6312/200.0, 13000/10447.7) 0.27922007457420
- chemicals.air.lemmon2000_air_d4Ar_dtau4(tau, delta)[source]¶
Calculates the fourth derivative of residual Helmholtz energy of air with respect to tau according to Lemmon (2000).
- Parameters
- Returns
- d4Ar_dtau4
float
Fourth derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to tau, [-]
- d4Ar_dtau4
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 4 divisions and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d4Ar_dtau4(132.6312/200.0, 13000/10447.7) -8.197368061417
- chemicals.air.lemmon2000_air_dAr_ddelta(tau, delta)[source]¶
Calculates the first derivative of residual Helmholtz energy of air with respect to delta according to Lemmon (2000).
- Parameters
- Returns
- dAr_ddelta
float
First derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta, [-]
- dAr_ddelta
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_dAr_ddelta(132.6312/200.0, 13000/10447.7) -0.1367917666005
- chemicals.air.lemmon2000_air_d2Ar_ddelta2(tau, delta)[source]¶
Calculates the second derivative of residual Helmholtz energy of air with respect to delta according to Lemmon (2000).
- Parameters
- Returns
- d2Ar_ddelta2
float
Second derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta, [-]
- d2Ar_ddelta2
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d2Ar_ddelta2(132.6312/200.0, 13000/10447.7) 0.27027259528316
- chemicals.air.lemmon2000_air_d3Ar_ddelta3(tau, delta)[source]¶
Calculates the third derivative of residual Helmholtz energy of air with respect to delta according to Lemmon (2000).
- Parameters
- Returns
- d3Ar_ddelta3
float
Third derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta, [-]
- d3Ar_ddelta3
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d3Ar_ddelta3(132.6312/200.0, 13000/10447.7) 0.1849386546766
- chemicals.air.lemmon2000_air_d4Ar_ddelta4(tau, delta)[source]¶
Calculates the fourth derivative of residual Helmholtz energy of air with respect to delta according to Lemmon (2000).
- Parameters
- Returns
- d4Ar_ddelta4
float
Fourth derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta, [-]
- d4Ar_ddelta4
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d4Ar_ddelta4(132.6312/200.0, 13000/10447.7) 0.37902213262258
- chemicals.air.lemmon2000_air_d2Ar_ddeltadtau(tau, delta)[source]¶
Calculates the second derivative of residual Helmholtz energy of air with respect to delta and tau according to Lemmon (2000).
- Parameters
- Returns
- d2Ar_ddeltadtau
float
Second derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta and tau, [-]
- d2Ar_ddeltadtau
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d2Ar_ddeltadtau(132.6312/200.0, 13000/10447.7) -1.359976184125
- chemicals.air.lemmon2000_air_d3Ar_ddeltadtau2(tau, delta)[source]¶
Calculates the third derivative of residual Helmholtz energy of air with respect to delta once and tau twice according to Lemmon (2000).
- Parameters
- Returns
- d3Ar_ddeltadtau2
float
Third derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta once and tau twice, [-]
- d3Ar_ddeltadtau2
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 3 divisions, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d3Ar_ddeltadtau2(132.6312/200.0, 13000/10447.7) -0.19089212184849
- chemicals.air.lemmon2000_air_d3Ar_ddelta2dtau(tau, delta)[source]¶
Calculates the third derivative of residual Helmholtz energy of air with respect to delta twice and tau once according to Lemmon (2000).
- Parameters
- Returns
- d3Ar_ddelta2dtau
float
Third derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta twice and once twice, [-]
- d3Ar_ddelta2dtau
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 3 divisions, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d3Ar_ddelta2dtau(132.6312/200.0, 13000/10447.7) 0.01441788198940
- chemicals.air.lemmon2000_air_d4Ar_ddelta2dtau2(tau, delta)[source]¶
Calculates the fourth derivative of residual Helmholtz energy of air with respect to delta twice and tau twice according to Lemmon (2000).
- Parameters
- Returns
- d4Ar_ddelta2dtau2
float
Fourth derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta twice and tau twice, [-]
- d4Ar_ddelta2dtau2
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 2 divisions, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d4Ar_ddelta2dtau2(132.6312/200.0, 13000/10447.7) 0.1196873112730
- chemicals.air.lemmon2000_air_d4Ar_ddeltadtau3(tau, delta)[source]¶
Calculates the fourth derivative of residual Helmholtz energy of air with respect to delta once and tau thrice according to Lemmon (2000).
- Parameters
- Returns
- d4Ar_ddeltadtau3
float
Fourth derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta once and tau thrice, [-]
- d4Ar_ddeltadtau3
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 1 division, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d4Ar_ddeltadtau3(132.6312/200.0, 13000/10447.7) 2.077739387492
- chemicals.air.lemmon2000_air_d4Ar_ddelta3dtau(tau, delta)[source]¶
Calculates the fourth derivative of residual Helmholtz energy of air with respect to delta thrice and tau once according to Lemmon (2000).
- Parameters
- Returns
- d4Ar_ddelta3dtau
float
Fourth derivative of residual dimensionless Helmholtz energy Ar/(RT) with respect to delta thrice and tau once, [-]
- d4Ar_ddelta3dtau
Notes
The cost of this function is 1 power, 3 exp, 2 sqrt, 1 division, and the necessary adds/multiplies.
Examples
>>> lemmon2000_air_d4Ar_ddelta3dtau(132.6312/200.0, 13000/10447.7) -0.26039336747
Humid Air Virial Terms¶
- chemicals.air.TEOS10_BAW_derivatives(T)[source]¶
Calculates the second molar virial cross coefficient between air and water according to [1].
Where and K and mol/m^3.
- Parameters
- T
float
Temperature, [K]
- T
- Returns
- Baw
float
Air-water second molar virial cross coefficient [m^3/mol]
- dBaw_dT
float
First temperature derivative of air-water second molar virial cross coefficient [m^3/(mol*K)]
- d2Baw_dT2
float
Second temperature derivative of air-water second molar virial cross coefficient [m^3/(mol*K^2)]
- d3Baw_dT3
float
Third temperature derivative of air-water second molar virial cross coefficient [m^3/(mol*K^3)]
- Baw
Notes
The coefficients are as follows:
cis = [0.665687E2, -0.238834E3, -0.176755E3]
dis = [-0.237, -1.048, -3.183]
References
- 1
Herrmann, Sebastian, Hans-Joachim Kretzschmar, and Donald P. Gatley. “Thermodynamic Properties of Real Moist Air, Dry Air, Steam, Water, and Ice (RP-1485).” HVAC&R Research 15, no. 5 (September 1, 2009): 961-986. https://doi.org/10.1080/10789669.2009.10390874.
Examples
>>> TEOS10_BAW_derivatives(300.0) (-2.956727474282386e-05, 2.8009736043809844e-07, -2.425992413058737e-09, 3.0736974302787557e-11)
- chemicals.air.TEOS10_CAAW_derivatives(T)[source]¶
Calculates the third molar virial cross coefficient between air and air-water according to [1].
Where and K and mol/m^3.
- Parameters
- T
float
Temperature, [K]
- T
- Returns
- Caaw
float
Air air-water second molar virial cross coefficient [m^6/mol^2]
- dCaaw_dT
float
First temperature derivative of air air-water third molar virial cross coefficient [m^6/(mol^2*K)]
- d2Caaw_dT2
float
Second temperature derivative of air air-water third molar virial cross coefficient [m^6/(mol^2*K^2)]
- d3Caaw_dT3
float
Third temperature derivative of air air-water third molar virial cross coefficient [m^6/(mol^2*K^3)]
- Caaw
Notes
The coefficients are as follows:
cis = [0.482737E-9, 1.05678E-7, -6.56394E-5, 0.294442E-1, -3.19317]
References
- 1
Herrmann, Sebastian, Hans-Joachim Kretzschmar, and Donald P. Gatley. “Thermodynamic Properties of Real Moist Air, Dry Air, Steam, Water, and Ice (RP-1485).” HVAC&R Research 15, no. 5 (September 1, 2009): 961-986. https://doi.org/10.1080/10789669.2009.10390874.
Examples
>>> TEOS10_CAAW_derivatives(300.0) (8.019777407407409e-10, -1.9610345679012353e-12, 1.700556378600824e-14, -1.0129827160493832e-16)
- chemicals.air.TEOS10_CAWW_derivatives(T)[source]¶
Calculates the third molar virial cross coefficient between air and water-water according to [1].
Where and K and mol/m^3.
- Parameters
- T
float
Temperature, [K]
- T
- Returns
- Caww
float
Air water-water second molar virial cross coefficient [m^6/mol^2]
- dCaww_dT
float
First temperature derivative of air water-water third molar virial cross coefficient [m^6/(mol^2*K)]
- d2Caww_dT2
float
Second temperature derivative of air water-water third molar virial cross coefficient [m^6/(mol^2*K^2)]
- d3Caww_dT3
float
Third temperature derivative of air water-water third molar virial cross coefficient [m^6/(mol^2*K^3)]
- Caww
Notes
The coefficients are as follows:
dis = [-0.10728876E2, 0.347802E2, -0.383383E2, 0.334060E2]
References
- 1
Herrmann, Sebastian, Hans-Joachim Kretzschmar, and Donald P. Gatley. “Thermodynamic Properties of Real Moist Air, Dry Air, Steam, Water, and Ice (RP-1485).” HVAC&R Research 15, no. 5 (September 1, 2009): 961-986. https://doi.org/10.1080/10789669.2009.10390874.
Examples
>>> TEOS10_CAWW_derivatives(300.0) (-1.1555278368039349e-07, 2.6136327775413448e-09, -7.513345818045024e-11, 2.601834967770415e-12)
Henry’s Law for Air in Water¶
- chemicals.air.iapws04_Henry_air(T)[source]¶
Calculate the Henry’s law constant of air in water according to the IAPWS-04 standard.
Notes
The mole fractions of air in this model are 0.7812 N2, 0.2095 O2 and 0.0093 Ar.
References
- 1
Fernández-Prini, Roberto, Jorge L. Alvarez, and Allan H. Harvey. “Henry’s Constants and Vapor-Liquid Distribution Constants for Gaseous Solutes in H2O and D2O at High Temperatures.” Journal of Physical and Chemical Reference Data 32, no. 2 (June 2003): 903-16. https://doi.org/10.1063/1.1564818.
Examples
>>> iapws04_Henry_air(320.0) 1.0991553689889531e-10
- chemicals.air.iapws04_dHenry_air_dT(T)[source]¶
Calculate the temperature derivative of Henry’s law constant of air in water according to the IAPWS-04 standard. As the actual Henry’s law constant must be calculated as well, it is also returned.
- Parameters
- T
float
Temperature, [K]
- T
- Returns
Notes
The mole fractions of air in this model are 0.7812 N2, 0.2095 O2 and 0.0093 Ar.
References
- 1
Fernández-Prini, Roberto, Jorge L. Alvarez, and Allan H. Harvey. “Henry’s Constants and Vapor-Liquid Distribution Constants for Gaseous Solutes in H2O and D2O at High Temperatures.” Journal of Physical and Chemical Reference Data 32, no. 2 (June 2003): 903-16. https://doi.org/10.1063/1.1564818.
Examples
>>> iapws04_dHenry_air_dT(320.0) (-8.680064421141611e-13, 1.0991553689889561e-10)