Skip to content

Fix zero wall velocity in the no-slip condition of dummy-particle boundaries - #1361

Open
svchb wants to merge 88 commits into
mainfrom
fix/no-slip-wall-velocity
Open

svchb wants to merge 88 commits into
mainfrom
fix/no-slip-wall-velocity

Conversation

@svchb

@svchb svchb commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #1341, based on fix/fsi-pressure-mirroring. The base already computes the no-slip wall velocity for PressureMirroring; this PR extends that treatment to the other dummy-particle density calculators.

With a boundary viscosity, SummationDensity, ContinuityDensity, PressureZeroing, and PressureBoundaries used a wall velocity of zero. The velocity of moving walls and structures was ignored, and static walls applied only half the wall shear (Couette flow: 50% of the exact shear before, 98.5% after).

  • Reuse the existing pressure-extrapolation pair loops to compute the wall velocity of Adami et al. (2012) for these calculators in update_quantities!, including Zhang buffer particles.
  • With IISPH, also provide the AdamiPressureExtrapolation/BernoulliPressureExtrapolation wall velocity before the advection prediction.
  • Extend regression coverage to the additional density calculators, changing fluid velocities, both IISPH system orderings, integer/Float32/Float64 initial densities, and Zhang buffers.
  • Document the no-slip behavior and IISPH timing, and add a NEWS entry.

Behavior change: results change for simulations that combine a boundary viscosity with these calculators.

Documentation build fixes

  • Restrict Documenter to versions compatible with Asciicast 0.1.3 (1.0 - 1.19).
  • Create the output directory before writing VTI data in the visualization tutorial.

Validation

Previously reported local validation for this PR (Julia 1.11.9): affected suites, threaded Float32/Float64, zero-allocation, and formatting checks passed. The wall velocity and wall forces also matched an independent from-scratch implementation.

svchb added 11 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.
Resolve the conflicts with the reuse of the pair loops of the pressure extrapolation:
- `interpolate_wall_velocity!` calls the existing pair loops for all density
  calculators. The pair loops already include the buffer particles of
  `BoundaryModelDynamicalPressureZhang`.
- The velocity-only method of `boundary_pressure_inner!` applies to all density
  calculators that don't extrapolate the pressure.
- Keep the no-slip tests for all density calculators instead of the tests for
  `PressureMirroring` only.
svchb added a commit to svchb/TrixiParticles.jlOpen that referenced this pull request Nov 10, 2026
@svchb
svchb marked this pull request as draft November 10, 2026 20:00
@svchb
svchb added this pull request to stack #1393 November 18, 2026 12:59
@svchb
svchb marked this pull request as ready for review November 18, 2026 15:38
@svchb
svchb requested a review from efaulhaber November 18, 2026 15:38
Base automatically changed from fix/fsi-pressure-mirroring to main November 19, 2026 10:30

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.

2 participants