New question #683109 on Yade: https://answers.launchpad.net/yade/+question/683109
Hi, i try to do some simulation about particle packing behavior in a rotating drum. However the iteration speed is so low as about 30 iterations per second. Nevertheless, at the beginning when the particles are far from each, the iteration speed is 500 iter/s, no matter with -j2 or without prescribed -j parameter. ## Below is my code, from yade import pack,geom,utils import numpy as np from yade import qt ### the unit in the simulation is UI, like kg m s Pa ### the particle has diameter below 100 microns muS = 0.57 muF = 0.9 FricAngleS = math.atan(muS) FricAngleF = math.atan(muF) density = 8150 yongmodu = 195e5 ## scaled by 1e-4, normal value is 195Gpa poisn = 0.3 Dsph = 80e-6 ## particle max diameter angvelsw = -25 ## rotation speed rad/s nrot = 6 ## rotation times matSph = CohFrictMat(density=density, young=yongmodu, poisson=poisn, frictionAngle=FricAngleS, momentRotationLaw=True) SMat = O.materials.append(matSph) matFacet = CohFrictMat(density=density, young=yongmodu, poisson=poisn, frictionAngle=FricAngleF, momentRotationLaw=True) FMat = O.materials.append(matFacet) ### geometry ### radiusSweeper = 10*Dsph radiusSweeper0 = 9*Dsph lengthSweeper = 12*Dsph numSweeperParts = int(round(2*np.pi*radiusSweeper/5.0e-6)) ## spheres ## O.bodies.clear() sp = pack.SpherePack() x1, y1, z1 = -radiusSweeper, 0, 0 x2, y2, z2 = radiusSweeper, lengthSweeper, 2*radiusSweeper sp.makeCloud((x1, y1, z1), (x2, y2, z2), psdSizes=[0.010e-3,0.024e-3,0.035e-3,0.051e-3,0.085e-3], psdCumm=[0,0.1,0.5,0.9,1.0]) sp.toSimulation(material=SMat) ## drum ## Sweeper=[] for i in np.linspace(0, 2*pi, num=numSweeperParts, endpoint=True): Sweeper.append(Vector3(radiusSweeper*cos(-i), 0.0, radiusSweeper*sin(-i)+radiusSweeper)) SweeperP=[Sweeper, [p+Vector3(0.0,lengthSweeper,0.0) for p in Sweeper]] SweeperPoly = pack.sweptPolylines2gtsSurface(SweeperP, threshold=1e-7) sweeperid = O.bodies.append(pack.gtsSurface2Facets(SweeperPoly, wire=False, material=FMat)) boxid = O.bodies.append(geom.facetBox((0,0.5*lengthSweeper,radiusSweeper),(radiusSweeper,0.5*lengthSweeper,radiusSweeper), \ wallMask=63, material=FMat, wire=True)) ## remove the spheres out of the drum ## for eb in O.bodies: if isinstance(eb.shape, Sphere): xi,yi,zi = eb.state.pos lengi = np.sqrt(xi**2 + (zi-radiusSweeper)**2) if lengi > 0.96*radiusSweeper: O.bodies.erase(eb.id) ## total sphere is 6691, facet is 2020 ### define engines functions ### t1 = 0.1 t2 = t1+nrot*(2*np.pi/abs(angvelsw)) t3 = t2+0.1 def change_motion(): if O.time > t1: rotaEngineSw.dead = False rotaEngineSw.angularVelocity = angvelsw if O.time > t2: rotaEngineSw.angularVelocity = 0.0 O.engines=[ ForceResetter(), InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Facet_Sphere_ScGeom6D()], [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()], [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()] ), PyRunner(iterPeriod=int(1.0e6),command='change_motion()'), RotationEngine(dead=True, label='rotaEngineSw', rotateAroundZero=True, zeroPoint=(0,0,radiusSweeper), angularVelocity=angvelsw, rotationAxis=[0,1,0], ids=sweeperid), NewtonIntegrator(damping=0.75, exactAsphericalRot=True, gravity=(0,0,-9.81)), ] O.dt = 0.85*utils.PWaveTimeStep() O.run() ## the hardware ## Ubuntu 18.04 on VMware 14.0 with 8 processors 32 GB memory Main system: Win10-64 Processor: AMD Ryzen Threadripper 1950X 16-Core Porcessor, 3.40 GHz ## Yade version 2018.02b ## some yade --performance test ## 4k 20k 40k spherical particles with yade -j 1 *.py https://drive.google.com/open?id=1nqXm75HpqhG-n0XPU7MF1G0AiBfuTcSj https://drive.google.com/open?id=1_2TWGVauOQvFznHqdiV5R35yhqzitHvo https://drive.google.com/open?id=1rPvseozgYY9qEW41dQXKm3iz4sORTGtY ## 4k 20k 40k spherical particles with yade -j 2 *.py https://drive.google.com/open?id=1_z7C7jkjYy_wzXy9iNaq_N4SaI_wghSV https://drive.google.com/open?id=1hrOEshAC4YQAEmSpCrk_IHmIwvcvjz7z https://drive.google.com/open?id=1pcR6WAmLWeCWo0-yiRGR-2g0BzJ7rMCl Very appreciated. Xuesong -- 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