← Back to team overview

yade-users team mailing list archive

Re: [Question #402934]: SpherePack slicing

 

Question #402934 on Yade changed:
https://answers.launchpad.net/yade/+question/402934

Gary Pekmezi gave more information on the question:
Below is a minimalist script that replicates the issue I am stumbling
over.


############################################
###   DEFINING VARIABLES AND MATERIALS   ###
############################################
import math, os, sys
import numpy as np
from yade import pack

mn,mx=Vector3(0,0,0),Vector3(0.15,0.15,0.15) # corners of the packing
smallPack=30000 # number of spheres in subsample
largePack=100000 # number of spheres in large pack
psdSizes=[0.074,0.105,0.149,0.21,0.297,0.42,0.59,0.85,1.5,2,3,5,7,9,12.5]
psdCumm=[0,0.5,1.4,6.5,25,49,68.5,77.5,84,87,90,93.5,96.5,99,100]
psdSizes=[x*0.001 for x in psdSizes]
psdCumm=[x*0.01 for x in psdCumm]
consolidation_p = -5.0e6
sp=pack.SpherePack()
#######################################
###           DEFINE THE SCENE      ###
#######################################
O.materials.append(FrictMat(label='spheres'))
O.materials.append(FrictMat(frictionAngle=0,density=0,label='walls'))

walls=aabbWalls([mn,mx],thickness=0,oversizeFactor=2.0,material='walls')
wallIds=O.bodies.append(walls)

sp.makeCloud(mn,mx,num=largePack,psdSizes=psdSizes,psdCumm=psdCumm,
				distributeMass=True)
print "###      MakeCloud Done      ###"
spIndex=np.random.choice(largePack, smallPack)
spIndex.sort()
for j in spIndex:
	center, rad = sp[j]
	O.bodies.append(sphere(center,rad,material='spheres'))

print "SP effective aabb: ",sp.aabb()
print "SP relative density: ",sp.relDensity()
sys.stdout.flush()
############################
###   DEFINING ENGINES   ###
############################
triax=TriaxialStressController()          
O.engines=[
        ForceResetter(),
        InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
        InteractionLoop(
        	  [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
                  [Ip2_FrictMat_FrictMat_MindlinPhys()],
                  [Law2_ScGeom_MindlinPhys_Mindlin()],    ),
		  GlobalStiffnessTimeStepper(),
        triax,
        NewtonIntegrator(),]
# #######################################
# ###   APPLYING   PRESSURE   ###
# #######################################
triax.goal1=triax.goal2=triax.goal3=consolidation_p

for i in range(0,4):
  print 'Triax particle volume: %.9f' % triax.spheresVolume
  print 'Triax box volume: %.9f' % triax.boxVolume
  print 'Triax height: %.9f height0: %.9f' % (triax.height,triax.height0)
  print 'Triax width: %.9f width0: %.9f' % (triax.width,triax.width0)
  print 'Triax depth: %.9f depth0: %.9f' % (triax.depth,triax.depth0)
  print 'aabbExtrema: ',aabbExtrema()
  print 'aabbDim: ',aabbDim()
  for i in wallIds:
     print 'Wall ',i,' coordinates: ',O.bodies[i].state.pos
  O.step()
  sys.stdout.flush()

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.