|
[Sponsors] |
Obtaining the number of faces contained in a patch. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 30, 2010, 09:56 |
Obtaining the number of faces contained in a patch.
|
#1 |
Senior Member
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21 |
Dear Foamers,
I had two questions related to the information depending on a certain patch.
Thank you for your reply! Francois. |
|
September 30, 2010, 21:36 |
|
#2 |
Senior Member
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24 |
Francois, as regards your first question I don't what kind of class is nbr. I'll give you an example with a volScalarField:
T.boundaryField()[nbrPatchID].size() I think the solution is not far of this. Always remember to look in classes whose your interested in class inherits. In this case size() method is implemented in fvPatch class. Greetings from Argentina.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D. Research Scientist Research Center for Computational Methods (CIMEC) - CONICET/UNL Tel: 54-342-4511594 Int. 7032 Colectora Ruta Nac. 168 / Paraje El Pozo (3000) Santa Fe - Argentina. http://www.cimec.org.ar Last edited by santiagomarquezd; October 1, 2010 at 09:17. Reason: Spelling error |
|
October 1, 2010, 07:41 |
|
#3 |
Senior Member
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21 |
Dear Santiago,
Thank you for your reply! Coincidentally, your example was exactly what I was looking for, as I am trying to modify the velocity field of a volVectorField. It works! nbrMesh is of type fvMesh, and from that object I'm read a velocity field which I want to adapt. I was trying to get the patch size from the mesh object through the use op some obscure function called .nFaces() contained in primitiveMesh, and inherited via via by fvMesh... How to make your life complicated... Thanks again for your efficient solution! Does anybody care to give me some hints on how to proceed with my second question? Greetings from sunny Holland, Francois |
|
October 3, 2010, 12:14 |
|
#4 |
Senior Member
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22 |
Try whichPatch and whichFace from boundaryMesh.
|
|
October 6, 2010, 09:41 |
|
#5 |
Senior Member
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21 |
Thanks for the tip!
|
|
Tags |
nfaces, walldist |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to let the mesh motion solver just solve a small region near a moving boundary? | zhajingjing | OpenFOAM Running, Solving & CFD | 9 | April 28, 2016 05:15 |
Problems with mpirun | duderino | OpenFOAM | 17 | February 5, 2010 14:00 |
[mesh manipulation] Using createPatch in place of couplePatches | sripplinger | OpenFOAM Meshing & Mesh Conversion | 8 | November 13, 2009 08:14 |
Courant number, patches, etc | oort | OpenFOAM | 1 | July 24, 2009 19:05 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |