CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How many particles are in a cell?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 21, 2021, 03:27
Default How many particles are in a cell?
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
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
sharonyue is offline   Reply With Quote

Old   October 21, 2021, 05:40
Default
  #2
Member
 
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16
guin is on a distinguished road
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.
guin is offline   Reply With Quote

Old   December 26, 2021, 14:01
Default
  #3
Member
 
Jairo A. Gutiérrez S
Join Date: Nov 2014
Posts: 57
Rep Power: 11
jairoandres is on a distinguished road
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?
jairoandres is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 09:09.