← Back to team overview

yade-users team mailing list archive

Re: [Question #682137]: Periodic boundary of a cylinder

 

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

jamespaul posted a new comment:
Thanks Jan,

I added your code into mine.It could generate the cylinder and sphere
successfully at beginning.But after running,I reported an error.

In [1]: FATAL /build/yade-AmJP7C/yade-2018.02b/pkg/common/InsertionSortCollider.cpp:495 spatialOverlapPeri: Body #24 spans over half of the cell size 2 (axis=2, see flag allowBiggerThanPeriod)
FATAL /build/yade-AmJP7C/yade-2018.02b/core/ThreadRunner.cpp:30 run: Exception occured: 
/build/yade-AmJP7C/yade-2018.02b/pkg/common/InsertionSortCollider.cpp: Body larger than half of the cell size encountered.


Here is my script:
##################################################

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from yade import pack,qt,geom

sphere1=O.materials.append(FrictMat(young=6e5,poisson=0.3,density=2460,frictionAngle=float(atan(0.3)),label='sphere1'))

r = 3 # cyl radius
h = 2 # cyl "height"
e = 1 # cyl height multiplicator to capture "overflown" spheres

cyl = geom.facetCylinder((r,r,.5*h),r,e*h,segmentsNumber=24,wallMask=4,wire=False)
O.bodies.append(cyl)
O.periodic = True
O.cell.setBox(6,6,h)

rs = 0.05
s = sphere((1.1*rs,r,0),rs)
s.state.vel = 1e-2*Vector3(1,1,.5)
O.bodies.append(s)

O.engines[1].allowBiggerThanPeriod = True # or set it to collider in
O.engines definition

O.engines=[
   	ForceResetter(),
   	InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
   	InteractionLoop(
      		[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],        
     		[Ip2_FrictMat_FrictMat_FrictPhys()], 
      		[Law2_ScGeom_FrictPhys_CundallStrack()]   

   	),
   	NewtonIntegrator(gravity=(0,0,-9.81),damping=0.1), 
   	PyRunner(command='motion()',virtPeriod=.4,nDo=2),  	
]

O.dt=.01*PWaveTimeStep()
qt.Controller()
O.saveTmp()

def motion():         	
	O.engines += [RotationEngine(ids=Cylinder,rotationAxis=[1,0,0],rotateAroundZero=True,angularVelocity=1.77)];

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