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

How to efficiently find all cells within an 3D object (e.g. box or sphere)?

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 26, 2022, 02:16
Question How to efficiently find all cells within an 3D object (e.g. box or sphere)?
  #1
Senior Member
 
David Long
Join Date: May 2012
Location: Germany
Posts: 104
Rep Power: 14
keepfit is on a distinguished road
Hi Foamers,

suppose there is a moving object in fluid. I want to know all cells (IDs) that intersects the object at EVERY timestep. Is there any way to avoid loop all cells in the fluid domain?

My idea is: first find the cell near the center of the object, then loop over the neighboring cells of the first cell. We repeat this process on preciously found cells until new cells are all outside the object. This way we don't need to loop over cells that are far away from the object.

Nevertheless, I am not familiar with existing OpenFOAM algorithms to do this job more efficiently. Any wonderful advice will be highly appreciated.

Last edited by keepfit; February 2, 2022 at 04:10.
keepfit is offline   Reply With Quote

 

Tags
findcell, meshsearch, octree


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
[snappyHexMesh] snappyHexMesh stuck when snap is turned on yukuns OpenFOAM Meshing & Mesh Conversion 3 February 2, 2021 13:05
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 08:54
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 14:56
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30


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