How to arrange my cloud (1st polyhedra, 2nd spheres) stacked but not mixed?

Asked by Defri

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.

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
Jan Stránský (honzik) said :
#1

Hello,

TLTR: create cloud of polyhedrons and cloud of spheres and let it fall with gravity (together or one after the other, depending on your needs)

> they are really takes time to be loading on showing up

what does this exactly mean??
- "time" (seconds, minutes, hours)
- "to be loading"?
- "on showing up"?

> Polyhedras don't appear
> polyhedra_utils.fillBox((-5,-2,0),(5,2,0)...)

you have zero height

> In addition, the spheres is not under gravity (so it is just floating)

What does "not under gravity" and "just floating" mean?
You have defined gravity in NewtonIntegrator, so the particles are under gravity..

> 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?

what is "box/facet"?
what is the role of "rubber" here (material, shape, ...)?

cheers
Jan

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

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

Revision history for this message
Defri (daredefri) said :
#3

I am sorry for late late response..

I am considering not to use polyhedrons. Thank you anyway.