Implementing Integrated Steam TablesDecember 20, 2013
Figure 2 Interpolated density and sound speed with triangulation overlaid in blue for the IAPWS-IF97 model. Tabulation tolerance was 1.0 with 7 samples per triangle.
At the end of August, CASL published an equation of state model library for use with VERA. The IAPWS95 and IAPWS-IF97 standard models for the thermodynamic properties of water and the associated transport property models implemented within the library were verified to reproduce the analytic models across the range of validity. The performance of the interpolation package is over an order of magnitude faster than the analytic model equations, even for tables with very large numbers of nodes.
The International Association for the Properties of Water and Steam (IAPWS) has created and published multiple models for the thermodynamic and transport properties of water. The models are analytic formulas based upon polynomial expansions of free energies in density, temperature, and pressure. The many parameters of these expansions are calibrated to the various experimental measurements available for water and each are validated within their respective references. The models typically agree well with all the available data, except near the critical point.
The aim for CASL’s implementation is to allow faster evaluation of properties. The IAPWS95 model equation uses density and temperature as independent variables. The IAPWS-IF97 contains five different equations that use a combination of density-temperature and pressure-temperature as independent variables. However, the current desired independent variable space for the solver is pressure and internal energy. In order to evaluate the steam properties using pressure and internal energy, the model equations must be inverted. The need for inversion is a key reason to tabulate the models, as the tabulation may be done directly in the desired pressure/internal energy space.
The standards documents define code verification tests for a subset of the thermodynamic and transport quantities, at a limited number of points in the domain of applicability of each region. These tests provided verification that the parameters of the basic polynomial equations are correctly entered and that the equations themselves are properly evaluated. The CASL implementation of the models have been tested successfully against these values and were found to be in good agreement in almost every case to the 9 decimal digits of accuracy reported in the documents. The next level of verification dealt with the consistency and accuracy of the variables that are not specified in the reference documents. In particular, the reference documents for IAPWS95 and IAPWS-IF97 report values for 5-6 thermodynamic quantities. However, CASL required computation and tabulation of a greater set of values (10-12). The last level of verification applied to the inversion algorithms.
The main goal of tabulation is to speed up the evaluation of state properties. This is accomplished through tabulation of the models directly into the desired pressure-internal energy phase space, avoiding multiple evaluations of the model polynomials. It is important, however, to verify that the tabulated properties still represent the analytic model. A new unstructured triangular (UTri) tabular format accomplishes these goals by allowing adaptation of the table grid so as to ensure a minimal amount of tabulated points that, when interpolated, reproduce the analytic models to within a certain error tolerance. Linear interpolation on the triangles provides for a very efficient computation. Efficient look up of thermodynamic states is accomplished through a tree structure that subdivides the phase space into regions containing roughly an equal number of triangles. Once a state is placed in one of these regions, the triangles contained therein are searched through using their barycentric coordinates to determine the triangle containing the interpolation point.
Construction of a table requires specification of the desired model, error tolerance, error sample size, independent variables, and table bounds. The table bounds are specified as a rectangular region in pressure/temperature space. This space is then warped into the desired space, as shown in Figure 2 at the highest energies. Thermal stability of the models ensure this mapping results in a valid boundary in the desired space. To simplify the triangle look up process, a rectangular space is regenerated by adding boundary triangles along the borders of the warped space. As these additional triangles lie flat along the boundary, interpolation points that fall in this region may be straightforwardly clipped to the pressure-temperature table bounds. Together the error tolerance and sample size define the verification level of the tabulation.
The tabulation process is accomplished through a table builder code. XML file format is used for the input, and an example is shown in Figure 3. In future, the steam table subroutine may be implemented within VERA modules that utilize steam tables to ensure consistent physical properties are used across the set of CASL codes.
Developers John Carpenter, Noel Belcourt, and Robert Nourgaliev noted that the table generator, model implementation, and interpolation package codes have been approved for release as open source software. They will be made available in future for download at http://software.sandia.gov.
For more information, see CASL-I-2013-0188-000.
Figure 3 Example XML input to the steam table tabulation process