are the vertices of the cell the center of the sphere

Asked by Zhicheng Gao on 2021-05-26

I use the PeriodicFlowEngine to simulate flow in assembly and it is labeled as flow. Is the cell of the engine formed with the center of four spheres as the vertex? If so, can I get the four spheres that formed the cell by getting the four vertices of the cell through the function flow.getVertices(cellid) ?

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Robert Caulk (rcaulk) said :
#1

Hello,

>Is the cell of the engine formed with the center of four spheres as the vertex? If so, can I get the four spheres that formed the cell by getting the four vertices of the cell through the function flow.getVertices(cellid) ?

Yes, and yes :)

Cheers,

Robert

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#2

Dear Robert,
Thank you for your answer. Whether function flow.getVertices(cellid) returns the coordinates of four vertices, so how can I get the id of the sphere from the central coordinates? Is there a function that can do this?

Revision history for this message
Robert Caulk (rcaulk) said :
#3

Hello,

getVertices() returns directly the body ids of the constituent vertices.

[1]https://www.yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.getVertices

Cheers,

Robert

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#4

Thank you Robert, this solved problem.

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#5

Hello,
I have a new problem, The code is shown below:
.periodic=True
O.cell.hSize=Matrix3(2,0,0, 0,2,0, 0,0,2)
s0=utils.sphere((0.3,0.3,0.3),radius=0.2)
s1=utils.sphere((1,0.3,0.3),radius=0.21)
s2=utils.sphere((0.3,1,0.3),radius=0.28)
s3=utils.sphere((1,1,0.3),radius=0.21)
s4=utils.sphere((0.3,0.3,1),radius=0.21)
s5=utils.sphere((1,0.3,1),radius=0.31)
s6=utils.sphere((0.3,1,1),radius=0.18)
s7=utils.sphere((1,1,1),radius=0.31)
s8=utils.sphere((0.5,0.5,0.5),radius=0.3)

O.bodies.append(s0)
O.bodies.append(s1)
O.bodies.append(s2)
O.bodies.append(s3)
O.bodies.append(s4)
O.bodies.append(s5)
O.bodies.append(s6)
O.bodies.append(s7)
O.bodies.append(s8)
flow=PeriodicFlowEngine()
flow.emulateAction()

csdList=flow.getConstrictionsFull()
a=csdList[1]
b=flow.getVertices(a[0])
c=flow.getVertices(a[1])

I found that the body ids in b and c are the same, but the order is different, they are [7, 2, 5, 2] and [5, 2, 7, 2].
Why is this happening?

Revision history for this message
Chareyre (bruno-chareyre-9) said :
#6

That's because some particles are duplicated in order to mimick periodicity, si the two cells are not the same in memory. Why is it a problem?
-------- Message d'origine --------De : Zhicheng Gao <email address hidden> Date : 28/05/2021 17:16 (GMT+01:00) À : <email address hidden> Objet : Re: [Yade-users] [Question #697260]: are the vertices of the cell
  the center of the sphere Question #697260 on Yade changed:https://answers.launchpad.net/yade/+question/697260    Status: Solved => OpenZhicheng Gao is still having a problem:Hello,I have a new problem, The code is shown below:.periodic=TrueO.cell.hSize=Matrix3(2,0,0, 0,2,0, 0,0,2)s0=utils.sphere((0.3,0.3,0.3),radius=0.2)s1=utils.sphere((1,0.3,0.3),radius=0.21)s2=utils.sphere((0.3,1,0.3),radius=0.28)s3=utils.sphere((1,1,0.3),radius=0.21)s4=utils.sphere((0.3,0.3,1),radius=0.21)s5=utils.sphere((1,0.3,1),radius=0.31)s6=utils.sphere((0.3,1,1),radius=0.18)s7=utils.sphere((1,1,1),radius=0.31)s8=utils.sphere((0.5,0.5,0.5),radius=0.3)O.bodies.append(s0)O.bodies.append(s1)O.bodies.append(s2)O.bodies.append(s3)O.bodies.append(s4)O.bodies.append(s5)O.bodies.append(s6)O.bodies.append(s7)O.bodies.append(s8)flow=PeriodicFlowEngine()flow.emulateAction()csdList=flow.getConstrictionsFull()a=csdList[1]b=flow.getVertices(a[0])c=flow.getVertices(a[1])I found that the body ids in b and c are the same, but the order is different, they are [7, 2, 5, 2] and [5, 2, 7, 2].Why is this happening?-- You received this question notification because your team yade-users isan answer contact for Yade._______________________________________________Mailing list: https://launchpad.net/~yade-usersPost to     : <email address hidden> : https://launchpad.net/~yade-usersMore help   : https://help.launchpad.net/ListHelp

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#7

Dear Chareyre, thank you for your reply. I would like to know how to determine which three bodies are on the shared facet for such two cells.

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#8

On the basis of Chareyre's answer, I would like to know how to determine which three bodies are on the shared facet for such two cells.

Revision history for this message
Best Robert Caulk (rcaulk) said :
#9

the two cells are the same cell :)

Revision history for this message
Zhicheng Gao (zhichenggao) said (last edit ):
#10

Dear Robert,
If I want to get the constriction size distribution, whether these same cells make an effect?

Revision history for this message
Launchpad Janitor (janitor) said :
#11

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Robert Caulk (rcaulk) said :
#12

Changing status to "solved" to avoid launchpad janitor.

Revision history for this message
Zhicheng Gao (zhichenggao) said :
#13

Thanks Robert Caulk, that solved my question.