Creating Ellipse or Ellipsoid

Asked by Felipe

Hello Everyone,

I'am looking for creating some particle wich will be simulating ellipse or ellipsoid in Yade but I didn't find yet.

So, I would like to ask if it is possible to do:

1-> Creating one ellipse or ellpsoid;

2-> Simulating bouncing.py changing the sphere to ellipse;

3-> How is it work the function "pack.inEllipsoid";

4-> Is it possible to create one ellipsoid like one pack.cylinder. I have created a pack cylinder and right now i would like to change this pack for one pack in ellipsoid.

Thanks for everything.

Felipe.

Question information

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

Hi Felipe,

> 1-> Creating one ellipse or ellpsoid;

> 2-> Simulating bouncing.py changing the sphere to ellipse;
>

ellipsoids are currently not implemented in Yade. A workaround is to create
a clump composed of overlaping spheres with surface approximating an
ellipsoid.

>
> 3-> How is it work the function "pack.inEllipsoid";
>

inEllipsoid should work in the same way like other pack.predicates, like
pack.inCylinder, pack.inAlignedBox, see [1]

>
> 4-> Is it possible to create one ellipsoid like one pack.cylinder. I have
> created a pack cylinder and right now i would like to change this pack for
> one pack in ellipsoid.
>

did you mean pack.inCylinder? if yes, changing inCylinder to inEllipsoid
(and probably the arguments) should be enough..

cheers
Jan

[1] https://yade-dem.org/doc/user.html#constructive-solid-geometry-csg

Revision history for this message
mohsen (agha-mohsena) said :
#2

Hi Felipe and Jan
Jan i also have some trouble with making a predicate!
generally when i using randomDensePack, i encounter some errors or warnings that i can not understand their meanings!
Jan can you help us about "memoizeDb"? I think some errors is because of this.

in the following is my simple code and warnings:

#######
## construct the predicate first
pred=pack.inCylinder(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05)
## alternatively: pack.inHyperboloid((0,0,-.1),(0,0,.1),.05,.03)

## pack the predicate with spheres (will be explained later)
spheres=pack.randomDensePack(pred,radius=8.5e-3)

## add spheres to simulation
O.bodies.append(spheres)

################
Warnings:
WARN /build/yadedaily-1.20.0-126-e3271e8~trusty/pkg/dem/SpherePack.cpp:104 makeCloud: porosity must be >0, changing it for you. It will be ineffective if rMean>0.
/usr/lib/x86_64-linux-gnu/yadedaily/py/yade/pack.py:296: 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)
/usr/lib/x86_64-linux-gnu/yadedaily/py/yade/pack.py:301: UserWarning: Packing's dimension (Vector3(0.09220547603362886,0.09204759935856582,0.1700020579236124)) doesn't fully contain dimension of the predicate (Vector3(0.1,0.1,0.2)).
  if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]: warnings.warn("Packing's dimension (%s) doesn't fully contain dimension of the predicate (%s)."%(dimS,dimP))

############

2- another problem is that the spheres in generated pack have overlap!!
How can we avoid this? ( I know that the over lap is removed if we give a number to spheresInCell, i.e activating periodic condition. but is there any other way to have a aperiodic scene without overlap)
Is there another method to construct a cylinder filled with spheres with no initial overlap?

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

Hi Mohsen,

if you have different question than the original problem, please open a new
question.

your 2) comes from 1). I always use randomDensePack with spheresInCell
parameter, usually with value between 300 and 2000. Then your example
(memoizeDb, too) works OK.

cheers
Jan

2016-05-05 9:17 GMT+02:00 mohsen <email address hidden>:

> Question #293216 on Yade changed:
> https://answers.launchpad.net/yade/+question/293216
>
> mohsen posted a new comment:
> Hi Felipe and Jan
> Jan i also have some trouble with making a predicate!
> generally when i using randomDensePack, i encounter some errors or
> warnings that i can not understand their meanings!
> Jan can you help us about "memoizeDb"? I think some errors is because of
> this.
>
> in the following is my simple code and warnings:
>
> #######
> ## construct the predicate first
> pred=pack.inCylinder(centerBottom=(0,0,-.1),centerTop=(0,0,.1),radius=.05)
> ## alternatively: pack.inHyperboloid((0,0,-.1),(0,0,.1),.05,.03)
>
> ## pack the predicate with spheres (will be explained later)
> spheres=pack.randomDensePack(pred,radius=8.5e-3)
>
> ## add spheres to simulation
> O.bodies.append(spheres)
>
> ################
> Warnings:
> WARN
> /build/yadedaily-1.20.0-126-e3271e8~trusty/pkg/dem/SpherePack.cpp:104
> makeCloud: porosity must be >0, changing it for you. It will be ineffective
> if rMean>0.
> /usr/lib/x86_64-linux-gnu/yadedaily/py/yade/pack.py:296: 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)
> /usr/lib/x86_64-linux-gnu/yadedaily/py/yade/pack.py:301: UserWarning:
> Packing's dimension
> (Vector3(0.09220547603362886,0.09204759935856582,0.1700020579236124))
> doesn't fully contain dimension of the predicate (Vector3(0.1,0.1,0.2)).
> if dimP[0]>dimS[0] or dimP[1]>dimS[1] or dimP[2]>dimS[2]:
> warnings.warn("Packing's dimension (%s) doesn't fully contain dimension of
> the predicate (%s)."%(dimS,dimP))
>
> ############
>
> 2- another problem is that the spheres in generated pack have overlap!!
> How can we avoid this? ( I know that the over lap is removed if we give a
> number to spheresInCell, i.e activating periodic condition. but is there
> any other way to have a aperiodic scene without overlap)
> Is there another method to construct a cylinder filled with spheres with
> no initial overlap?
>
> --
> 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
Felipe (felipetthadeu) said :
#4

Thanks Jan Stránský, that solved my question.