jjgomera / iapws

python libray for IAPWS standard calculation of water and steam properties
GNU General Public License v3.0
169 stars 64 forks source link

Vapour Pressure of Ice #65

Closed defencedog closed 1 year ago

defencedog commented 1 year ago

How can I get vapour pressure of ice say at -5C https://biopharma.co.uk/blog/2015/03/30/vapour-pressure-of-ice/

jjgomera commented 1 year ago

Hi,

By definition, the vapour pressure of ice is the interface solid-gas, so can be calculated using the _Sublimation_Pressure correlation

In [1]: from iapws import _Sublimation_Pressure
In [2]: from numpy import arange, concatenate
In [3]: t1 = arange(273.15, 263.15, -1)
In [4]: t2 = arange(263.15, 203.15, -5)
In [5]: t3 = arange(203.15, 173, -10)
In [6]: t = concatenate([t1, t2, t3])
In [7]: ["%0.4g" % (_Sublimation_Pressure(ti)*1e4) for ti in t]     # Generating the table of your link
Out[7]: 
['6.112',
 '5.627',
 '5.177',
 '4.76',
 '4.375',
 '4.017',
 '3.687',
 '3.382',
 '3.1',
 '2.839',
 '2.599',
 '1.653',
 '1.032',
 '0.6327',
 '0.3801',
 '0.2234',
 '0.1284',
 '0.07203',
 '0.03938',
 '0.02094',
 '0.01081',
 '0.005411',
 '0.002617',
 '0.0005477',
 '9.682e-05',
 '1.405e-05']

And the vapor pressure at -5ºC


In [12]: _Sublimation_Pressure(268.15)*1e4
Out[12]: 4.01741022116384  # mbar

Be careful with units, temperature en Kelvin, pressure in MPa

Best regards

defencedog commented 1 year ago

EXtremely thank you. Regarding default units, are these K & MPa for temperature & pressure respectively?

jjgomera commented 1 year ago

Yes, these are the units used in IAPWS standard and so the used in this iapws library, in input and in output values.