|
[Sponsors] |
[mesh manipulation] refineMesh inverses face normals? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 2, 2012, 14:16 |
refineMesh inverses face normals?
|
#1 |
New Member
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 15 |
My home-brewed code crashes on meshes refined with the "refineMesh" utility. To find out what is happening I made a small mesh consisting of two cells and used refineMesh to split both cells. I wrote a code which calculates the snGrad of a scalar field, loops over all cells and writes the snGrads (which are very important for my code) and the face normals Sf() to the output file.
It seems that refineMesh inverses the face normals of some faces. Consequently, the snGrad of these faces has the opposite sign. Interestingly, the normals of the "new" faces created with refineMesh point in the correct direction whereas the normals of "old" internal cells are inversed. Does anybody know why the nomals are inversed? Thanks in advance! Roland |
|
August 2, 2012, 16:05 |
|
#2 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
Hi Roland,
The normal on an internal face point from the cell owner to the cell neighbour. refineMesh probably has to reassign owners and neighbours after refining. But the new normals should still be correctly pointing from the new owners to new neighbours. Why is it a problem? Best regards, Philip |
|
August 3, 2012, 12:28 |
|
#3 |
New Member
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 15 |
Hi Philip,
the normals do point from the new owners to the new neighbours. I knew I had read about the normal orientation and its relation to the owner/neighbour thingy, but I could not remember where exactly... So that was just the information I needed! My code runs on refined meshes now Thank you & best wishes, Roland |
|
August 3, 2012, 12:41 |
|
#4 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
That's Great
Philip |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[DesignModeler] Find face normals to selected faces | Pallati | ANSYS Meshing & Geometry | 1 | July 26, 2017 12:04 |
snappyhexmesh remove blockmesh geometry | philipp1 | OpenFOAM Running, Solving & CFD | 2 | December 12, 2014 11:58 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
gmsh2ToFoam | sarajags_89 | OpenFOAM | 0 | November 24, 2009 23:50 |
WARNING: non-positive face area exist. | Alan | Main CFD Forum | 4 | August 17, 2006 08:33 |