support radial boundary conidtion with Llama in NewRad

Create issue
Issue #2000 closed
Roland Haas created an issue

This implements the radially outgoing boundary condition on Llama's spherical grid. I (Roland) checked that the expressions agree with what CTGamma implements in its CTGRadiativeBC/src/calc_rhs.h, Ian checked that the physics makes sense.

To use the this the user needs to set the parameter z_is_radial explicitly rather than in CTGamma where CTGRadiativeBC decides this on its own based on its knowledge of Llama's coordinate systems. If one really wanted to risk being clever one could likely try and auto-detect this like so:

    z_is_radial = (r[CCTK_GFINDEX3D(cctkGH, 0,0,1)] != r[CCTK_GFINDEX3D(cctkGH, 0,0,0)]) &&
                  (r[CCTK_GFINDEX3D(cctkGH, 0,1,0)] == r[CCTK_GFINDEX3D(cctkGH, 0,0,0)]) &&
                  (r[CCTK_GFINDEX3D(cctkGH, 1,0,0)] == r[CCTK_GFINDEX3D(cctkGH, 0,0,0)]);

though this is obviously not fully safe as it only tests at a single point.

Pull request is here:

Keyword: NewRad

Comments (6)

  1. Roland Haas reporter
    • removed comment

    The code looks fine with me (Ian implemented it so I can review without conflict of interest). If someone else wants to take a look that be helpful, otherwise I will likely apply on Tuesday or so.

  2. Ian Hinder
    • removed comment

    I tested that this works as expected for an outgoing radiative boundary condition by comparing with the static BC, and finding only a very small amount of incoming radiation (in psi0), and comparing the psi4 waveform with that from a causally disconnected boundary. Erik also had eyes on the code (he found a bug which I had missed). One reason not to apply it would be the complaint that it is not a generic solution, since it only helps when the z coordinate is in fact radial. It also may not work if the radial stretch is used and the stretched region extends to the outer boundary. However, it allows us right now to implement causally-connected outer boundary conditions with the ET, and I think that is worth having even with those issues.

  3. Log in to comment