Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Adami loop flipping optimization optional #581

Draft
wants to merge 40 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
32ab3df
change how adami pressure extrapolation is calculated and add optiona…
svchb Apr 18, 2024
06f8df6
remove unused function
svchb Apr 18, 2024
69ef99c
update
svchb Apr 18, 2024
d22aa3c
move to dispatch on function
svchb Apr 18, 2024
993608c
fix
svchb Apr 18, 2024
c5f3e23
Merge branch 'main' into adami_pressure_changes
svchb Apr 18, 2024
ed28f61
fix
svchb Apr 18, 2024
5c6d6bc
format
svchb Apr 18, 2024
e35975a
fix test
svchb Apr 18, 2024
da17b41
format
svchb Apr 18, 2024
b8c4d89
Merge remote-tracking branch 'upstream/main'
svchb May 16, 2024
fd523fc
Merge remote-tracking branch 'upstream/main'
svchb May 27, 2024
f37adcd
change how adami pressure extrapolation is calculated and add optiona…
svchb Apr 18, 2024
8224f5e
remove unused function
svchb Apr 18, 2024
532a247
update
svchb Apr 18, 2024
cbab0b2
move to dispatch on function
svchb Apr 18, 2024
073b6b0
fix
svchb Apr 18, 2024
a3d3896
fix
svchb Apr 18, 2024
e968245
format
svchb Apr 18, 2024
ad44624
fix test
svchb Apr 18, 2024
23bbfac
format
svchb Apr 18, 2024
b82e338
fix merge
svchb May 27, 2024
10668b9
fix merge
svchb May 27, 2024
7f50e96
Merge remote-tracking branch 'refs/remotes/upstream/main'
svchb Jul 3, 2024
75c3457
Merge branch 'adami_pressure_changes' of github.com:svchb/TrixiPartic…
svchb Jul 3, 2024
5484594
Merge branch 'main' into adami_pressure_changes
svchb Jul 15, 2024
dd484c7
fix
svchb Jul 15, 2024
01c6b71
fix
svchb Jul 15, 2024
a6183e2
fix
svchb Jul 15, 2024
0f3536c
add new bnd density calculator
svchb Jul 15, 2024
431e3c0
missing code
svchb Jul 15, 2024
46b532b
fix test
svchb Jul 15, 2024
6aab6be
fix
svchb Jul 15, 2024
36afcd3
fix
svchb Jul 15, 2024
a111515
fix docs
svchb Jul 15, 2024
3bab14f
fix
svchb Jul 16, 2024
daf5999
Merge branch 'main' into adami_pressure_changes
svchb Jul 22, 2024
5729c48
Make Adami loop flipping optimization optional
efaulhaber Jul 24, 2024
b22b3f2
Disable loop flipping in validation
efaulhaber Jul 24, 2024
d84ae1e
Update vaildation files
efaulhaber Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions docs/src/systems/boundary.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,28 @@ of the boundary particle ``b``.

### Hydrodynamic density of dummy particles

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

#### 4. [`PressureZeroing`](@ref)
#### 2. [`BernoulliPressureExtrapolation`](@ref)
```@docs
BernoulliPressureExtrapolation
```

#### 5. [`PressureZeroing`](@ref)

This is the simplest way to implement dummy boundary particles.
The density of each particle is set to the reference density and the pressure to the
Expand All @@ -102,7 +111,7 @@ reference pressure (the corresponding pressure to the reference density by the s
PressureZeroing
```

#### 5. [`PressureMirroring`](@ref)
#### 6. [`PressureMirroring`](@ref)

Instead of calculating density and pressure for each boundary particle, we modify the
momentum equation,
Expand Down
2 changes: 1 addition & 1 deletion examples/fsi/falling_spheres_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator,

# ==========================================================================================
# ==== Boundary
boundary_density_calculator = AdamiPressureExtrapolation()
boundary_density_calculator = BernoulliPressureExtrapolation()
boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundary.mass,
state_equation=state_equation,
boundary_density_calculator,
Expand Down
3 changes: 2 additions & 1 deletion src/TrixiParticles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export ArtificialViscosityMonaghan, ViscosityAdami, ViscosityMorris
export DensityDiffusion, DensityDiffusionMolteniColagrossi, DensityDiffusionFerrari,
DensityDiffusionAntuono
export BoundaryModelMonaghanKajtar, BoundaryModelDummyParticles, AdamiPressureExtrapolation,
PressureMirroring, PressureZeroing, BoundaryModelLastiwka
PressureMirroring, PressureZeroing, BoundaryModelLastiwka, BernoulliPressureExtrapolation

export BoundaryMovement
export examples_dir, validation_dir, trixi_include
export trixi2vtk
Expand Down
Loading
Loading