1. The Enzo Project
  2. Untitled project
  3. enzo-dev
  4. Pull requests

Pull requests

#132 Merged at d340714

ShockInABox Test Problem Fix, HydroShockTubes update, problem generating script

  1. Sam Skillman
  1. This fixes a field ordering mixup in ShockInABoxInitialize and Grid_HydroShockTubesInitialize that was leading to swapped values of velocity/internal energy.

  2. Adds a new test problem at Hydro/Hydro-1D/ShockInABox which uses the ShockInABox problem type to generate a unitful shock (Mach 3, T2=10^7K, Lbox = 1 Mpc, simulation time=1 Gyr).

  3. Adds a problem generator in make_shock.py that creates a custom shock using unit-ful input values.

  4. Adds ShockInABox to the answer testing suite, which includes a test that

  5. Adds shock finding instrumentation to the shock tubes (off by default) and ShockInABox (on in default ShockInABox.enzo test problem).

  6. Allows the shock tubes and ShockInABox to have GridRank > 1.

I'd like eyes on the modification to ShockInABoxInitialize.C as well as make_shock.py. The usage of Mu is a bit funky. I'm not sure if it should just be set to 1.0 in the ShockInABox problem type.

This passes the quicksuite on medium strictness comparing with enzogolddev, other than having no old answers for the new test, meaning once accepted it will require generation of a new gold standard for the ShockInABox test.

Update 1: Addressing Britton Smith 's comments.

Comments (4)

  1. Britton Smith

    Sam, this looks great to me. I tried out the ShockInABox.enzo as well as a custom one made with make_shocks.py designed to give the same setup and they produced identical results. I tried using make_shocks.py for a couple other configurations and they also looked good. Your modifications to the problem initializers looked fine to me, but it's probably a good idea to have at least one more person look them over.

    I have only two minor comments:

    1. In make_shocks.py, you have Gamma hard-coded to 5/3 in TempJump, but it is accepted as a keyword in setup_shockbox. Just for consistency, it might be a good idea to make it a keyword in TempJump as well in the event that someone would want to try changing it. Also, in setup_shock, it's probably ok to have gamma default to 5/3 instead of None.

    2. There is a commented out call to Grid_ShockTubeInitialize. Since that function doesn't seem to exist anymore, maybe it's worth it to just remove the commented out call.

  2. Tom Abel

    OhCool. there is global a parameter called UsePhysicalUnit which is used in a lot of the hydro_rk/ problem setups that you may be able to use to your advantage in this problem.

  3. Greg Bryan

    Sam -- I just looked this over and think it is good as is. The usage of mu is correct I believe (TemperatureUnit does not include mu, so you do need to set it). Thanks!