Corrected pressure support for MUSCL for non-cosmological simulations and EOS = 0

#281 Merged at 4d57969
Deleted repository
week-of-code (e494d20e282b)
  1. Elizabeth Tasker

This fixes a small bug that appears if you try and use the MUSCL solver (HydroSolver 3) with a pressure floor in play, but on a non-cosmological simulation or with an EOSType > 0.

  1. Previously, the calculation for the min_coeff assumed GravitationalConstant = 4*pi (i.e. cosmology)

This was corrected (all files) to call the variable itself, as is done in Grid_SetMinimumSupport.C (that file cannot be called itself, since HydroSweep are not Grid_ files).

One caveat: the variation of cosmology 'a' with time is still not included in the pressure floor value. This would require 'time' to be passed into the routine.

  1. If EOSType > 0, the pressure floor was comparing pressure with a minimum energy values, instead of pressure with minimum pressure.

This was fixed in L108 (all files) by duplicating the Prim1[1][i] = max(value1,value2) so that it compares pressure values inside the "EOSType > 0" statement and energy values if outside that. The comparison of the pressure values matches ZeusSource, L89.

(Attempt #2: this time to correct brach)

Comments (3)