[Particles] Introduce constraints feature to the particles framework#1729
[Particles] Introduce constraints feature to the particles framework#1729vovannikov wants to merge 3 commits into4C-multiphysics:mainfrom
Conversation
b0b97a5 to
30087af
Compare
30087af to
fd21c76
Compare
ppraegla
left a comment
There was a problem hiding this comment.
Thanks for the implementation. Could you add an input file test that uses the constraints? Right now, create_constraints is unused (unless I missed something).
src/particle/src/algorithm/4C_particle_algorithm_constraints.hpp
Outdated
Show resolved
Hide resolved
src/particle/src/algorithm/4C_particle_algorithm_constraints.cpp
Outdated
Show resolved
Hide resolved
slfuchs
left a comment
There was a problem hiding this comment.
I like the idea of introducing a constraints handler
src/particle/src/algorithm/4C_particle_algorithm_constraints.hpp
Outdated
Show resolved
Hide resolved
Done! Now there is a test that crashes without this feature. |
7c838d0 to
1a0f31b
Compare
|
Here, for the test to pass, #1728 needs to be merged first. Once #1728 is merged, I will rebase this one and proceed. Ready for review. As I have commented above, I would like to remove the requirement for the particles to be located at the plane z=0. I have already programmed an algo that detects the plane automatically and checks whether all the particles are coplanar, but I would prefer to add it in a follow up PR due to its relative complexity. Again to keep things for review simple. |
To proceed with the 2D simulations in the SPH setting, we need to ensure that no action is produced in the z-direction, that may appear when the particles are coupled to 3D structures, e.g. particle walls. It is then required to explicitly nullify the corresponding velocity and acceleration components, since the 2D SPH kernel is not capable to handle these contributions properly.
As originally proposed by @slfuchs, such sanitation is easy to perform in the
pre_interaction_routine()step of the time integrator. I just decided to introduce the concept of constraints, that would encapsulate this functionality and that could be extended to other tasks if needed. One could use the Dirichlet boundary conditions handler, but that handler has a bit more functionality than needed, making it a bit too expensive to apply at each timestep to each particle of the simulation domain.Together with #1728, the 2D SPH cases requiring coupling to structural elements can not be simulated (including those from the paper of @slfuchs).