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

How to determine if a cell is on a boundary in OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2024, 07:18
Default How to determine if a cell is on a boundary in OpenFOAM?
  #1
New Member
 
Join Date: Jul 2022
Posts: 18
Rep Power: 3
applekiller is on a distinguished road
Hello, everyone.

In programming I want to determine if a cell is on boundary. Is there any way to solve it?

I originally wanted to judge whether the face of the cell was in a boundary patch, but felt that cost too much calculation. I look forward to your thoughts.
applekiller is offline   Reply With Quote

Old   March 25, 2024, 13:43
Default
  #2
Member
 
Shravan
Join Date: Mar 2017
Posts: 60
Rep Power: 9
Severus is on a distinguished road
Hello,
Check out this thread: Finding boundary cells
Also check out (based on the this answer in the above thread): https://www.openfoam.com/documentati...aryToCell.html

Thanks
Severus is offline   Reply With Quote

Old   March 25, 2024, 21:13
Default
  #3
New Member
 
Join Date: Jul 2022
Posts: 18
Rep Power: 3
applekiller is on a distinguished road
Quote:
Originally Posted by Severus View Post
Hello,
Check out this thread: Finding boundary cells
Also check out (based on the this answer in the above thread): https://www.openfoam.com/documentati...aryToCell.html

Thanks
Thank you!

Another question is, what is the pattern of grid arrangement in OpenFOAM? Is it that the internal cells are arranged first and then the boundary cells
applekiller is offline   Reply With Quote

Old   March 27, 2024, 10:45
Default
  #4
Member
 
Shravan
Join Date: Mar 2017
Posts: 60
Rep Power: 9
Severus is on a distinguished road
Hello,
I am not a 100% sure, please correct me if I am wrong. I recommend you to print it out if possible and check for yourself.
For the cells, I think the arrangement is based on axis (at least for structured ones). For a specific x axis value, it is fixed and y and z are numbered for that constant x value. Then x is incremented and the same procedure is followed till all the values of x is reached, by that time you would have covered all the cells (similar to the contant/polyMesh/points file). For the faces however, I have heard that it is first internal and then boundary faces. I think decomposition may also influence this (for parallel simulations where the domain is decomposed into several smaller subdomains).

Thanks

Last edited by Severus; March 27, 2024 at 11:54.
Severus 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
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 01:44
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 18:02
Out File does not show Imbalance in % Mmaragann CFX 5 January 20, 2017 10:20
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 04:39
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04


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