File: README.rst

package info (click to toggle)
iapws 1.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 560 kB
  • sloc: python: 6,606; makefile: 5
file content (141 lines) | stat: -rw-r--r-- 4,734 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.. image:: https://api.travis-ci.org/jjgomera/iapws.svg?branch=master
    :target: https://travis-ci.org/jjgomera/iapws
    :alt: Build Status

.. image:: https://ci.appveyor.com/api/projects/status/a128sh8e50cjsiya?svg=true
    :target: https://ci.appveyor.com/project/jjgomera/iapws
    :alt: Windows Build Status

.. image:: https://coveralls.io/repos/github/jjgomera/iapws/badge.svg?branch=master
    :target: https://coveralls.io/github/jjgomera/iapws?branch=master
    :alt: coveralls.io analysis

.. image:: https://codecov.io/gh/jjgomera/iapws/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/jjgomera/iapws
    :alt: codecov.io analysis

.. image:: https://landscape.io/github/jjgomera/iapws/master/landscape.svg?style=flat
   :target: https://landscape.io/github/jjgomera/iapws/master
   :alt: Code Health

.. image:: http://readthedocs.org/projects/iapws/badge/?version=latest
    :target: http://iapws.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://zenodo.org/badge/19471942.svg
   :target: https://zenodo.org/badge/latestdoi/19471942
   :alt: DOI


iapws
=====

Python implementation of standard from IAPWS (http://www.iapws.org/release.html). The module implements the full set of standards, including::

    IAPWS-IF97
    IAPWS-95
    IAPWS-06 for Ice
    IAPWS-08 for seawater
    IAPWS-17 for Heavy water
    ...
    

dependences
--------------------

* Support for both python branch::

  * python 2.7
  * python 3.4 or later

* Numpy-scipy: library with mathematic and scientific tools


install
--------------------

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::

	pip install iapws
 
or directly from the github repository::

    pip install git+https://github.com/jjgomera/iapws.git

This is the recommended option to have the latest version.


documentation
--------------------
 
To see the full documentation of package, see `readthedocs <http://iapws.readthedocs.io/>`__

.. inclusion-marker-do-not-remove

For a rapid usage demostration, see this examples 


IAPWS-IF97 (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws97.html#iapws.iapws97.IAPWS97>`__)

.. code:: python

	from iapws import IAPWS97
	sat_steam=IAPWS97(P=1,x=1)                #saturated steam with known P
	sat_liquid=IAPWS97(T=370, x=0)            #saturated liquid with known T
	steam=IAPWS97(P=2.5, T=500)               #steam with known P and T
	print(sat_steam.h, sat_liquid.h, steam.h) #calculated enthalpies
    

IAPWS-95 (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws95.html#iapws.iapws95.IAPWS95>`__)

.. code:: python

	from iapws import IAPWS95
	sat_steam=IAPWS95(P=1,x=1)                #saturated steam with known P
	sat_liquid=IAPWS95(T=370, x=0)            #saturated liquid with known T
	steam=IAPWS95(P=2.5, T=500)               #steam with known P and T
	print(sat_steam.h, sat_liquid.h, steam.h) #calculated enthalpies
    

IAPWS-17 for Heavy water (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws95.html#iapws.iapws95.D2O>`__)

.. code:: python

	from iapws import D2O
	sat_liquid=D2O(T=370, x=0)            #saturated liquid with known T
	print(sat_liquid.h)                   #calculated enthalpy


IAPWS-06 for Ice Ih (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws._iapws.html#iapws._iapws._Ice>`__)

.. code:: python

    from iapws import _Ice
    ice=_Ice(273.15, 0.101325)            #Ice at normal melting point
    print(ice["rho"])                     #Calculated density


IAPWS-08 for seawater (`see full documentation <https://iapws.readthedocs.io/en/latest/iapws.iapws08.html#iapws.iapws08.SeaWater>`__)

.. code:: python

    from iapws import SeaWater
    state = SeaWater(T=300, P=0.101325, S=0.001)    #Seawater with 0.1% Salinity
    print(state.cp)                                 # Get cp


TODO
====

* FIXME: Electrolytic conductiviy
* TODO: Improve convergence in two phase region for IAPWS95 and D2O class
* TODO: Implement SBTL method for fast calculation
* TODO: Implement TTSE method for fast calculation

Ammonia-water mixture:

* FIXME: Ammonia-water mixture residual helmholtz. The values are good, bad difer by 1%
* TODO: Add equilibrium routine

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.
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 <jjgomera@gmail.com>`__.