|
[Sponsors] |
October 21, 2021, 03:27 |
How many particles are in a cell?
|
#1 |
Senior Member
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 844
Rep Power: 18 |
Hello there,
I know that p.cell() tells you that which cell this particle belongs to. On the contrary, I want to know the particles' label if they belong to a same cell. I tried some ways but they are cumbersome. Is there any simple way to achieve this? Thanks. In the following it is an example, we have 5 particles labeling 1,2,3,4,5. particle 1 belongs to cell 23 particle 2 belongs to cell 20 particle 3 belongs to cell 23 particle 4 belongs to cell 21 particle 5 belongs to cell 23 therefore, cell 23 has particle 1 3 5. How can we extract the labels "1" "3" "5"?
__________________
My OpenFOAM algorithm website: http://dyfluid.com By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html |
|
October 21, 2021, 05:40 |
|
#2 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
You seem to be actually looking for what cellOccupancy() does
https://cpp.openfoam.org/v7/classFoa...bcb51500c11841 I am not sure if it will give you with the appropriate output format out of the box, but you can try it out. |
|
December 26, 2021, 14:01 |
|
#3 |
Member
Jairo A. Gutiérrez S
Join Date: Nov 2014
Posts: 60
Rep Power: 11 |
Now that you ask that, I wonder how could you determine the number of particles inside a specific cell. For example for celli, I want to determine the number of particles inside (or previously tracked into it). Is that information stored for each cell? or the information is stored for the particles with the cell number containing it?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
F 32 number of particles per cell | ananthw | REEF3D | 1 | June 16, 2021 05:13 |
Fluent UDF wrong number of cells in parallel - correct in serial | dralexpe | Fluent UDF and Scheme Programming | 7 | May 17, 2018 08:26 |
Add lagrangian particles to OpenFoam solver | luchen2408 | OpenFOAM | 0 | June 2, 2015 03:10 |
trying to simulate two-phase jet flow with particles in surface injection | ajkratos | FLUENT | 5 | March 3, 2015 21:33 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 14:06 |