We present Singularity-EOS, a new performance-portable library for
+ equations of state and related capabilities. Singularity-EOS provides
+ a large set of analytic equations of state, such as the Gruneisen
+ equation of state, and tabulated equation of state data under a
+ unified interface. It also provides support capabilities around these
+ equations of state, such as Python wrappers, solvers for finding
+ pressure-temperature equilibrium between multiple equations of state,
+ and a unique
When expressed mathematically for continuous materials, the laws of
+ conservation of mass, energy, and momentum form the Navier-Stokes
+ equations of fluid dynamics. In the limit of zero molecular viscosity,
+ they become the Euler equations. These laws have been used to describe
+ phenomena as disparate as flow of air over an airplane wing, bacterial
+ motion in fluids, and the cataclysmic deaths of stars. However, the
+ fluid equations are not complete, and the system must be
+
Equations of state vary from the simple ideal gas law, to + sophisticated multi-phase descriptions of the lattice structure of ice + or wood, to models of quark-gluon plasma and nuclear pasta at ultra + high densities. A common form to write an equation of state is as a + pair of relations:
+which relate the pressure
In multi-material fluid dynamics simulations, one often will end up
+ with a so-called
Typically fluid dynamics codes each develop an EOS package
+ individually to meet a given problem’s needs. Databases of tabulated
+ equations of state, such as the Sesame
+ (
We present Singularity-EOS, which aims to be a “one stop shop” for
+ EOS models for fluid and continuum dynamics codes. It provides a
+ unified interface for both analytic and tabulated equations of state.
+ It also provides useful surrounding capabilities, such as Python
+ wrappers,
Singularity-EOS leverages the
Here we enumerate several design principles underlying + Singularity-EOS, and highlight a few feature of the library.
+Singularity-EOS provides both scalar and vector APIs, allowing + the user to make EOS calls on both single points in thermodynamic + space, and on collections of points. The vector calls may be more + performant (as they may vectorize), however care is made to ensure + both APIs operate at acceptable performance, to accommodate + different code structures downstream.
+The vector calls in Singularity-EOS use an
+
Many equations of state are most naturally represented as + functions of density and temperature. However, fluid codes require + pressure as a function of density and internal energy. Extracting + this often requires computing a root to invert the relation
+In these cases, we expose an initial guess for temperature, which
+ helps the solution rapidly converge. Similarly, the performance of a
+ sequence of EOS calls may depend on the ordering of the calls. For
+ example, if both temperature and pressure are required from an
+ equation of state that requires inversion, requesting pressure first
+ will be less performant than requesting temperature first, as the
+ former requires two root finds, and the latter requires only one. To
+ enable this, we expose a function
Accelerators present new challenges to standard object-oriented
+ programming. In particular, not all compiler stacks (such as Sycl
+ (
A given code may need to modify an EOS model to make it suitable
+ for a given application. For example, the zero-point of the energy
+ may need to be shifted, a porosity model may need to be added, or
+ the unit system may need to be changed. We implement this with a
+ system of
To span the required orders of magnitude, equations of state are
+ often tabulated on log-spaced grids. Logarithms and exponentials
+ are, however, expensive operations and the performance of lookups
+ can suffer. We instead use the not-quite-transcendental lookups
+ described in
+ (
Singularity-EOS is designed to be extensible. The
+
This work was supported through the Laboratory Directed Research + and Development program, the Center for Space and Earth Sciences, and + the Center for Nonlinear Studies under project numbers 20240477CR-SES + and 20220564ECR at Los Alamos National Laboratory (LANL). LANL is + operated by Triad National Security, LLC, for the National Nuclear + Security Administration of U.S. Department of Energy (Contract + No. 89233218CNA000001). This research used resources provided by the + Darwin testbed at LANL which is funded by the Computational Systems + and Software Environments subprogram of LANL’s Advanced Simulation and + Computing program (NNSA/DOE). This work is approved for unlimited + release with report number LA-UR-24-23364.
+