yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #25272
[Question #696098]: How to arrange my cloud (1st polyhedra, 2nd spheres) stacked but not mixed?
New question #696098 on Yade:
https://answers.launchpad.net/yade/+question/696098
Dear All,
I am trying to create a cloud array/stack, from Polyhedra, then Spheres, but my problem is they are really takes time to be loading on showing up, and unfortunately only Spheres appeared and Polyhedras don't appear. In addition, the spheres is not under gravity (so it is just floating).
Could you help me how to create it?
and if I want to add rectangular plate such as rubber in the middle of cloud array (still inside the box/facet), is that possible? How to make it so?
Here is my existing code:
##Sphere Cylinder pack
from yade import pack,plot,utils,export
import math
from pylab import rand #for sand color
from yade import polyhedra_utils,export
#export.textPolyhedra('/tmp/textPolyhedra.txt')
##Polyhedra
#p=PolyhedraMat()
#p.density=2600 #kg/m^3
#p.young=1e7 #Pa
#p.poisson=.2
#p.frictionAngle=18 #rad
polyhedra_utils.fillBox((-5,-2,0),(5,2,0),defaultMaterial(),sizemin=(1,1,.5),sizemax=(.7,.7,.4),seed=4)
##Sand
O.bodies.append(geom.facetBox((0,0,0),(5,2,3),wallMask=31))
sp=pack.SpherePack()
sp.makeCloud((-5,-2,-3),(5,2,0),rMean=.14,rRelFuzz=.1,num=3000)
sp.toSimulation(color=(0.6+0.15*rand(),0.5+0.15*rand(),0.15+0.15*rand()))
##Define material of the grains
b=O.bodies[0]
b.state.blockedDOFs='xyzXYZ'
b.state.vel=(0,0,0)
O.materials.append(FrictMat(young=1e7,poisson=.3,density=2700,frictionAngle=18))
boulder=O.bodies[0]
##Make a floor
O.bodies.append(wall((0,0,-3),axis=2))
##Engines and Constitutive Law
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Polyhedra_Aabb()],[Bo1_Sphere_Aabb(),Bo1_Facet_Aabb(),Bo1_Wall_Aabb()]),
InteractionLoop([Ig2_Wall_Polyhedra_PolyhedraGeom(), Ig2_Polyhedra_Polyhedra_PolyhedraGeom(), Ig2_Facet_Polyhedra_PolyhedraGeom()],
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom(),Ig2_Wall_Sphere_ScGeom()],
[Ip2_PolyhedraMat_PolyhedraMat_PolyhedraPhys()],[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_PolyhedraGeom_PolyhedraPhys_Volumetric()],[Law2_ScGeom_FrictPhys_CundallStrack()]),
NewtonIntegrator(damping=.3,gravity=[0,0,-9.81]),
PyRunner(command='checkUnbalanced()',iterPeriod=1100,label='checker'),
# PyRunner(command='stress_rad1()')
#VTKRecorder(fileName='tes',recorders=['all'],iterPeriod=100),
]
O.dt=.9*PWaveTimeStep()
def checkUnbalanced():
if O.iter<1000:return # at the very start, unbalanced force can be low as there is only few contacts, but it does not mean the packing is stable
O.materials.append(FrictMat(young=1e8,poisson=0.2,density=2700,frictionAngle=25))
O.bodies.append(utils.sphere(center=(0,0,5),radius=2,color=[0,1,1]))
O.bodies[0].state.mass=2000
checker.command='unloadBoulder()'
def unloadBoulder():
abs(O.forces.f(boulder.id))
O.saveTmp()
Thank you in advance.
Best regards.
--
You received this question notification because your team yade-users is
an answer contact for Yade.