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

[snappyHexMesh] Face normals of non-planar faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2023, 06:41
Default Face normals of non-planar faces
  #1
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
Teilhart is on a distinguished road
How does snappyHexMesh (and I suppose OpenFOAM in general) define the face normal if a face fails to be planar? Is it kind of an (area-weighted) average of the triangle normals of some triangulation of the face? If so, which triangulation is used? I suspect that it might be independent of the chosen triangulation but I'm not quite sure.
Teilhart is offline   Reply With Quote

Old   November 7, 2023, 03:49
Default
  #2
New Member
 
Cristóbal
Join Date: Jan 2022
Location: Sweden
Posts: 14
Rep Power: 4
cibanez is on a distinguished road
Hi,

As you mention, in order to calculate the area and normal direction of a face, this one is divided into triangles by using its centroid.

The cross product of two vectors is perpendicular to those vectors and its magnitude is the area of a paralellogram with both vectors as sides. Half of this magnitude represents the area of a triangle. In OpenFOAM the sum of the cross product vectors on each subtriangle gives the normal direction to the entirety of the face. Half the magnitude of this last vector is the total area of the face. Also, the area weighted average of each triangle center gives the face center.

You can check the source code here:

https://develop.openfoam.com/Develop...shTools.C#L204

/Cristóbal
cibanez is offline   Reply With Quote

Old   November 18, 2023, 07:31
Default
  #3
New Member
 
Join Date: Nov 2023
Posts: 4
Rep Power: 2
Teilhart is on a distinguished road
Ok, the triangulation is based on the centriod. That clarifies ist. Thank you!
Teilhart 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 05:29
[Gmsh] Vertex numbering is dense KateEisenhower OpenFOAM Meshing & Mesh Conversion 7 August 3, 2015 10:49
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


All times are GMT -4. The time now is 14:29.