Litcius/Paper detail

FeO<sub>s</sub>: An Open-Source Framework for Equations of State and Classical Density Functional Theory

Philipp Rehner, Gernot Bauer, Joachim Groß

2023Industrial & Engineering Chemistry Research70 citationsDOI

Abstract

In this work, we present an open-source software package, referred to as FeO s ─Framework for Equations of State and Classical Density Functional Theory. FeO s is a collection of interfaces and data types that can be used (1) to implement thermodynamic equations of state and Helmholtz energy functionals for classical density functional theory, and (2) to compute thermodynamic properties of pure substances and mixtures, phase equilibria, and interfacial properties such as surface tensions and adsorption isotherms. The framework is written in the Rust programming language with a complete Python interface and is designed with a focus on usability and extensibility. It is openly available on GitHub ( https://github.com/feos-org/feos ). Equations of state can be implemented in Rust, yielding performant code, or as a Python class, which is useful for prototyping and with less emphasis on execution speed. In both cases, the user has to implement a single function: the Helmholtz energy. FeO s then uses generalized (hyper-) dual numbers to evaluate the Helmholtz energy as well as the required exact partial (higher-order) derivatives. Using this type of automatic differentiation delivers performance without the need for implementing any analytical derivatives. The performance is further enhanced by a caching mechanism that avoids duplicate model evaluations. Together with the core interfaces and functionalities for equations of state and classical density functional theory, we provide implementations for multiple models such as the PC-SAFT equation of state (with homo- and heterosegmented group contribution methods) and Helmholtz energy functionals (including segment-based functionals). To showcase a selection of FeO s ’ features, an example study of the adsorption of biogas in porous media using the PC-SAFT functional is provided.

Topics & Concepts

Helmholtz free energyPython (programming language)Computer scienceFunctional programmingDensity functional theoryExtensibilityEquation of stateUsabilityApplied mathematicsComputational scienceMathematical optimizationTheoretical computer scienceProgramming languageMathematicsThermodynamicsPhysicsQuantum mechanicsHuman–computer interactionPhase Equilibria and ThermodynamicsCatalysis and Oxidation ReactionsCarbon Dioxide Capture Technologies