|
[Sponsors] |
March 7, 2011, 17:01 |
area of a patch
|
#1 |
New Member
mediode
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello,
I would appreciate if anybody could give me a hint how to determine the area of an existing patch? (I would like to investigate the geometrical error produced by using snappyhexmesh.) m* |
|
March 8, 2011, 07:00 |
|
#2 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi mediode,
If you know the name of the patch (or the patchID straight away), then you can do the following. Here, the name of the patch is "movingWall", from the icoFoam cavity case. Code:
// Find the patchID of the patch by name label patchID = mesh.boundaryMesh().findPatchID("movingWall"); // Create a polyPatch for looping const polyPatch& myPatch = mesh.boundaryMesh()[patchID]; // Initialize patchArea scalar patchArea = 0.0; // Loop trhough all faces on the polyPatch, adding their magnitude surface // area vectors forAll(myPatch, faceI) { patchArea += mesh.magSf().boundaryField()[patchID][faceI]; }
__________________
Regards, Gijs |
|
April 6, 2011, 11:16 |
|
#3 |
New Member
mediode
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Thanks a lot for the answer. Sorry for the delay.
Best regards M* |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with cyclic boundaries in Openfoam 1.5 | fs82 | OpenFOAM | 36 | January 7, 2015 01:31 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
CFX Solver Memory Error | mike | CFX | 1 | March 19, 2008 08:22 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |