|
[Sponsors] |
February 19, 2014, 17:35 |
How to access 'patchTypes'?
|
#1 |
New Member
Join Date: Jan 2013
Posts: 7
Rep Power: 13 |
Hi everybody,
can anybody give me a hint about how one can get access to the type of the patches, similar to Code:
const labelList& patch1 = mesh.boundary()["inlet"].faceCells(); Thanx in advance. |
|
February 20, 2014, 00:54 |
Access Patches
|
#2 | |
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 14 |
Just for a example:
Code:
DynamicList<label> fluidCoupledTemperaturePatchIDs(Tf.boundaryField().size()); DynamicList<label> fluidCoupledHeatFluxPatchIDs(Tf.boundaryField().size()); forAll(Tf.boundaryField(), patchI) { if(Tf.boundaryField()[patchI].type() == "regionCoupleTemperature") { fluidCoupledTemperaturePatchIDs.append(patchI); } else if(Tf.boundaryField()[patchI].type() == "regionCoupleHeatFlux") { fluidCoupledHeatFluxPatchIDs.append(patchI); } } Quote:
|
||
February 20, 2014, 04:28 |
|
#3 |
New Member
Join Date: Jan 2013
Posts: 7
Rep Power: 13 |
Thank you for the answer.
But i am looking for the base boundary type (patch, wall, empty, cyclic, symmetry ...). I found the solution now. Code:
const polyBoundaryMesh& patches = mesh.boundaryMesh(); forAll(patches, patchI) { const polyPatch& pp = patches[patchI]; Info<< " type " << pp.type() << endl; } |
|
February 20, 2014, 19:49 |
|
#4 |
Member
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13 |
Also might be helpful for you:
Code:
forAll(JTherm.boundaryField(),patchI) { if (isA<wallFvPatch>(mesh.boundary()[patchI])) { |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting access to mesh (fvMesh) via object registry | Chris Lucas | OpenFOAM Programming & Development | 18 | January 15, 2024 02:57 |
[DesignModeler] DesignModeler Scripting: How to get Full Command Access | ANT | ANSYS Meshing & Geometry | 53 | February 16, 2020 15:13 |
Online libraries - with access to Journals | momentum_waves | Main CFD Forum | 2 | December 12, 2007 10:08 |
Error: access: unbound variable,HELP | sudhakar | FLUENT | 0 | January 15, 2007 23:21 |
Access Density | Allan Walsh | FLUENT | 3 | October 4, 2005 07:55 |