Cosmic Rays for Zeus and GalaxySimulation enhancements (DiskGravity and RPS wind)

#300 Merged at 9b1d001
  1. Greg Bryan

This PR brings in two broad sets of changes put in place by Munier Salem and Greg Bryan (cosmic rays and ram-pressure stripping). They are included here together because they both substantially touch a number of the same files (primarily Grid_GalaxySimulationInitializeGrid.C). Documentation and a test problem has been added. This passes the "quick" tests (on my laptop). The changes are:

New feature: Cosmic Ray module including diffusion and injection in star_maker3. Note that it only works right now with Zeus hydro, although this is straightforward to add to other codes (I think).

New feature: GalaxySimulation now includes the ability to specify a wind that enters from the boundary (for testing RPS, so parameters are called GalaxySimulationRPS). This includes options for static and time-dependent winds.

New feature: An new external gravity feature called DiskGravity has been added, which allows one to add the static acceleration for a disk including bulge and dark matter halo.

Improvement: GalaxySimulation now includes a possible CR component.

Improvement: CosmologySimulation now includes a possible CR component.

Improvement: ShockPool now includes a possible delay (for testing delayed winds).

BUGFIX: Cool rates are now written only by ONE processor (rather than all of them!)

Update: Modified to address all identified issues (Brian and Nathan) as of 10/7/15.

Update2: Merged in all changes from main branch, resolving one small conflict. As far as I know, I have addressed all outstanding comments as of 12/30/15.

Update3: Addressed Brian's small comment. I also created a new run directory (run/Hydro/Hydro-3D/GalaxySimulation) which includes a sample parameter file for the new RPS stuff. I have checked that this starts up correctly and begins to run, but haven't run it very far. I think that's OK -- this is not the main part of this PR and it should match the paper mentioned in the notes.txt in that directory. 1/4/2016.

Comments (15)

  1. Brian OShea

    This passes the test suite (or did before the PR that was just issued). I'll look through it, though I may need to do so after the workshop ends.

  2. Brian OShea

    @gbryan , I've looked through the whole PR. This adds some really cool new capabilities! My comments are largely minor, and mostly requesting clarification in various places. I will test both the various CR-related simulations before hitting 'approve', but due to other constraints that's probably going to happen early next week.

  3. Brian OShea

    I'm going through and re-testing all of the PRs. This PR, at changeset 106f4ebf7ff0, passes the push suite. Could three people look through this PR and comment on it?

  4. Brian OShea

    Other than my small comment on the documentation of CRCourantSafetyNumber in cosmicrays.rst, the code looks good to me. I've run the cosmic ray shock tube, which works fine as well. I have not run the GalaxySimulation test yet, but I believe that Elizabeth is doing so.

  5. Elizabeth Tasker

    (Previous comments deleted since I just tried running on a different machine and it seems to work no problem in parallel. The issue there is likely on my end!)

  6. Elizabeth Tasker

    Since I was slow getting this running (sorry!) I've not tested this very well, but it all looks fine. The lower resolution of the default parameter file Greg provided definitely runs:

    ICs: Evolved:

    Runs with the alternative winds and with cooling are also running well, but have only completed one output. Since we're in a hurry, I'm happy to give a thumbs up and shout if I encounter late problems in the runs. Is that a good plan?

  7. dcollins4096

    This is a dumb question for the future, since at some point someone may want to add this to another solver:

    It looks like the only piece in the Zeus solver is the addition of CR to the pressure computation, is that right? So that would (likely) be the primary change to another method?

  8. Greg Bryan author

    This is not a dumb question! To add CR to another solver would require (1) adding the CR pressure but also would need to (2) pass in and solve for the CR energy component. In principle, the Riemann solver should be modified but really just the effective gamma changes. I think it would not be hard and I'd be interested in chatting with anyone who wants to do it.

    Dave, you also asked in a comment in the code (which I can't find now) about overloading IdentifyPhysicalQuantities for MHD and CRs -- I think this overloading should probably not be done as it currently is, however, for this current PR, I'm going to leave it as is and burn (er, cross) that bridge when we get to it...

    1. dcollins4096

      I may ping you about it before to long. I have some other solver changes that are similar in nature, as well, so it might be "easy" to make a few changes at once (for some value of easy)

      I did ask about overloading IdentifyPhysicalQuantities. The comment I made was on the ExternalBoundary instance, then I noticed that it was done in a relatively consistent manner (including MHD) for the Grid version, so i removed the comment. I think that FieldObjects eliminate this as a problem in the long run.

      This is an impressive code feat!