|
[Sponsors] |
May 9, 2005, 12:04 |
Upper triangular face order
|
#1 |
New Member
Matt Amos
Join Date: Mar 2009
Posts: 7
Rep Power: 17 |
Hi all,
I'm trying to convert a mesh from our in-house format to Foam format, but I keep having problems failing the "upper triangular order" mesh check. I've had a look for what "upper triangular order" entails other than the obvious, but I can't find a definition anywhere. Any help appreciated, Matt |
|
May 9, 2005, 12:33 |
Simply said upper-triangular o
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Simply said upper-triangular order is that the order of faces corresponds to the order of the cells they connect.
- take all (higher numbered) cells connected to a cell. - sort them according to their cell label - the faces connecting to those cells should now also be ordered. renumberMesh will do this for you. |
|
April 15, 2014, 08:04 |
Upper-triangular order in detail
|
#3 | |
New Member
Richel Bilderbeek
Join Date: Nov 2013
Posts: 14
Rep Power: 12 |
Quote:
Trying to following the advice, I:
All files and output (and future solution) can be found at https://github.com/richelbilderbeek/...eek/issues/181 , yet I also put the files here. Trace of the faces used, the name of their boundary type and the index of the cell that owns the face: Code:
#Face index - Boundary type - Index of Cell owning the Face TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '0: inside: 1' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '1: top: 0' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '2: top: 1' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '3: right: 0' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '4: left: 0' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '5: front: 1' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '6: bottom: 0' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '7: bottom: 1' TRACE 's.str()' line 174 in file '..\..\Classes\CppTriangleMesh\trianglemeshbuilder.cpp': '8: back: 1' Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ /* Windows 32 and 64 bit porting by blueCAPE: http://www.bluecape.com.pt *\ | Based on Windows porting (2.0.x v4) by Symscape: http://www.symscape.com | \*---------------------------------------------------------------------------*/ Build : 2.1-88b2f2ae3a0b Exec : checkMesh Date : Apr 15 2014 Time : 13:41:22 Host : "AIRBEAR-W7-I5" PID : 5668 Case : D:/Projects/Tools/build-ToolTestTriangleMeshConsole-Desktop_Qt_5_1_1_MinGW_32bit-Debug nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 8 internal points: 0 faces: 9 internal faces: 1 cells: 2 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 0 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 2 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. ***Faces not in upper triangular order. <<Writing 1 unordered faces to set upperTriangularFace Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces ... Patch Faces Points Surface topology top 2 4 ok (non-closed singly connected) right 1 4 ok (non-closed singly connected) left 1 4 ok (non-closed singly connected) front 1 4 ok (non-closed singly connected) bottom 2 4 ok (non-closed singly connected) back 1 4 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.92388 -0.92388 1) (0.92388 0.92388 2) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (0 1.14967e-017 0) OK. ***Open cells found, max cell openness: 1, number of open cells 2 <<Writing 2 non closed cells to set nonClosedCells Minimum face area = 1. Maximum face area = 2. Face area magnitudes OK. Min volume = 0.777778. Max volume = 0.777778. Total volume = 1.55556. Cell volumes OK. Mesh non-orthogonality Max: 180 average: 180 ***Number of non-orthogonality errors: 1. <<Writing 1 non-orthogonal faces to set nonOrthoFaces ***Error in face pyramids: 2 faces are incorrectly oriented. <<Writing 1 faces with incorrect orientation to set wrongOrientedFaces Max skewness = 0.404762 OK. Coupled point location match (average 0) OK. Failed 4 mesh checks. End Code:
FoamFile { version 2.0; format ascii; class faceSet; location "constant/polyMesh/sets"; object upperTriangularFace; } 1 ( 0 ) Code:
FoamFile { version 2.0; format ascii; class vectorField; location "constant/polyMesh"; object points; } 8 ( (-0.92388000000000003 -0.382683 1) (-0.92388000000000003 -0.382683 2) (-0.382683 0.92388000000000003 1) (-0.382683 0.92388000000000003 2) (0.382683 -0.92388000000000003 1) (0.382683 -0.92388000000000003 2) (0.92388000000000003 0.382683 1) (0.92388000000000003 0.382683 2) ) Code:
FoamFile { version 2.0; format ascii; class faceList; location "constant/polyMesh"; object faces; } 9 ( 4(2 4 5 3) 3(5 7 3) 3(3 1 5) 4(2 3 7 6) 4(4 6 7 5) 4(0 4 5 1) 3(2 6 4) 3(4 0 2) 4(0 1 3 2) ) Code:
FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant\polyMesh"; object boundary; } 6 ( top { type zeroGradient; nFaces 2; startFace 1; } right { type zeroGradient; nFaces 1; startFace 3; } left { type zeroGradient; nFaces 1; startFace 4; } front { type zeroGradient; nFaces 1; startFace 5; } bottom { type zeroGradient; nFaces 2; startFace 6; } back { type zeroGradient; nFaces 1; startFace 8; } ) Code:
FoamFile { version 2.0; format ascii; class labelList; note "nPoints: 8 nCells: 2 nFaces: 9"; location "constant/polyMesh"; object owner; } 9 ( 1 0 1 0 0 1 0 1 1 ) Code:
FoamFile { version 2.0; format ascii; class labelList; note "nPoints: 8 nCells: 2 nFaces: 9"; location "constant/polyMesh"; object neighbour; } 9 ( 0 -1 -1 -1 -1 -1 -1 -1 -1 )
__________________
I will never accept a 'Friend' request, I will always accept beer Last edited by assert; April 15, 2014 at 08:07. Reason: layout |
||
April 15, 2014, 09:37 |
[FIXED] Upper-triangular order in detail
|
#4 |
New Member
Richel Bilderbeek
Join Date: Nov 2013
Posts: 14
Rep Power: 12 |
The algorithm to assign indices to a cell is as follows:
* Partition faces (yes, faces) in boundaries * Maintain a cell index counter, start it at zero. * Go through all these faces: find the face its owner (i.e. the cell that owns that face). If that cell has not been assigned a cell index yet, assign it a cell index. Increase that cell index counter.
__________________
I will never accept a 'Friend' request, I will always accept beer |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Error in mesh writing | helios | ANSYS Meshing & Geometry | 21 | August 19, 2021 14:18 |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 10:51 |
[snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 14:07 |
2nd order boundary conditions for 2nd order discretization? | quarkz | Main CFD Forum | 30 | December 26, 2011 07:12 |
Upper triangular ordering | deepsterblue | OpenFOAM Running, Solving & CFD | 0 | December 3, 2007 11:41 |