SPHinXsys
SPHinXsys copied to clipboard
Feature/shell contact using ghost particle
The previous PR was closed due to the incorrect merge.
TODO:
- Add test cases back
- Check sliding under different resolutions of solid and shell
@DongWuTUM Hi Dong, I opened a new PR for contact. I'll add the deleted test cases back later this week.
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 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!
@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 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!!!
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?
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.
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:
Refining dp to thickness / 8.0, the hourglass effect disappears as shown above.
Great!!!
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):
With dp = 0.25m (10 particles per diameter):
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.
The weird shape exists even with resolution refinement.
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
With relaxation, no shell damping
Shape is much better, but pressure is not so uniform at the bottom, max velocity of shell~0.1
With relaxation, with shell damping
Uniform pressure distribution, max velocity of shell~0.003
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.
The result with shell damping looks good.
@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?
@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 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?
The shell body is also defined as "SolidBody". Only particles are distinguished as "ShellParticles" and "SolidParticles".
@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.
@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
andneighborhood
, but it seems that in the contact force classes, we are using "from contact body" and "to source body" (ContactForceFromWall
andContactForceToWall
). 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.
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 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.
@DongWuTUM Two problems:
- 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) - I think the volume of source body in
ContactToWall
should beParticleVolume(index_i)
instead ofVol_[index_i]
, but by doing so the test caseshell_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?
@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.
@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 usingNeighborBuilderSurfaceContact
:ShellSurfaceContactRelation
Please let me know if you have other naming preferences.
'NeighborBuilderContactFromSolid' and 'NeighborBuilderContactFromShell' should be better?
@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 usingNeighborBuilderSurfaceContact
: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
?
@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 usingNeighborBuilderSurfaceContact
: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.