← Back to team overview

yade-users team mailing list archive

[Question #404361]: using randomDensePack meets error

 

New question #404361 on Yade:
https://answers.launchpad.net/yade/+question/404361

I am trying to make a mound using pack.randomDensePack, but a mistake is met.The script and the error noticeis shown below.Can you help me?


from yade import pack
from yade import plot

densitytu=float(1600)
youngtu=100e6
potu=0.4
frictionAngletu= float(atan(0.32))
sigmaT=1e3
epsCrackOnset=1e-4
relDuctility=30
globals()['densitytu']=locals()['densitytu']
globals()['youngtu']=locals()['youngtu']
globals()['potu']=locals()['potu']
globals()['frictionAngletu']=locals()['frictionAngletu']
globals()['sigmaT']=locals()['sigmaT']
globals()['epsCrackOnset']=locals()['epsCrackOnset']
globals()['relDuctility']=locals()['relDuctility']

densitydao=8000
youngdao=209e9
podao=0.29
frictionAngledao=float(atan(0.7))
globals()['densitydao']=locals()['densitydao']
globals()['youngdao']=locals()['youngdao']
globals()['podao']=locals()['podao']
globals()['frictionAngledao']=locals()['frictionAngledao']

rParticle=float(2e-3)
rRelFuzz=float(1.75/8.75)*1.5
globals()['rParticle']=locals()['rParticle']
globals()['rRelFuzz']=locals()['rRelFuzz']


tux1=1
tuy1=1
tuz1=1
tux2=0
tuy2=0
tuz2=0
globals()['tux1']=locals()['tux1']
globals()['tux2']=locals()['tux2']
globals()['tuy1']=locals()['tuy1']
globals()['tuy2']=locals()['tuy2']
globals()['tuz1']=locals()['tuz1']
globals()['tuz2']=locals()['tuz2']


tu=O.materials.append(CpmMat(density=densitytu,young=youngtu,poisson=potu,frictionAngle=frictionAngletu,sigmaT=sigmaT,epsCrackOnset=epsCrackOnset,relDuctility=relDuctility,label='tuti'))

dao=O.materials.append(FrictMat(density=densitydao,young=youngdao,poisson=podao,frictionAngle=frictionAngledao,label='daop'))

pred1=pack.inAlignedBox((tux1,tuy1,tuz1),(tux2,tuy2,tuz2))
sp=SpherePack()
sp=pack.randomDensePack(pred1,spheresInCell=2000,radius=rParticle,rRelFuzz=rRelFuzz,memoizeDb='/home/dj/yade/tmp/tuti.sqlite',returnSpherePack=True)
spheres=sp.toSimulation(color=(0,1,1),material=tu)


-------------------------------------------------------
ValueError                                Traceback (most recent call last)
/home/dj/yade/install/bin/yade in <module>()
----> 1 sp=pack.randomDensePack(pred1,spheresInCell=2000,radius=rParticle,rRelFuzz=rRelFuzz,memoizeDb='/home/dj/yade/tmp/tuti.sqlite',returnSpherePack=True)

/home/dj/yade/install/lib/i386-linux-gnu/yade-2016.06a/py/yade/pack.py in randomDensePack(predicate, radius, material, dim, cropLayers, rRelFuzz, spheresInCell, memoizeDb, useOBB, memoDbg, color, returnSpherePack)
    474         O.switchScene() ### !!
    475         _memoizePacking(memoizeDb,sp,radius,rRelFuzz,wantPeri,fullDim)
--> 476         if wantPeri: sp.cellFill(Vector3(fullDim[0],fullDim[1],fullDim[2]))
    477         if orientation:
    478                 sp.cellSize=(0,0,0); # reset periodicity to avoid warning when rotating periodic packing

ValueError: Repeat count components must be positive.


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