| 1 |
Metadata-Version: 2.4 |
| 2 |
Name: iapws |
| 3 |
Version: 1.5.5 |
| 4 |
Summary: Python implementation of standards from The InternationalAssociation for the Properties of Water and Steam |
| 5 |
Home-page: https://github.com/jjgomera/iapws |
| 6 |
Download-URL: https://github.com/jjgomera/iapws/tarball/v1.5.5 |
| 7 |
Author: jjgomera |
| 8 |
Author-email: [email protected] |
| 9 |
License: gpl v3 |
| 10 |
Classifier: Development Status :: 5 - Production/Stable |
| 11 |
Classifier: Intended Audience :: Education |
| 12 |
Classifier: Intended Audience :: Science/Research |
| 13 |
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3) |
| 14 |
Classifier: Natural Language :: English |
| 15 |
Classifier: Operating System :: OS Independent |
| 16 |
Classifier: Programming Language :: Python |
| 17 |
Classifier: Topic :: Scientific/Engineering |
| 18 |
Classifier: Topic :: Scientific/Engineering :: Chemistry |
| 19 |
Classifier: Topic :: Scientific/Engineering :: Physics |
| 20 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 21 |
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.* |
| 22 |
License-File: LICENSE |
| 23 |
Requires-Dist: scipy>=1.2 |
| 24 |
Dynamic: author |
| 25 |
Dynamic: author-email |
| 26 |
Dynamic: classifier |
| 27 |
Dynamic: description |
| 28 |
Dynamic: download-url |
| 29 |
Dynamic: home-page |
| 30 |
Dynamic: license |
| 31 |
Dynamic: license-file |
| 32 |
Dynamic: requires-dist |
| 33 |
Dynamic: requires-python |
| 34 |
Dynamic: summary |
| 35 |
|
| 36 |
.. image:: https://dl.circleci.com/status-badge/img/gh/jjgomera/iapws/tree/master.svg?style=svg |
| 37 |
:target: https://dl.circleci.com/status-badge/redirect/gh/jjgomera/iapws/tree/master |
| 38 |
:alt: Build Status |
| 39 |
|
| 40 |
.. image:: https://ci.appveyor.com/api/projects/status/a128sh8e50cjsiya?svg=true |
| 41 |
:target: https://ci.appveyor.com/project/jjgomera/iapws |
| 42 |
:alt: Windows Build Status |
| 43 |
|
| 44 |
.. image:: https://coveralls.io/repos/github/jjgomera/iapws/badge.svg?branch=master |
| 45 |
:target: https://coveralls.io/github/jjgomera/iapws?branch=master |
| 46 |
:alt: coveralls.io analysis |
| 47 |
|
| 48 |
.. image:: https://codecov.io/gh/jjgomera/iapws/branch/master/graph/badge.svg |
| 49 |
:target: https://codecov.io/gh/jjgomera/iapws |
| 50 |
:alt: codecov.io analysis |
| 51 |
|
| 52 |
.. image:: https://app.codacy.com/project/badge/Grade/bb92d537dfa1461d919a0782f3c398b9 |
| 53 |
:target: https://www.codacy.com/gh/jjgomera/iapws/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jjgomera/iapws&utm_campaign=Badge_Grade |
| 54 |
:alt: Code Quality |
| 55 |
|
| 56 |
.. image:: http://readthedocs.org/projects/iapws/badge/?version=latest |
| 57 |
:target: http://iapws.readthedocs.io/en/latest/?badge=latest |
| 58 |
:alt: Documentation Status |
| 59 |
|
| 60 |
.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4744318.svg |
| 61 |
:target: https://doi.org/10.5281/zenodo.4744318 |
| 62 |
:alt: DOI |
| 63 |
|
| 64 |
|
| 65 |
iapws |
| 66 |
===== |
| 67 |
|
| 68 |
Python implementation of standard from IAPWS (http://www.iapws.org/release.html). The module implements the full set of standards, including:: |
| 69 |
|
| 70 |
IAPWS-IF97 |
| 71 |
IAPWS-95 |
| 72 |
IAPWS-06 for Ice |
| 73 |
IAPWS-08 for seawater |
| 74 |
IAPWS-17 for Heavy water |
| 75 |
... |
| 76 |
|
| 77 |
|
| 78 |
dependences |
| 79 |
-------------------- |
| 80 |
|
| 81 |
* Support for both python branch:: |
| 82 |
|
| 83 |
* python 2.7 |
| 84 |
* python 3.4 or later |
| 85 |
|
| 86 |
* Numpy-scipy: library with mathematic and scientific tools |
| 87 |
|
| 88 |
|
| 89 |
install |
| 90 |
-------------------- |
| 91 |
|
| 92 |
In debian you can find in official repositories in jessie, testing and sid. In ubuntu it's in official repositories from ubuntu saucy (13.10). In other system you can install using pip:: |
| 93 |
|
| 94 |
pip install iapws |
| 95 |
|
| 96 |
or directly from the github repository:: |
| 97 |
|
| 98 |
pip install git+https://github.com/jjgomera/iapws.git |
| 99 |
|
| 100 |
This is the recommended option to have the latest version. |
| 101 |
|
| 102 |
|
| 103 |
documentation |
| 104 |
-------------------- |
| 105 |
|
| 106 |
To see the full documentation of package, see `readthedocs <http://iapws.readthedocs.io/>`__ |
| 107 |
|
| 108 |
.. inclusion-marker-do-not-remove |
| 109 |
|
| 110 |
For a rapid usage demostration, see this examples |
| 111 |
|
| 112 |
|
| 113 |
IAPWS-IF97 (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws97.html#iapws.iapws97.IAPWS97>`__) |
| 114 |
|
| 115 |
.. code:: python |
| 116 |
|
| 117 |
from iapws import IAPWS97 |
| 118 |
sat_steam = IAPWS97(P=1,x=1) #saturated steam with known P |
| 119 |
sat_liquid = IAPWS97(T=370, x=0) #saturated liquid with known T |
| 120 |
steam = IAPWS97(P=2.5, T=500) #steam with known P and T |
| 121 |
print(sat_steam.h, sat_liquid.h, steam.h) #calculated enthalpies |
| 122 |
|
| 123 |
|
| 124 |
IAPWS-95 (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws95.html#iapws.iapws95.IAPWS95>`__) |
| 125 |
|
| 126 |
.. code:: python |
| 127 |
|
| 128 |
from iapws import IAPWS95 |
| 129 |
sat_steam = IAPWS95(P=1,x=1) #saturated steam with known P |
| 130 |
sat_liquid = IAPWS95(T=370, x=0) #saturated liquid with known T |
| 131 |
steam = IAPWS95(P=2.5, T=500) #steam with known P and T |
| 132 |
print(sat_steam.h, sat_liquid.h, steam.h) #calculated enthalpies |
| 133 |
|
| 134 |
For calculation of multiple states is possible use multiprocessing to speed up |
| 135 |
calculation, 6x in my laptop. Method valid too for D2O |
| 136 |
|
| 137 |
.. code:: python |
| 138 |
|
| 139 |
from iapws import IAPWS95 |
| 140 |
from numpy import arange |
| 141 |
from time import time |
| 142 |
|
| 143 |
x = arange(0, 1.01, 0.01) |
| 144 |
|
| 145 |
def fi(x): |
| 146 |
return IAPWS95(P=20.8, x=x) |
| 147 |
|
| 148 |
start = time() |
| 149 |
for xi in x: |
| 150 |
fi(xi) |
| 151 |
print(f'Without multiprocessing: {time() - start}') |
| 152 |
|
| 153 |
start = time() |
| 154 |
states = IAPWS95.from_list("P", 20.8, "x", x) |
| 155 |
print(f'With multiprocessing: {time() - start}') |
| 156 |
|
| 157 |
|
| 158 |
IAPWS-17 for Heavy water (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws95.html#iapws.iapws95.D2O>`__) |
| 159 |
|
| 160 |
.. code:: python |
| 161 |
|
| 162 |
from iapws import D2O |
| 163 |
sat_liquid = D2O(T=370, x=0) #saturated liquid with known T |
| 164 |
print(sat_liquid.h) #calculated enthalpy |
| 165 |
|
| 166 |
|
| 167 |
IAPWS-06 for Ice Ih (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws._iapws.html#iapws._iapws._Ice>`__) |
| 168 |
|
| 169 |
.. code:: python |
| 170 |
|
| 171 |
from iapws import _Ice |
| 172 |
ice = _Ice(273.15, 0.101325) #Ice at normal melting point |
| 173 |
print(ice["rho"]) #Calculated density |
| 174 |
|
| 175 |
|
| 176 |
IAPWS-08 for seawater (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws08.html#iapws.iapws08.SeaWater>`__) |
| 177 |
|
| 178 |
.. code:: python |
| 179 |
|
| 180 |
from iapws import SeaWater |
| 181 |
state = SeaWater(T=300, P=0.101325, S=0.001) #Seawater with 0.1% Salinity |
| 182 |
print(state.cp) # Get cp |
| 183 |
|
| 184 |
|
| 185 |
TODO |
| 186 |
==== |
| 187 |
|
| 188 |
* TODO: Improve convergence in two phase region for IAPWS95 and D2O class |
| 189 |
* TODO: Implement SBTL method for fast calculation |
| 190 |
* TODO: Implement TTSE method for fast calculation |
| 191 |
|
| 192 |
Ammonia-water mixture: |
| 193 |
|
| 194 |
* TODO: Add equilibrium routine |
| 195 |
|
| 196 |
I've tried to test all code and use all values for computer verification the standards give, but anyway the code can have hidden problem. |
| 197 |
For any suggestions, comments, bugs ... you can usage the `github issue section <https://github.com/jjgomera/iapws/issues>`__, or contact directly with me at `email <[email protected]>`__. |