-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patched microphysics to quokka, and added primordial chem test #263
Conversation
See this as an example: https://github.com/quokka-astro/quokka/blob/development/.ci/azure-pipelines-aarch64.yml |
/azp run |
1 similar comment
/azp run |
/azp run |
GPU tests pass too! The only one that remains queued is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few code style comments, and un-resolved a few clang-tidy messages that I think should be fixed.
The main thing is that there needs to be a check that the answer is 'correct'. It probably makes sense to evolve the simulation until it reaches chemical equilibrium, then you can compare the values with the equilibrium abundances. In terms of implementing that in Quokka, you can follow the example here:
void RadhydroSimulation<ContactProblem>::computeReferenceSolution(amrex::MultiFab &ref, amrex::GpuArray<amrex::Real, AMREX_SPACEDIM> const &dx, |
I will look at the clang-tidy comments again. Some of them were outdated. For several remaining clang-tidy comments, the code was borrowed from existing test problems - why were they not fixed in the existing tests? Clang-tidy should have provided the same comments in those tests too. For the second part, I am not sure what you mean by chemical equilibrium - this is fundamentally non-equilibrium chemistry. But if we want to compare with, say, results of the Microphysics unit test, it would require increasing the density by hand as we did in the unit test (otherwise the chemistry will not evolve). The implementation would then be identical to what we have in the unit test. At this point, I would prefer finishing off this PR without this check and opening a new PR for it, because we have reached a level where a basic primordial chem implementation exists and works well on CPUs and GPUs. It also gets hard to manage bulky PRs with lots of commits, and we already closed one PR to begin the current one. |
It could go in a separate PR. I'm not sure what you mean by 'fundamentally non-equilibrium' - is the equilibrium timescale longer than a Hubble time or something? Otherwise, we should be able to evolve until the values reach a steady state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
I didn't install clang-tidy as a pull request action until recently, so it has only reviewed PRs from the past few months or so. Anything written before then wasn't reviewed by clang-tidy. |
Okay, all clang-tidy issues are now resolved. The last few open ones (since yesterday) were changes I had already implemented, so I resolved them too. |
/azp run |
I mean 1.) the rate of forward and reverse reactions can be quite different. The ratio of the forward to the backward reaction can be as high as 10^(30). Chemical equilibrium would demand the two rates be equal. 2.) timescale for chemical composition to change is >= the freefall timescale. |
Continuation of #241 . Closes #104