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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Jesse,
I have tried the following code, it gives different results for different 
goals. Also ig you are looking for as dense as possible packings, decrease 
friction angle.
I think the problem comes from the initial packing before compression. The 
space not filled after compression is also empty before the compression. So to 
get better results, you can try some optimization of the previous stage.
#####
from yade import export,ymport
import random
random.seed(1)

dim = Vector3(2e-6,2e-6,2e-6)
walls = aabbWalls((-dim,dim))
wallIds = O.bodies.append(walls)

O.materials.append(FrictMat(density=1e6,frictionAngle=0))

attrs = []
sp = ymport.textExt('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 = .5
O.dt = factor * PWaveTimeStep()

compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-2
#compressor.goal1 = compressor.goal2 = compressor.goal3 = -1e-5
O.run(50000,True)
print compressor.goal1
print compressor.boxVolume
#####

cheers
Jan

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to