New question #680203 on Yade:
https://answers.launchpad.net/yade/+question/680203
Hi, all.
Now I'm trying to use the cluster to do some simulation work. But there seem
some errors.
Actually, the cluster can run for one of my scripts, but when I add another two
line codes, this cluster can't work. There will be an error pop up.
here is my script:
from yade import pack, plot
from yade import utils
compFricDegree = 30
targetPorosity = 0.98
stabilityThreshold=0.3
finalFricDegree=19.5
damp=0.8
young=4e8
O.materials.append(CohFrictMat(young=young,poisson=0.3,frictionAngle=radians(compFricDegree),isCohesive=False,alphaKr=0.2,alphaKtw=0,etaRoll=0.5,momentRotationLaw=True,density=2648,label='spheres'))
O.materials.append(FrictMat(young=young,poisson=0.3,frictionAngle=0,density=0,label='walls'))
mn,mx=Vector3(0,0,0),Vector3(400e-3,400e-3,300e-3)
psdSizes,psdCumm =
[3e-3,3.48e-3,3.98e-3,4.41e-3,4.78e-3,5.12e-3,5.53e-3,6.09e-3,7.37e-3,9.47e-3],[0.,0.11,0.22,0.33,0.44,0.56,0.67,0.78,0.89,1.0]
sp = pack.SpherePack()
sp.makeCloud(mn,mx,psdSizes=psdSizes,psdCumm=psdCumm,num=50026,distributeMass=1,seed=1)
pred=pack.inCylinder((200e-3,200e-3,0),(200e-3,200e-3,300e-3),radius=200e-3)
sp2 = pack.filterSpherePack(pred,sp,returnSpherePack=True)
sp2.toSimulation(material='spheres')
facets =
geom.facetCylinder((200e-3,200e-3,150e-3),200e-3,300e-3,wallMask=6,material='walls',segmentsNumber=100)
O.bodies.append(facets)
print "num_spheres= ", len(O.bodies)
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack(),Law2_ScGeom6D_CohFrictPhys_CohesionMoment(useIncrementalForm=True,always_use_moment_law=True,label='cohesiveLaw')]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.8),
NewtonIntegrator(gravity=(0,0,-9.81),damping=damp),
]
O.dt=.5*PWaveTimeStep()
while 1:
O.run(3000,True)
unb=unbalancedForce()
print 'unbalanced force: ',unb
if unb<stabilityThreshold:
break
O.save('make_sample_1.yade.gz')
O.saveTmp()
#####################
if I didn't include these two lines:
#pred=pack.inCylinder((200e-3,200e-3,0),(200e-3,200e-3,300e-3),radius=200e-3)
#sp2 = pack.filterSpherePack(pred,sp,returnSpherePack=True)
and change :sp2.toSimulation(material='spheres') to
sp.toSimulation(material='spheres')
the cluster can run this script.
if I run the script that I posted. Here is the error:
TCP python prompt on localhost:9000, auth cookie `cdseya'
Welcome to Yade 2018.02b
XMLRPC info provider on http://localhost:21000
Running script make-sample.py
Traceback (most recent call last):
File "/packages/7x/yade/2018.02b/bin/yade-2018.02b", line 182, in runScript
execfile(script,globals())
File "make-sample.py", line 16, in <module>
sp2 = pack.filterSpherePack(pred,sp,returnSpherePack=True)
File "/packages/7x/yade/2018.02b/lib64/yade-2018.02b/py/yade/pack.py", line
373, in filterSpherePack
if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]:
warnings.warn("Packing's dimension (%s) doesn't fully contain dimension of the
predicate (%s)."%(dimS,dimP))
TypeError: No registered converter was able to produce a C++ rvalue of type
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
from this Python object of type str
=================== JOB SUMMARY ================
id : make-sample.py.default
status : 256 (FAILED)
duration: 00:00:04
command : YADE_BATCH= DISPLAY= /packages/7x/yade/2018.02b/bin/yade-2018.02b
--threads=1 --nice=10 -x make-sample.py> make-sample.py.default.log 2>&1
started : Thu Apr 11 17:02:03 2019
finished: Thu Apr 11 17:02:08 2019
Is there anyone can help me to figure out the reason why I just add that two
line codes, this script can't work.
--
You received this question notification because your team yade-users is
an answer contact for Yade.
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp