yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25537
[Question #697089]: facets erase time
New question #697089 on Yade:
https://answers.launchpad.net/yade/+question/697089
Hello,
following a previous post on how to erase the faces of a cylinder, I managed to do it using the recommended function O.bodies.erase () . This works perfectly without problems, except when I have a lot of particles in the system. In this case, when reaching the imposed condition the system freezes for a while (about 1 hour) and then continues as usual (deleting the cylinder facets). I don't know if this is normal, or I am making a basic error. Maybe there is a way to optimize this easily.
--------------
CODE
--------------
...
cylinderFacetsIds = O.bodies.append(geom.facetCylinder((0,0,-0.5),0.25,3.0,segmentsNumber=30, wallMask=4))
sp=pack.SpherePack()
sp.makeCloud((-0.2,-0.2,-0.5),(0.2,0.2,1.0),rMean=0.03,rRelFuzz=0.1)
pred=pack.inCylinder((0.0,0.0,-4.0),(0.0,0.0,1.5),radius=0.2)
sp2 = pack.filterSpherePack(pred,sp,returnSpherePack=True)
# add the sphere pack to the simulation
sp2.toSimulation(material='sphereMat')
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
# handle sphere+sphere and facet+sphere collisions
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0,0,-9.81),damping=0.2),
# call the checkUnbalanced function
PyRunner(iterPeriod=1,command='checkUnbalanced()')
]
def checkUnbalanced():
if O.iter==15000:
for f in cylinderFacetsIds:
O.bodies.erase(f)
------------------------------------------------------------------------------------------------
--
You received this question notification because your team yade-users is
an answer contact for Yade.