spherePacking warning pack.randomDensePack

Bug #1175574 reported by Alexander Eulitz [Eugen]
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
New
Undecided
Unassigned

Bug Description

Hi,
making use of pack.randomDensePack to fill up a predicate gives the following warning:

WARN /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/SpherePack.cpp:107 makeCloud: porosity must be >0, changing it for you. It will be ineffective if rMean>0.
WARN /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/TriaxialCompressionEngine.cpp:110 action: This engine is deprecated, please switch to TriaxialStressController if you expect long term support.
/usr/lib/yade-daily/py/yade/pack.py:288: FutureWarning: The default behavior will change; specify returnSpherePack=True for the new behavior, and False to get rid of this warning (your code will break in the future, however). The returned SpherePack object can be added to the simulation using SpherePack.toSimulation()
  warnings.warn('The default behavior will change; specify returnSpherePack=True for the new behavior, and False to get rid of this warning (your code will break in the future, however). The returned SpherePack object can be added to the simulation using SpherePack.toSimulation()',category=FutureWarning)

Does this method need an update?
  "This engine is deprecated, please switch to TriaxialStressController if you expect long term support."
the method works as supposed but the warning is annoying.

I attached a minimum working example this time ;)

Thanks, Eugen

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) wrote :
Revision history for this message
Alexander Eulitz [Eugen] (kubeu) wrote :

There is an other thing I don't understand with this method.
Following [1] it is possible to save created packings in a database. This way they will be taken from there if the same packing shall be created again.
For using this you need to set 'memoizeDb' to the name (path) of the database.
Obviously [2] this only works for spheresInCell>0 that is periodic packings. If I understand this point right periodic packings are related to simulations with periodic boundary conditions?
Why is it not possible to reload packings in not periodic simulations?

---
[1]https://www.yade-dem.org/doc/yade.pack.html?highlight=randomdensepack#yade.pack.randomDensePack
[2]https://www.yade-dem.org/doc/_modules/yade/pack.html#randomDensePack

Revision history for this message
Jan Stránský (honzik) wrote : Re: [Yade-dev] [Bug 1175574] Re: spherePacking warning pack.randomDensePack

Hi Eugen,

Following [1] it is possible to save created packings in a database. This
> way they will be taken from there if the same packing shall be created
> again.
> For using this you need to set 'memoizeDb' to the name (path) of the
> database.
> Obviously [2] this only works for spheresInCell>0 that is periodic
> packings. If I understand this point right periodic packings are related to
> simulations with periodic boundary conditions?
> Why is it not possible to reload packings in not periodic simulations?
>

From the source code, it seems that really only periodic packings are
loaded from database.. anyway, spheresInCell parameter means, that the
initial packing is created using periodic boundary conditions [1], *NOT*
necessarilly usable only in simulations with periodic boundary conditions.
Basicly, the periodic packing packing (cube) is created, than copied in
space to cover all needed volume defined by predicate and particles outside
predicate are deleted (this is for illustration, the actual implementation
may differ..). So you can use it for any simulation. To be more precise,
use randomDensePack for non-periodic simulations (even though
randomDensePack itself uses periodic boundary conditions) and
randomPeriPack for periodic simulations.

HTH
Jan

[1] https://yade-dem.org/doc/user.html#dynamic

Revision history for this message
Jan Stránský (honzik) wrote : Re: [Yade-dev] [Bug 1175574] [NEW] spherePacking warning pack.randomDensePack
Download full text (4.3 KiB)

Hi Eugen,

randomDensePack calls TriaxialTest internally [1], which
calls TriaxialCompressionEngine internally [2], which is deprecated. So, as
the warning says, it should be replaced by TriaxialStressController. I have
no time to do it now, but this information may be useful for other people
willing to fix it.
cheers
Jan

[1]
http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/py/pack/pack.py#L462
[2]
http://bazaar.launchpad.net/~yade-pkg/yade/git-trunk/view/head:/pkg/dem/TriaxialTest.cpp#L276

PS: thanks for attached minimal working example, things are much easier
then :-)

2013/5/2 Eugen Kubowsky <email address hidden>

> Public bug reported:
>
> Hi,
> making use of pack.randomDensePack to fill up a predicate gives the
> following warning:
>
> WARN
> /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/SpherePack.cpp:107
> makeCloud: porosity must be >0, changing it for you. It will be ineffective
> if rMean>0.
> WARN
> /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/TriaxialCompressionEngine.cpp:110
> action: This engine is deprecated, please switch to
> TriaxialStressController if you expect long term support.
> /usr/lib/yade-daily/py/yade/pack.py:288: FutureWarning: The default
> behavior will change; specify returnSpherePack=True for the new behavior,
> and False to get rid of this warning (your code will break in the future,
> however). The returned SpherePack object can be added to the simulation
> using SpherePack.toSimulation()
> warnings.warn('The default behavior will change; specify
> returnSpherePack=True for the new behavior, and False to get rid of this
> warning (your code will break in the future, however). The returned
> SpherePack object can be added to the simulation using
> SpherePack.toSimulation()',category=FutureWarning)
>
> Does this method need an update?
> "This engine is deprecated, please switch to TriaxialStressController if
> you expect long term support."
> the method works as supposed but the warning is annoying.
>
> I attached a minimum working example this time ;)
>
> Thanks, Eugen
>
> ** Affects: yade
> Importance: Undecided
> Status: New
>
> ** Attachment added: "spherePackWarning.py"
>
> https://bugs.launchpad.net/bugs/1175574/+attachment/3662495/+files/spherePackWarning.py
>
> --
> You received this bug notification because you are a member of Yade
> developers, which is subscribed to Yade.
> https://bugs.launchpad.net/bugs/1175574
>
> Title:
> spherePacking warning pack.randomDensePack
>
> Status in Yet Another Dynamic Engine:
> New
>
> Bug description:
> Hi,
> making use of pack.randomDensePack to fill up a predicate gives the
> following warning:
>
> WARN
> /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/SpherePack.cpp:107
> makeCloud: porosity must be >0, changing it for you. It will be ineffective
> if rMean>0.
> WARN
> /build/buildd/yade-daily-3+3463+44~precise1/pkg/dem/TriaxialCompressionEngine.cpp:110
> action: This engine is deprecated, please switch to
> TriaxialStressController if you expect long term support.
> /usr/lib/yade-daily/py/yade/pack.py:288: FutureWarning: The default
> behavior will change; specify returnSpherePack=Tru...

Read more...

Revision history for this message
Alexander Eulitz [Eugen] (kubeu) wrote :

ok, thank you!
That is very useful as I can create reusable packings now.

Revision history for this message
Janek Kozicki (cosurgi) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers