Packing and predicate dimension
Hello everyone,
In my script I'm using a gts surface to create a random dense pack.
However, the dimensions of the pack are different from gts surface, as described by these two warnings:
UserWarning: Packing's dimension (Vector3(
if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]: warnings.
Follows the image of the pack. The blue line is gts surface.
https:/
How can I create a pack of spheres with the same predicate of gts?
Thanks,
Luis
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Jérôme Duriez
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hi Luis,
could you please provide a python script?
thanks
Jan
2016-04-18 3:13 GMT+02:00 Luis Barbosa <<email address hidden>
>:
> New question #291326 on Yade:
> https:/
>
> Hello everyone,
>
> In my script I'm using a gts surface to create a random dense pack.
>
> However, the dimensions of the pack are different from gts surface, as
> described by these two warnings:
>
> UserWarning: Packing's dimension
> (Vector3(
> fully contain dimension of the predicate (Vector3(2,1,2)).
> if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]:
> warnings.
> the predicate (%s)."%(dimS,dimP))
>
> Follows the image of the pack. The blue line is gts surface.
>
> https:/
>
> How can I create a pack of spheres with the same predicate of gts?
>
> Thanks,
> Luis
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#2 |
Hi Jan,
Sure I can.
#!/usr/bin/python
# -*- coding: utf-8 -*-
#======
from yade import pack
import gts
from yade import utils
surf=gts.
pred=pack.
vol = surf.volume()
#======
# Spheres
O.materials.
#======
O.bodies.
sp = pack.randomDens
sp.toSimulation
#======
O.engines=[
ForceResetter(),
InsertionSortC
InteractionLoop(
[Ig2_
[Ip2_
[Law2_
),
GlobalStiffne
NewtonIntegra
]
ve=utils.
print vol,ve
#======
from yade import qt
qt.View()
qt.Controller()
#######
And here follows the gts surface...
https:/
Thanks,
Luis
Revision history for this message
|
#3 |
Hi Luis,
thanks for the files. For some reason, the "smooth" surface, created by a
wall in triaxial compression, is placed wrongly. There are several
solutions, all parameters of randomDensePack, see docs [1]:
spheresInCell=500 (or another number). It does internally periodic triaxial
compression, overcoming the problem with fixed wall position
cropLayers=3, it simply enlarge the compressed volume
dim, according to the documentation, it could also help
my suggestion is 1), since it also reduces time needed for preparation.
cheers
Jan
[1] https:/
2016-04-19 2:17 GMT+02:00 Luis Barbosa <<email address hidden>
>:
> Question #291326 on Yade changed:
> https:/
>
> Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Hi Jan,
>
> Sure I can.
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> #======
> from yade import pack
> import gts
> from yade import utils
> surf=gts.
> pred=pack.
> vol = surf.volume()
> #======
> # Spheres
>
> O.materials.
> #======
> O.bodies.
> sp = pack.randomDens
> 'sphereo'
> sp.toSimulation
> #======
> O.engines=[
> ForceResetter(),
> InsertionSortCo
> InteractionLoop(
> [Ig2_Sphere_
>
> [Ip2_JCFpmMat_
>
> [Law2_ScGeom_
> ),
>
> GlobalStiffness
> NewtonIntegrato
> ]
> ve=utils.
> print vol,ve
> #======
> from yade import qt
> qt.View()
> qt.Controller()
> #######
>
> And here follows the gts surface...
> https:/
>
> Thanks,
> Luis
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#4 |
Hi,
Inserting spheresInCell I got this message:
"No suitable packing in database found, running PERIODIC compression"
And the pack is not dense, but is similar to a "cloud".
Thanks,
Luis
Revision history for this message
|
#5 |
Hi Luis,
> "No suitable packing in database found, running PERIODIC compression"
>
>
this is just information for the user, it is OK.
> And the pack is not dense, but is similar to a "cloud".
>
this is strange. Could you please post a final picture? In my case it
worked as expected.
cheers
Jan
Revision history for this message
|
#6 |
Hi Jan,
https:/
As you can see the spheres are not overlaping, in some case not even touch.
Thanks,
Luis
Revision history for this message
|
#7 |
Hi Luis,
you can also improve the result with setting noPad=True to
pack.inGtsSurface. Computing the volume fraction of spheres, I got 57%.
randomDensePack in periodic (optimal) conditions has usually around 62% of
volume fraction (with monodisperse packing), so the packing is OK. Could
you try it and (dis)confirm that it works or not?
Thanks
Jan
2016-04-21 14:47 GMT+02:00 Luis Barbosa <
<email address hidden>>:
> Question #291326 on Yade changed:
> https:/
>
> Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Hi Jan,
>
> https:/
>
> As you can see the spheres are not overlaping, in some case not even
> touch.
>
> Thanks,
> Luis
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#8 |
Hi Jan,
I didn't know if I got the idea,
but my volume of spheres is near 39%, and again, is not dense.
Could you share what you have done?
Here is what I'm using to calc volume of sphere,creating Gts and dense pack, respectively:
utils.getSphere
pred=pack.
pack.randomDens
Thanks
Luis
Revision history for this message
|
#9 |
Hi Luis,
I used slightly modified script from #2. The result is 57%.
cheers
Jan
picture result:
https:/
script:
#######
#!/usr/bin/python
# -*- coding: utf-8 -*-
#======
from yade import pack
import gts
from yade import utils
surf=gts.
pred=pack.
vol = surf.volume()
#======
# Spheres
O.materials.
#======
O.bodies.
sp = pack.randomDens
'sphereo'
sp.toSimulation
#======
O.engines=[
ForceResetter(),
InsertionSortCo
InteractionLoop(
[Ig2_Sphere_
[Ip2_JCFpmMat_
[Law2_ScGeom_
),
GlobalStiffness
NewtonIntegrato
]
ve=utils.
print vol,ve,ve/vol
#======
from yade import qt
qt.View()
qt.Controller()
#######
tetrahedron.gts:
4 6 4
-1.63299 -0.942809 -0.666667
0 1.88562 -0.666667
1.63299 -0.942809 -0.666667
0 0 2
2 1
3 2
2 4
1 3
4 1
3 4
1 2 4
5 3 1
3 6 2
6 5 4
2016-04-21 19:13 GMT+02:00 Luis Barbosa <
<email address hidden>>:
> Question #291326 on Yade changed:
> https:/
>
> Status: Answered => Open
>
> Luis Barbosa is still having a problem:
> Hi Jan,
> I didn't know if I got the idea,
> but my volume of spheres is near 39%, and again, is not dense.
> Could you share what you have done?
>
> Here is what I'm using to calc volume of sphere,creating Gts and dense
> pack, respectively:
>
> utils.getSphere
>
> pred=pack.
>
> pack.randomDens
> material = 'sphereo'
>
> Thanks
> Luis
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______
> Mailing list: https:/
> Post to : <email address hidden>
> Unsubscribe : https:/
> More help : https:/
>
Revision history for this message
|
#10 |
Hi Jan,
Thanks for the script, and now I have ve/vol=52%.
And again is not a dense pack as obtained using randomdensepack aperiodic.
Can you tell me where find documentation to go deeper in this randomdensepack using TriaxialTest?
I think be necessary to me understand better this function.
Thanks for everything.
Luis
Revision history for this message
|
#11 |
In case the documentation [1] itself is not enough, you have no other choice than looking into the source code in py/pack.py [2]...
[1] https:/
[2] https:/
Jerome
Revision history for this message
|
#12 |
Thanks Jérôme Duriez, that solved my question.