IAPWS-IF97 is the Industrial Formulation by The International Association for the Properties of Water and Steam (www.iapws.org). This implementation is according Wagner, Wolfgang & Kretzschmar, Hans-Joachim, 2008, *International Steam Tables — Properties of Water and Steam Based on the Industrial Formulation IAPWS-IF97*, 2^{nd} Edition, Springer-Verlag, Berlin Heidelberg, ISBN 978-3-540-21419-9.

This library is made available to the public domain, under GNU Lesser General Public License. That is, free for any product to use and redistribute. This library can also be included in proprietary software.

IF97 project binaries and source code are hosted on SourceForge: sourceforge.net/projects/if97 as well as compiled sources and API documentation (javadoc).

Our IF97 library is developed in Java, with a test suite containing a mere 100 tests readily available in the source distribution.

IF97 artefacts are also available in The Central Repository and can be added to your Maven project dependencies section:

<dependency> <groupId>com.hummeling</groupId> <artifactId>if97</artifactId> <version>2.0.0</version> </dependency>

This library has no dependencies on other software libraries, except for the test classes which require JUnit.

See IF97 in action on our engineering portal: www.code-calc.com

We're preparing a desktop application which can be used in Windows, Mac, and Linux. Add yourself to the mailing list or send us a message when you want to be informed when it's available!

We're also preparing an Android app. Add yourself to the mailing list or send us a message when you want to be informed when it's available!

Below table shows which properties are available as a function of the two arguments shown in brackets above the columns. Refractive index requires the wavelength of light as an additional third argument. Some properties only require one argument and are denoted as `✓sat.`

, e.g. saturated pressure as a function of temperature only.

(p, T) | (p, h) | (p, s) | (h, s) | (T, s) | (ρ, T) | (p, x?) | (T, x?) | ||
---|---|---|---|---|---|---|---|---|---|

absolute pressure | p | ✓ | ✓sat. | ||||||

density | ρ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||

dielectric constant | ε | ✓ | ✓ | ✓ | ✓ | ✓ | |||

dynamic viscosity | η | ✓ | ✓ | ✓ | ✓ | ✓ | |||

isobaric cubic expansion coefficient | α_{v} | ✓ | ✓ | ✓ | ✓ | ||||

isothermal compressibility | κ_{T} | ✓ | ✓ | ✓ | ✓ | ||||

kinematic viscosity | ν | ✓ | ✓ | ✓ | ✓ | ✓ | |||

Prandtl number | Pr | ✓ | ✓ | ✓ | ✓ | ||||

refractive index | n | ✓ | ✓ | ✓ | ✓ | ✓ | |||

specific enthalpy | h | ✓ | ✓ | ✓ | ✓ | ||||

specific entropy | s | ✓ | ✓ | ✓ | ✓ | ||||

specific Gibbs free energy | g | ✓ | |||||||

specific internal energy | u | ✓ | ✓ | ✓ | ✓ | ||||

specific isobaric heat capacity | c_{p} | ✓ | ✓ | ✓ | ✓ | ||||

specific isochoric heat capacity | c_{v} | ✓ | ✓ | ✓ | ✓ | ||||

specific volume | v | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||

speed of sound | w | ✓ | ✓ | ✓ | ✓ | ||||

surface tension | σ | ✓ | ✓ | ||||||

temperature | T | ✓ | ✓ | ✓ | ✓sat. | ||||

thermal conductivity | λ | ✓ | ✓ | ✓ | ✓ | ✓ | |||

thermal diffusivity | κ | ✓ | ✓ | ✓ | ✓ | ||||

vapour fraction | x | ✓ | ✓ | ✓ | ✓ | ||||

partial derivative | (^{∂z}/_{∂x})_{y} | ✓ | ✓ |

Partial derivatives can be specified using the `com.hummeling.if97.IF97.Quantity`

enumeration. For example, the partial derivative of pressure with respect to enthalpy for constant temperature is retrieved as follows:

`double dp_dh = if97.partialDerivativePT(3, 300, IF97.Quantity.h, IF97.Quantity.T, IF97.Quantity.p);`

Note that partial derivatives are returned in the DEFAULT unit system, so (^{∂p}/_{∂h})_{T} would be in MPa·kg/kJ.

- Add IF97 to the imports:
`import com.hummeling.if97.IF97;`

- Create an IF97 object:
`IF97 if97 = new IF97(IF97.UnitSystem.ENGINEERING);`

- Retrieve a property:
`double v = if97.specificVolumePT(3, 300);`

When arguments are out-of-range, an `com.hummeling.if97.OutOfRangeException`

is thrown, which states the exceeded limit. This class contains methods that return the limit, `double getLimit()`

, the quantity, `String getQuantity()`

, and the exceeding value, `double getValue()`

.

Use `IF97.UnitSystem`

enumeration to select a unit system:

`DEFAULT`

Units as used in above mentioned reference Wagner&Kretzschmar.`ENGINEERING`

Units as commonly used in (process) engineering practice.`SI`

International system of units.`IMPERIAL`

British Imperial system of units.

DEFAULT | ENGINEERING | SI | IMPERIAL | ||
---|---|---|---|---|---|

absolute pressure | p | MPa | bar | Pa | psi |

density | ρ | kg/m³ | kg/m³ | kg/m³ | lb/ft³ |

dielectric constant | ε | - | - | - | - |

dynamic viscosity | η | Pa·s | Pa·s | Pa·s | cP |

isobaric cubic expansion coefficient | α_{v} | 1/K | 1/K | 1/K | 1/R |

isothermal compressibility | κ_{T} | 1/MPa | 1/MPa | 1/Pa | in²/lb |

kinematic viscosity | ν | m²/s | m²/s | m²/s | cSt |

Prandtl number | Pr | - | - | - | - |

refractive index | n | - | - | - | - |

specific enthalpy | h | kJ/kg | kJ/kg | J/kg | BTU/lb |

specific entropy | s | kJ/(kg·K) | kJ/(kg·K) | J/(kg·K) | BTU/(lb·R) |

specific Gibbs free energy | g | kJ/kg | kJ/kg | J/kg | BTU/lb |

specific internal energy | u | kJ/kg | kJ/kg | J/kg | BTU/lb |

specific isobaric heat capacity | c_{p} | kJ/(kg·K) | kJ/(kg·K) | J/(kg·K) | BTU/(lb·R) |

specific isochoric heat capacity | c_{v} | kJ/(kg·K) | kJ/(kg·K) | J/(kg·K) | BTU/(lb·R) |

specific volume | v | m³/kg | m³/kg | m³/kg | ft³/lb |

speed of sound | w | m/s | m/s | m/s | ft/s |

surface tension | σ | N/m | N/m | N/m | lbf/ft |

temperature | T | K | °C | K | °F |

thermal conductivity | λ | W/(m·K) | kW/(m·K) | W/(m·K) | BTU/(hr·ft·R) |

thermal diffusivity | κ | m²/s | m²/s | m²/s | cSt |

vapour fraction | x | - | - | - | - |

wavelength of light | λ_{L} | μm | μm | m | in |

Note that partial derivatives are returned in the DEFAULT unit system, so (^{∂p}/_{∂h})_{T} would be in MPa·kg/kJ.

Our IF97 library can be accessed easily from within MATLAB since Java is standard shipped with MATLAB. First add `IF97.jar`

to MATLAB's dynamic class path

>> `javaaddpath path_to_IF97.jar`

Select your preferred unit system

>> `unitSystem = javaMethod('valueOf', 'com.hummeling.if97.IF97$UnitSystem', 'ENGINEERING');`

Create an instance of the IF97 class

>> `if97 = com.hummeling.if97.IF97(unitSystem);`

Retrieve a property, e.g., specific volume as a function of pressure and temperature as follows

>> `if97.specificVolumePT(3, 300)`

Alternatively, the Java archive can be added to MATLAB's static class path by editing your `classpath.txt`

file, see your documentation for more details. Or you could add the `javaaddpath`

statement to your MATLAB startup file, `startup.m`

.

For a list of available methods issue the following command

>> `methodsview(if97)`

For more information, contact us: .

Happy with our library? Consider a donation!

We've also implemented the more accurate (but slower) formulation for scientific and general use, IAPWS-95. Contact us for more information.