Buoyancy example on static multi-level MAC grid #4423
Closed
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.
Summary
Add minimal working example of a buoyancy calculation on a MAC grid on a static multi-level mesh without subcycling-in-time. Detailed description in README.md.
Draft PR to get feedback on the following questions:
Additional background
I built up this example while attempting to learn how to convert an existing single-level code to multi-level. It was intended to represent a single stage in a CFD code, and to expose and solve the unique requirements for a (static, non-subcycling-in-time) multi-level solve compared to a (uniform, distributed parallel) single-level solve. For this buoyancy algorithm, those unique requirements seem to be a) initialization of coarse/fine ghosts for temperature inputs, and b) an "average down" for the velocity outputs. I plan to do this again for a more complicated case (heat equation? Suggestions welcome) to tease out more of these requirements, and may be able to contribute that if it's useful.
Checklist
The proposed changes: