SPHinXsys
SPHinXsys copied to clipboard
Shell contact current limitations
https://github.com/Xiangyu-Hu/SPHinXsys/blob/890f4ded058d7e1e6185972aaef2e3494750e094/SPHINXsys/src/shared/particle_dynamics/solid_dynamics/contact_dynamics.cpp#L114-L129
Before I forget again, the above snippet for shell contact calculation has several issues for the generalization in 3D:
- The algorithm sample along a line (correct in 2D), but it requires a tensor product (sampling a surface) of gauss points in 3D
- In 3D the part
Vecd(dp_2 * x_0, dp_2 * x_0)
yieldsVec3d(dp_2 * x_0, dp_2 * x_0, 0)
(absence of the z-coordinate) - IIRC the numerical quadrature should be performed along the the boundary of the object (line, surface) so the quadrature point position should be given relatively to the tangent (and bitangent) of the body around the particle
For visual purpose, the correction of point 3 in current file would be:
const Vecd dp_2_t_0 = pos_n_[index_i] - dp_2 * x_0 * tangent - contact_pos_j;
const Vecd dp_2_t_1 = pos_n_[index_i] - dp_2 * x_1 * tangent - contact_pos_j;
const Vecd dp_2_t_2 = pos_n_[index_i] - dp_2 * x_2 * tangent - contact_pos_j;
Ok. I will ask Dong @DongWuTUM revise this part of the code.
Fabien, this issue actually leads to the code crash in Windows system for the ball-shell-contact case. This part of code should be revised.