← Back to team overview

yade-users team mailing list archive

Re: [Question #255437]: Periodic random packing of spheres in a cube

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi

2014-10-13 18:01 GMT+02:00 skonda2
<question255437@xxxxxxxxxxxxxxxxxxxxx>:

> Question #255437 on Yade changed:
> https://answers.launchpad.net/yade/+question/255437
>
>     Status: Answered => Open
>
> skonda2 is still having a problem:
> Hi Jan,
>
> I was making an error while running program. I figured that out. Now, i do
> not see any overlapping spheres, but the packing visualization is not the
> same.
>

do you compare the same view and the same run (since every realization is
different)?


> So, what i do right now is, export all the x,y,z directions periodic image
> spheres ("ghost" spheres) from the program that you provided and then i
> export all the spheres from the simulation, then i see the visualization.
> I think, when i export the spheres from the simulation, there are already
> some spheres which are on the edges of the periodic cell (position beyond
> or on periodic cell) DO you think that could be one reason?
>

It is also a feature of periodic cell in Yade. The spheres may have
arbitrary position :-) specifically in the case of your current approach,
all spheres starts "inside" periodic cell, i.e. with zero period shift, but
during compaction stage (in randomPeriPack), it may happen that spheres
move to another ("neigboring") period. But the yade visualization of them
are always inside the cell. So to export "normal" particles, you should do:

f = open('normal.dat')
f.write('x y z r\n')
for b in bodies:
   p,r = O.cell.wrap(b.state.pos),b.shape.radius
   f.write('%g %g %g %g\n'%(p[0],p[1],p[2],r))
f.close()

instead of the export function you use now. It is another tricky step,
being difficult for beginners :-)


> The periodic cell size is 7.86 for the above simulation, so when i expor
> the spheres from simulation, do you think i should only consider spheres
> which are completely inside the periodic cell?, since we already have
> spheres from our program.
>

no, export all spheres from O.bodies ("normal") + ghosts, see above.

cheers
Jan

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.