← Back to team overview

yade-users team mailing list archive

[Question #688968]: Problem in consolidation

 

New question #688968 on Yade:
https://answers.launchpad.net/yade/+question/688968

Hi,all
I am trying to fix the orientation of clumps during the consolidation recently.But there are some problem in this procedure.
The periodic cell would be a rectangle after complete the consolidation, which is not a square. 
This is my code. Thanks for your time.
########particle generation########
from yade import pack
import random
sp = pack.SpherePack()
size = .38
sp.makeCloud(minCorner=(0,0,.05),maxCorner=(size,size,.05),rMean=.005,rRelFuzz=.4,num=1000,periodic=True,seed=1)
sp.toSimulation()
fout = file('packing_thirty.lst','w')
for b in O.bodies:
   pos = b.state.pos
   diameter = b.shape.radius * 2
   eq_rad = diameter / 3.
   ori = 1. / 6. * pi
   x1 = pos[0] - (b.shape.radius - eq_rad) * cos(ori) 
   x2 = pos[0] + (b.shape.radius - eq_rad) * cos(ori) 
   y1 = pos[1] - (b.shape.radius - eq_rad) * sin(ori) 
   y2 = pos[1] + (b.shape.radius - eq_rad) * sin(ori) 
   fout.write(str(x1)+' '+str(y1)+' '+str(x2)+' '+str(y2)+' '+str(eq_rad)+'\n')
fout.close()

#########consolidation###########from yade import export
from math import *

mat_id = O.materials.append(FrictMat(young=8.e8,poisson=.8,frictionAngle=.0,density=10000))
mat = O.materials[mat_id]

fin = open('packing_thirty.lst','r')
clumpDataBase = fin.readlines()
fin.close()

z = 0.05
clump_id = []
coef = sqrt(3)/2+4./3*pi
print coef
area = 0.0
for i in xrange(len(clumpDataBase)):
   x1 = float(clumpDataBase[i].split()[0])
   y1 = float(clumpDataBase[i].split()[1])
   x2 = float(clumpDataBase[i].split()[2])
   y2 = float(clumpDataBase[i].split()[3])
   radius = float(clumpDataBase[i].split()[4])
   mass = 2650 * (2*z) * (coef*radius**2)
   area += coef*radius**2
   inertia = mass * radius**2
   cpos = [(x1+x2)/2.,(y1+y2)/2.,z]
   color = numpy.random.rand(3)
   ID = O.bodies.appendClumped([sphere([x1,y1,z],material=mat,radius=radius,color=color.tolist()), sphere([x2,y2,z],material=mat,radius=radius,color=color.tolist())])
   clump_id.append(ID[0])
   O.bodies[ID[0]].state.pos = cpos
   O.bodies[ID[0]].state.mass = mass
   O.bodies[ID[0]].state.inertia = [1.e10,1.e10,inertia]
   O.bodies[ID[0]].state.blockedDOFs = 'zXYZ'
   O.bodies[ID[0]-1].state.blockedDOFs = 'zXYZ'
   O.bodies[ID[0]-2].state.blockedDOFs = 'zXYZ'

print area
mn,mx = utils.aabbExtrema()
print mn,mx
O.periodic = True
O.cell.setBox(0.38,0.38,z*2)
print len(clump_id)

O.dt = 3.e-5
print O.dt

def shear():
   print O.cell.hSize
   O.pause()


O.engines = [
   ForceResetter(),
   InsertionSortCollider([Bo1_Sphere_Aabb()]),
   InteractionLoop(
      [Ig2_Sphere_Sphere_ScGeom()],
      [Ip2_FrictMat_FrictMat_FrictPhys()],
      [Law2_ScGeom_FrictPhys_CundallStrack()]
   ),
   PeriTriaxController(
      dynCell=True,
      goal=(-1.e5,-1.e5,0),
      stressMask=3,
      relStressTol=.001,
      maxUnbalanced=.001,
      maxStrainRate=(.25,.25,0.),
      doneHook='shear()',
      label='biax'
   ),
   NewtonIntegrator(damping=0.2)
]
O.run()


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