problem using the hopper example with smaller particles

Asked by rhaven

Hi,
Using the clump-hopper-test located at trunk/examples/clumps/clump-hopper-test.py, I have tried modifying it to work with smaller particles. I am using this example to test out the timestep required for simulating gravity deposition of nanometer sized particles. I have modified the example to use a scaling factor, which allows the generated geometry to be scaled down. My plan is to scale everything down to 1e-6. However, no matter the timestep used, the particles pass right through the facetbox. Even with a timestep of 5e-09, where the particles hardly move, the particles pass right through.

Is it possible to run this gravity simulation with small (50e-09) particles? Reducing the timestep even further doesnt seem to be the way to go here.

Your help always appreciated
Jesse

The script I have pasted below.

from yade import pack,export,qt,geom
import itertools
from numpy import *

scalefac = 1e-6 #be careful of timestep

kinEnergyMax = 100000
# Parameters
tc=0.001# collision time
en=.3 # normal restitution coefficient
es=.3 # tangential restitution coefficient
frictionAngle=radians(35)#
density=2700
# facets material
facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,tc=tc,en=en,et=es))
# default spheres material
dfltSpheresMat=O.materials.append(ViscElMat(density=density,frictionAngle=frictionAngle,tc=tc,en=en,et=es))

#O.dt=.05*tc # time step
O.dt=.05*tc * 1e-3# time step
#O.dt= 1e-09

Rs=0.05 # particle radius

# Create geometry

x0=0.; y0=0.; z0=0.; ab=.7; at=2.; h=1.; hl=h; al=at*3

Rs *= scalefac
ab *= scalefac
at *= scalefac
h *= scalefac

zb=z0; x0b=x0-ab/2.; y0b=y0-ab/2.; x1b=x0+ab/2.; y1b=y0+ab/2.
zt=z0+h; x0t=x0-at/2.; y0t=y0-at/2.; x1t=x0+at/2.; y1t=y0+at/2.
zl=z0-hl;x0l=x0-al/2.; y0l=y0-al/2.; x1l=x0+al/2.; y1l=y0+al/2.

vibrationPlate = O.bodies.append(geom.facetBunker((x0,y0,z0),
  dBunker=ab*4.0,dOutput=ab*1.7,hBunker=ab*3,hOutput=ab,hPipe=ab/3.0,
  wallMask=4,segmentsNumber=10))#,material=facetMat))

# Create engines
O.engines=[
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
  [Ip2_ViscElMat_ViscElMat_ViscElPhys()],
  [Law2_ScGeom_ViscElPhys_Basic()],
 ),
 DomainLimiter(lo=(-4,-4,-1),hi=(4,4,4),iterPeriod=5000,label='domLim'),
 NewtonIntegrator(damping=0, gravity=[0,0,-9.81]),
 PyRunner(iterPeriod=6500,command='addBodies()',nDo=7,label='addb'),
 PyRunner(iterPeriod=1000,command='state()',label='state'),
]

numSphereGen = 0
def addBodies():
 global numSphereGen
 # Create clumps...
 clumpColor=(0.0, 0.5, 0.5)
 for k,l in itertools.product(arange(0,10),arange(0,10)):
  #clpId,sphId=O.bodies.appendClumped([sphere(Vector3(x0t+Rs*(k*4+2),y0t+Rs*(l*4+2),i*Rs*2+zt+ab*3),Rs,color=clumpColor,material=dfltSpheresMat) for i in xrange(4)])
  clpId,sphId=O.bodies.appendClumped([sphere(Vector3(x0t+Rs*(k*4+2),y0t+Rs*(l*4+2),i*Rs*2+zt+ab*3),Rs,color=clumpColor) for i in xrange(4)])
  numSphereGen += len(sphId)

 # ... and spheres
 spheresColor=(0.4, 0.4, 0.4)
 for k,l in itertools.product(arange(0,9),arange(0,9)):
  #sphAloneId=O.bodies.append( [sphere( Vector3(x0t+Rs*(k*4+4),y0t+Rs*(l*4+4),i*Rs*2.3+zt+ab*3),Rs,color=spheresColor,material=dfltSpheresMat) for i in xrange(4) ] )
  sphAloneId=O.bodies.append( [sphere( Vector3(x0t+Rs*(k*4+4),y0t+Rs*(l*4+4),i*Rs*2.3+zt+ab*3),Rs,color=spheresColor) for i in xrange(4) ] )
  numSphereGen += len(sphAloneId)

 #O.bodies.updateClumpProperties(discretization=10)# correct mass, volume, inertia!!

def state():
 global numSphereGen
 print "Iter %d: Total number of generated spheres %d, removed particles %d, current particles %d, kinEnergy %g"%(O.iter, numSphereGen, domLim.nDeleted, numSphereGen-domLim.nDeleted, utils.kineticEnergy())
 if (utils.kineticEnergy() > kinEnergyMax):
  print "Kinetic energy is over a threshold value! Error!"

addBodies()

from yade import qt
qt.View()
O.saveTmp()

#O.run(50001)

Question information

Language:
English Edit question
Status:
Answered
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,

I have tried your script and in GUI I see real interactions between spheres and facets. So interactions are there, but probably the force is too low. I don't know the ViscElMat, but I would expect also collision time to be scaled..

cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask rhaven for more information if necessary.

To post a message you must log in.