Skip to content

[Particles] Introduce constraints feature to the particles framework#1729

Open
vovannikov wants to merge 3 commits into4C-multiphysics:mainfrom
vovannikov:sph_introduce_constraints
Open

[Particles] Introduce constraints feature to the particles framework#1729
vovannikov wants to merge 3 commits into4C-multiphysics:mainfrom
vovannikov:sph_introduce_constraints

Conversation

@vovannikov
Copy link
Contributor

@vovannikov vovannikov commented Feb 5, 2026

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).

@vovannikov vovannikov force-pushed the sph_introduce_constraints branch from 30087af to fd21c76 Compare February 5, 2026 13:06
Copy link
Member

@ppraegla ppraegla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Contributor

@slfuchs slfuchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of introducing a constraints handler

@vovannikov
Copy link
Contributor Author

After thinking further and also looking at #1728, I could extend the flexibility of this feature and detect to which plane (2D) or axis (1D) projection should take place. This will be also merged with the coordinates check @slfuchs mentioned.

@vovannikov
Copy link
Contributor Author

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).

Done! Now there is a test that crashes without this feature.

@vovannikov vovannikov force-pushed the sph_introduce_constraints branch from 7c838d0 to 1a0f31b Compare February 6, 2026 13:48
@vovannikov
Copy link
Contributor Author

vovannikov commented Feb 7, 2026

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants