IAPWS-IF97 is the Industrial Formulation by The International Association for the Properties of Water and Steam (www.iapws.org).

Hummeling Engineering released its water & steam thermodynamic properties library to the public domain, under GNU Lesser General Public License. That is, free for any product to use and redistribute. Even proprietary software developers can use our library.

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>1.0.5</version> </dependency>

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

## >> Available properties

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.

## >> Using IF97 in Java

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

`ENGINEERING`

`SI`

`IMPERIAL`

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

λ | wave length | μm | μm | m | in |

Note that partial derivatives are returned in the DEFAULT unit system.

## >> Accessing IF97 from MATLAB

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)`

## >> Need help?

Send us an email:

Call us: +316 5758 1679

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.

For an implementation in C, refer to sourceforge.net/projects/freesteam.