← Back to team overview

yade-users team mailing list archive

Re: [Question #645958]: creating a cloud of compressed aggregates/clumps

 

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

rhaven gave more information on the question:
I've made only slight progress, looking at examples/PeriodicBoundaries/periodic-grow.py for inspiration.
I added a few lines, now I see that the volume looks to be getting compressed and much more like what I am expecting. However after only one step I get a runtime error 

Exception occured:
/build/yadedaily....../InsertionSortCollider.cpp: Body larger than half of the cell size encountered. 

How can I avoid this? I dont want to increase the simulation size
many thanks
Jesse

the code is below.

	from yade import export,ymport
	import random
	random.seed(1)

	# add walls first
	#dim = (15,15,15)
	#dim = (1.5e-6,1.5e-6,1.5e-6)
	dim = (1e-6,1e-6,1e-6)
	walls = aabbWalls(((0,0,0),(dim)))
	wallIds = O.bodies.append(walls)

	# load spheres from file, including information of their agglomerates ids
	attrs = []
	sp = ymport.textExt('/tmp/divided.txt',format='x_y_z_r_attrs',attrs=attrs)
	n = max(int(a[0]) for a in attrs)+1
	colors = [randomColor() for _ in xrange(n)]
	agglomerates = [[] for _ in xrange(n)]
	for s,a in zip(sp,attrs):
		aa = int(a[0])
		s.agglomerate = aa
		s.shape.color = colors[aa]
		agglomerates[aa].append(s)
	for a in agglomerates:
		O.bodies.appendClumped(a)

	O.engines = [
		ForceResetter(),
		InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
		InteractionLoop(
			[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
			[Ip2_FrictMat_FrictMat_FrictPhys()],
			[Law2_ScGeom_FrictPhys_CundallStrack()]
		),
		TriaxialStressController(
			thickness = 0,
			stressMask = 7,
			internalCompaction = False,
			label = 'compressor',
		),
		NewtonIntegrator(damping=.6),
	]
	factor = 0.001
	print('factor = ', factor)
	O.dt = factor * PWaveTimeStep()


	# compress the sample
	compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
	#compressor.goal1 = compressor.goal2 = compressor.goal3 = 1e-10
	
	
	#O.run(50000,True)
	
	
	#compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
	#O.run(30000,True)
	
	cubeSize=dim[1]
	
	O.periodic=True
	O.cell.setBox(cubeSize,cubeSize,cubeSize)
	#O.dt=PWaveTimeStep()
	O.saveTmp()
	#from yade import qt
	#qt.Controller(); qt.View()
	O.run(1,True)

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