New question #700470 on Yade: https://answers.launchpad.net/yade/+question/700470
Hi all, I am creating BoxFactory inside O.engines., but getting the following error: + singularity run /beegfs/common/singularity/yade/yade_debian_bookwarm_1.0.sif yade -j80 Densidade_boxfactory.py /usr/lib/x86_64-linux-gnu/yade/py/yade/__init__.py:76: RuntimeWarning: to-Python converter for boost::shared_ptr<yade::PartialSatClayEngine> already registered; second conversion method ignored. boot.initialize(plugins,config.confDir) TCP python prompt on localhost:9000, auth cookie `akcdsy' Welcome to Yade 2021.01a Using python version: 3.9.7 (default, Sep 24 2021, 09:43:00) [GCC 10.3.0] Warning: no X rendering available (see https://bbs.archlinux.org/viewtopic.php?id=13189) XMLRPC info provider on http://localhost:21000 Running script Densidade_boxfactory.py python3.9: ./pkg/common/InsertionSortCollider.hpp:127: yade::InsertionSortCollider::Bounds& yade::InsertionSortCollider::VecBounds::operator[](long int): Assertion `idx < long(size()) && idx >= 0' failed. Here is the script I am running in singularity: #!/usr/bin/python # -*- coding: utf-8 -*- #unidades milimetros, s, Pa, milimetros3/kg, kg #Forca normal lei de contato coesao e atrito from yade import plot from yade import ymport from yade import bodiesHandling from yade import export from yade import utils import pylab # Spheres ceasa=O.materials.append(JCFpmMat(type=1,young=5e6,poisson=0.3,frictionAngle=radians(0),density=300,tensileStrength=0,cohesion=0,jointNormalStiffness=0,jointShearStiffness=0,jointCohesion=0,jointFrictionAngle=radians(0),jointDilationAngle=0.0,label='spheres1')) #O.materials.append(JCFpmMat(type=1,young=70e4,poisson=0.3,frictionAngle=radians(30),density=800,tensileStrength=20e2,cohesion=20e2,jointNormalStiffness=1e5,jointShearStiffness=1e5,jointCohesion=20e2,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres2')) O.materials.append(FrictMat(young=10e6,poisson=0.3,frictionAngle=radians(0),density=1000,label='walls')) mn,mx=Vector3(0,0,0),Vector3(0.01,0.01,0.01) mnbox,mxbox=Vector3(0,0,0),Vector3(0.01,0.015,0.01) walls=aabbWalls([mnbox,mxbox],thickness=0,material='walls') wallIds=O.bodies.append(walls) #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],verletDist=.05*.0025), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=-1),Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Matrix", recordCracks=False),Law2_ScGeom_FrictPhys_CundallStrack()] ), NewtonIntegrator(damping=0.3,gravity=(0,-9.81,0)), # BoxFactory(maxParticles=120,extents=(0.005,0.005,0.0005),center=(0.005,0.009,0.005),rMin=0.0002,rMax=0.0002,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00002,normal=(0,-1,0),label='factory1',materialId=ceasa), #BoxFactory(maxParticles=110,extents=(0.005,0.005,0.001),center=(0.005,0.0105,0.005),rMin=0.0007,rMax=0.0007,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00075,normal=(0,-1,0),label='factory2',materialId=ceasa), #BoxFactory(maxParticles=44,extents=(0.005,0.005,0.0015),center=(0.005,0.013,0.005),rMin=0.0012,rMax=0.0012,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00155,normal=(0,-1,0),label='factory3',materialId=ceasa), BoxFactory(maxParticles=4000,extents=(0.005,0.005,0.0015),center=(0.005,0.0115,0.005),rMin=0.0002,rMax=0.0002,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00007,normal=(0,-1,0),label='factory1',materialId=ceasa), BoxFactory(maxParticles=1000,extents=(0.005,0.005,0.0015),center=(0.005,0.0115,0.005),rMin=0.0003,rMax=0.0003,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00016,normal=(0,-1,0),label='factory2',materialId=ceasa), BoxFactory(maxParticles=100,extents=(0.005,0.005,0.0015),center=(0.005,0.0115,0.005),rMin=0.0005,rMax=0.0005,vMin=0.50,vMax=0.80,vAngle=0,massFlowRate=0.00025,normal=(0,-1,0),label='factory3',materialId=ceasa), PyRunner(iterPeriod=10000,command='a()'), GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.5), ] def a(): VPi=utils.voxelPorosity(200,(0,0,0),(0.01,0.01,0.01)) #Precisa definir o vertice inferior e superior que esta dentro do tambor(0.0025,0.0015,0.0025),(0.0075,0.0065,0.0075) a=factory1.numParticles+factory2.numParticles+factory3.numParticles unb=unbalancedForce() #print(factory1.numParticles,factory1.numParticles*100/a, factory2.numParticles, factory2.numParticles*100/a, factory3.numParticles,factory3.numParticles*100/a, VPi,unb) if factory1.numParticles>=factory1.maxParticles and factory2.numParticles>=factory2.maxParticles and factory3.numParticles>=factory3.maxParticles and unb<0.02: # O.save('inital'+key+'.yade.gz') export.text("matrix_v1.txt") O.pause() O.run(5000000,True) -- 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 : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp