Skip to content
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

add Navier-Stokes Characteristic Boundary Conditions #352

Merged
merged 70 commits into from
Sep 1, 2023

Conversation

BenWibking
Copy link
Collaborator

@BenWibking BenWibking commented Aug 18, 2023

Adds Navier-Stokes Characteristic Boundary Conditions (NSCBC) from Motheau, Almgren & Bell, AIAA, Vol. 55, No. 10, 2017:

  • The relevant boundary conditions are for subsonic inflow and subsonic outflow. The inflow boundary conditions are only partially implemented (for the x-direction lower boundary, for the exclusive purpose of running one of the test problems from the paper). The outflow BC is implemented for all faces.

  • We do not include the special treatment of the corner boundaries that is done in the paper. (It may be necessary to implement this in the future if we want to have adjacent outflow-outflow boundaries.)

  • Two test problems are included:

    • a 1D channel-flow test, where the left boundary is subsonic inflow and the right boundary is subsonic outflow. This is quantitatively checked against the exact solution.
    • a 2D vortex outflow test, where a 2D vortex is moving with a uniform velocity until it reaches the right subsonic outflow boundary. This seems impossible to check quantitatively, so I manually examined the output snapshots in VisIt to see that it flows outward without significant reflections or disturbances back into the box, matching row 2 of Figure 4 in the paper. I also ran with extrapolating boundaries and saw much poorer behavior, in agreement with row 1 of Figure 4. I also ran this problem with outflow boundaries on each lower/upper x/y boundary and the vortex flows outward without significant disturbances for all 4 cases.

Additionally, this adds exhaustive debugging output that can be enabled at runtime for all temporary/work MultiFabs used during the hydro update (including all ghost zones). This should only be enabled for debugging purposes, as it outputs every MultiFab used during every timestep.

BenWibking and others added 22 commits August 16, 2023 14:21
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@BenWibking BenWibking changed the title WIP: add Navier-Stokes Characteristic Boundary Conditions [WIP] add Navier-Stokes Characteristic Boundary Conditions Aug 18, 2023
Copy link
Contributor

@github-actions github-actions bot left a 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

There were too many comments to post at once. Showing the first 10 out of 12. Check the log or trigger a new build to see more.

src/RadhydroSimulation.hpp Outdated Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a 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

src/NSCBC/channel.cpp Outdated Show resolved Hide resolved
src/NSCBC/channel.cpp Outdated Show resolved Hide resolved
src/NSCBC/channel.cpp Outdated Show resolved Hide resolved
src/NSCBC/channel.cpp Outdated Show resolved Hide resolved
src/NSCBC/channel.cpp Outdated Show resolved Hide resolved
src/RadhydroSimulation.hpp Show resolved Hide resolved
src/simulation.hpp Outdated Show resolved Hide resolved
@BenWibking BenWibking marked this pull request as ready for review August 29, 2023 18:47
@BenWibking BenWibking changed the title [WIP] add Navier-Stokes Characteristic Boundary Conditions add Navier-Stokes Characteristic Boundary Conditions Aug 29, 2023
@BenWibking
Copy link
Collaborator Author

@markkrumholz This is a bit of a hefty PR, so please let me know if I should split it into smaller pieces and/or anything else that would be helpful in reviewing.

@BenWibking
Copy link
Collaborator Author

/azp run

@markkrumholz
Copy link
Collaborator

OK, will have a look, but it may not be until tomorrow or Friday due to other commitments.

@BenWibking
Copy link
Collaborator Author

/azp run

src/NSCBC_inflow.hpp Outdated Show resolved Hide resolved
src/NSCBC_outflow.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@markkrumholz markkrumholz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left a couple comments on the PR, one just fixing a typo in a comment, one more substantive.

@BenWibking
Copy link
Collaborator Author

/azp run

1 similar comment
@BenWibking
Copy link
Collaborator Author

/azp run

@markkrumholz markkrumholz added this pull request to the merge queue Aug 31, 2023
Merged via the queue into development with commit 13be468 Sep 1, 2023
8 checks passed
@BenWibking BenWibking deleted the BenWibking/NSCBC branch September 7, 2023 15:36
github-merge-queue bot pushed a commit that referenced this pull request Jul 1, 2024
This updates the shock-cloud problem to use a new setup that:

- tracks the cloud center-of-mass frame
- refines so that the cooling length $l_{\text{cool}} = c_s
t_{\text{cool}}$ is resolved with at least 10 cells
- adds derived fields for temperature, entropy, pressure, etc. to the
outputs
- uses the (simplified) Navier-Stokes Characteristic Boundary Conditions
for inflow/outflow on the left/right sides of the box
- adds shock-cloud problem to nightly regression testing

**This PR depends on:**
* #352
* #360
* #363
* #364
* #365
* #366
* #367
* #430
* #581
* #596
* #597
* #598
* #599
* #616
* #645
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants