Skip to content

Fix issue #215: keep covered-cell sentinel density out of the hydrost… - #270

Open
asalmgren wants to merge 1 commit into
AMReX-Fluids:developmentfrom
asalmgren:fix-issue-215
Open

asalmgren wants to merge 1 commit into
AMReX-Fluids:developmentfrom
asalmgren:fix-issue-215

Conversation

@asalmgren

Copy link
Copy Markdown
Contributor

…atic outflow BC

With EB, the density handed to set_outflow_bcs holds a sentinel in covered cells (1.2345e20 from level_project, COVERED_VAL from initialPressureProject). computeRhoG integrated it down each column of the outflow strip, so every node below a covered cell got phi ~ 1e20gdh: with gravity on and a body in the two-cell strip, dt collapsed to ~1e-22 and the nodal rhs reached ~1e41.

set_outflow_bcs_at_level now gathers a copy of the density with covered cells marked negative, and computeRhoG replaces each marked cell with the density of the nearest fluid cell above it in its column (below it, if the top of the column is covered), or the mean fluid density of the strip for a fully covered column, before integrating. Configurations with no covered cells in the strip are unchanged.

… the hydrostatic outflow BC

With EB, the density handed to set_outflow_bcs holds a sentinel in covered
cells (1.2345e20 from level_project, COVERED_VAL from
initialPressureProject). computeRhoG integrated it down each column of the
outflow strip, so every node below a covered cell got phi ~ 1e20*g*dh: with
gravity on and a body in the two-cell strip, dt collapsed to ~1e-22 and the
nodal rhs reached ~1e41.

set_outflow_bcs_at_level now gathers a copy of the density with covered
cells marked negative, and computeRhoG replaces each marked cell with the
density of the nearest fluid cell above it in its column (below it, if the
top of the column is covered), or the mean fluid density of the strip for
a fully covered column, before integrating. Configurations with no covered
cells in the strip are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant