Skip to content

Fix pressure mirroring and no-slip coupling for walls and structures - #1341

Merged
efaulhaber merged 74 commits into
mainfrom
fix/fsi-pressure-mirroring
Nov 19, 2026
Merged

efaulhaber merged 74 commits into
mainfrom
fix/fsi-pressure-mirroring

Conversation

@svchb

@svchb svchb commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Apply pressure mirroring consistently to structures and EDAC momentum, pressure diffusion, and average-pressure reduction.
  • Compute mirrored no-slip velocities in update_quantities! and defer IISPH prediction until all quantities are ready, independent of system order.
  • Reject SummationDensity for structure boundaries only when fluid–structure coupling is enabled.

Validation

Affected suites and focused regressions pass locally on Julia 1.11.9 with bounds checking. Formatting and zero-allocation checks pass.

Follow-up #1361 extends no-slip interpolation to the other density calculators.

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.75362% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.78%. Comparing base (6588929) to head (3bbf776).

Files with missing lines Patch % Lines
...hemes/boundary/open_boundary/dynamical_pressure.jl 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1341      +/-   ##
==========================================
+ Coverage   80.08%   81.78%   +1.70%     
==========================================
  Files         147      147              
  Lines       11061    11107      +46     
==========================================
+ Hits         8858     9084     +226     
+ Misses       2203     2023     -180     
Flag Coverage Δ
unit 81.78% <92.75%> (+1.70%) ⬆️

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 changed the title Fix pressure mirroring for structures and EDAC walls Fix pressure mirroring and no-slip coupling for walls and structures Oct 22, 2026
Comment thread docs/src/systems/boundary.md Resolved
Comment thread src/general/semidiscretization.jl Resolved
Comment thread test/schemes/fluid/rhs.jl Resolved
Comment thread test/schemes/fluid/rhs.jl Resolved
Comment thread test/schemes/fluid/rhs.jl Resolved
Comment thread test/schemes/fluid/rhs.jl Resolved
Comment thread NEWS.md Resolved
svchb added 8 commits November 9, 2026 11:37
Restores the formatting of three hunks in `dummy_particles.jl` that were
identical to `main` before and fixes the formatting check of the tests.
The interaction of the buffer particles of `BoundaryModelDynamicalPressureZhang`
read the pressure of the neighbor directly. For walls and structures with
`PressureMirroring`, this is the unused pressure stored in the boundary model
instead of the pressure of the buffer particle. Use `neighbor_pressure` like the
fluid systems do. With EDAC, this also removes the pressure diffusion between
the buffer particle and the mirrored wall.
…steps

The sub-steps of the `SplitIntegrationCallback` call `update_quantities!` of the
`TotalLagrangianSPHSystem`s for a semidiscretization without any fluid systems.
Interpolating the no-slip wall velocity of `PressureMirroring` there reset the
`wall_velocity` of the boundary model to zero after every sub-step, while
`AdamiPressureExtrapolation` keeps it, since the split integration skips
`update_boundary_interpolation!`.

Interpolate the wall velocity of structures in `update_boundary_interpolation!`
instead. This is not required for IISPH, which does not support structures.
Walls still interpolate it in `update_quantities!` to provide it to the IISPH
advection prediction.
…ctures

The check was changed to reject `SummationDensity` for structures independent
of the interaction matrix, which contradicts the PR description. Restore the
previous behavior: only reject it if the structure interacts with a fluid in
either direction. The boundary density of a structure is not used otherwise.
`all(f, nparticles(system))` only checked the last particle, because it iterates
over the integer. Check the neighbor count of all particles.
Reuse the existing pair loops of the pressure extrapolation for the mirrored wall
velocity instead of renaming and moving them. `boundary_pressure_extrapolation!`
and `boundary_pressure_inner!` keep their names, so the tests that call them
don't change. `PressureMirroring` only adds a velocity-only method of
`boundary_pressure_inner!`, and `interpolate_wall_velocity!` calls the existing
pair loops. This includes the buffer particles of
`BoundaryModelDynamicalPressureZhang` like the pressure extrapolation does.
The kernel weights are only allocated if a viscosity model is used.

Make the new tests smaller:
- Test the open-boundary interaction with the mirrored wall without a
  `Semidiscretization`, like the other tests in that file.
- Replace the test that runs the `SplitIntegrationCallback` by a unit test that calls
  the update function of the callback for a semidiscretization without fluid.
  It is part of the existing no-slip tests, so `test/callbacks` is not changed.

Revert the comment-only change in the IISPH interaction and shorten comments.
@svchb
svchb requested a review from efaulhaber November 9, 2026 14:49
svchb added a commit to svchb/TrixiParticles.jlOpen that referenced this pull request Nov 10, 2026
Comment thread src/schemes/structure/structure.jl Resolved
Comment thread docs/src/systems/boundary.md Resolved
Comment thread src/general/semidiscretization.jl Resolved
Comment thread src/schemes/structure/structure.jl Resolved
@svchb
svchb requested a review from efaulhaber November 18, 2026 12:28
@svchb
svchb added this pull request to stack #1393 November 18, 2026 12:59
@svchb
svchb enabled stacked auto-merge (squash) November 18, 2026 15:40
@efaulhaber
efaulhaber disabled stacked auto-merge November 19, 2026 10:30
@efaulhaber
efaulhaber merged commit dc67157 into main Nov 19, 2026
11 of 12 checks passed
@efaulhaber
efaulhaber deleted the fix/fsi-pressure-mirroring branch November 19, 2026 10:30
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.

2 participants