Skip to content

PressureBoundaries#1

Open
noahstruschka wants to merge 32 commits intoma_noahfrom
PressureBoundariesMass
Open

PressureBoundaries#1
noahstruschka wants to merge 32 commits intoma_noahfrom
PressureBoundariesMass

Conversation

@noahstruschka
Copy link
Copy Markdown
Owner

No description provided.

and create a new create cache model function for
this density calculator
Split density calculations and the pressure
calculation in two different functions
(update_density! and update_pressure!).
PressureBoundaries, therefore the create_cache_model function needed to
be modified (more inputs)
Also fix errora because of missing dispatch
reference_density as a fix value instead of a full
array

Also added new versions of a few functions for
PressureBoundarie which already existed in IISPHs
system.jl
PressureBoundaries, with dispatch to
BoundarySystem and PressureBoundaries
density calculator and add it to the cache
Also anotherh small correction
(calculate_diagonal_elements,
calculate_d_ii_values,
calculate_predicted_density,
calcuallte_predicted_velocity)

calculate_predicted_velocity : not needed for boundary particles
calculate_predicted_density : Has not changed
calculate_d_ii_values : not needed fot boundary particles
calcualte_diagonal_elements : Has changed a little bit

A few further littel modifications e.g. adjusting the PressureBoundaries cache

At this moment the IISPH example file (with Pressure Zeroing) works
and the PressureBoundaries example file works
But both are still delivering the same results
PressureBoundaries.
Both example files arevstill working
(IISPH with PressureZeroing and with
PressureBoundaries)
Both are still delivering the same result because
the pressure solver is not yet modified to work
for PressureBoundaries
This will be done next
pressure_solve_iteration function with dispatch to
the BoundarySystem (and PressureBoundaries)
Now there are two different versions of this
function, how it is for all other functions too.
Therefore the PressureBoundaries density_calculator
needed another jnput variabel omega, for the
relaxed jacobi scheme.
By default this is 0.5 exactly how it is for IISPH
Now everything is ready to test the new
PressureBoundaries density_calculator
Currently both example files work, the
PressureBoundaries example file delivers the same
results as the IISPH example file with PressureZeroing
But also with alle other existing density_calculator
does the IISPH example file work
loop before the pressure solve iteration function
neighbor loop by adding a new n_moving_particles
function for for PressureBoundaries
three new seperated functions and dispatched them
to the system and put them into a
foreach_syste(semi) loop

Also a few minor adjustments / fixes
implementatation
the sum_dij_pj values have only been calculated
for the fluid particles neighbors. That is correct
for preussre zeroing and pressure mirroring,
because the fluid particle there do not have an
own pressure value. There value disappear and
does not show up in the calculation.
But in the case of pressure mirroring we have own
pressure values for the boundary particle so they
need to be taken into account.
Therefore I needed to change a few function
Also the calculate_d_ij function needed to be
changed because this can't be zero anymore for j
being a boundary particle.
And because of that the calcualte diagonal_elements
function needed to be dispatched to the
neighor_system, because in the case that the
neighbor_system is a boundary system we can not
take d_ji into account for the calculation of a_ii

The code still doesn't work for PressureBoundaries,
because I have not changed the function for in the
dummy_particles file. Only in the IISPH file.

This needs to be done next.

But for IISPH example the result is the same as
before so the changes should be correct.
@noahstruschka noahstruschka force-pushed the PressureBoundariesMass branch from 651a347 to c66f4a4 Compare August 21, 2025 09:45
stable simulation, for the dam_break example with
PressureBoundaries
And fixing errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant