Cylinder and periodic boundary conditions
Hi all,
I am having a problem when I use a cylinder with periodic boundary condition.
I made a simple script to reproduce the problem. The script is a column of grain falling inside a box under gravity, with a cylinder fixed on the lower (infinite) plane of the box. When I do that, everything works fine (option periodic = 0 and cylinderBottom = 1 in the script below).
If now, I remove the sides of the box and replace it with periodic boundary condition (periodic = 1 and cylinderBottom = 1 in script below), some particles literally goes inside the cylinder. And this whatever the stiffness of the interaction, the time step used, the contact law used (Law2_ScGeom_
This does not happen if I consider instead of the cylinder a row of fixed spheres (periodic = 1 and cylinderBottom = 0 in the script below).
There is also a strange behavior when defining the cylinder position and extents, which might be linked to the present problem:
- It is not possible to define a cylinder which extents corresponds to an integer of the periodic cell extent, e.g. cylinder(begin = (L/2.,-
However, if you interchange begin and end, it works, i.e. cylinder(begin = (L/2.,100*
- The 3D view shows very strange position of the cylinder, which do not correspond to its actual position, when you consider the position of the cylinder nodes.
Do you have any idea what the problem could be linked to ?
Raphael
Script:
from yade import pack
from yade.gridpfacet import *
dp= 6e-3
periodic = 1
cylinderBottom = 1
ground = 0.2*dp
H = 300*dp
L = 20*dp
O.engines = [
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
# [Ip2_FrictMat_
# [Law2_ScGeom_
),
PyRunner(command = 'check()', virtPeriod = 0.1),
NewtonIntegrat
]
#Material creation
O.materials.
#O.materials.
#Periodic Cell or containing box
if periodic:
O.periodic = True
O.cell.
O.bodies.
else:
O.bodies.
O.bodies.
O.bodies.
O.bodies.
O.bodies.
#Bottom fixed cylinder or fixed particles
if cylinderBottom:
n = len(O.bodies)
cylinder(begin = (L/2.,100*
else:
for n in range(0,
O.bodies.
#Particle cloud for gravity deposition
partCloud = pack.SpherePack()
partCloud.
partCloud.
O.saveTmp()
O.dt = 1e-5
#Function to check if the center of a particle is contained inside the cylinder or pseudo cylinder
def check():
for b in O.bodies:
if b.dynamic and b.state.
posCylXZ = Vector3(
pRelX = b.state.pos[0]%L - posCylXZ[0]
pRelZ = b.state.pos[2] - posCylXZ[2]
if sqrt(pow(pRelX,2) + pow(pRelZ,
delta = dp/2.-sqrt(
print('particle {0} is inside the cylinder from an amount of {1} diameter'
O.pause()
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Raphaël Maurin for more information if necessary.