Skip to content

Implementation of a stable solver for the full (3+1D) vacuum Einstein equations#918

Open
JonathanGorard wants to merge 47 commits intomainfrom
vacuum_einstein_production
Open

Implementation of a stable solver for the full (3+1D) vacuum Einstein equations#918
JonathanGorard wants to merge 47 commits intomainfrom
vacuum_einstein_production

Conversation

@JonathanGorard
Copy link
Copy Markdown
Collaborator

@JonathanGorard JonathanGorard commented Dec 6, 2025

This branch contains an implementation of a numerically stable solver for the vacuum ADM evolution equations for the components of the spatial metric tensor $\gamma_{i j}$

$$ \left( \partial_t - \mathcal{L}_{\boldsymbol\beta} \right) \gamma_{i j} = - 2 \alpha K_{i j} $$

and its corresponding canonical momenta, namely the components of the extrinsic curvature tensor $K_{i j}$:

$$ \left( \partial_t - \mathcal{L}_{\boldsymbol\beta} \right) K_{i j} = - {}^{\left( 3 \right)} \nabla_i {}^{\left( 3 \right)} \nabla_j \alpha + \alpha \left[ {}^{\left( 3 \right)} R_{i j} + \mathrm{tr} \left( K \right) K_{i j} - 2 K^{i j} K_{i j} \right] $$

in first-order, flux-conservative form. The form of the equations being solved is based on the first-order Bona-Massó formalism presented in https://arxiv.org/abs/gr-qc/9412071 and https://arxiv.org/abs/gr-qc/9709016, in which symmetric hyperbolicity is maintained by additionally evolving $A_k$ (the derivative of the lapse function), $B_{k}^{i}$ (the derivative of the shift vector), and $V_k$ (used for the indirect enforcement of the momentum constraint). The wv_vacuum_einstein equation struct implements the Bona-Massó equations more-or-less directly as written, while the wv_vacuum_einstein_conformal struct implements a conformal decomposition of the spatial metric tensor:

$$ \gamma_{i j} = \frac{1}{\chi^2} \widetilde{\gamma_{i j}}, $$

with conformal factor:

$$ \chi = \left( \det \left( \gamma_{i j} \right) \right)^{\frac{1}{6}}, $$

similar to what is done within BSSN and CCZ4 codes. We find that evolving the conformally-decomposed forms of the variables increases the numerical robustness of the solver in tests involving singularities (such that both single and binary black hole tests can run for a significantly longer period of time without crashing). We augment the system with the following standard evolution equation for the conformal factor (as used in standard BSSN and CCZ4 codes, e.g. https://arxiv.org/abs/1106.2254), appropriately recast into first-order, flux-conservative form:

$$ \partial_t \chi = \frac{1}{3} \alpha \chi \mathrm{tr} \left( K \right) - \frac{1}{3} \chi \partial_k \beta^k + \beta^k \partial_k \chi. $$

Errors in the ADM Hamiltonian:

$$ \mathcal{H} = R + \left( \mathrm{tr} \left( K \right) \right) ^2 - K_{i j} K^{i j} $$

and momentum:

$$ \mathcal{M}_i = \gamma^{j k} \left( \partial_l K_{i j} - \partial_i K_{j l} - \Gamma_{j l}^{m} K_{m i} + \Gamma_{i j}^{m} K_{l m} \right) $$

constraints are corrected using hyperbolic divergence error correction, analogous to what is done in the Munz approach to electromagnetism. With the inclusion of the conformal factor, we are able to apply gauge conditions in both the alpha-driver:

$$ \partial_t \alpha = - \mu_{\alpha_1} \alpha^{\mu_{\alpha_2}} \mathrm{tr} \left( K \right) + \mu_{\alpha_3} \beta^i \partial_i \alpha, $$

and gamma-driver:

$$ \partial_t \beta^i = \eta_1 B^i, $$

$$ \partial_t B^i = \mu_{\beta_1} \alpha^{\mu_{\beta_2}} \partial_t \hat{\Gamma}^i - \eta_2 B^i, $$

forms, for contracted conformal connection coefficients $\hat{\Gamma}^i$. By default, we select hyperbolic gamma-driver conditions with $\eta_1 = \frac{3}{4}$, $\mu_{\beta_1} = 1$, $\mu_{\beta_2} = 0$, and $\eta_2 = 1$, and through the gkyl_spacetime_slicing struct we provide support for geodesic (GKYL_GEODESIC_SLICING), harmonic (GKYL_HARMONIC_SLICING), and $1 + \log$ (GKYL_1PLUSLOG_SLICING) slicing conditions on the lapse function, with the latter (corresponding to $\mu_{\alpha_1} = 2$, $\mu_{\alpha_2} = 1$, and $\mu_{\alpha_3} = 1$) being particularly well-suited to both single and binary black hole spacetime evolutions.

Validations have been performed against the 1D Apples with Apples tests of https://arxiv.org/abs/0709.3559 (specifically the linearized gravitational wave test and the highly stringent expanding Gowdy wave test, with considerably improved performance in the latter test from the inclusion of the conformal factor evolution), as well as against both static single black hole tests (Schwarzschild and Kerr) and dynamic binary black hole tests (Brill-Lindquist initial data, both with and without gamma driver gauge conditions, and therefore both with and without moving punctures and dynamic excision boundaries). In all cases, we find agreement with analytic or numerical (BSSN) reference solutions wherever the code doesn't crash, and we find generally improved stability in the conformally-decomposed form of the equations.

… vacuum Einstein field equations via the Bona-Masso formalism. Eventually we will probably want to implement a conformally-decomposed version of these equations, but for now this will represent a baseline. Adding some basic initial infrastructure for computing the fluxes according to the 1995 PRL of Bona, Masso, Seidel and Stela (with some typos corrected). Plus adding infrastructure to the spacetime geometry header to accommodate various slicing (geodesic, harmonic, 1+log) and evolution (Ricci, Einstein) schemes for dynamic spacetimes.
…ecessary tensorial and non-tensorial coordinate transformations) for the vacuum Bona-Masso equations, though only the homogeneous part for now. In the absence of a robust apparent horizon finder, I'm using a preliminary heuristic wherein we automatically excise any region of the spacetime in which the lapse function is less than 0.7. We'll see how it performs on some vacuum test cases shortly, although likely unstable modes will grow without bound until we implement the RHS of the equations correctly.
…e from Kerr-Schild initial data (using harmonic slicing and the Einstein evolution scheme) yields unbounded growth of extrinsic curvature tensor components which eventually destabilizes the simulation. Adding a placeholder form of the source term vector for the Bona-Masso system, in preparation for its full implementation.
…mputation where the wrong index of the spatial metric derivative was being raised. Fixed factor of 2 error in the definition of the shift vector derivative for the Schwarzschild black hole test. Still need to implement a proper algorithm for integrating the metric, lapse, extrinsic curvature, and auxiliary vector sources.
…l metric, lapse, extrinsic curvature, and auxiliary vector sources. Extended the stationary black hole test to full 3D, though it still destablizes shortly after t = 1M, even with 1+log slicing (which appears to be the most stable gauge for this problem). Fixed a bug with the spatial Christoffel symbol calculation, although this doesn't seem to have improved stability much.
…-isotropic gauge of Brandt and Seidel (1996), in the hopes that these will be more stable for the evolution of vacuum black hole spacetimes with the non-conformal Bona-Masso equations. For now, just adding the infrastructure and the spatial and spacetime transformation matrices to/from the spherical isotropic coordinates and the Cartesian Kerr-Schild coordinates.
… attempt at rerunning the vacuum Schwarzschild stability test has revealed that I screwed up something pretty basic in my definition of the new radial coordinate (which is resulting in the spatial metric diverging at large radial distance). We're getting close, though...
…auge so that we correctly distinguish between spherical rho and distorted eta (in the Brandt-Seidel notation). Fixing the definition of the 1+log slicing condition. Modifying dynamic excision boundaries so that we place the apparent horizon at the contour where the lapse function falls below 0.3. Now the stationary Schwarzschild black hole test runs stably, up until the point where we get bitten by boundary effects.
…o as the radial coordinate; fixing definition of extrinsic curvature tensor to include correct conformal factor; modifying vacuum black hole test cases to use harmonic slicing rather than 1+log (due to increased stability); and introducing spinning/Kerr version of the vacuum black hole evolution test. Both test cases run to 1M stably with harmonic gauge, for now.
…rect specification in horizon-penetrating coordinates, rather than the original specification in spherical coordinates + conversion. The Schwarzschild and Kerr black hole tests take time-steps, but now destabilize quickly due to boundary effects (although the bulk spacetime evolution is now much more stable). Need to implement some better boundary conditions for vacuum spacetimes, perhaps by imposing asymptotic limits to Minkowski space...
…nverse spacetime metric tensor implementations). Also implemented new boundary condition for vacuum simulations, which imposes asymptotic limits to Minkowski space. Updated the vacuum Schwarzschild test case to be full 3D and to use these new boundary conditions, allowing it to run stably to 1M with only (relatively) mild boundary effects.
…e spatial metric. Adding a new unit test for the vacuum Bona-Masso equations, testing flux computations and coordinate transformations in Minkowski and Schwarzschild spacetimes (with quasi-isotropic gauge), assuming harmonic slicing conditions and the Einstein evolution scheme. Both tests pass at the 10^-8 level.
… "Apples with Apples" test suite. Also some minor fixes to increase stability of the vacuum Schwarzschild test.
…ns, and updated the linearized gravitational wav test accordingly. At least at the suggest rho = 1, 2, 4 resolutions, the results are very diffusive, but at least we're not incurring phase errors. Am checking convergence now.
…al., simulating plane-polarized gravitational waves propagating through an expanding universe with a torus (T^3) topology. Runs stably to 2 crossing times, but crashes if one goes too far beyond that. Also corrected a bug in the initialization of the linearized wave test.
…itions across all black hole tests (both Schwarzschild and Kerr), which now all perform stably and with significantly less diffusion.
…) for dynamic excision in singularity-avoiding coordinates. Updated the hyperbolic part only, so far - source terms still need modification. Updated all regression and unit tests accordingly. Added new Brill-Lindquist regression test (head-on collision of two black holes in the fixed-puncture gauge).
…integrator(s), and slightly modified the dynamic excision algorithm so that we automatically collapse all geometric quantities to zero when alpha drops below this preset threshold. This somewhat improves stability of the Gowdy wave test in the collapsing direction (although not by much).
…l decompositions of the vacuum Bona-Masso equations (flux computations only, for now, and assuming a hardcoded value of chi = 1 everywhere). Next major step is to try to replicate the results of the Gowdy wave test using this new formalism.
… for the conformally-decomposed vacuum Bona-Masso equations (again, hardcoded to assume that chi = 1). Adding conformal variant of the Gowdy wave test to confirm that the homogeneous part of the equations is being solved correctly, which it does appear to be. Still need to check that my derivation of the source terms is correct before proceeding.
…mally-decomposed vacuum Bona-Masso equations. Everything is still hardcoded to chi = 1 everywhere. Updated the Gowdy wave regression test to use the conformal versions of the tensorial variables. Still need to implement a bespoke integrator for this.
…he vacuum Bona-Masso equations, and for the Gowdy wave problem it runs stably for about 0.3M (and produces correct results), but then progressively goes off the rails and crashes at around 0.4M. Not sure yet if this is a bug in my derivation/implementation of the equations (quite likely), or if there's a more insidious issue with our calculation of conformal derivatives (as @ammarhakim suggested). More investigation needed.
… factor (chi in the BSSN formalism, rather than psi in the Bona-Masso formalism). Also added a hardcoded analytical prescription for chi and psi in the case of the Gowdy wave test. This produces slightly less pathological results, but the lack of proper handling of the first and second conformal derivatives is (I believe) still messing this up, unsurprisingly, since it's sending the conformal factor to zero much too quickly. Deriving the relevant equations for the first conformal derivatives of chi now.
…perly. The conformal derivatives of chi were actually correct all along - I was just missing a factor of the derivative of the conformal shift vector from one of the fluxes, and that's why everything was getting weirdly biased in some spatial direction. Everything works beautifully now - we can run the Gowdy wave test even beyond what BSSN can do, and the stationary Schwarzschild test can seemingly now run for an arbitrary amount of time without crashing. More test cases to come, but this looks very promising.
…implemented for Minkowski and Schwarzschild/Kerr spacetimes, for now) to compute both the standard conformal factor psi, and the BSSN form of the conformal factor chi, for generic spacetimes. Updated the Gowdy wave and Schwarzschild black hole tests in conformally-decomposed form to use these new function pointers. Added a Kerr variant of the same test. This is essentially just gearing up for a general implementation of conformal derivatives, as needed for the specification of generic initial data.
…kyl_gr_spacetime struct (with implementations for Minkowski space and black hole spacetimes only, for now). Interestingly, introducing correct evolution for the first conformal derivatives makes the black hole tests crash *faster*, rather than making them more stable (I haven't yet figured out whether this is surprising or not, and therefore whether this hints at a bug in how I'm holding the conformal derivative terms in as part of the update or not). It could just be because the second conformal derivatives are not yet handled at all, and therefore the system being solved is mathematically inconsistent. If the instabilities remain after I add support for second conformal derivatives, then we'll know that something bad is happening.
… (thus making the overall system consistent) does cause the black hole tests to stabilize once again. Also needed to lower the accuracy of the finite differences for the second derivatives of the BSSN conformal factor, to prevent issues with finite precision. Still need to do a more systematic search for asymmetries appearing within the system, since the evolution seems to be particularly fragile to these.
… to Brill-Lindquist (binary black hole) spacetimes, and added an updated conformally-decomposed variant of the head-on binary black hole collision test. Absent any shift conditions, the test runs to around t = 10M before crashing.
…tions, and confirmed that the black hole tests (Schwarzschild, Kerr, and Brill-Lindquist binary) still run stably with significantly improved levels of accuracy.
…d updated comments in all other conformal Einstein tests to reflect the correct equation system being solved.
…ons (hardcoding the spacetime slicing conditions and evolution schemes for now, since I haven't yet implemented the appropriate Lua types). Also requires extending the Lua wrappers for the spacetime struct(s) to facilitate the computation of inverse spatial metric tensors, which for the time being I'm adding only to the black hole spacetime case. The stationary Schwarzschild and Kerr test cases now run correctly from Lua.
…rmonic, 1+log) and evolution schemes (Ricci, Einstein), and updated the vacuum Einstein Lua tests accordingly.
… and now the Lua versions of the Gowdy wave and linearized wave tests are running correctly (the former of which required using Lua FFI to evaluate the necessary Bessel functions - thanks to @ammarhakim for explaining that this was possible to do).
…k hole spacetimes, as used for specifying initial data for head-on collisions of black holes. Added the head-on black hole collision test (with fixed spatial coordinates) for the vacuum Einstein field equations, which now runs correctly from Lua.
…rs (both Bona-Masso and BSSN), and their respective derivatives, within the Lua black hole spacetime object. Also added Lua wrappers for the conformally-decomposed version of the vacuum Bona-Masso formalism. The conformal versions of the stationary Schwarzschild and Kerr test cases now run, and produce identical results to the C versions.
…, and their respective derivatives, to the flat spacetime case. The flat spacetime linear wave and Gowdy wave tests, with conformal decomposition, are now running correctly from Lua.
…s have been added for the Brill-Lindquist geometry. The head-on collision of binary black holes test using the conformal Bona-Masso formalism is now running correctly from Lua (although I have discovered that it is actually significantly more stable with geodesic slicing, which seems... interesting. Certainly unexpected. Warrants further investigation at some point).
…field equations and their conformal decomposition.
…ures (for Lax and HLL waves and q fluctuations) to reflect the new embedded boundary work in main.
…onfirming correct coordinate transformations and flux computations in both Minkowski and Schwarzschild spacetimes, using harmonic and 1+log slicings).
…tions, testing correctness of the coordinate transformations and wave propagation implementation in both (dynamic) Schwarzschild and Kerr spacetimes.
…ations to use consistent tolerances within finite difference approximations of metric quantities. Also added versions of the wave propagation unit tests for the conformal vacuum Einstein equations, too.
…d non-conformal vacuum Einstein equations to be equal to their production-ready forms (minimal numbers of output frames, minimal resolution, minimal simulation time). Confirmed that all regression and unit tests run successfully.
Copy link
Copy Markdown
Owner

@ammarhakim ammarhakim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants