|
[Sponsors] |
Get ID of a boundary face with help of a cell ID |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 26, 2014, 10:47 |
Get ID of a boundary face with help of a cell ID
|
#1 |
Senior Member
Join Date: Nov 2012
Location: Bavaria
Posts: 145
Rep Power: 13 |
Hi Foamers,
I have a cell label of a cell that belongs to the inner mesh and is located next to a boundary patch. Can I directly access the face label ID of the adjacent face of that cell which belongs to the boundary mesh, without looping through all faces of that boundary patch. Aylalisa |
|
September 19, 2018, 12:07 |
|
#2 |
New Member
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8 |
Hello aylalisa,
Did you find out how to do this? I am also interested adithya |
|
September 27, 2018, 07:07 |
|
#3 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
It should not be possible as there is no function for that (as far as I know).
The best solution is to check the face ID before the solver starts and save the ID. Therefore, you do not have to search for the face ID again and again.
__________________
Keep foaming, Tobias Holzmann |
|
September 27, 2018, 16:32 |
|
#4 |
New Member
Adithya Gurumurthy
Join Date: Jun 2017
Posts: 18
Rep Power: 8 |
Hello Tobi,
The Lagrangian solver (eg. icoUncoupledKinematicParcelFoam) writes the positions of the particles in /<time>/lagrangian/kinematicCloud/positions. Aside from writing the x, y and z coordinates, it also writes the cellID of the cell the particle is located at that time step according to the following code fragment in particleIO.C ($FOAM_SRC/lagrangian/basic/particle/particleIO.C) Code:
void Foam::particle::writePosition(Ostream& os) const { if (os.format() == IOstream::ASCII) { os << position_ << token::SPACE << celli_; } else { os.write(reinterpret_cast<const char*>(&position_), sizeofPosition_); } // Check state of Ostream os.check(FUNCTION_NAME); } Code:
//- Face index if the particle is on a face otherwise -1 label facei_; Code:
os << position_ << token::SPACE << celli_; Code:
os << position_ << token::SPACE << facei_; Do you have any idea what is going on? or Do you suggest any work-around to get the solver to write the faceID instead of cellID along with positions? Thanks. -adithya |
|
September 27, 2018, 16:44 |
|
#5 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
I am sorry. I do not have any background for parallel-computing in FOAM (only a small one - not worth to talk about).
__________________
Keep foaming, Tobias Holzmann |
|
March 30, 2022, 06:15 |
|
#6 |
New Member
Join Date: Aug 2019
Posts: 3
Rep Power: 6 |
Hi Tobi,
First of all, thank you for all you have done for the OpenFOAM community. I am desperately looking for how to get access to surface values of the face ids produced by faceSet in every time step. Do you have any idea about how can I solve this problem? Thank you so much! Behrad |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to determine the direction of cell face vectors on processor patches | sebastian_vogl | OpenFOAM Programming & Development | 1 | October 11, 2016 13:17 |
[snappyHexMesh] No layers in a small gap | bobburnquist | OpenFOAM Meshing & Mesh Conversion | 6 | August 26, 2015 09:38 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |
[blockMesh] Axisymmetrical mesh | Rasmus Gjesing (Gjesing) | OpenFOAM Meshing & Mesh Conversion | 10 | April 2, 2007 14:00 |