Clumps made of overlapping spheres

Asked by daalgi

Hi everyone!

I'm trying to model railway ballast particles by means of overlapping spheres. Since the spheres overlap I guess the overlapping space computes as double density, that is, the total mass of the clump is equal to the sum of each particle. Also, the inertia of the clump would be wrong. Am I right? If so, is there any function implemented in Yade or any other way to take this into account and correct both the mass and the inertia of the clump?

Thanks in advance!!

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
daalgi
Solved:
Last query:
Last reply:
Revision history for this message
tranviet (tranviet2302) said :
#1

Hi,

I think you can check the codes written in C++ to see. You can also modify the codes to what you need. It is not challenging.

Regards,

Viet

Revision history for this message
daalgi (dag49) said :
#2

Thank you tranviet for your reply. I'm newbie using Yade with no experience at all. I would appreciate a more specific answer.

Revision history for this message
tranviet (tranviet2302) said :
#3

Hi,

You can follow the YADE documnetation:

https://yade-dem.org/doc/formulation.html#clumps-rigid-aggregates

Viet

Revision history for this message
daalgi (dag49) said :
#4

Thank you tranviet. I'll try to follow the documentation.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#5

If the mass that is computed by default is not good, you can always compute it on your side and assign it to the clump. This doesn't need to modify the c++ code, simply some python scripting.
The same remark holds for inertia tensor.

Revision history for this message
daalgi (dag49) said :
#6

Thank you Bruno for your reply. Your approach sounds easier than modifying the c++ code. I'll try to solve my problem this way.

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#7

hi,

You can also try recently included methods (available soon) utils.clumpTemplate() and O.bodies.replaceByClumps(), which is very useful, if you want to model ballast! After an update you will find an example script here: examples/clumps/replaceByClumps-example.py.
There the mass is corrected via clump volume (which is not sum of sphere volumes in case of overlaps).
Also you can test the new code. ;)

Cheers,

Christian.

Revision history for this message
daalgi (dag49) said :
#8

Hi Christian, thank you for your reply. I'd like to apologize, I haven't been able to continue with this project for a few months, so I couldn't try to solve it.

Right now I'm trying to check the new methods implemented in Yade about clumps to create a ballast particle by means of overlapping spheres. Since I have to consider more than 2 overlaps I can only use the adaptClumpMasses method. I'm trying to check it through simple tests that I expected to have equal mass and inertia:
- Test1 (simple particle):
     sphere1=utils.sphere([0,0,0],2)
- Test2 (clump1):
     sphere2=utils.sphere([0,0,0],2)
     sphere3=utils.sphere([0,0,0],1)
     clump1=O.bodies.appendClumped(sphere2,sphere3)
     O.bodies.adaptClumpMasses([],10000000)
- Test3 (clump2):
     sphere4=utils.sphere([0,0,0],2)
     sphere5=utils.sphere([0,0.5,0],1)
     clump2=O.bodies.appendClumped(sphere4,sphere5)
     O.bodies.adaptClumpMasses([],10000000)
Resulting:
     mass_sphere1 = mass_clump1 = mass_clump2
     inertia_sphere1 ≠ inertia_clump1 ≠ inertia_clump2
Is that wrong? Does the adaptClumpMasses method take into account the overlapping correctly to calculate the inertia?

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#9

>Resulting:
> mass_sphere1 = mass_clump1 = mass_clump2
> inertia_sphere1 ≠ inertia_clump1 ≠ inertia_clump2
>Is that wrong? Does the adaptClumpMasses method take into account the overlapping
>correctly to calculate the inertia?

I do not see any problem.

sphere2 = sphere4
sphere3 is completely inside sphere2 and sphere 5 is completely inside sphere4, so they have to have same clump masses.
if densities for all spheres are equal, the sphere1 should also have the same mass as both of the clumps.
that leads to:
mass_sphere1 = mass_clump1 = mass_clump2

inertia is not calculated correctly in this case, because for clumps it is calculated as sum of all inertias of clump members, so inertia_sphere1 should be different from inertia_clump1 and inertia_clump2.
in your case inertia for clumps is calculated too high. maybe some day this will be fixed/improved ...
the inertia of both clumps should be also different, because their geometry is different (different balance point of masses)

regards,

christian

Revision history for this message
daalgi (dag49) said :
#10

All right! Thank you Christian. As the Yade documentation says about the adaptClumpMasses method that "Adapt clump masses and inertia via deterministic Monte-Carlo algorithm" I thought the inertia was calculated correctly. But that's what I found out, that the inertia of the clump is calculated as the sum of spheres.

Revision history for this message
Christian Jakob (jakob-ifgt) said :
#11

Yes, inertia is "adapted", not "correctly calculated". for small overlapping spheres inertia with adaptClumpMasses() is "better", than without adaptClumpMasses().
masses should be correct btw.

Revision history for this message
daalgi (dag49) said :
#12

Thanks Christian. Now I see how it works. I'll try to introduce the inertia manually.