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

refineMesh inverses face normals?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 2, 2012, 13:16
Default refineMesh inverses face normals?
  #1
RoE
New Member
 
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 6
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, 15:05
Default
  #2
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 570
Rep Power: 19
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, 11:28
Default
  #3
RoE
New Member
 
Roland Engberg
Join Date: Jan 2011
Posts: 14
Rep Power: 6
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, 11:41
Default
  #4
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 570
Rep Power: 19
bigphil will become famous soon enoughbigphil will become famous soon enough
That's Great

Philip
bigphil is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


All times are GMT -4. The time now is 07:10.