IllinoisGRMHD is incompatible with setting TmunuBase::stress_energy_at_RHS = "no"

Create issue
Issue #2497 open
Gabriele Bozzola created an issue

IllinoisGRMHD schedules the conservative-to-primitive methods in the group AddToTmunu. This group is not added to the scheduler unless TmunuBase::stress_energy_at_RHS = "yes". If this parameter is set to no, IllinoisGRHMD doesn’t do the conservative-to-primitive step, quickly resulting in NaNs.

Comments (8)

  1. Zach Etienne

    Thanks for this report @Gabriele Bozzola . My postdoc @Leonardo Werneck and I will add an error message to IllinoisGRMHD if both parameters aren’t set correctly. Hopefully this is fixed before the upcoming release.

  2. Gabriele Bozzola reporter

    In the future, it would be nice to have a permanent fix. I am running some simulations where I need to set stress_energy_at_RHS to no, and what I am currently doing is to change TmunuBase to add always the AddToTmunu group. I think that a clean solution is to change how the primitive solver is scheduled in IllinoisGRMHD avoiding using the AddToTmunu group.

  3. Gabriele Bozzola reporter

    Upon further inspection, the PR does not solve the problem. The group SetTmunu is not added to the scheduler when TmunuBase::stress_energy_at_RHS = "no"

    I don’t know how to fix this in a clean and easy way. The scheduler looks like this

                GROUP HydroBase_Con2Prim: Convert from conservative to primitive variables
              GROUP SetTmunu: Group for calculating the stress-energy tensor
                TmunuBase::TmunuBase_ZeroTmunu: Initialise the stress-energy tensor to zero
                GROUP AddToTmunu: Add to the stress-energy tensor here
                   IllinoisGRMHD::IllinoisGRMHD_conserv_to_prims: Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder.
                   IllinoisGRMHD::IllinoisGRMHD_outer_boundaries_on_P_rho_b_vx_vy_vz: Apply outflow-only, flat BCs on {P,rho_b,vx,vy,vz}. Outflow only == velocities pointed inward from outer boundary are set to zero.            

    IllinoisGRMHD computes Tmunu when it is doing primitive-recovery (in IllinoisGRMHD_convser_to_prims), so, it has to be scheduled after TmunuBase_ZeroTmunu. However, the group SetTmunu does not exist at all when `TmunuBase::stress_energy_at_RHS = "no"

  4. Roland Haas

    Part of the issue may be that ILGRMHD’s Tmunu code actually does non-Tmunu things namely con2prim as far as I remember. So not scheduling the Tmunu routines is not possible.

  5. Gabriele Bozzola reporter

    It’s the opposite: it is the con2prim that does non-con2prim things. My workaround to achieve what I want is to change `Tmunubase`

  6. Log in to comment