WIP: Cosmology support for VL+CT#187
Draft
mabruzzo wants to merge 32 commits intoenzo-project:mainfrom
Draft
Conversation
Contributor
|
This doesn't look crazy in terms of shape, but units are worrying -- the pancake should have a cosmic mean density, and at z=20 that is much higher than what is given (assuming CGS units). The dual energy formalism was developed and tested on this problem, so it's pretty useful (as shown in the bottom panel -- note that just because this is positive doesn't mean it's right). I couldn't quickly dig up Enzo plots but happy to do so once you get back to this. It's just a matter of running the enzo test problem and plotting the same outputs. |
Contributor
Author
|
There's a dual-energy related issue. This is not going to be done for the v1.0 release |
…ing the hydro equations over the course of a timestep
…oMHDVlctIntegrator (and other stuff related to B-fields).
…to EnzoMHDVlctIntegrator.
Also improved the documentation of the class.
…structor to source file
Strictly speaking, this only required 2 minor tweaks to ``EnzoMethodMHDVlct``: 1. modify the compatability checking of ``EnzoMethodMHDVlct::post_init_checks_`` related to using the VL+CT solver with cosmology. 2. modify all usage of the cell widths in ``EnzoMethodMHDVlct::compute`` (which would have defaulted to the cell width in the comoving frame) to instead use the proper cell width. As part of this commit, occurences of the variables named `cell_width` in the relevant code (i.e. paths executed by ``EnzoMethodMHDVlct::compute``) were renamed so that they are called `proper_cell_width`. The docstrings of these functions were also updated accordingly.
I factored out the solution to the Zeldovich pancake problem (for a pressure-free fluid) into a separate functor. By doing this, it should be easier to understand when we are talking about a pressure-free fluid
…r initialization along arbitrary axis)
… Pancake gets set up along
f44a6b2 to
f5f5077
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a WIP PR for making the VL+CT solver support cosmology, when run without magnetic fields. This builds off of PR #186. I'm pretty confident in the correctness of my implementation.
To try to test it, I tried to quickly port the Zeldovich Pancake test. Unfortunately, this took a lot longer than I expected and I ran into some issues. I'm not sure when exactly I'll have time to get back to this, so I wanted to post my progress so far.
The following shows what happens over the first 8 cycles of the simulation when initializing an x-axis aligned Zeldovich Pancake:

To reproduce this plot, use this input file at
input/Cosmology/ZeldovichPancake/vlct-HD-x-aligned.inand this python script.In the final snapshot, you can see that we start to enforce the density floor near the edges of the domain. The bottom row shows the relative difference between the total energy and the kinetic energy. In the second to-last snapshot this goes to a negative number on the domain edge which suggests we're encountering the problem that the dual-energy formalism is supposed to address. For reference, this simulation doesn't currently use the dual-energy formalism (we need a minor change introduced in PR #173 for
EnzoMethodComovingExpansionto properly support the VLCT solver with the dual-energy formalism - but I can manually port that to this PR as well).I suspect that I made a transcription error in porting the Zeldovich Pancale initializer. I was definitely not very careful (especially about units). However, it would be helpful if someone knowledgable about the test in Enzo can:
If people really want this feature sooner, we could shelve this test for now and come up with something simpler...