Skip to content

Add PressureBoundaries for IISPH - #946

Merged
efaulhaber merged 47 commits into
trixi-framework:mainfrom
noahstruschka:PressureBoundaries_v2
Nov 4, 2025
Merged

Add PressureBoundaries for IISPH#946
efaulhaber merged 47 commits into
trixi-framework:mainfrom
noahstruschka:PressureBoundaries_v2

Conversation

@noahstruschka

@noahstruschka noahstruschka commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Adds a new boundary density calculator PressureBoundaries, that can only be used with IISPH.
The implementation is located in pressure_boundaries.jl, and a corresponding example has been added in dam_break_2d_pressure_boundaries.jl.
Also makes IISPH compatible with AdamiPressureExtrapolation and BernoulliPressureExtrapolation.
To support the new boundary density calculators, a few modifications were made in the iisph system.jl, including the addition of the new calculate_d_ji function.

@efaulhaber efaulhaber added the enhancement New feature or request label Oct 9, 2025
@efaulhaber
efaulhaber requested a review from Copilot October 9, 2025 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds PressureBoundaries, a new boundary density calculator specifically designed for IISPH systems. The main innovation is extending IISPH's pressure Poisson equation (PPE) to include boundary particles directly in the linear system, rather than approximating their pressures separately.

Key changes:

  • Introduces PressureBoundaries density calculator for natural pressure distribution across fluid-boundary interfaces
  • Makes IISPH compatible with AdamiPressureExtrapolation and BernoulliPressureExtrapolation
  • Refactors IISPH system functions to support new boundary handling and adds calculate_d_ji function

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/examples/examples_fluid.jl Adds test cases for IISPH with new boundary density calculators
src/schemes/fluid/implicit_incompressible_sph/system.jl Major refactoring of IISPH system to support PressureBoundaries and improved boundary handling
src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl New file implementing PressureBoundaries density calculator with PPE support
src/schemes/fluid/implicit_incompressible_sph/implicit_incompressible_sph.jl Includes new pressure boundaries module
src/schemes/boundary/wall_boundary/dummy_particles.jl Extends boundary model to support PressureBoundaries with cache and pressure initialization
src/general/semidiscretization.jl Adds comment for IISPH system update
src/TrixiParticles.jl Exports new PressureBoundaries type
examples/fluid/dam_break_2d_pressure_boundaries.jl New example demonstrating PressureBoundaries usage
docs/src/systems/implicit_incompressible_sph.md Comprehensive documentation updates explaining boundary handling and new PressureBoundaries method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread examples/fluid/dam_break_2d_pressure_boundaries.jl Outdated
Comment thread examples/fluid/dam_break_2d_iisph_pressure_boundaries.jl
Comment thread src/general/semidiscretization.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated

@efaulhaber efaulhaber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add the pressure boundaries example to the example tests.

Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/general/semidiscretization.jl Outdated
Comment thread src/general/semidiscretization.jl Outdated
Comment thread src/general/semidiscretization.jl Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread docs/src/systems/implicit_incompressible_sph.md Outdated
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl
Comment thread src/schemes/boundary/wall_boundary/dummy_particles.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl Outdated
Comment thread src/schemes/fluid/implicit_incompressible_sph/system.jl
Comment thread src/schemes/fluid/implicit_incompressible_sph/pressure_boundaries.jl Outdated
Comment thread docs/src/refs.bib Outdated
@efaulhaber

Copy link
Copy Markdown
Member

/run-gpu-tests

@LasNikas
LasNikas self-requested a review November 4, 2025 10:02
@efaulhaber
efaulhaber merged commit 15cf5f7 into trixi-framework:main Nov 4, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants