randome dense packing in a cylinder with a wire on its axis-howto?

Asked by Jeff

Hi All

I am new to Yade and this is my first post.

I am trying to generate a random dense packing in a cylinder with a fine wire on its axis:
my problem : the wire size being much smaller than the sphere diameter, the spheres overlap it completely and make it "useless as such"
Can someone could provide some advice for improving this packing...? ( I would like the sphere against the wire not inside..)
Thanks a lot

JF

the instructions I use are pretty simple ( copied and slightly adapted from some example):

###geometry definition
rIn=0.75 # wire radius
rOut=13 #cylinder radius
length=320 # cylinder length
rS=2.6 #sphere radius

poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
thetas=arange(0,2*pi,pi/24)
pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly] for theta in thetas],thetas)
surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
### add surface to the simulation
O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
#####generate the packing and add it to the simulation
sp=SpherePack()
sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
sp.toSimulation()

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hi Jeff,

I am new to Yade

welcome :-)

You can define the predicate as a difference of two cylinders [1]. If the
gap between inner wire and inner particles is too big, then you would have
to use different initial packing method than random dense pack.

####################
pred = pack.inCylinder((0,0,0),(0,0,length),rOut) -
pack.inCylinder((0,0,0),(0,0,length),rIn)
sp=pack.randomDensePack(pred,radius=rS,returnSpherePack=True)
sp.toSimulation()
####################

cheers
Jan

[1] https://yade-dem.org/doc/user.html#boolean-operations-on-predicates

2016-08-01 14:13 GMT+02:00 Jeff <email address hidden>:

> New question #313648 on Yade:
> https://answers.launchpad.net/yade/+question/313648
>
> Hi All
>
> I am new to Yade and this is my first post.
>
> I am trying to generate a random dense packing in a cylinder with a fine
> wire on its axis:
> my problem : the wire size being much smaller than the sphere diameter,
> the spheres overlap it completely and make it "useless as such"
> Can someone could provide some advice for improving this packing...? ( I
> would like the sphere against the wire not inside..)
> Thanks a lot
>
> JF
>
> the instructions I use are pretty simple ( copied and slightly adapted
> from some example):
>
> ###geometry definition
> rIn=0.75 # wire radius
> rOut=13 #cylinder radius
> length=320 # cylinder length
> rS=2.6 #sphere radius
>
> poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
> thetas=arange(0,2*pi,pi/24)
> pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly] for
> theta in thetas],thetas)
>
> surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
> ### add surface to the simulation
> O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
> #####generate the packing and add it to the simulation
> sp=SpherePack()
>
> sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
> sp.toSimulation()
>
>
>
>
>
>
>
> --
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jeff (jf-vt) said :
#2

Hi Jan,
Thank you for your answer.

in fact I initially tried the difference between 2 cylinders you suggest
and I then moved to the revolution surface because I found that the inside
cylinder was fully filled as soon as its diameter was close to the sphere
diameter.
 I thought that the revolution surface approach I posted will give me an
explicit control of the angular discretization. I found with a few
experiment that it was indeed playing a role on the performance of the
algorithm but I could never come close to the wire I need to model... so my
post.

I assume when you mention other aproach that you are suggesting gravity
filling with sphere factory ? something else?

Thanks anyway
JF

Jean-François Leon
Galtenco

Tel [Main-Global]: +1 (415) 322-0376
Cell [France]: +33 (651) 168-014

On Mon, Aug 1, 2016 at 9:12 AM, Jan Stránský <
<email address hidden>> wrote:

> Question #313648 on Yade changed:
> https://answers.launchpad.net/yade/+question/313648
>
> Status: Open => Answered
>
> Jan Stránský proposed the following answer:
> Hi Jeff,
>
> I am new to Yade
>
>
> welcome :-)
>
> You can define the predicate as a difference of two cylinders [1]. If the
> gap between inner wire and inner particles is too big, then you would have
> to use different initial packing method than random dense pack.
>
> ####################
> pred = pack.inCylinder((0,0,0),(0,0,length),rOut) -
> pack.inCylinder((0,0,0),(0,0,length),rIn)
> sp=pack.randomDensePack(pred,radius=rS,returnSpherePack=True)
> sp.toSimulation()
> ####################
>
> cheers
> Jan
>
> [1] https://yade-dem.org/doc/user.html#boolean-operations-on-predicates
>
>
> 2016-08-01 14:13 GMT+02:00 Jeff <email address hidden>:
>
> > New question #313648 on Yade:
> > https://answers.launchpad.net/yade/+question/313648
> >
> > Hi All
> >
> > I am new to Yade and this is my first post.
> >
> > I am trying to generate a random dense packing in a cylinder with a
> fine
> > wire on its axis:
> > my problem : the wire size being much smaller than the sphere diameter,
> > the spheres overlap it completely and make it "useless as such"
> > Can someone could provide some advice for improving this packing...? ( I
> > would like the sphere against the wire not inside..)
> > Thanks a lot
> >
> > JF
> >
> > the instructions I use are pretty simple ( copied and slightly adapted
> > from some example):
> >
> > ###geometry definition
> > rIn=0.75 # wire radius
> > rOut=13 #cylinder radius
> > length=320 # cylinder length
> > rS=2.6 #sphere radius
> >
> > poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
> > thetas=arange(0,2*pi,pi/24)
> > pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly] for
> > theta in thetas],thetas)
> >
> >
> surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
> > ### add surface to the simulation
> > O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
> > #####generate the packing and add it to the simulation
> > sp=SpherePack()
> >
> >
> sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
> > sp.toSimulation()
> >
> >
> >
> >
> >
> >
> >
> > --
> > 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 address hidden>
> > Unsubscribe : https://launchpad.net/~yade-users
> > More help : https://help.launchpad.net/ListHelp
> >
>
> --
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Jean-François,

In fact I initially tried the difference between 2 cylinders you suggest and
> I then moved to the revolution surface because I found that the
> inside cylinder was fully filled as soon as its diameter was close to the
> sphere diameter.

I am not sure if I got it, could you please send a cript reproducing this
problem? There might be some bug in the code..

I thought that the revolution surface approach I posted will give me
an explicit
> control of the angular discretization. I found with a few experiment that
> it was indeed playing a role on the performance of the algorithm but I
> could never come close to the wire I need to model... so my post.

The problem with inGtsSurface is that it evaluates the sphere in/ousideness
only approximately in 6 axis aligned directions [1]. It should not be
difficult to make it more exact.

I assume when you mention other aproach that you are suggesting gravity filling
> with sphere factory ? something else?

gravity deposition is one option, some kind of compression within desired
volume is another similar option.

Random dense pack first create a packing an then it is "cropped" to the
geometry, so near boundary the packing is not optimal. You can also use
randomDensePack(...,cropLayers=3), from certain point of view it improves
the results [2,3]. Using this parameter and difference of two cylinders, I
got (from my point of view :-) OK results.

cheers
Jan

[1]
https://yade-dem.org/doc/yade.pack.html#yade._packPredicates.inGtsSurface.__init__
[2] https://answers.launchpad.net/yade/+question/291326
[3] https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack

2016-08-01 23:42 GMT+02:00 Jeff <email address hidden>:

> Question #313648 on Yade changed:
> https://answers.launchpad.net/yade/+question/313648
>
> Status: Answered => Open
>
> Jeff is still having a problem:
> Hi Jan,
> Thank you for your answer.
>
> in fact I initially tried the difference between 2 cylinders you suggest
> and I then moved to the revolution surface because I found that the inside
> cylinder was fully filled as soon as its diameter was close to the sphere
> diameter.
> I thought that the revolution surface approach I posted will give me an
> explicit control of the angular discretization. I found with a few
> experiment that it was indeed playing a role on the performance of the
> algorithm but I could never come close to the wire I need to model... so my
> post.
>
> I assume when you mention other aproach that you are suggesting gravity
> filling with sphere factory ? something else?
>
> Thanks anyway
> JF
>
> Jean-François Leon
> Galtenco
>
> Tel [Main-Global]: +1 (415) 322-0376
> Cell [France]: +33 (651) 168-014
>
> On Mon, Aug 1, 2016 at 9:12 AM, Jan Stránský <
> <email address hidden>> wrote:
>
> > Question #313648 on Yade changed:
> > https://answers.launchpad.net/yade/+question/313648
> >
> > Status: Open => Answered
> >
> > Jan Stránský proposed the following answer:
> > Hi Jeff,
> >
> > I am new to Yade
> >
> >
> > welcome :-)
> >
> > You can define the predicate as a difference of two cylinders [1]. If the
> > gap between inner wire and inner particles is too big, then you would
> have
> > to use different initial packing method than random dense pack.
> >
> > ####################
> > pred = pack.inCylinder((0,0,0),(0,0,length),rOut) -
> > pack.inCylinder((0,0,0),(0,0,length),rIn)
> > sp=pack.randomDensePack(pred,radius=rS,returnSpherePack=True)
> > sp.toSimulation()
> > ####################
> >
> > cheers
> > Jan
> >
> > [1] https://yade-dem.org/doc/user.html#boolean-operations-on-predicates
> >
> >
> > 2016-08-01 14:13 GMT+02:00 Jeff <email address hidden>:
> >
> > > New question #313648 on Yade:
> > > https://answers.launchpad.net/yade/+question/313648
> > >
> > > Hi All
> > >
> > > I am new to Yade and this is my first post.
> > >
> > > I am trying to generate a random dense packing in a cylinder with a
> > fine
> > > wire on its axis:
> > > my problem : the wire size being much smaller than the sphere diameter,
> > > the spheres overlap it completely and make it "useless as such"
> > > Can someone could provide some advice for improving this packing...? (
> I
> > > would like the sphere against the wire not inside..)
> > > Thanks a lot
> > >
> > > JF
> > >
> > > the instructions I use are pretty simple ( copied and slightly adapted
> > > from some example):
> > >
> > > ###geometry definition
> > > rIn=0.75 # wire radius
> > > rOut=13 #cylinder radius
> > > length=320 # cylinder length
> > > rS=2.6 #sphere radius
> > >
> > > poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
> > > thetas=arange(0,2*pi,pi/24)
> > > pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly] for
> > > theta in thetas],thetas)
> > >
> > >
> >
> surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
> > > ### add surface to the simulation
> > > O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
> > > #####generate the packing and add it to the simulation
> > > sp=SpherePack()
> > >
> > >
> >
> sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
> > > sp.toSimulation()
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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 address hidden>
> > > Unsubscribe : https://launchpad.net/~yade-users
> > > More help : https://help.launchpad.net/ListHelp
> > >
> >
> > --
> > 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 address hidden>
> > Unsubscribe : https://launchpad.net/~yade-users
> > More help : https://help.launchpad.net/ListHelp
> >
>
> --
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Jeff (jf-vt) said :
#4

Hi Jan
Sorry for the late answer but I was away from my desk

I explored my problem a bit further and I am happy to report that there is
no trace of bug iassociated to my problem
just a poor use of the code by a beginner
All is just working fine now !

thanks for your patience and willingness to answer though even if the
question was naive

JF

Jean-François Leon
Galtenco

Tel [Main-Global]: +1 (415) 322-0376
Cell [France]: +33 (651) 168-014

On Mon, Aug 1, 2016 at 6:17 PM, Jan Stránský <
<email address hidden>> wrote:

> Your question #313648 on Yade changed:
> https://answers.launchpad.net/yade/+question/313648
>
> Status: Open => Answered
>
> Jan Stránský proposed the following answer:
> Hi Jean-François,
>
> In fact I initially tried the difference between 2 cylinders you suggest
> and
> > I then moved to the revolution surface because I found that the
> > inside cylinder was fully filled as soon as its diameter was close to
> the
> > sphere diameter.
>
>
> I am not sure if I got it, could you please send a cript reproducing this
> problem? There might be some bug in the code..
>
> I thought that the revolution surface approach I posted will give me
> an explicit
> > control of the angular discretization. I found with a few experiment that
> > it was indeed playing a role on the performance of the algorithm but I
> > could never come close to the wire I need to model... so my post.
>
>
> The problem with inGtsSurface is that it evaluates the sphere in/ousideness
> only approximately in 6 axis aligned directions [1]. It should not be
> difficult to make it more exact.
>
> I assume when you mention other aproach that you are suggesting gravity
> filling
> > with sphere factory ? something else?
>
>
> gravity deposition is one option, some kind of compression within desired
> volume is another similar option.
>
> Random dense pack first create a packing an then it is "cropped" to the
> geometry, so near boundary the packing is not optimal. You can also use
> randomDensePack(...,cropLayers=3), from certain point of view it improves
> the results [2,3]. Using this parameter and difference of two cylinders, I
> got (from my point of view :-) OK results.
>
> cheers
> Jan
>
> [1]
>
> https://yade-dem.org/doc/yade.pack.html#yade._packPredicates.inGtsSurface.__init__
> [2] https://answers.launchpad.net/yade/+question/291326
> [3] https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack
>
>
> 2016-08-01 23:42 GMT+02:00 Jeff <email address hidden>:
>
> > Question #313648 on Yade changed:
> > https://answers.launchpad.net/yade/+question/313648
> >
> > Status: Answered => Open
> >
> > Jeff is still having a problem:
> > Hi Jan,
> > Thank you for your answer.
> >
> > in fact I initially tried the difference between 2 cylinders you suggest
> > and I then moved to the revolution surface because I found that the
> inside
> > cylinder was fully filled as soon as its diameter was close to the
> sphere
> > diameter.
> > I thought that the revolution surface approach I posted will give me an
> > explicit control of the angular discretization. I found with a few
> > experiment that it was indeed playing a role on the performance of the
> > algorithm but I could never come close to the wire I need to model... so
> my
> > post.
> >
> > I assume when you mention other aproach that you are suggesting gravity
> > filling with sphere factory ? something else?
> >
> > Thanks anyway
> > JF
> >
> > Jean-François Leon
> > Galtenco
> >
> > Tel [Main-Global]: +1 (415) 322-0376
> > Cell [France]: +33 (651) 168-014
> >
> > On Mon, Aug 1, 2016 at 9:12 AM, Jan Stránský <
> > <email address hidden>> wrote:
> >
> > > Question #313648 on Yade changed:
> > > https://answers.launchpad.net/yade/+question/313648
> > >
> > > Status: Open => Answered
> > >
> > > Jan Stránský proposed the following answer:
> > > Hi Jeff,
> > >
> > > I am new to Yade
> > >
> > >
> > > welcome :-)
> > >
> > > You can define the predicate as a difference of two cylinders [1]. If
> the
> > > gap between inner wire and inner particles is too big, then you would
> > have
> > > to use different initial packing method than random dense pack.
> > >
> > > ####################
> > > pred = pack.inCylinder((0,0,0),(0,0,length),rOut) -
> > > pack.inCylinder((0,0,0),(0,0,length),rIn)
> > > sp=pack.randomDensePack(pred,radius=rS,returnSpherePack=True)
> > > sp.toSimulation()
> > > ####################
> > >
> > > cheers
> > > Jan
> > >
> > > [1]
> https://yade-dem.org/doc/user.html#boolean-operations-on-predicates
> > >
> > >
> > > 2016-08-01 14:13 GMT+02:00 Jeff <<email address hidden>
> >:
> > >
> > > > New question #313648 on Yade:
> > > > https://answers.launchpad.net/yade/+question/313648
> > > >
> > > > Hi All
> > > >
> > > > I am new to Yade and this is my first post.
> > > >
> > > > I am trying to generate a random dense packing in a cylinder with a
> > > fine
> > > > wire on its axis:
> > > > my problem : the wire size being much smaller than the sphere
> diameter,
> > > > the spheres overlap it completely and make it "useless as such"
> > > > Can someone could provide some advice for improving this packing...?
> (
> > I
> > > > would like the sphere against the wire not inside..)
> > > > Thanks a lot
> > > >
> > > > JF
> > > >
> > > > the instructions I use are pretty simple ( copied and slightly
> adapted
> > > > from some example):
> > > >
> > > > ###geometry definition
> > > > rIn=0.75 # wire radius
> > > > rOut=13 #cylinder radius
> > > > length=320 # cylinder length
> > > > rS=2.6 #sphere radius
> > > >
> > > > poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
> > > > thetas=arange(0,2*pi,pi/24)
> > > > pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly]
> for
> > > > theta in thetas],thetas)
> > > >
> > > >
> > >
> >
> surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
> > > > ### add surface to the simulation
> > > > O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
> > > > #####generate the packing and add it to the simulation
> > > > sp=SpherePack()
> > > >
> > > >
> > >
> >
> sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
> > > > sp.toSimulation()
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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 address hidden>
> > > > Unsubscribe : https://launchpad.net/~yade-users
> > > > More help : https://help.launchpad.net/ListHelp
> > > >
> > >
> > > --
> > > 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 address hidden>
> > > Unsubscribe : https://launchpad.net/~yade-users
> > > More help : https://help.launchpad.net/ListHelp
> > >
> >
> > --
> > 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 address hidden>
> > Unsubscribe : https://launchpad.net/~yade-users
> > More help : https://help.launchpad.net/ListHelp
> >
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/yade/+question/313648/+confirm?answer_id=2
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/yade/+question/313648
>
> You received this question notification because you asked the question.
>

Revision history for this message
Jan Stránský (honzik) said :
#5

Hi Jean-François,
as a reference for other users who might have the same problem, could you
please write how did yo solve it or what was misinterpreted?
Thanks
Jan

2016-08-04 12:27 GMT+02:00 Jeff <email address hidden>:

> Question #313648 on Yade changed:
> https://answers.launchpad.net/yade/+question/313648
>
> Status: Answered => Open
>
> Jeff is still having a problem:
> Hi Jan
> Sorry for the late answer but I was away from my desk
>
> I explored my problem a bit further and I am happy to report that there is
> no trace of bug iassociated to my problem
> just a poor use of the code by a beginner
> All is just working fine now !
>
> thanks for your patience and willingness to answer though even if the
> question was naive
>
> JF
>
>
> Jean-François Leon
> Galtenco
>
> Tel [Main-Global]: +1 (415) 322-0376
> Cell [France]: +33 (651) 168-014
>
> On Mon, Aug 1, 2016 at 6:17 PM, Jan Stránský <
> <email address hidden>> wrote:
>
> > Your question #313648 on Yade changed:
> > https://answers.launchpad.net/yade/+question/313648
> >
> > Status: Open => Answered
> >
> > Jan Stránský proposed the following answer:
> > Hi Jean-François,
> >
> > In fact I initially tried the difference between 2 cylinders you suggest
> > and
> > > I then moved to the revolution surface because I found that the
> > > inside cylinder was fully filled as soon as its diameter was close to
> > the
> > > sphere diameter.
> >
> >
> > I am not sure if I got it, could you please send a cript reproducing this
> > problem? There might be some bug in the code..
> >
> > I thought that the revolution surface approach I posted will give me
> > an explicit
> > > control of the angular discretization. I found with a few experiment
> that
> > > it was indeed playing a role on the performance of the algorithm but I
> > > could never come close to the wire I need to model... so my post.
> >
> >
> > The problem with inGtsSurface is that it evaluates the sphere
> in/ousideness
> > only approximately in 6 axis aligned directions [1]. It should not be
> > difficult to make it more exact.
> >
> > I assume when you mention other aproach that you are suggesting gravity
> > filling
> > > with sphere factory ? something else?
> >
> >
> > gravity deposition is one option, some kind of compression within desired
> > volume is another similar option.
> >
> > Random dense pack first create a packing an then it is "cropped" to the
> > geometry, so near boundary the packing is not optimal. You can also use
> > randomDensePack(...,cropLayers=3), from certain point of view it improves
> > the results [2,3]. Using this parameter and difference of two cylinders,
> I
> > got (from my point of view :-) OK results.
> >
> > cheers
> > Jan
> >
> > [1]
> >
> >
> https://yade-dem.org/doc/yade.pack.html#yade._packPredicates.inGtsSurface.__init__
> > [2] https://answers.launchpad.net/yade/+question/291326
> > [3] https://yade-dem.org/doc/yade.pack.html#yade.pack.randomDensePack
> >
> >
> > 2016-08-01 23:42 GMT+02:00 Jeff <email address hidden>:
> >
> > > Question #313648 on Yade changed:
> > > https://answers.launchpad.net/yade/+question/313648
> > >
> > > Status: Answered => Open
> > >
> > > Jeff is still having a problem:
> > > Hi Jan,
> > > Thank you for your answer.
> > >
> > > in fact I initially tried the difference between 2 cylinders you
> suggest
> > > and I then moved to the revolution surface because I found that the
> > inside
> > > cylinder was fully filled as soon as its diameter was close to the
> > sphere
> > > diameter.
> > > I thought that the revolution surface approach I posted will give me
> an
> > > explicit control of the angular discretization. I found with a few
> > > experiment that it was indeed playing a role on the performance of the
> > > algorithm but I could never come close to the wire I need to model...
> so
> > my
> > > post.
> > >
> > > I assume when you mention other aproach that you are suggesting gravity
> > > filling with sphere factory ? something else?
> > >
> > > Thanks anyway
> > > JF
> > >
> > > Jean-François Leon
> > > Galtenco
> > >
> > > Tel [Main-Global]: +1 (415) 322-0376
> > > Cell [France]: +33 (651) 168-014
> > >
> > > On Mon, Aug 1, 2016 at 9:12 AM, Jan Stránský <
> > > <email address hidden>> wrote:
> > >
> > > > Question #313648 on Yade changed:
> > > > https://answers.launchpad.net/yade/+question/313648
> > > >
> > > > Status: Open => Answered
> > > >
> > > > Jan Stránský proposed the following answer:
> > > > Hi Jeff,
> > > >
> > > > I am new to Yade
> > > >
> > > >
> > > > welcome :-)
> > > >
> > > > You can define the predicate as a difference of two cylinders [1]. If
> > the
> > > > gap between inner wire and inner particles is too big, then you would
> > > have
> > > > to use different initial packing method than random dense pack.
> > > >
> > > > ####################
> > > > pred = pack.inCylinder((0,0,0),(0,0,length),rOut) -
> > > > pack.inCylinder((0,0,0),(0,0,length),rIn)
> > > > sp=pack.randomDensePack(pred,radius=rS,returnSpherePack=True)
> > > > sp.toSimulation()
> > > > ####################
> > > >
> > > > cheers
> > > > Jan
> > > >
> > > > [1]
> > https://yade-dem.org/doc/user.html#boolean-operations-on-predicates
> > > >
> > > >
> > > > 2016-08-01 14:13 GMT+02:00 Jeff <
> <email address hidden>
> > >:
> > > >
> > > > > New question #313648 on Yade:
> > > > > https://answers.launchpad.net/yade/+question/313648
> > > > >
> > > > > Hi All
> > > > >
> > > > > I am new to Yade and this is my first post.
> > > > >
> > > > > I am trying to generate a random dense packing in a cylinder
> with a
> > > > fine
> > > > > wire on its axis:
> > > > > my problem : the wire size being much smaller than the sphere
> > diameter,
> > > > > the spheres overlap it completely and make it "useless as such"
> > > > > Can someone could provide some advice for improving this
> packing...?
> > (
> > > I
> > > > > would like the sphere against the wire not inside..)
> > > > > Thanks a lot
> > > > >
> > > > > JF
> > > > >
> > > > > the instructions I use are pretty simple ( copied and slightly
> > adapted
> > > > > from some example):
> > > > >
> > > > > ###geometry definition
> > > > > rIn=0.75 # wire radius
> > > > > rOut=13 #cylinder radius
> > > > > length=320 # cylinder length
> > > > > rS=2.6 #sphere radius
> > > > >
> > > > > poly=((rIn,length),(rOut,length),(rOut,0),(rIn,0),(rIn,length))
> > > > > thetas=arange(0,2*pi,pi/24)
> > > > > pts=pack.revolutionSurfaceMeridians([[(pt[0],pt[1]) for pt in poly]
> > for
> > > > > theta in thetas],thetas)
> > > > >
> > > > >
> > > >
> > >
> >
> surf=pack.sweptPolylines2gtsSurface(pts,capStart=True,capEnd=True,threshold=1e-2)
> > > > > ### add surface to the simulation
> > > > > O.bodies.append(pack.gtsSurface2Facets(surf,color=(1,0,0)))
> > > > > #####generate the packing and add it to the simulation
> > > > > sp=SpherePack()
> > > > >
> > > > >
> > > >
> > >
> >
> sp=pack.randomDensePack(pack.inGtsSurface(surf),radius=rS,returnSpherePack=True)
> > > > > sp.toSimulation()
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 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 address hidden>
> > > > > Unsubscribe : https://launchpad.net/~yade-users
> > > > > More help : https://help.launchpad.net/ListHelp
> > > > >
> > > >
> > > > --
> > > > 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 address hidden>
> > > > Unsubscribe : https://launchpad.net/~yade-users
> > > > More help : https://help.launchpad.net/ListHelp
> > > >
> > >
> > > --
> > > 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 address hidden>
> > > Unsubscribe : https://launchpad.net/~yade-users
> > > More help : https://help.launchpad.net/ListHelp
> > >
> >
> > --
> > If this answers your question, please go to the following page to let us
> > know that it is solved:
> > https://answers.launchpad.net/yade/+question/313648/+confirm?answer_id=2
> >
> > If you still need help, you can reply to this email or go to the
> > following page to enter your feedback:
> > https://answers.launchpad.net/yade/+question/313648
> >
> > You received this question notification because you asked the question.
> >
>
> --
> 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 address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask Jeff for more information if necessary.

To post a message you must log in.