periodic boundary in the direction of the length of a rotating drum (cylinder )
Hello,
I am trying to simulate a rotating drum. To avoid the effect of the front and back wall of the drum, instead of choosing the length of the drum very long I want to set periodic boundary only in this direction(z direction). So I defined a box with the same dimension of the drum in the z direction, and bigger than the radius of the drum. The drum center is located on (0,0,0) with the radius 0.5m and length of 0.2. So I defined the box as :
sp=pack.
sp.makeCloud(
sp.toSimulation
walls = O.bodies.
O.periodic = True
O.cell.
Based on the answers to some similar questions I also added allowBiggerThan
InsertionSortCo
But I get a very weird simulation.
Is the center of the created box using O.cell.
I was wondering if you could help me find where are my mistakes and how I can apply the boundary condition in this case.
Regards,
Roxana Saghafian
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
|
#1 |
Hello,
> But I get a very weird simulation.
please be (much) more specific.
> Is the center of the created box using O.cell.
Periodic cell has no center. Or has arbitrary center at any point. It is one of the (possibly non-intuitive) features of periodicity.
> I was wondering if you could help me find where are my mistakes and how I can apply the boundary condition in this case.
The code seems OK.
Please describe your problem more in detail.
Please provide a MWE [1], i.e. provide Drum.stl or replace it e.g. with something like geom.facetCylinder
Cheers
Jan
Revision history for this message
|
#2 |
Hello Jan,
The problem is that I think the periodic boundary is being applied in all directions (but I only need z direction to have period boundary condition ). So, when I increase the dimensions of O.cell.setBox, it gets devided to four different parts that might be right for other cases but for my case it does not seem like a rotating drum. With smaller dimensions of O.cell.setBox, also it does not give me good result as I think the periodic boundary condition is being implemented in all directions.
This is my script; I have also attached the Drum.stl file.
from yade import ymport
from yade import pack
from yade import utils, plot,wrapper
###functions for exporting data
os.mkdir(
def savePropData(O):
from yade import export
import numpy as np
path = os.getcwd()+'/VTK/'
vtkExporter = export.
####
fr = 0.38
rho = 2500
En = 0.7
Et = 0.7
poi=0.21
yoM=63e6
O.dt = 0.000005
r = 0.008 #0.002381
Gamma =0.073 #20.6 * 1e-3
Theta = 35
vB = 0.0
CapType=
##definig material
mat=O.materials
)
mat2=O.
)
#defining the spheres
sp=pack.
sp.makeCloud(
sp.toSimulation
Nprtcl=
walls = O.bodies.
##periodic boundary
O.periodic = True
O.cell.
##engine
O.engines = [
),
]
O.run()
Thank you!
Regards,
Roxana Saghafian
_______
From: <email address hidden> <email address hidden> on behalf of Jan Stránský <email address hidden>
Sent: Monday, August 15, 2022 9:30 AM
To: Saghafian Larijani, Roxana (UT-ET) <email address hidden>
Subject: Re: [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )
Your question #702751 on Yade changed:
https:/
Status: Open => Needs information
Jan Stránský requested more information:
Hello,
> But I get a very weird simulation.
please be (much) more specific.
> Is the center of the created box using O.cell.
(0,0,0) ?
Periodic cell has no center. Or has arbitrary center at any point. It is
one of the (possibly non-intuitive) features of periodicity.
> I was wondering if you could help me find where are my mistakes and
how I can apply the boundary condition in this case.
The code seems OK.
Please describe your problem more in detail.
Please provide a MWE [1], i.e. provide Drum.stl or replace it e.g. with something like geom.facetCylinder
Cheers
Jan
[1] https:/
--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#3 |
> I have also attached the Drum.stl
attachments are not possible here in launchpad questions..
Please either provide the content of the file, or make your code using alternatives, like facetCylinder
> it gets devided to four different parts that might be right for other cases but for my case it does not seem like a rotating drum.
Thanks for clarification.
Actually, it IS proper rotating drum and is "right" :-)
It is just the way it is displayed, particles positions wrapped inside the periodic cell, not outside.
To overcome this issue, you can:
- postprocess the positions to look more natural
- put the drum and particles to the "center" of the cell (i.e. the visualization of particles is natural). Note that the results should be exactly the same as in the "default" case.
Cheers
Jan
Revision history for this message
|
#4 |
Isn’t it the case that the periodic boundary is being implemented in all three directions? Is there any way I can avoid periodic boundary condition in x and y direction?
Regards,
Roxana Saghafian
Roxana Saghafian Larijani | PhD student
ET-CME, UTwente | https:/
_______
From: <email address hidden> <email address hidden> on behalf of Jan Stránský <email address hidden>
Sent: Monday, August 15, 2022 1:31 PM
To: Saghafian Larijani, Roxana (UT-ET) <email address hidden>
Subject: Re: [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )
Your question #702751 on Yade changed:
https:/
Status: Open => Answered
Jan Stránský proposed the following answer:
> I have also attached the Drum.stl
attachments are not possible here in launchpad questions..
Please either provide the content of the file, or make your code using alternatives, like facetCylinder
> it gets devided to four different parts that might be right for other
cases but for my case it does not seem like a rotating drum.
Thanks for clarification.
Actually, it IS proper rotating drum and is "right" :-)
It is just the way it is displayed, particles positions wrapped inside the periodic cell, not outside.
To overcome this issue, you can:
- postprocess the positions to look more natural
- put the drum and particles to the "center" of the cell (i.e. the visualization of particles is natural). Note that the results should be exactly the same as in the "default" case.
Cheers
Jan
--
If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#5 |
It depends on definition.
In Yade, if you enable periodicity, it is applied in 3 direction, no matter what.
But enlarging the periodic cell dimensions, you can "disable" some directions, making the simulation being practically periodic only in some direction(s).
Still, the **visualization** is done such that all particles are displayed inside the cell. But the periodicity itself (i.e. periodic contact detection between particles and periodic images of other particles) is not effectively present in "disabled" directions.
Cheers
Jan
Revision history for this message
|
#6 |
Thank you for your response! I managed to display the rotating drum in the same way as the default case by shifting the drum and the particles.
However, I still have a problem. It seems that there are some problems with the contact detection of some particles, and they get out of the drum. Might it be because I am using (
Law2_ScGeom_
) as it is mentioned in the question 429604?
Regards,
Roxana Saghafian
_______
From: <email address hidden> <email address hidden> on behalf of Jan Stránský <email address hidden>
Sent: Monday, August 15, 2022 2:25 PM
To: Saghafian Larijani, Roxana (UT-ET) <email address hidden>
Subject: Re: [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )
Your question #702751 on Yade changed:
https:/
Status: Open => Answered
Jan Stránský proposed the following answer:
It depends on definition.
In Yade, if you enable periodicity, it is applied in 3 direction, no matter what.
But enlarging the periodic cell dimensions, you can "disable" some directions, making the simulation being practically periodic only in some direction(s).
Still, the **visualization** is done such that all particles are displayed inside the cell. But the periodicity itself (i.e. periodic contact detection between particles and periodic images of other particles) is not effectively present in "disabled" directions.
Cheers
Jan
--
If this answers your question, please go to the following page to let us
know that it is solved:
https:/
If you still need help, you can reply to this email or go to the
following page to enter your feedback:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#7 |
> However, I still have a problem.
please, provide a MWE as discussed above.
> Might it be because I am using (Law2_ScGeom_
What is the result with Law2_ScGeom_
But firstly I would guess the problem is due to the fact
"If I remember correctly, the large bodies are not "periodically copied", so the spheres from "next" cells do not interact with the wall."
discussed in [2], #4
If it is this case or not would be clear with the MWE.
Cheers
Jan
Revision history for this message
|
#8 |
Please find the MWE below:
from yade import ymport
from yade import pack
from yade import utils, plot,wrapper
fr = 0.38
rho = 2500
En = 0.7
Et = 0.7
poi=0.21
yoM=63e6
O.dt = 0.000005
r = 0.01 #0.002381
##definig material
mat=O.materials
)
#defining the spheres
sp=pack.
sp.makeCloud(
sp.toSimulation
Nprtcl=
Drum=geom.
walls = O.bodies.
##periodic boundary
O.periodic = True
O.cell.
####
##engine
O.engines = [
),
]
from yade import qt
qt.View()
O.run()
>What is the result with Law2_ScGeom_
I checked it and the problem does not get solved by changing to Cundall.
>But firstly I would guess the problem is due to the fact
"If I remember correctly, the large bodies are not "periodically copied", so the spheres from "next" cells do not interact with the wall."
discussed in [2], #4
I think this is the problem! Because it is like the particles pass through the drum wall and does not interact with it!
Regards,
Roxana Saghafian
_______
From: <email address hidden> <email address hidden> on behalf of Jan Stránský <email address hidden>
Sent: Thursday, August 18, 2022 9:20 AM
To: Saghafian Larijani, Roxana (UT-ET) <email address hidden>
Subject: Re: [Question #702751]: periodic boundary in the direction of the length of a rotating drum (cylinder )
Your question #702751 on Yade changed:
https:/
Status: Open => Needs information
Jan Stránský requested more information:
> However, I still have a problem.
please, provide a MWE as discussed above.
> Might it be because I am using (Law2_ScGeom_
it is mentioned in the question 429604?
What is the result with Law2_ScGeom_
But firstly I would guess the problem is due to the fact
"If I remember correctly, the large bodies are not "periodically copied", so the spheres from "next" cells do not interact with the wall."
discussed in [2], #4
If it is this case or not would be clear with the MWE.
Cheers
Jan
[2] https:/
--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https:/
You received this question notification because you asked the question.
Revision history for this message
|
#9 |
Thanks for MWE.
The issue seems to to be the same from [2]
If I enlarge the cylinder
Drum=geom.
I get no spheres passing through the drum.
If you have STL model, you can:
- modify the file to make it longer
- "copy" the original drum sufficiently along the axis
Cheers
Jan
Revision history for this message
|
#10 |
Thanks for your time and responses to my questions!
Regards,
Roxana Saghafian