Skip to content

Commit c19e15e

Browse files
svchbefaulhaberLasNikas
committed
Boundary Pressure Calculation for FSI (trixi-framework#498)
* change how adami pressure extrapolation is calculated and add optional offset * remove unused function * update * move to dispatch on function * fix * fix * format * fix test * format * change how adami pressure extrapolation is calculated and add optional offset * remove unused function * update * move to dispatch on function * fix * fix * format * fix test * format * fix merge * fix merge * fix * fix * fix * add new bnd density calculator * missing code * fix test * fix * fix * fix docs * fix * format * review comments * fix test * fix test * format * fix * update docs * fix * set test up for 1.11 * format * implement suggestions * fix equation * formatting * format * Increase errors for 1.11 * Fix invalidations * Fix tests * Update ci.yml * revert * Update ci.yml * Update test/validation/validation.jl Co-authored-by: Erik Faulhaber <[email protected]> * review comments * adjust docs * adjust docs * format * add complete equation * Update docs/src/systems/boundary.md Co-authored-by: Erik Faulhaber <[email protected]> --------- Co-authored-by: Erik Faulhaber <[email protected]> Co-authored-by: Niklas Neher <[email protected]>
1 parent ea11f84 commit c19e15e

File tree

5 files changed

+175
-67
lines changed

5 files changed

+175
-67
lines changed

docs/src/systems/boundary.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,28 @@ of the boundary particle ``b``.
5555

5656
### Hydrodynamic density of dummy particles
5757

58-
We provide five options to compute the boundary density and pressure, determined by the `density_calculator`:
58+
We provide six options to compute the boundary density and pressure, determined by the `density_calculator`:
5959
1. (Recommended) With [`AdamiPressureExtrapolation`](@ref), the pressure is extrapolated from the pressure of the
6060
fluid according to [Adami et al., 2012](@cite Adami2012), and the density is obtained by applying the inverse of the state equation.
6161
This option usually yields the best results of the options listed here.
62-
2. With [`SummationDensity`](@ref), the density is calculated by summation over the neighboring particles,
62+
2. (Only relevant for FSI) With [`BernoulliPressureExtrapolation`](@ref), the pressure is extrapolated from the
63+
pressure similar to the [`AdamiPressureExtrapolation`](@ref), but a relative velocity-dependent pressure part
64+
is calculated between moving solids and fluids, which increases the boundary pressure in areas prone to
65+
penetrations.
66+
3. With [`SummationDensity`](@ref), the density is calculated by summation over the neighboring particles,
6367
and the pressure is computed from the density with the state equation.
64-
3. With [`ContinuityDensity`](@ref), the density is integrated from the continuity equation,
68+
4. With [`ContinuityDensity`](@ref), the density is integrated from the continuity equation,
6569
and the pressure is computed from the density with the state equation.
6670
Note that this causes a gap between fluid and boundary where the boundary is initialized
6771
without any contact to the fluid. This is due to overestimation of the boundary density
6872
as soon as the fluid comes in contact with boundary particles that initially did not have
6973
contact to the fluid.
7074
Therefore, in dam break simulations, there is a visible "step", even though the boundary is supposed to be flat.
7175
See also [dual.sphysics.org/faq/#Q_13](https://dual.sphysics.org/faq/#Q_13).
72-
4. With [`PressureZeroing`](@ref), the density is set to the reference density and the pressure
76+
5. With [`PressureZeroing`](@ref), the density is set to the reference density and the pressure
7377
is computed from the density with the state equation.
7478
This option is not recommended. The other options yield significantly better results.
75-
5. With [`PressureMirroring`](@ref), the density is set to the reference density. The pressure
79+
6. With [`PressureMirroring`](@ref), the density is set to the reference density. The pressure
7680
is not used. Instead, the fluid pressure is mirrored as boundary pressure in the
7781
momentum equation.
7882
This option is not recommended due to stability issues. See [`PressureMirroring`](@ref)
@@ -93,7 +97,20 @@ where the sum is over all fluid particles, ``\rho_f`` and ``p_f`` denote the den
9397
AdamiPressureExtrapolation
9498
```
9599

96-
#### 4. [`PressureZeroing`](@ref)
100+
#### 2. [`BernoulliPressureExtrapolation`](@ref)
101+
Identical to the pressure ``p_b `` calculated via [`AdamiPressureExtrapolation`](@ref), but it adds the dynamic pressure component of the Bernoulli equation:
102+
```math
103+
p_b = \frac{\sum_f (p_f + \frac{1}{2} \, \rho_{\text{neighbor}} \left( \frac{ (\mathbf{v}_f - \mathbf{v}_{\text{body}}) \cdot (\mathbf{x}_f - \mathbf{x}_{\text{neighbor}}) }{ \left\| \mathbf{x}_f - \mathbf{x}_{\text{neighbor}} \right\| } \right)^2 \times \text{factor} +\rho_f (\bm{g} - \bm{a}_b) \cdot \bm{r}_{bf}) W(\Vert r_{bf} \Vert, h)}{\sum_f W(\Vert r_{bf} \Vert, h)}
104+
```
105+
where ``\mathbf{v}_f`` is the velocity of the fluid and ``\mathbf{v}_{\text{body}}`` is the velocity of the body.
106+
This adjustment provides a higher boundary pressure for solid bodies moving with a relative velocity to the fluid to prevent penetration.
107+
This modification is original and not derived from any literature source.
108+
109+
```@docs
110+
BernoulliPressureExtrapolation
111+
```
112+
113+
#### 5. [`PressureZeroing`](@ref)
97114

98115
This is the simplest way to implement dummy boundary particles.
99116
The density of each particle is set to the reference density and the pressure to the
@@ -102,7 +119,7 @@ reference pressure (the corresponding pressure to the reference density by the s
102119
PressureZeroing
103120
```
104121

105-
#### 5. [`PressureMirroring`](@ref)
122+
#### 6. [`PressureMirroring`](@ref)
106123

107124
Instead of calculating density and pressure for each boundary particle, we modify the
108125
momentum equation,

examples/fsi/falling_spheres_2d.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator,
6363

6464
# ==========================================================================================
6565
# ==== Boundary
66-
boundary_density_calculator = AdamiPressureExtrapolation()
66+
boundary_density_calculator = BernoulliPressureExtrapolation()
6767
boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass,
6868
state_equation=state_equation,
6969
boundary_density_calculator,

src/TrixiParticles.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export ArtificialViscosityMonaghan, ViscosityAdami, ViscosityMorris
7070
export DensityDiffusion, DensityDiffusionMolteniColagrossi, DensityDiffusionFerrari,
7171
DensityDiffusionAntuono
7272
export BoundaryModelMonaghanKajtar, BoundaryModelDummyParticles, AdamiPressureExtrapolation,
73-
PressureMirroring, PressureZeroing, BoundaryModelLastiwka
73+
PressureMirroring, PressureZeroing, BoundaryModelLastiwka,
74+
BernoulliPressureExtrapolation
75+
7476
export BoundaryMovement
7577
export examples_dir, validation_dir, trixi_include
7678
export trixi2vtk

0 commit comments

Comments
 (0)