problem while generating a packing

Asked by shiv

Hello everyone,

I am trying to generate a pack of spheres for a slope made up of granite rock using this script :

from yade import pack, export, ymport
import gts, os.path, locale

def mat(): return JCFpmMat(type=1,young=1e8,poisson=0.3,frictionAngle=radians(30),density=3000,tensileStrength=1e6,cohesion=1e6,jointNormalStiffness=1e7,jointShearStiffness=1e7,jointCohesion=1e6,jointFrictionAngle=radians(20),jointDilationAngle=0.0)

#### control parameters
mesh='iit' #name f gts mesh
sizeRatio=10. # defines discretisation (sizeRatio=meshLength/particleDiameter)

#### import mesh
locale.setlocale(locale.LC_ALL,'en_US.UTF-8') #gts is locale-dependend. If, for example, german locale is used, gts.read()-function does not import floats normally
surface=gts.read(open(mesh+'.gts'))

print 'closed? ', surface.is_closed()

#### generate packing
if surface.is_closed():
 pred=pack.inGtsSurface(surface)
 # get characteristic dimensions
 aabb=pred.aabb()
 dim=pred.dim()
 center=pred.center()
 minDim=min(dim[0],dim[1],dim[2])
 # define discretisation
 radius=minDim/(2*sizeRatio)
 print center, dim, ' | minDim=', minDim, ' | diameter=', 2*radius

O.bodies.append(pack.randomDensePack(pred,radius=radius,rRelFuzz=0.3,useOBB=True,memoizeDb='/tmp/gts-triax-packings.sqlite',returnSpherePack=False,color=(0.9,0.8,0.6),material=mat))

O.bodies.append(pack.gtsSurface2Facets(surface,color=(0.8,0.8,0.8),wire=True))

#### export packing# in a text file
export.text(mesh+'_'+str(int(sizeRatio))+'.spheres')

But it is showing me this warning and any results are not generating

Best-fit oriented-bounding-box computed for GTS surface, orientation is Quaternion((1,-6.131644428895787e-125,-2.9761932039277854e-113),4.641198870949644e-197)
WARN /data/trunk/pkg/dem/SpherePack.cpp:104 makeCloud: porosity must be >0, changing it for you. It will be ineffective if rMean>0.
WARN /data/trunk/pkg/dem/Shop_01.cpp:445 PWaveTimeStep: PWaveTimeStep has not found any suitable spherical body to calculate dt. dt is set to 1.0

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

next time please try to post also "external" files (specifically the mesh+'.gts' file) such that we can try it ourselves.

For this problem, if you use spheresInCell argument of randomDensePack, i.e.
O.bodies.append(pack.randomDensePack(pred,radius=radius,rRelFuzz=0.3,useOBB=True,memoizeDb='/tmp/gts-triax-packings.sqlite',returnSpherePack=False,color=(0.9,0.8,0.6),material=mat,spheresInCell=300))
, does it help?

cheers
Jan

Revision history for this message
shiv (shivpreet.ce15) said :
#2

No, it doesn't help me.The same problem is occurring which I have mentioned before. My yade get stuck in the processing and later on, I have to quit the processing.

LInk for GTS:https://drive.google.com/file/d/1BtwHfgojSKCLCTtMB9ISpiPtmvFNUHBP/view?usp=sharing

Revision history for this message
Best Jan Stránský (honzik) said :
#3

Thanks for the gts file.
I have tries it without useOBB and it works fine:

O.bodies.append(pack.randomDensePack(pred,radius=radius,rRelFuzz=0.3,memoizeDb='/tmp/gts-triax-packings.sqlite',returnSpherePack=False,color=(0.9,0.8,0.6),material=mat,spheresInCell=300))

please try it and let us know.

cheers
Jan

Revision history for this message
shiv (shivpreet.ce15) said :
#4

Thanks Jan Stránský, that solved my question.