CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] refineMesh inverses face normals?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2012, 14:16
Default refineMesh inverses face normals?
  #1
RoE
New Member
 
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 15
RoE is on a distinguished road
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
RoE is offline   Reply With Quote

Old   August 2, 2012, 16:05
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by RoE View Post
It seems that refineMesh inverses the face normals of some faces.
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
bigphil is offline   Reply With Quote

Old   August 3, 2012, 12:28
Default
  #3
RoE
New Member
 
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 15
RoE is on a distinguished road
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
RoE is offline   Reply With Quote

Old   August 3, 2012, 12:41
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
That's Great

Philip
bigphil is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:54.