Several mostly innocuous additions to make MHDCT usable for a wider array of test problems.
Grid_FlagCellsToBeRefinedByJeansLength.C, move the allocation of temperature outside of the ProblemType conditional. (This is the only change that will have impact outside of MHDCT, I believe)
CollapseMHD3DInitialize.C now supports MHDCT.
Added a new BinaryCollapseTest that uses the MHD3DInitialize with MHDCT
Grid_MHD2DTestInitializeGrid.C now supports MHDCT
Added RayleightTaylor_CT_Suppressed.enzo test that uses MHD2D initializer. This suppresses the growth of RT mushrooms with a magnetic field.
Changed the treatment of reflecting boundary conditions for MHDCT. This reflects what is done with Dedner. Not especially physically motivated in either case.
Now with Banyl=1, DivB will be written out for MHDCT.
TurbulenceSimulation now supports MHDCT
Once the missing ' below gets fixed, I'll comment on the results of the automatic testing. While that is happening, can I get @jsoishi , @haoxu , and @jforbes to take a look at the PR? Specifically, could one of you make sure to run the new test problems and make the plots?
I've fixed the glitch. Also reduced the number of outputs in the RT test.
Ping @jsoishi @haoxu @jforbes . Let me know if you are not able to review this PR and I will find new reviewers.
J. S. Oishi
Add me as a reviewer. I can do it.
I can review this.
Ping @jsoishi @haoxu @jforbes . @dcollins4096 Looks like a merge conflict popped up.
Interesting, it did not like that jforbes and I fixed the same thing twice. I've fixed it.
J. S. Oishi
All of this looks good to me, except the ExternalBoundary condition stuff, which I don't have the knowledge to evaluate. I will go ahead and approve, but please note especially @samskillman and @dcollins4096 that I haven't reviewed the code in src/enzo/ExternalBoundary_SetMagneticBoundary.C.
Made some style/comment comments. Everything else looks fine, though I admit I also don't know what the changes in the SetMagneticBoundary.C are changing. @dcollins4096 care to elaborate a bit?
Originally I had treated the magnetic field as though it were the velocity. That's not entirely correct, and the physically correct solution will depend on the conductivity of the boundary. This caused significant noise at the corners. Treating the magnetic field like a scalar is still imperfect, but allows the code to run without generating extra inconsistencies. The big problem is that in the face, if changing the sign of the normal component is to be consistent, only solutions with zero normal component are consistent. For the Rayleigh Taylor problem, we want the pressure wave to be reflected at the bottom, but want a vertical field, which means the bottom cannot be a perfect conductor.
A more elaborate boundary should be developed as its need arises, that allows for the specification of the conductivity at the interface. Any new boundary should be able to reproduce this result.
This is a side-effect of testing that was necessary for the grackle 2.0 PR. I'm now going to work on updating the gold again with the MHD RT test above. Comments/approvals should continue as if everything is passing.
My patch seems to have fixed the spurious errors from grackle stuff. @dcollins4096 mind adding an image generated from BinaryCollapseMHDCT/plots.py? It's in the full suite, which I don't run, and just want to see that the plot makes something useful to look at. After that, I'm okay with merging, and I'll update the gold tomorrow, hopefully combining this and the grackle stuff.
Great. I'll put in an image later today.
I added an image for the BinaryCollapse, reduced the number of outputs, made it run faster. Also added a plot and notes for the rayleigh-taylor suppressed.