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.
@Greg Bryan , 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.
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.
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?
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...
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.