Periodic boundary conditions - cell position

Asked by Dominik Boemer

Hello everybody,

I would like to create a periodic boundary condition which has the form of a rectangular parallelepiped (axis aligned) and whose center of gravity can be translated (pan) to any point in space.

I was able to create a periodic condition with the following command:

O.cell.refSize=(0.8,0.8,0.4) (and O.periodic=True)

This cell has however one vertex at position (0,0,0). I would like to translate the cell, i.e. its center of gravity should be at the origine of the reference frame and not one of its vertices. How could I translate the periodic boundary condition cell?

Thanks in advance!
Best regards,
Dominik

Question information

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

Hello Dominik,

Could you please specify more in detail what you are trying to achieve?
Simulations using periodic boundary conditions (or periodic contact
detection more precisely) are quite specific and at the moment I see no
reason to consider the center of gravity of the periodic cell.. since it is
considered to be copied all around filling entire space.

If you still need it, would it be possible to do your calculations using
the actual center of the periodic cell?

cheers
Jan

2014-08-19 9:26 GMT+02:00 Dominik Boemer <
<email address hidden>>:

> Question #253296 on Yade changed:
> https://answers.launchpad.net/yade/+question/253296
>
> Description changed to:
> Hello everybody,
>
> I would like to create a periodic boundary condition which has the form
> of a rectangular parallelepiped (axis aligned) and whose center of
> gravity can be translated (pan) to any point in space.
>
> I was able to create a periodic condition with the following command:
>
> O.cell.refSize=(0.8,0.8,0.4) (and O.periodic=True)
>
> This cell has however one vertex at position (0,0,0). I would like to
> translate the cell, i.e. its center of gravity should be at the origine
> of the reference frame and not one of its vertices. How could I
> translate the periodic boundary condition cell?
>
> Thanks in advance!
> Best regards,
> Dominik
>
> --
> You received this question notification because you are a member of
> yade-users, which 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
Jérôme Duriez (jduriez) said :
#2

I think I asked myself the same question as Dominik, so let me try to rephrase it.

Is it possible to avoid that one vertice of the cell corresponds to the axis origin ? E.g. it is possible to impose, for some reason, that that the lowest cell corner is at e.g. (0,2,3) ?

If I rephrased correctly, in fact I do not know the answer... (in my case, I translated the whole sample, rather than the cell)

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

Hi Jerome,

>
> Is it possible to avoid that one vertice of the cell corresponds to the
> axis origin ? E.g. it is possible to impose, for some reason, that that
> the lowest cell corner is at e.g. (0,2,3) ?
>

currently it is not possible, but as the sample is periodic, it would not
make much sense ...

>
> If I rephrased correctly, in fact I do not know the answer... (in my
> case, I translated the whole sample, rather than the cell)
>

... for exactly this reason. The periodic cell can in fact have any
arbitrary position and the resulting behavior would not differ (as long as
the cell has fixed size).

cheers
Jan

Revision history for this message
Dominik Boemer (dominik-boemer) said :
#4

Hello Jan,

Thanks you! Let's put it simple. I think that you know the periodic sand pile example (https://www.youtube.com/watch?v=xAZuNFliFcw ; https://github.com/yade/trunk/blob/master/examples/periodicSandPile.py). The box in this example seems to have the following vertices:

(0,0,0),
(length,0,0)
(0,width,0)
(length,width,0)
(0,0,3.*height)
(length,0,3.*height)
(0,width,3.*height)
(length,width,3.*height)

Thus, the center of gravity of the box is located at (length/2,width/2,1.5*height). I want however that the coordinates of the COG are (0,0,0). In other words, I would like to translate the box (or to create one that directly satisfies this condition).

Why? I am currently creating a DEM simulation of a ball mill. And instead of inserting two walls at the mill ends (to close it), I would like to create a periodic boundary such that the balls which are evacuated at one side reenter at the other side.

I hope this might help.
Thanks again,
Dominik

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

Hello Dominik,

thanks for the explanation. On the case of periodic sand pile, imagine that
the cell would be shifted a bit left or right. Only the visualization would
be different (the top of the "hill" would have different position
relatively to the cell), but otherwise there would be no difference from
physics point of view. The reason is the periodicity :-)

The same would be in the case of the ball mill. Because in the direction of
mill axis the simulation is periodic, it does not matter where you put the
periodic cell. It would only influence the postprocessing stage.

If I misunderstood something or did not explain something properly, let me
know :-)

cheers
Jan

2014-08-19 10:51 GMT+02:00 Dominik Boemer <
<email address hidden>>:

> Question #253296 on Yade changed:
> https://answers.launchpad.net/yade/+question/253296
>
> Status: Answered => Open
>
> Dominik Boemer is still having a problem:
> Hello Jan,
>
> Thanks you! Let's put it simple. I think that you know the periodic
> sand pile example (https://www.youtube.com/watch?v=xAZuNFliFcw ;
> https://github.com/yade/trunk/blob/master/examples/periodicSandPile.py).
> The box in this example seems to have the following vertices:
>
> (0,0,0),
> (length,0,0)
> (0,width,0)
> (length,width,0)
> (0,0,3.*height)
> (length,0,3.*height)
> (0,width,3.*height)
> (length,width,3.*height)
>
> Thus, the center of gravity of the box is located at
> (length/2,width/2,1.5*height). I want however that the coordinates of
> the COG are (0,0,0). In other words, I would like to translate the box
> (or to create one that directly satisfies this condition).
>
> Why? I am currently creating a DEM simulation of a ball mill. And
> instead of inserting two walls at the mill ends (to close it), I would
> like to create a periodic boundary such that the balls which are
> evacuated at one side reenter at the other side.
>
> I hope this might help.
> Thanks again,
> Dominik
>
> --
> You received this question notification because you are a member of
> yade-users, which 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
Dominik Boemer (dominik-boemer) said :
#6

Hello Jan and Jerome,

in a nutshell:
- currently, it is impossible to translate the periodic boundary box
- in consequence, the sample has to be translated in function of the boundary box position

For instance, my ball mill currently turns around the direction (0, 0, 1) with the point (0, 0, 0). Thus, I would have to translate the mill geometry and change the turning point from (0, 0, 0) to (0, r, r) where r is the radius of the mill (to put the mill inside of the box).

I think this answered my question.
Thank you,
Dominik

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

Hello Dominik,

>
> in a nutshell:
> - currently, it is impossible to translate the periodic boundary box
> - in consequence, the sample has to be translated in function of the
> boundary box position
>

yes

>
> For instance, my ball mill currently turns around the direction (0, 0,
> 1) with the point (0, 0, 0). Thus, I would have to translate the mill
> geometry and change the turning point from (0, 0, 0) to (0, r, r) where
> r is the radius of the mill (to put the mill inside of the box).
>

exactly. But please have in mind that the results would be the same as with
the axis (0,0,1) :-) only the postprocessing could be a bit inconvenient..

cheers
Jan

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#8

Hello,

>in consequence, the sample has to be translated in function of the
> boundary box position

I am still not sure what you mean... The "box" is just a window in which you look at an infinite (in size) system. It doesn't matter where you look at it, the system is always the same. The "box" does not define boundaries in the sense of boundary conditions, it is just a visualization tool.

As Jan suggests, you can generate the objects outside the window. E.g. you could put the sandpile cloud everywhere outside the box, if all objects are translated by the same amount the result will be exactly the same (even if the translation is a not a multiple of the box size).

if I don't miss something, you can put the mill half-way between two periods (i.e. don't translate anything), it should not break.

Revision history for this message
Dominik Boemer (dominik-boemer) said :
#9

Hello Bruno,

suppose that I have a ball mill with rotation axis z of radius r and length l (in z direction). In this case, I will use

O.cell.refSize=(2*r, 2*r, l)

to create the periodic boundary condition. Thus, the mill seems to have an infinite length (along z). As you pointed out, this is absolutely correct (for any rotation point (a,b,c), i.e. the rotation of the liner is defined by a direction and a point). But, as Jan explained, the post-processing gets a little inconvenient if the rotation point is (0,0,0). In this case, I see a rectangular parallelepiped with one quadrant of the mill in each of its corners. Until now everything is fine. But these quadrants are turned to the outside, such that the liner (projection) almost looks like an astroide (hypocycloid with four cusps). I want, however, to see the liner like a circle and this is why I had to translate the mill and its content from (0,0,0) to (r, r, 0); it's just a matter of post-processing.

Regards,
Dominik

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#10

I see, thanks.
Side note: refSize should have larger sizes in x and y, otherwise you
will have an array of mills in contact with each other.
Bruno