← Back to team overview

yade-users team mailing list archive

Re: [Question #275284]: bug with periodic cell of the order of the particles diameter

 

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

Raphaël Maurin gave more information on the question:
Hi Jerome,

I will try to be more explicit on the way to reproduce the bug, and try to put a script that works directly ! =)
Taking the script below, which is a simple gravity deposition with bi-periodic boundary condition + a possibility to break the periodicity with lateral walls when putting the flag lateralWalls equal to 1.
- You run the script exactly as it is. Open the 3D viewer. Put run. After the gravity deposition, it pauses. If you press run again, it will make a simulation increment of 0.2s. When you do it, you will see (at least I see!) that the particles takes less and less space at the bottom of the sample. They actually completely overlap each other for no reason. 
- You can redo exactly the same with the flag lateralWalls to 1, and you will see that the problem is gone. 
- You can play with the script, and vary the width or the length of the system. It happens only if the width or the length of the periodic cell is of the order of 2 or lower. 

I hope it is more clear ! Can you first tell me if you can reproduce the
bug ?

Thanks !

Raphael

new script: 
from yade import pack, plot
import math

diameterPart = 6e-3     #Diameter of the particles, in meter

length = 10*diameterPart 	#length of the stream
width = 2*diameterPart  #width of the stream 
Nlayer = 5		#nb of layers of particle, in diameter

#Option to put lateral walls and break the biperiodicity
lateralWalls = 0

height = 10*Nlayer*diameterPart	#heigth of the periodic cell
groundPosition = height/4.0 
	

O.materials.append(ViscElMat(en=0.5, et=0., young=5e6, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat'))  
#O.materials.append(FrictMat(young=5e6, poisson=0.5, density=2500, frictionAngle=0.4, label='Mat'))  

#Definition of the semi-periodic cell
O.periodic = True 
O.cell.setBox(length,width,height)

#To be compatible with lateral walls
leftLimitY = 0.0
rightLimitY = width
centerLimitY = width/2.0

#If lateralWalls, add the walls and increase the cell size to avoid particle touching the walls to appear on the other side
if lateralWalls:
	#Warn the user
	print '\nlateralWalls option activated: mono-periodic boundary condition only !\n'
	#Increase the cell size
	O.cell.setBox(length,width+2*diameterPart,height)
	#Modify accordingly the position of the center of the cell and the wall right and left position
	leftLimitY = diameterPart
	rightLimitY = width+diameterPart
	centerLimitY = diameterPart + width/2.0
	#Define the wall and add to the simulation
	sidePlaneL = box(center= (length/2.0,leftLimitY,height/2.0),extents=(2000,0,height*10),fixed=True,wire = True,color = (1,0,0), material = 'Mat')
	sidePlaneR = box(center= (length/2.0,rightLimitY,height/2.0),extents=(2000,0,height*10.0),fixed=True,wire=True, material = 'Mat',color = (0,0,1))
	O.bodies.append([sidePlaneR,sidePlaneL])


# Ground reference and Wall on the side
lowPlane = box(center= (length/2.0,centerLimitY,groundPosition),extents=(200,200,0),fixed=True,wire=False,color = (0.,1.,0.),material = 'Mat')  #Build a plane to have a reference for the eyes
O.bodies.append(lowPlane) #add to simulation


#Create a loose cloud of particle inside the cell
partCloud = pack.SpherePack()

partVolume = pi/6.*pow(diameterPart,3.)
partNumber = int(Nlayer*0.6*diameterPart*length*width/partVolume) #Volume of beads
#Define the deposition height considering that the packing realised by make cloud is 0.2
depositionHeight = Nlayer*0.6/0.1*diameterPart #Consider that the packing realised by make cloud is 0.2 
partCloud.makeCloud(minCorner=(0,leftLimitY,groundPosition+diameterPart+1e-4),maxCorner=(length,rightLimitY,groundPosition+depositionHeight),rRelFuzz=0., rMean=diameterPart/2.0, num = partNumber)
partCloud.toSimulation(material='Mat')



#########################
#### SIMULATION LOOP#####
#########################
O.engines = [
	ForceResetter(),
	InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Wall_Aabb(),Bo1_Facet_Aabb(),Bo1_Box_Aabb()],label='contactDetection',allowBiggerThanPeriod = True),
	InteractionLoop(
   	[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()],
   	[Ip2_ViscElMat_ViscElMat_ViscElPhys()],
   	[Law2_ScGeom_ViscElPhys_Basic()]
#   	[Ig2_Sphere_Sphere_ScGeom(), Ig2_Box_Sphere_ScGeom()],
#        [Ip2_FrictMat_FrictMat_FrictPhys()],
#        [Law2_ScGeom_FrictPhys_CundallStrack()] 
	,label = 'interactionLoop'),				
	PyRunner(command='gravityDeposition()',virtPeriod = 0.05,label = 'packing'),
	GlobalStiffnessTimeStepper(defaultDt = 1e-4, viscEl = True,timestepSafetyCoefficient = 0.7,  label = 'GSTS'),
	NewtonIntegrator(damping=0.2, gravity= Vector3(0.,0.0,-9.81), label='newton')
	]
#save the initial configuration to be able to recharge the simulation starting configuration easily
O.saveTmp()
#run
#O.run()


def gravityDeposition():
	if O.time<0.3 : return
	else:
		packing.virtPeriod = 0.2
		O.pause()
	return

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