## 2 Equations of General-Relativistic Hydrodynamics

The general-relativistic hydrodynamics equations consist of the local conservation laws of the stress-energy tensor, (the Bianchi identities) and of the matter current density, (the continuity equation):

As usual, stands for the covariant derivative associated with the four-dimensional spacetime metric . The density current is given by , representing the fluid 4-velocity and the proper rest-mass density.

The stress-energy tensor for a nonperfect (unmagnetized) fluid is defined as (see, e.g., [264])

where is the specific energy density of the fluid in its rest frame, is the pressure, and is the spatial projection tensor . In addition, and are the shear and bulk viscosities. The expansion , describing the divergence or convergence of the fluid world lines, is defined as . The symmetric, trace-free, spatial shear tensor is defined by
and, finally, is the energy flux vector.

In the following, we will neglect nonadiabatic effects, such as viscosity and heat transfer, assuming the stress-energy tensor to be that of a perfect fluid

where we have introduced the relativistic specific enthalpy, , defined by

Introducing an explicit coordinate chart , the previous conservation equations read

where the scalar represents a foliation of the spacetime with hypersurfaces (coordinatized by ). Additionally, is the volume element associated with the 4-metric, with , and the objects are the 4-dimensional Christoffel symbols.

In order to close the system, the equations of motion (1) and the continuity equation (2) must be supplemented with an equation of state (EOS) relating some fundamental thermodynamic quantities. In general, the EOS takes the form

The available EOSs have become sophisticated enough to take into account physical and chemical processes such as molecular interactions, quantization, relativistic effects, nuclear physics, etc. Nevertheless, due to their simplicity, the most widely employed EOSs in numerical simulations in astrophysics are the ideal fluid EOS, , where is the adiabatic index, and the polytropic EOS (e.g., to build equilibrium stellar models), , being the polytropic constant and the polytropic index. State-of-the-art, microphysical EOSs that describe the interior of compact stars at nuclear matter densities have also been developed. While they are being increasingly used in the numerical modelling of relativistic stars, the true EOS of neutron-star interiors remains still largely unknown, as reproducing the associated densities and temperatures is not amenable to laboratory experimentation.

In the “test-fluid” approximation, where the fluid self-gravity is neglected, the dynamics of the system is completely governed by Equations (1) and (2), together with the EOS (9). In those situations in which such an approximation does not hold, the previous equations must be solved in conjunction with the Einstein gravitational-field equations,

which describe the evolution of the geometry in a dynamic spacetime. A detailed description of the various numerical approaches to solving the Einstein equations is beyond the scope of the present article (see, e.g., [21741] for recent reviews). We briefly mention that the Einstein equations, both in vacuum as well as in the presence of matter fields, can be formulated as an initial value (Cauchy) problem, using the 3+1 decomposition of spacetime [25]. More details can be found in, e.g., [431158]. Given a choice of gauge, the Einstein equations in the 3+1 formalism split into evolution equations for the 3-metric and the extrinsic curvature (the second fundamental form), and constraint equations (the Hamiltonian and momentum constraints), which must be satisfied on every time slice.

The Arnowitt–Deser–Misner (ADM) 3+1 metric equations have been shown over the years to be intrinsically unstable for long-term numerical simulations, especially for those dealing with black-hole spacetimes. Recently, there have been diverse attempts to reformulate those equations into forms better suited for numerical investigations (see [363395] and references therein). Among the various approaches proposed, the Baumgarte–Shapiro–Shibata–Nakamura (BSSN) reformulation of the ADM system [36339] is very appropriate for long-term stable numerical work. BSSN makes use of a conformal decomposition of the 3-metric, and the trace-free part of the extrinsic curvature, , with the conformal factor chosen to satisfy . In this formulation, as shown by [39], in addition to the evolution equations for the conformal three-metric and the conformal-traceless extrinsic-curvature variables , there are evolution equations for the conformal factor , the trace of the extrinsic curvature and the “conformal connection functions” . Indeed, BSSN (or slight modifications thereof) is currently the standard 3+1 formulation for most numerical relativity groups [5158]. Long-term stable applications include strongly-gravitating systems such as neutron stars (both, isolated and in binary systems) and single and binary black holes. Such binary–black-hole evolutions, possibly the grandest challenge of numerical relativity ever, since the beginning of the field, have only been possible in the last few years (see, e.g., [323] and references therein).

Alternatively, a characteristic initial-value–problem formulation of the Einstein equations was developed in the 1960s by Bondi, van der Burg, and Metzner [59], and by Sachs [344]. This approach has gradually advanced to a state where long-term stable evolutions of caustic-free spacetimes in multiple dimensions are possible, even including matter fields (see [217] and references therein). A comprehensive review of the characteristic formulation is presented in a Living Reviews article by Winicour [419]. Examples of this formulation in general-relativistic hydrodynamics are discussed in various sections of the current article.

Traditionally, most of the approaches for numerical integrations of the general-relativistic hydrodynamics equations have adopted spacelike foliations of the spacetime, within the 3+1 formulation. More recently, however, covariant forms of these equations, well suited for advanced numerical methods, have also been developed. This is reviewed next (Section 2.1) in a chronological way.