|
[Sponsors] |
May 9, 2016, 05:38 |
find Cell Index via geometry coordinates
|
#1 |
Member
Charles K.
Join Date: Feb 2016
Location: Germany
Posts: 37
Rep Power: 10 |
Hello everyone,
I know the xyz coordinates of a certain point in my model geometry and want to use these coordinates to get the nearest Cell Index in Open Foam. I looked through the Documentation in order to find an existing OF utility able to resolve my problem but found nothing. I know that there is a function in OF called 'findCell' that extracts the index of a cell in a mesh. Unfortunately, I'm quite new to OpenFoam and have no Idea how to implement 'findCell' in an utility. Does anyone have have an idea? Charles |
|
May 9, 2016, 23:10 |
|
#2 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Heya,
Check out this thread and see if it helps you get started: http://www.cfd-online.com/Forums/ope...-parallel.html Cheers! Kyle |
|
May 10, 2016, 06:12 |
|
#3 |
Member
Charles K.
Join Date: Feb 2016
Location: Germany
Posts: 37
Rep Power: 10 |
Hello Kyle and thanks for your answer and the link!
As a first step, i would like to know how utilities are created and executed in OFl, i've never done it before. Do I simply have to write the content of my own utility in a new text file, make the file executable and run it over the specific OF case? Thanks for your help, Charles |
|
May 10, 2016, 15:14 |
|
#4 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
Hi Charles,
It really drastically depends on what it is you're trying to do... A good place to start might be to go through the /applications/utilities folder and see if you find something that is already doing something roughly similar to what you're trying to accomplish. Try to understand whats its doing then try and adapt it from there. |
|
September 17, 2016, 17:15 |
findNearestCell() tolerance
|
#5 |
Senior Member
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16 |
Hi Kyle,
As you suggested, I have been using the function findNearestCell() (which belongs to the meshSearch class, http://openfoamcfd.sourceforge.net/d...eshSearch.html) inside my script to get the nearest cells to a series of points inside the boundary layer for flow over an airfoil. It seems the tolerance (tol_, which is a public variable of the class) is hard-coded to a value of 1e-3, which may not be sufficient for regions of very fine mesh. That is why I'm getting wrong results out of the function findNearestCell(). Have you ever faced this issue, and Is there any way to change this tolerance without recompiling? Thanks |
|
Tags |
cell, coordinates, find, findcell, index |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find face area of each cell in a boundary patch? | Hale | OpenFOAM Post-Processing | 3 | August 6, 2019 08:06 |
Problem with building geometry - concentric cylinders | Rhoddwen | OpenFOAM Pre-Processing | 9 | December 17, 2014 11:02 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 15:06 |
CFX-Pre problem, pls help!!! | cth_yao | CFX | 0 | February 17, 2012 01:52 |
[ANSYS Meshing] need to convert a cell based geometry into STL or CGNS | kamran_kibria | ANSYS Meshing & Geometry | 0 | September 15, 2011 06:14 |