← Back to team overview

yade-users team mailing list archive

Re: [Question #679762]: 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

 

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

procrastinator gave more information on the question:
In my own computer, the version of the operating system is Ubuntu
10.04LTS and the version of YADE is 2018.02b. while the version of the
operating system in the cluster is CentOS Linux release 7.4.1078 (Core),
the version of YADE is 2019.01a.

Here is the script:

from yade import pack,qt, plot
qt.View()
qt.Controller()
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()

Is there is anyone can help me?

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