# 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:
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:

## This question was reopened

 Revision history for this message Robert Caulk (rcaulk) said on 2021-05-27: #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 on 2021-05-27: #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 on 2021-05-27: #3

Hello,

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

Cheers,

Robert

 Revision history for this message Zhicheng Gao (zhichenggao) said on 2021-05-28: #4

Thank you Robert, this solved problem.

 Revision history for this message Zhicheng Gao (zhichenggao) said on 2021-05-28: #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)

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 on 2021-05-28: #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

 Revision history for this message Zhicheng Gao (zhichenggao) said on 2021-05-29: #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 on 2021-06-01: #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 Robert Caulk (rcaulk) said on 2021-06-01: #9

the two cells are the same cell :)

 Revision history for this message Zhicheng Gao (zhichenggao) said on 2021-06-01 #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 on 2021-06-17: #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 on 2021-06-17: #12

Changing status to "solved" to avoid launchpad janitor.

 Revision history for this message Zhicheng Gao (zhichenggao) said on 2021-06-20: #13

Thanks Robert Caulk, that solved my question.