|
[Sponsors] |
FaceID from code to FaceSet from FaceID is not properly obtained. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 10, 2021, 01:55 |
FaceID from code to FaceSet from FaceID is not properly obtained.
|
#1 |
Member
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 7 |
Dear all,
I have a 3D domain which consists of 3 patches in total. I wanted to extract the faceID of one particular patch and convert to faceSet so that I could obtain BC using createPatch for that faceSet. I obtained faceID from the below code: Code:
code #{ const fvPatch& mesh = this->patch(); const fvBoundaryMesh& boundaryMesh = mesh.boundaryMesh(); for (int patch = 0; patch < 1; patch++) { const word& patchName = mesh.boundaryMesh()[patch].name(); Info << patchName << endl; std::ofstream file; file.open("faceID.txt"); for (int facei = 0; facei < mesh.boundaryMesh()[patch].size(); facei++) { const label& face = boundaryMesh[patch].start() + facei; Info << face << endl; file << face << endl; file << nl << endl; } file.close(); } All these are working fine. But, when I visualize in paraview, the patch is taking faceIDs from different patch too, even though the length of the facelabels is same as the current patch. How is this possible? What wrong am I doing? I have attached two images, one with what faceSet has been obtained from code and the other with what I needed ( the one with complete plain structure). 1. Original which I wanted from code: https://drive.google.com/file/d/1_9A...ew?usp=sharing 2. What I have obtained from code: https://drive.google.com/file/d/14QM...ew?usp=sharing Any leads will be appreciated. Regards, Sunag R A. |
|
Tags |
boundary condition, faceset, openfoam, programming, toposet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Design Integration with CFD? | John C. Chien | Main CFD Forum | 19 | May 17, 2001 16:56 |
What is the Better Way to Do CFD? | John C. Chien | Main CFD Forum | 54 | April 23, 2001 09:10 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 01:18 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 15:34 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 11:20 |