Boost logo

Boost :

Subject: Re: [boost] Interest in thermodynamic properties of water and steam
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2017-08-28 16:12:05

> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Robert Ramey via Boost
> Sent: 28 August 2017 15:54
> To: Belcourt, Kenneth via Boost
> Cc: Robert Ramey
> Subject: Re: [boost] Interest in thermodynamic properties of water and steam
> On 8/25/17 10:33 AM, Belcourt, Kenneth via Boost wrote:
> > Hi,
> >
> > Would there be any interest in an implementation of the IAPWS-95 in Boost? Here’s the reference:
> >
> > The IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific
> Use.
> > Authors: W. Wagner and A. Pruss
> > J. Phys. Chem. Ref. Data, Vol. 31, No. 2, 2002, pages 387-535
> >
> > For those with access to the paper, the code reproduces Table 6.6 (results agree to all published digits), as well as well
> significant parts of both Table 13.1 (vapor-liquid phase boundary properties as function of temperature) and Table 13.2
> (properties of water in single-phase as function of temperature and density for pressures in range of 0.05 MPa to 1000 MPa).
> Also implemented are the full set of algorithms in Table 6.3, including pressure, enthalpy, entropy, sound speed, heat
> capacities. There’s also an algorithm for computing the thermal saturation properties (pressure, liquid and vapor densities),
> given the saturation temperature.
> >
> > At present the code has a required dependency on Boost.Units and is about 2k loc. If you're interested in this, feel free to
> reply or contact me directly.
> >
> > — Noel Belcourt
> >
> > [1]
> Just one more uninformed opinion, but wouldn't this work better as an
> addition to the boost units library?

I'd suggest not, on the grounds that physical properties are inexact and accepted values can and do change, while math constants really are constant (though their representation may change depending on the type used to represent them - as 32, 64 or 128 bit doubles for example). I'd prefer to keep these two different things separate.

Of course, the algorithms should not change, but generally involve some inconstant constants, and so they do change.


Paul A. Bristow
Prizet Farmhouse
Kendal UK LA8 8AB
+44 (0) 1539 561830

Boost list run by bdawes at, gregod at, cpdaniel at, john at