Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.
https://www.sphinxsys.org/
Apache License 2.0
259 stars 199 forks source link

shell contact algorithm #198

Closed DongWuTUM closed 1 year ago

DongWuTUM commented 1 year ago

Shell contact algorithm is updated.

BenceVirtonomy commented 1 year ago

@DongWuTUM Can you please give more details in the PR description as to what changes - how that influences the usage? Also images from the test case result?

DongWuTUM commented 1 year ago

@DongWuTUM Can you please give more details in the PR description as to what changes - how that influences the usage? Also images from the test case result?

Yes. The maxium contact density is 0.005 * density. The factor, sigma/contactmax, means the ratio of the calculated contact density to the maximum density. The purpose of this updated algorithm is to prevent penetration and simplify the shell contact model. The usage and test case results are essentially unchanged.

FabienPean-Virtonomy commented 1 year ago

0.005*density was there previously, but why actually this magic number, heuristics or theory based ?

On the PR itself, what is the gaussian integration discarded ?

DongWuTUM commented 1 year ago

0.005*density was there previously, but why actually this magic number, heuristics or theory based ?

On the PR itself, what is the gaussian integration discarded ?

The shell contact model was last updated with Eigen. However, it was not the final version. So I'm updating it now.

Looking at the class ContactDensitySummation, the maximum contact pressure is density * c * c (c is the sound wave speed), i.e., K (bulk modulus). The contact pressure K is extremely huge. For the shell model, a layer of particles and a huge contact pressure result in a single particle having a huge contact acceleration, which is one of the sources of instability. Thus, we add a factor 0.005 to maintain enough contact pressure to prevent penetration while also maintaining stability. Thus, the factor 0.005 is determined by theory and numerical experiments.

By using the Gauss-Legendre quadrature integration in the previous shell contact model, we want to add Gaussian points around each particle (2 points for 2D problems and 8 points for 3D problems, same case when calculating the contact_max_) to also ensure enough contact pressure and improve stability. However, numerical experiments show that we don't need to do this because the results are alomost the same with or without the additional Gaussian points.

FabienPean-Virtonomy commented 1 year ago

Thus, the factor 0.005 is determined by theory and numerical experiments.

According to your description, it is purely heuristics then. On how many cases was it tested (2D, 3D) ?

numerical experiments show that we don't need to do this because the results are almost the same with or without the additional Gaussian points.

Good to hear, simpler is better ! Though again, on how many cases was it tested (2D, 3D) ?

DongWuTUM commented 1 year ago

Thus, the factor 0.005 is determined by theory and numerical experiments.

According to your description, it is purely heuristics then. On how many cases was it tested (2D, 3D) ?

numerical experiments show that we don't need to do this because the results are almost the same with or without the additional Gaussian points.

Good to hear, simpler is better ! Though again, on how many cases was it tested (2D, 3D) ?

Two cases are put to the test. Could you help us to test more?

BenceVirtonomy commented 1 year ago

Two cases are put to the test. Could you help us to test more?

We can sure, please describe the tests and the results, then we can look to add more.

DongWuTUM commented 1 year ago

Two cases are put to the test. Could you help us to test more?

We can sure, please describe the tests and the results, then we can look to add more.

The two test cases, ball_shell_collosion and 3d_elasticSolid_shell_collision, are available. You can run them and have a check.

BenceVirtonomy commented 1 year ago

The two test cases, ball_shell_collosion and 3d_elasticSolid_shell_collision, are available. You can run them and have a check.

Do you also take the thickness into consideration now concerning the distance needed to reach contact between two bodies? I think last time you explained that thickness = resolution is ideal for shell but it would make sense to allow for at least thickness = 0.5-2x resolution.

DongWuTUM commented 1 year ago

The two test cases, ball_shell_collosion and 3d_elasticSolid_shell_collision, are available. You can run them and have a check.

Do you also take the thickness into consideration now concerning the distance needed to reach contact between two bodies? I think last time you explained that thickness = resolution is ideal for shell but it would make sense to allow for at least thickness = 0.5-2x resolution.

Not yet, although we have considered the resolution difference between two contact bodies. I agree that it makes sense to allow for at least thickness equal to 0.5-2.0 * resolution. The effect of estimated contact distance error is usually minimal as the thickness is small and the difference between thickness and particle spacing is also small. It does, however, have an effect in some cases. We will factor thickness into the contact distance in the near future.

BenceVirtonomy commented 1 year ago

Not yet, although we have considered the resolution difference between two contact bodies. I agree that it makes sense to allow for at least thickness equal to 0.5-2.0 * resolution. The effect of estimated contact distance error is usually minimal as the thickness is small and the difference between thickness and particle spacing is also small. It does, however, have an effect in some cases. We will factor thickness into the contact distance in the near future.

Okay, understand. I'm not sure when we have time to test other cases yet. We'll try as soon as possible tho.