Robin Klein, Benjamin Sanderse, Pedro Costa et al.
We generalize Tadmor's algebraic numerical flux condition for entropy-conservative discretizations of conservation laws to a broader class of secondary structures, i.e. possibly non-convex secondary quantities whose evolution can consist of both conservative and non-conservative contributions. The resulting generalized Tadmor condition yields a discrete local balance law for secondary structures alongside the discrete conservation law that is solved. In contrast to the convex entropy setting, non-convex secondary quantities can have singular Hessians and non-injective gradients; this introduces an additional necessary structural requirement, which we term (discrete) null-consistency. Null-consistency constrains admissible numerical work terms and is required for the existence and well-posedness of fluxes satisfying the generalized Tadmor condition. To construct such fluxes in practice, we show how discrete gradient operators provide systematic construction methods even when some of the functions entering the secondary structure are arbitrary, as in compressible flow closed by an arbitrary equation of state. As an application, we derive an entropy-conserving and kinetic-energy-consistent numerical flux for the Euler equations with an arbitrary (non-ideal) equation of state. We demonstrate the performance of the resulting scheme on a set of supercritical/transcritical compressible-flow test cases using several non-ideal equations of state, including a fully turbulent transcritical flow with a state-of-the-art equation of state and models for viscosity and heat conductivity. Computations are performed with our new open-source, flexible, JAX-based, multi-GPU compressible flow solver for Helmholtz-based equations of state available at github.com/rbklein/HelmEOS2.