|
[Sponsors] |
June 17, 2016, 18:56 |
Face IDs for cells at boundary patch
|
#1 |
New Member
Praveen Srikanth
Join Date: Jul 2012
Location: West Lafayette, IN
Posts: 23
Rep Power: 14 |
Hello Forum users,
I am working with the conjugate heat transfer solver where I am trying to find the temperature at a liquid vapor interface by interpolating the temperatures from the liquid and the gas regions and taking an average. I interpolate the temperatures with Code:
surfaceScalarField TI_liquid = fvc::interpolate(liquidT); surfaceScalarField TI_gas = fvc::interpolate(gasT); Code:
const labelList& gasPFaceCells = gasMesh_.boundary()[gasPatchID_].faceCells(); |
|
June 23, 2016, 08:13 |
|
#2 |
Member
Vignesh
Join Date: Oct 2012
Location: Darmstadt, Germany
Posts: 66
Rep Power: 14 |
Hi,
If you have not figured it out, Code:
//To access the mesh information for the boundary const polyPatch& cPatch = mesh.boundaryMesh()[patchI]; //Starting index of the face in a patch label faceId_start = cPatch.start() ; List of cells close to a boundary const labelUList& faceCells = cPatch.faceCells(); forAll(cPatch, faceI) { // index of each face label faceID = faceId_start +faceI; //id of the owner cell having the face label faceOwner = faceCells[faceI] ; .... } If there is a better way, do let me know !!
__________________
Thanks and Regards Vignesh |
|
July 6, 2016, 12:55 |
|
#3 |
New Member
Praveen Srikanth
Join Date: Jul 2012
Location: West Lafayette, IN
Posts: 23
Rep Power: 14 |
Hey Vignesh,
Thank you so much for that. I did not realise that the face numbers on the patch were going to be continuous. Code:
const cell& gasFaces = gasMesh_.cells()[gasPfCellI]; label gasfaceI = 0; forAll(gasFaces, i) { label gasPatchI = gasMesh_.boundaryMesh().whichPatch(gasFaces[i]); if(gasPatchI == gasPatchID_) { gasfaceI = gasFaces[i]; Info<<"gasFaceI = "<< gasfaceI<<endl; } } |
|
Tags |
boundary cell, chtmultiregionfoam, conjugate heat transfer, face |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Wedge patch '*' is not planar | LilumDaru | OpenFOAM Meshing & Mesh Conversion | 7 | September 18, 2024 06:52 |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 07:09 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 11:56 |