[ET Trac] #2497: IllinoisGRMHD is incompatible with setting TmunuBase::stress_energy_at_RHS = "no"

Leonardo Werneck trac-noreply at einsteintoolkit.org
Tue May 16 17:15:59 CDT 2023


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

 Reporter: Gabriele Bozzola
   Status: open
Milestone: 
  Version: development version
     Type: bug
 Priority: major
Component: EinsteinToolkit thorn

Comment (by Leonardo Werneck):

After reviewing the issue more carefully, I think it is more prudent to fix it for the November release, as there won’t be enough time to fully test the code in time for this release. One possible solution is to modify IllinoisGRMHD’s `schedule.ccl` to add the con2prim function to the `HydroBase_Con2Prim` bin when `TmunuBase::stress_energy_at_RHS="no"`, e.g.,

```
if(stress_energy_at_RHS)
{
  schedule IllinoisGRMHD_conserv_to_prims in AddToTmunu after compute_B_and_Bstagger_from_A
  {
    LANG: C
  } "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."

  schedule IllinoisGRMHD_outer_boundaries_on_P_rho_b_vx_vy_vz in AddToTmunu after IllinoisGRMHD_conserv_to_prims
  {
    # We must sync {P,rho_b,vx,vy,vz} here.
    SYNC: grmhd_primitives_allbutBi
    LANG: C
  } "Apply outflow-only, flat BCs on {P,rho_b,vx,vy,vz}. Outflow only == velocities pointed inward from outer boundary are set to zero."
}
else
{
  schedule IllinoisGRMHD_conserv_to_prims in HydroBase_Con2Prim after compute_B_and_Bstagger_from_A
  {
    LANG: C
  } "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."

  schedule IllinoisGRMHD_outer_boundaries_on_P_rho_b_vx_vy_vz in HydroBase_Con2Prim after IllinoisGRMHD_conserv_to_prims
  {
    # We must sync {P,rho_b,vx,vy,vz} here.
    SYNC: grmhd_primitives_allbutBi
    LANG: C
  } "Apply outflow-only, flat BCs on {P,rho_b,vx,vy,vz}. Outflow only == velocities pointed inward from outer boundary are set to zero."
}
```

This fixes the scheduling problem, but the code will still keep adding to `Tmunu` unless one also sets `IllinoisGRMHD::update_tmunu = "no"` in the parfile.

Could you please test this to see if it provides the functionality that you seek @{557058:4b0c8315-696b-4d2e-92da-2da5fea9e8d4} ? If I misunderstood something, please let me know.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2497/illinoisgrmhd-is-incompatible-with-setting
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.einsteintoolkit.org/pipermail/trac/attachments/20230516/6ce3516f/attachment.htm>


More information about the Trac mailing list