Machine learning for conservative-to-primitive in relativistic hydrodynamics

Tobias Dieselhorst, William Cook, Sebastiano Bernuzzi, David Radice

Research output: Contribution to journalArticlepeer-review

4 Scopus citations


The numerical solution of relativistic hydrodynamics equations in conservative form requires root-finding algorithms that invert the conservative-to-primitive variables map. These algorithms employ the equation of state of the fluid and can be computationally demanding for applications involving sophisticated microphysics models, such as those required to calculate accurate gravitational wave signals in numerical relativity simulations of binary neutron stars. This work explores the use of machine learning methods to speed up the recovery of primitives in relativistic hydrodynamics. Artificial neural networks are trained to replace either the interpolations of a tabulated equation of state or directly the conservative-to-primitive map. The application of these neural networks to simple benchmark problems shows that both approaches improve over traditional root finders with tabular equation-of-state and multi-dimensional interpolations. In particular, the neural networks for the conservative-to-primitive map accelerate the variable recovery by more than an order of magnitude over standard methods while maintaining accuracy. Neural networks are thus an interesting option to improve the speed and robustness of relativistic hydrodynamics algorithms.

Original languageEnglish (US)
Article number2157
Issue number11
StatePublished - Nov 2021

All Science Journal Classification (ASJC) codes

  • Computer Science (miscellaneous)
  • Chemistry (miscellaneous)
  • General Mathematics
  • Physics and Astronomy (miscellaneous)


Dive into the research topics of 'Machine learning for conservative-to-primitive in relativistic hydrodynamics'. Together they form a unique fingerprint.

Cite this