NSCBC 2/7: transverse terms in the modelled incoming wave - #1059
Draft
drummerdoc wants to merge 2 commits into
Draft
NSCBC 2/7: transverse terms in the modelled incoming wave#1059drummerdoc wants to merge 2 commits into
drummerdoc wants to merge 2 commits into
Conversation
This was referenced Aug 28, 2026
…LODI limit The base characteristic treatment as a ghost-cell fill: one wave decomposition in an outward-normal frame, two boundary types. Outgoing invariants extrapolate from the interior on a minmod-limited slope; the incoming acoustic is modelled as a Poinsot-Lele relaxation written as a gradient increment (a mesh-independent rate, so literature coefficients transfer), sigma at outflows, relax_u/relax_t at inflows, with a stateless feed-forward slot (Target::dudt) for problems that inject signals. Supersonic faces are exact. Flow reversal at an outflow runs the same closure with the material slopes upwinded off across a narrow Mach band -- one code path on both sides of u_out = 0. The fill is a pure function of pre-launch interior data: idempotent, order-independent, bit-reproducible across restarts and decompositions, GPU-resident (POD captures, counted fallbacks instead of device aborts). Every fallback increments a counter and the counters report by default -- a silent fallback is indistinguishable from a healthy boundary. Problems opt in per boundary POINT through a bcnormal_nscbc() hook returning a Target; a face may mix inflow, outflow and wall. EB requires eb_zero_body_state (fatal otherwise, the fill detects covered cells by non-positive density); an AMR fine face touching a characteristic boundary warns. This PR is the 1-D-normal LODI limit on purpose: transverse terms and the reacting-boundary closures arrive as the next two PRs in this stack, each an additive, default-off correction to the modelled incoming wave (some comments here forward-reference them). Verification driver and regression cases follow in the stack; headline number from the case PR: an acoustic pulse leaves through this boundary with 0.8% reflection against 97% for a hard-pressure fill. Also removes the dead nscbc_adv/nscbc_diff keys of the deleted Fortran implementation (aborting, not ignoring, when an inputs file still sets them) and retires the 1 K default for eb_boundary_T in favour of 300 K. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XU8M23nucKsu1do2WxXFeq
The multi-dimensional correction: -(1 - beta) T_in on the incoming amplitude, where T_in carries the tangential convective and dilatational terms in the outward frame (the ghost-cell transplantation of Motheau's T1/T4 -- one expression for lo and hi faces). Tangential derivatives come from the boundary cell's clamped neighbours; at a corner the stencil collapses one-sided or to nothing, which is the measured replacement for the AIAA corner-coupling machinery. The beta blend is exact for a plane wave at incidence theta: beta_opt = 1 - cos(theta)/(1 + cos(theta)) -- 0.5 head-on, toward 1 at grazing -- and both measured optima in the COVO/pulse suite land on it. The response is asymmetric (a wrong beta is worse than an absent one), so the default stays 1: this PR is bit-inert until a problem opts in, and every result of the previous PR is unchanged. The clamp leaves a small measured seam residual where a characteristic face meets a periodic direction, and that trade is guarded rather than assumed: nscbc_check_periodic_wrap() measures the ghost-image mismatch at startup, reports it beside the boundary-row spread (so a vacuous pass is visible), and aborts above 1e-2 -- an order above the worst known-good measurement and an order below what a broken stencil produces. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XU8M23nucKsu1do2WxXFeq
drummerdoc
force-pushed
the
nscbc-1b-transverse
branch
from
August 28, 2026 08:07
e3e5182 to
ece2d39
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.
Stacked on #1058 (part 2/7 of the stack tracked in #1057). The reviewable content of this PR is its LAST commit — the earlier commits are the lower stack levels and will vanish from this diff as they merge and the stack rebases.
The multi-dimensional correction: -(1 - beta) T_in on the incoming
amplitude, where T_in carries the tangential convective and dilatational
terms in the outward frame (the ghost-cell transplantation of Motheau's
T1/T4 -- one expression for lo and hi faces). Tangential derivatives
come from the boundary cell's clamped neighbours; at a corner the
stencil collapses one-sided or to nothing, which is the measured
replacement for the AIAA corner-coupling machinery.
The beta blend is exact for a plane wave at incidence theta:
beta_opt = 1 - cos(theta)/(1 + cos(theta)) -- 0.5 head-on, toward 1 at
grazing -- and both measured optima in the COVO/pulse suite land on it.
The response is asymmetric (a wrong beta is worse than an absent one),
so the default stays 1: this PR is bit-inert until a problem opts in,
and every result of the previous PR is unchanged.
The clamp leaves a small measured seam residual where a characteristic
face meets a periodic direction, and that trade is guarded rather than
assumed: nscbc_check_periodic_wrap() measures the ghost-image mismatch
at startup, reports it beside the boundary-row spread (so a vacuous
pass is visible), and aborts above 1e-2 -- an order above the worst
known-good measurement and an order below what a broken stencil
produces.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XU8M23nucKsu1do2WxXFeq