BoxFactory for creating spheres on periodic conditions

Asked by Andres Escobar

Hello,

I recently added periodic boundaries to my simulation, in which I have a granular flow on an inclined plane. For this reason I have a reservoir that is filled with spheres so my incoming flow is steady. Previously I used the following boxfactory command on the engines to generate spheres as observed here:

BoxFactory(maxParticles=-1,center=(lr/2,0,(hr+hc)/2),extents=(lr/2,wc/2,(hc-hr)/2),rMin=d-disp,rMax=d+disp,vMin=0.5,vMax=0.5,vAngle=0,massFlowRate=1000,normal=(0,0,-1),materialId=sphereMat,stopIfFailed=False,silent=True,maxAttempt=3,label='BoxFact')

Yet I obtain the following error:
In [1]: <FATAL ERROR> ThreadRunner:35 void yade::ThreadRunner::run(): Exception occured:
InsertionSortCollider::probeBoundingVolume: handling periodic boundary not implemented.

I skipped this problem by creating a function that checks if the reservoir is getting empty every few steps, if it's empty I would manually add more. However, since I need to ensure a constant flow I need to add a huge quantity of spheres(Otherwise this would influence the results), making the script very inefficient.

Based on this, does an alternative to this command exists that could work in periodic conditions?
Thank you very much in advance for any help or suggestions that could exist!

If it helps, I assume my current version of yadedaily wouldn't be a problem. This is my version as for the startup message:
Welcome to Yade 20210306-5036~03fcf2d~focal1
Using python version: 3.8.5 (default, May 27 2021, 13:30:53)

Since the error message involves "insertionSortcollider" here's my engines setup:

O.engines=[
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],allowBiggerThanPeriod=True),
   InteractionLoop(
# handle sphere+sphere and box+sphere collisions
   [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
   [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
   [Law2_ScGeom_ViscElPhys_Basic()]),
   NewtonIntegrator(gravity=(g*sin(slope),0,-g*cos(slope)), damping=0),
]

Question information

Language:
English Edit question
Status:
Expired
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

To rephrase what your computer already told you:

- use of BoxFactory involves a hidden call to InsertionSortCollider::probeBoundingVolume [*]

- that function does not support periodic boundaries [**]

=> you indeed need an alternative script, or to modify source code and extend InsertionSortCollider::probeBoundingVolume to periodic boundaries (which would improve Yade)

[*] https://gitlab.com/yade-dev/trunk/-/blob/a37d9fd2f20f102fd277ac6aaaf52df8fbeb18f0/pkg/dem/SpheresFactory.cpp#L151 current version
[**] https://gitlab.com/yade-dev/trunk/-/blob/a37d9fd2f20f102fd277ac6aaaf52df8fbeb18f0/pkg/common/InsertionSortCollider.cpp#L193

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Andres Escobar (afer95) said :
#3

Hi Jérôme,

I did finally work on a function that performs the same task without any problems, thanks for your help with letting me know the source of the problem!
Finally, I apologize for my late reply since I did read this earlier but I was convinced I had answered.
Best,

Andrés