Skip to content

Fix WCSPH Shepard boundary-density history dependence - #1368

Draft
svchb wants to merge 5 commits into
trixi-framework:stack/pr-1285from
svchb:fix/wcsph-summation-boundary-predictor
Draft

svchb wants to merge 5 commits into
trixi-framework:stack/pr-1285from
svchb:fix/wcsph-summation-boundary-predictor

Conversation

@svchb

@svchb svchb commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #1285 via stack/pr-1285. That branch already contains the staged correction lifecycle and the density_correction API used by this fix. Found during the correction validation work in #1286.

WCSPH with SummationDensity() and ShepardKernelCorrection() includes boundary volumes m_b / ρ_b in its normalizer. At EOS-backed Adami/Bernoulli pressure boundaries, the cached boundary density previously came from the preceding RHS evaluation. This made the result depend on RHS history: repeated evaluations at identical ODE state, or a rejected trial evaluation followed by restoration of that state, could change densities, pressures, and the RHS.

Predict the affected boundary densities from the current raw fluid pressure before assembling correction coefficients. The usual corrected-pressure and boundary-interpolation stages then complete the update. The predictor is enabled only when an affected WCSPH fluid interacts with an EOS-backed pressure boundary.

Regression coverage

The focused regression covers wall, rigid-body, and TLSPH boundaries with both Adami and Bernoulli pressure extrapolation. It checks poisoned boundary caches, rejected-trial restoration, reversed system order, and consistency between final pressure and corrected density.

Earlier verification

The original branch on #1293 passed 780/780 correction-consistency checks, 6848/6848 fluid RHS checks, 29/29 pressure-acceleration checks, and 10/10 Aqua checks on Julia 1.11.9. JuliaFormatter 2.1.1 and git diff --check passed.

This addresses RHS-history dependence. The separate summation-density initialization/quadrature and free-surface accuracy findings from the validation study remain open; the long campaign has not been rerun with this predictor.

@svchb
svchb marked this pull request as draft November 2, 2026 16:15
@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 82.29%. Comparing base (bc25561) to head (e8500e3).

Files with missing lines Patch % Lines
src/general/abstract_system.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           drafty_draft    #1368      +/-   ##
================================================
+ Coverage         82.24%   82.29%   +0.05%     
================================================
  Files               156      157       +1     
  Lines             13135    13178      +43     
================================================
+ Hits              10803    10845      +42     
- Misses             2332     2333       +1     
Flag Coverage Δ
unit 82.29% <97.67%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svchb svchb self-assigned this Nov 23, 2026
@svchb svchb added the bug Something isn't working label Nov 23, 2026
@svchb
svchb force-pushed the fix/wcsph-summation-boundary-predictor branch from a0e416d to ad851e7 Compare November 23, 2026 12:54
@svchb
svchb changed the base branch from drafty_draft to stack/pr-1285 November 23, 2026 12:54
svchb added a commit that referenced this pull request Nov 23, 2026
@svchb svchb mentioned this pull request Nov 23, 2026

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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant