Consistent thermodynamic derivative estimates for tabular equations of   state
  Numerical simulations of compressible fluid flows require an equation of state (EOS) to relate the thermodynamic variables of density, internal energy, temperature, and pressure. A valid EOS must satisfy the thermodynamic conditions of consistency (derivation from a free energy) and stability (positive sound speed squared). When phase transitions are significant, the EOS is complicated and can only be specified in a table. For tabular EOS's such as SESAME from Los Alamos National Laboratory, the consistency and stability conditions take the form of a differential equation relating the derivatives of pressure and energy as functions of temperature and density, along with positivity constraints. Typical software interfaces to such tables based on polynomial or rational interpolants compute derivatives of pressure and energy and may enforce the stability conditions, but do not enforce the consistency condition and its derivatives. We describe a new type of table interface based on a constrained local least squares regression technique. It is applied to several SESAME EOS's showing how the consistency condition can be satisfied to round-off while computing first and second derivatives with demonstrated second-order convergence. An improvement of 14 orders of magnitude over conventional derivatives is demonstrated, although the new method is apparently two orders of magnitude slower, due to the fact that every evaluation requires solving an 11-dimensional nonlinear system. 
Gary A. Dilts