yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #12766
Re: [Question #293955]: How to generate dense packing of aggregates
Question #293955 on Yade changed:
https://answers.launchpad.net/yade/+question/293955
VG posted a new comment:
Hello Jan,
I have a follow-up question: I modified the compress.py script a little
bit to generate a periodic packing. Now, how do I use this compressed
packing in my main periodic simulation (MWE posted in #1 above) ? The
specific problems are:
1. How to get the size of periodic cell for main simulation, since the
compressed sample is going to be of smaller dimensions.
2. How to fit the sample exactly in the periodic cell of main
simulation, since the locations are going to be different ?
3. I want periodicity in x and z directions, but I am using top and
bottom boxes in the vertical direction to restrict periodicity in y
direction. I need to place these plates such that they precisely fit the
periodic cell in x & z direction, and contain the granular sample in
y-direction. Now, if I get the solution to above two, that should be
doable.
Just in case, here is the modified script of compress.py:
######################################################################
# Compress the loose packing into dense packing. Each agglomerate is
# considered as clump in this stage
######################################################################
from yade import export,ymport
import random
random.seed(1)
O.periodic = True
# add walls first
dim = (15,15,15)
#walls = aabbWalls(((0,0,0),(dim)))
#wallIds = O.bodies.append(walls)
# load spheres from file, including information of their agglomerates
ids
sp = ymport.textExt('./cloud.txt')
for s in sp: O.bodies.append(s)
O.cell.setBox(dim)
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()],
allowBiggerThanPeriod=True),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
PeriIsoCompressor(
charLen = 2.,
stresses=[-100e5,-1e4],
maxUnbalanced=1e-2,
doneHook= 'O.pause();',
globalUpdateInt=5,keepProportions=True),
NewtonIntegrator(damping=.6),
]
O.dt = PWaveTimeStep()
# compress the sample
O.run()
O.wait()
# save the result
export.textExt('./compressed.txt')
try:
from yade import qt
qt.View()
except:
pass
Thanks
Varun
--
You received this question notification because your team yade-users is
an answer contact for Yade.