Litcius/Paper detail

Implementing an Equation of State without Derivatives: teqp

Ian H. Bell, Ulrich K. Deiters, Allan M. M. Leal

2022Industrial & Engineering Chemistry Research37 citationsDOI

Abstract

This work uses advanced numerical techniques (complex differentiation and automatic differentiation) to efficiently and accurately compute all the required thermodynamic properties of an equation of state without any analytical derivatives─particularly without any handwritten derivatives. It avoids the tedious and error-prone process of symbolic differentiation, thus allowing for more rapid development of new thermodynamic models. The technique presented here was tested with several equations of state (van der Waals, Peng–Robinson, Soave–Redlich–Kwong, PC-SAFT, and cubic-plus-association) and high-accuracy multifluid models. A minimal set of algorithms (critical locus tracing and vapor–liquid equilibrium tracing) were implemented in an extensible and concise open-source C++ library: teqp (for Templated EQuation of state Package). This work demonstrates that highly complicated equations of state can be implemented faster yet with minimal computational overhead and negligible loss in numerical precision compared with the traditional approach that relies on analytical derivatives. We believe that the approach outlined in this work has the potential to establish a new computational standard when implementing computer codes for thermodynamic models.

Topics & Concepts

Automatic differentiationTracingComputer scienceEquation of stateWork (physics)State (computer science)Overhead (engineering)Set (abstract data type)Process (computing)ComputationAlgorithmComputational scienceApplied mathematicsThermodynamicsMathematicsPhysicsProgramming languagePhase Equilibria and ThermodynamicsSpectroscopy and Quantum Chemical StudiesAdvanced Thermodynamics and Statistical Mechanics
Implementing an Equation of State without Derivatives: teqp | Litcius