SPHinXsys icon indicating copy to clipboard operation
SPHinXsys copied to clipboard

Feature/shell contact using ghost particle

Open WeiyiVirtonomy opened this issue 11 months ago • 23 comments

The previous PR was closed due to the incorrect merge.

TODO:

  • Add test cases back
  • Check sliding under different resolutions of solid and shell

WeiyiVirtonomy avatar Mar 13 '24 15:03 WeiyiVirtonomy

@DongWuTUM Hi Dong, I opened a new PR for contact. I'll add the deleted test cases back later this week.

WeiyiVirtonomy avatar Mar 13 '24 15:03 WeiyiVirtonomy

Hi Weiyi, test_3d_shell_self_contact cannot run. When compling, it shows 'ParticleGeneratorSurface': base class undefined. Could you help me solve this? Thanks.

DongWuTUM avatar May 02 '24 17:05 DongWuTUM

@WeiyiVirtonomy Hi Weiyi, could you sent me the reference data (and test results if it is Okay from your side) of the test cases you have tested? Including the fluid-shell, shell-shell, shell-solid cases if possible. In this way, I don't need to collect these data again. Thank you!

DongWuTUM avatar May 03 '24 09:05 DongWuTUM

@WeiyiVirtonomy Hi Weiyi, could you sent me the reference data (and test results if it is Okay from your side) of the test cases you have tested? Including the fluid-shell, shell-shell, shell-solid cases if possible. In this way, I don't need to collect these data again. Thank you!

Hi, Dong, I have uploaded the reference data of FSI extracted from the figures and the SPH simulation results to Dropbox https://www.dropbox.com/scl/fo/oba51l7uyo9npoy9yzvo7/AE0wAqExM-eVyGO73uxLn4k?rlkey=llp63qrqteed0eyger2646veb&st=7koohawb&dl=0. As for the contact problems, I only created some simple tests without verification.

WeiyiVirtonomy avatar May 06 '24 07:05 WeiyiVirtonomy

@WeiyiVirtonomy Hi Weiyi, could you sent me the reference data (and test results if it is Okay from your side) of the test cases you have tested? Including the fluid-shell, shell-shell, shell-solid cases if possible. In this way, I don't need to collect these data again. Thank you!

Hi, Dong, I have uploaded the reference data of FSI extracted from the figures and the SPH simulation results to Dropbox https://www.dropbox.com/scl/fo/oba51l7uyo9npoy9yzvo7/AE0wAqExM-eVyGO73uxLn4k?rlkey=llp63qrqteed0eyger2646veb&st=7koohawb&dl=0. As for the contact problems, I only created some simple tests without verification.

Thank you!!!

DongWuTUM avatar May 06 '24 10:05 DongWuTUM

Hi Weiyi, test_3d_shell_self_contact cannot run. When compling, it shows 'ParticleGeneratorSurface': base class undefined. Could you help me solve this? Thanks.

@WeiyiVirtonomy Could you also have a look on this problem?

DongWuTUM avatar May 06 '24 10:05 DongWuTUM

Three ring contact

Reference paper: Yang, Laursen The big ring is modeled as a solid, while the medium and small ones are modeled as a shell. Unlike the paper, frictionless contact is used in the simulation. Other parameters are the same.

Result

The paper didn't provide the exact time of Fig. 16, so I only took some screenshots at time frames with similar deformation. Screenshot 2024-06-05 165619 Screenshot 2024-06-05 165707 Screenshot 2024-06-05 165731 Screenshot 2024-06-05 165749 Screenshot 2024-06-05 165856

Instability

Under a resolution of dp = thickness / 4.0, self-penetration of the medium ring is observed, probably because the displacement within one step is too large. If repulsion force is only generated when particle distance is within 0.5*(dp1+dp2), the shell might not have enough time to react. Therefore, I changed the contact surface to 2.3*dp_ave (cut-off radius of the kernel). With this modification, no self-penetration is observed, but strong hourglass effect can still be seen: image Refining dp to thickness / 8.0, the hourglass effect disappears as shown above.

WeiyiVirtonomy avatar Jun 05 '24 16:06 WeiyiVirtonomy

Great!!!

DongWuTUM avatar Jun 05 '24 19:06 DongWuTUM

Oil tank

An oil tank with oil inside collided with a truck at a speed of 20m/s. The oil tank is modeled as an elastic cylindrical shell, while the truck is a rigid volumetric cylinder. The properties and geometries are all estimated. The simulation includes the contact between the elastic tank and the rigid truck, the fluid-solid interaction between the fluid and the tank, and the solid-fluid interaction between the tank and the fluid. The tank is fixed at the bottom (the red points): image

With dp = 0.25m (10 particles per diameter): Screenshot 2024-06-06 163359 Screenshot 2024-06-06 163447

The fluid looks not so good. Some strange wave-like shapes can be seen at the bottom, caused by the initial interaction between shell and fluid. In hydrostatic tests, high velocity can be seen at the bottom of the tank due to force from fluid. image

The weird shape exists even with resolution refinement. Screenshot 2024-06-06 170906

WeiyiVirtonomy avatar Jun 06 '24 15:06 WeiyiVirtonomy

Hydrostatic test

Test case: test_3d_oil_tank_crash_debug The main problem is the initial fluid particle distribution.

No relaxation, no shell damping

Strange shape, max velocity of shell~2.0

image

With relaxation, no shell damping

Shape is much better, but pressure is not so uniform at the bottom, max velocity of shell~0.1

image

With relaxation, with shell damping

Uniform pressure distribution, max velocity of shell~0.003

image

There's no need to use fluid damping, relaxation + shell damping will be sufficient.

Dynamic impact

I tried to close shell damping after the hydrostatic phase, but the deformed shape of shell and fluid are not so good without damping, as the impact velocity is quite high. Screenshot 2024-06-10 163823 Screenshot 2024-06-10 163835

The result with shell damping looks good.

WeiyiVirtonomy avatar Jun 10 '24 16:06 WeiyiVirtonomy

@DongWuTUM I still have some doubts about the renaming of RepulsionDensity and RepulsionForce.

For a body named "body1" in contact with "body2" and "body3", I will need to name the repulsion densities as "RepulsionDensity_body1_body2" and "RepulsionDensity_body1_body3".

However, if body2 and body3 are placed in one contact relation, I can only have one repulsion density registered for the contact of body1 to body2 and 3.

Does it mean that I need to change contact to one-to-one for now?

WeiyiVirtonomy avatar Jun 11 '24 07:06 WeiyiVirtonomy

@DongWuTUM I still have some doubts about the renaming of RepulsionDensity and RepulsionForce.

For a body named "body1" in contact with "body2" and "body3", I will need to name the repulsion densities as "RepulsionDensity_body1_body2" and "RepulsionDensity_body1_body3".

However, if body2 and body3 are placed in one contact relation, I can only have one repulsion density registered for the contact of body1 to body2 and 3.

Does it mean that I need to change contact to one-to-one for now?

Hi Weiyi, I think it would be "RepulsionDensityShellSolid, RepulsionDensityShellShell, RepulsionDensitySolidSolid, RepulsionDensitySolidShell". It means a repulsion density, for example, "RepulsionDensityShellSolid", registered for a shell contact to all solid bodies.

DongWuTUM avatar Jun 11 '24 08:06 DongWuTUM

@DongWuTUM I still have some doubts about the renaming of RepulsionDensity and RepulsionForce. For a body named "body1" in contact with "body2" and "body3", I will need to name the repulsion densities as "RepulsionDensity_body1_body2" and "RepulsionDensity_body1_body3". However, if body2 and body3 are placed in one contact relation, I can only have one repulsion density registered for the contact of body1 to body2 and 3. Does it mean that I need to change contact to one-to-one for now?

Hi Weiyi, I think it would be "RepulsionDensityShellSolid, RepulsionDensityShellShell, RepulsionDensitySolidSolid, RepulsionDensitySolidShell". It means a repulsion density, for example, "RepulsionDensityShellSolid", registered for a shell contact to all solid bodies.

Do you know if there's a way to get the type of bodies (solid or shell) automatically?

WeiyiVirtonomy avatar Jun 11 '24 08:06 WeiyiVirtonomy

The shell body is also defined as "SolidBody". Only particles are distinguished as "ShellParticles" and "SolidParticles".

DongWuTUM avatar Jun 11 '24 08:06 DongWuTUM

@DongWuTUM Hi, Dong. I have renamed the repulsion forces and densities according to the type of surface contact relations. Could you take a lot at them? If it's fine with you, we can start to finalize this PR.

I still have one point to discuss: shall we unify the usage of "to" and "from" in the class naming? I was using "to contact body" and "from source body" to contact_relation and neighborhood, but it seems that in the contact force classes, we are using "from contact body" and "to source body" (ContactForceFromWall and ContactForceToWall). It can be quite confusing to the users.

WeiyiVirtonomy avatar Jun 21 '24 08:06 WeiyiVirtonomy

@DongWuTUM Hi, Dong. I have renamed the repulsion forces and densities according to the type of surface contact relations. Could you take a lot at them? If it's fine with you, we can start to finalize this PR.

I still have one point to discuss: shall we unify the usage of "to" and "from" in the class naming? I was using "to contact body" and "from source body" to contact_relation and neighborhood, but it seems that in the contact force classes, we are using "from contact body" and "to source body" (ContactForceFromWall and ContactForceToWall). It can be quite confusing to the users.

Hi Weiyi, thanks. I will have a look these days.

Yes, we should unify the usage. Using "from contact body" and "to source body" (ContactForceFromWall and ContactForceToWall) should be better.

DongWuTUM avatar Jun 21 '24 09:06 DongWuTUM

Hi Weiyi, if this PR is Okay, please inform me, and then I will have a check. And for the multi-time-step solutions, I have told Prof. Hu. He said we can arrange a meeting when he is available. I don't have time until Thursday. If I don't have to attend the meeting, I will ask for Prof. Hu's time for these two days. And what's your idea?

DongWuTUM avatar Jun 25 '24 09:06 DongWuTUM

Hi Weiyi, if this PR is Okay, please inform me, and then I will have a check. And for the multi-time-step solutions, I have told Prof. Hu. He said we can arrange a meeting when he is available. I don't have time until Thursday. If I don't have to attend the meeting, I will ask for Prof. Hu's time for these two days. And what's your idea?

Hi, Dong. I have fixed some bugs after merging the master branch and added gtests / regression tests. I have run the three new tests locally and it should be ok now, but still need to see if the CI test can pass. As for the meeting, since I might need your help in the multi-time-step research later, I prefer to meet at a time you can attend.

WeiyiVirtonomy avatar Jun 26 '24 14:06 WeiyiVirtonomy

@DongWuTUM Two problems:

  1. I determined the name of contact density and force by the type of surface contact relation. For the class ShellContactDensity, I have to change the density name to "RepulsionDensitySolidSolid", since the contact relation is SurfaceContactRelation. I would suggest to find a better way for naming or delete this class to avoid confusion. (Might be done in a follow up PR)
  2. I think the volume of source body in ContactToWall should be ParticleVolume(index_i) instead of Vol_[index_i], but by doing so the test case shell_beam_collison will fail, possibly because the reaction force acting on the shell is not enough to push it back. Could you also check this test?

WeiyiVirtonomy avatar Jun 27 '24 09:06 WeiyiVirtonomy

@DongWuTUM Hi, I have unified contact relations. Currently the namings are: The neighborhood for the contact from a solid to a solid/shell with offset_Wij correction: NeighborBuilderContactFromSolidToSolid The neighborhood for the contact from a shell to a solid/shell: NeighborBuilderContactFromShellToSolid Contact relation for unified solid/shell-solid/shell: SurfaceContactRelation The old surface contact relation using NeighborBuilderSurfaceContact: ShellSurfaceContactRelation

Please let me know if you have other naming preferences.

WeiyiVirtonomy avatar Jul 11 '24 10:07 WeiyiVirtonomy

@DongWuTUM Hi, I have unified contact relations. Currently the namings are: The neighborhood for the contact from a solid to a solid/shell with offset_Wij correction: NeighborBuilderContactFromSolidToSolid The neighborhood for the contact from a shell to a solid/shell: NeighborBuilderContactFromShellToSolid Contact relation for unified solid/shell-solid/shell: SurfaceContactRelation The old surface contact relation using NeighborBuilderSurfaceContact: ShellSurfaceContactRelation

Please let me know if you have other naming preferences.

'NeighborBuilderContactFromSolid' and 'NeighborBuilderContactFromShell' should be better?

DongWuTUM avatar Jul 11 '24 11:07 DongWuTUM

@DongWuTUM Hi, I have unified contact relations. Currently the namings are: The neighborhood for the contact from a solid to a solid/shell with offset_Wij correction: NeighborBuilderContactFromSolidToSolid The neighborhood for the contact from a shell to a solid/shell: NeighborBuilderContactFromShellToSolid Contact relation for unified solid/shell-solid/shell: SurfaceContactRelation The old surface contact relation using NeighborBuilderSurfaceContact: ShellSurfaceContactRelation Please let me know if you have other naming preferences.

'NeighborBuilderContactFromSolid' and 'NeighborBuilderContactFromShell' should be better?

How about 'NeighborBuildeSurfacerContactFromSolid' and 'NeighborBuildeSurfacerContactFromShell' to be consistent with NeighborBuilderSurfaceContact?

WeiyiVirtonomy avatar Jul 11 '24 12:07 WeiyiVirtonomy

@DongWuTUM Hi, I have unified contact relations. Currently the namings are: The neighborhood for the contact from a solid to a solid/shell with offset_Wij correction: NeighborBuilderContactFromSolidToSolid The neighborhood for the contact from a shell to a solid/shell: NeighborBuilderContactFromShellToSolid Contact relation for unified solid/shell-solid/shell: SurfaceContactRelation The old surface contact relation using NeighborBuilderSurfaceContact: ShellSurfaceContactRelation Please let me know if you have other naming preferences.

'NeighborBuilderContactFromSolid' and 'NeighborBuilderContactFromShell' should be better?

How about 'NeighborBuildeSurfacerContactFromSolid' and 'NeighborBuildeSurfacerContactFromShell' to be consistent with NeighborBuilderSurfaceContact?

Yes, it is better. Thank you.

DongWuTUM avatar Jul 11 '24 12:07 DongWuTUM