-
Notifications
You must be signed in to change notification settings - Fork 15
Add shifting for InFlow
-buffer particles
#768
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #768 +/- ##
==========================================
- Coverage 70.60% 70.22% -0.38%
==========================================
Files 106 106
Lines 6769 6804 +35
==========================================
- Hits 4779 4778 -1
- Misses 1990 2026 +36
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just cut off the shifting at a point? Is this stable? Or should this be a smooth transition from shifting to no shifting?
src/callbacks/particle_shifting.jl
Outdated
for neighbor in PointNeighbors.eachneighbor(particle_coords, | ||
neighborhood_search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- This is not public API.
- This is not available for every NHS implementation.
I see two options:
- Use
foreach_point_neighbor
and skip all particle-neighbor pairs with particle outside the max distance (benchmark performance and compare with this function here). - If this is not fast enough, we can make
foreach_neighbor
public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first option is not an option, because their exists no NHS for OpenBoundarySPHSystem
s.
Buffer particles don't need to interact with other particles or with itself.
I like the second option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Buffer particles don't need to interact with other particles or with itself.
You are just implementing an interaction between buffer particles and other particles.
You can't just use another NHS and assume it works for a different set of particles. This is what PointNeighbors.requires_update
is for.
Yes, because these buffer particles don't calculate their physical properties physically but extrapolate (Tafuni) them or determine them with a model (Lastiwka). Here, the shifting acts basically as a rearrangement of the position of the particles. |
I ran a simulation with a step in the transition zone (see image below). This step induced periodic gaps in the buffer zone which didn't decay. Indeed, the opposite is the case. The simulation is becoming unstable.
So the workaround is to shift not only the fluid particles but also the buffer particles.
I only shift particles that are in the vicinity of the transition plane.
Left: No shifting of buffer particle. Right: Shifted buffer particles
