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

[snappyHexMesh] non-orthogonal faces in layers

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2012, 10:31
Default non-orthogonal faces in layers
  #1
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
Hi Foamers,

I have a hull geometry on which I try to insert layers. In order to reach a reasonable yPlus, I need to insert about 20 layers. When I do so, I nearly don't have any layer cells added on my geometry.
In order to understand why the cells are not inserted, I relaxed the mesh quality in sHM. I obtained a mesh in which the layers are inserted and many non-orthogonal faces are present. They are probably the reason why the layers are not inserted when I keep un-relaxed mesh quality requirement.

I do not understand how to get rid of those non-orthogonal faces.
They are located inside the layer, between polyhedral cells which are perfectly piled up, and I don't see any reason why those faces are detected as non-orthogonal. In attached image, the layer's cells are in grey and the non-orthogonal faces in red.

Help needed please!
Regards,
Eloïse
Attached Images
File Type: jpg Layers.jpg (19.4 KB, 300 views)
Eloise is offline   Reply With Quote

Old   October 12, 2012, 10:08
Default
  #2
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
Hi,

I'm still stuck with this issue of non-orthogonal faces. Here is a typical output of checkMesh of the snapped mesh (Time2) and for the layer mesh (Time 3):

Code:
Time = 2

Mesh stats
    points:           2354368
    faces:            6789693
    internal faces:   6645664
    cells:            2219640
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     2170238
    prisms:        1958
    wedges:        0
    pyramids:      0
    tet wedges:    75
    tetrahedra:    0
    polyhedra:     47369

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch               Faces    Points   Surface topology                  
    frontAndBack        15060    15624    ok (non-closed singly connected)  
    outlet              4650     4836     ok (non-closed singly connected)  
    inlet               4650     4836     ok (non-closed singly connected)  
    upperWall           38905    39312    ok (non-closed singly connected)  
    lowerWall           40342    41260    ok (non-closed singly connected)  
    HULL        40422    43904    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-900 -500 -300) (600 500 0)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.07829e-15 4.53941e-16 4.62619e-14) OK.
    Max cell openness = 3.80173e-16 OK.
    Max aspect ratio = 23.3478 OK.
    Minumum face area = 0.0110912. Maximum face area = 997.836.  Face area magnitudes OK.
    Min volume = 0.00975568. Max volume = 30402.1.  Total volume = 4.49867e+08.  Cell volumes OK.
    Mesh non-orthogonality Max: 60.4405 average: 4.73595
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.25394 OK.

Mesh OK.

Time = 3

Mesh stats
    points:           2773606
    faces:            7985817
    internal faces:   7842477
    cells:            2608303
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     2508558
    prisms:        2220
    wedges:        0
    pyramids:      0
    tet wedges:    113
    tetrahedra:    1
    polyhedra:     97411

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
    Patch               Faces    Points   Surface topology                  
    frontAndBack        15060    15624    ok (non-closed singly connected)  
    outlet              4650     4836     ok (non-closed singly connected)  
    inlet               4650     4836     ok (non-closed singly connected)  
    upperWall           38905    39312    ok (non-closed singly connected)  
    lowerWall           40342    41260    ok (non-closed singly connected)  
    HULL        39733    43297    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-900 -500 -300) (600 500 0)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.70792e-15 7.25352e-16 4.68483e-14) OK.
    Max cell openness = 1.16192e-14 OK.
    Max aspect ratio = 506.676 OK.
    Minumum face area = 3.9423e-05. Maximum face area = 997.836.  Face area magnitudes OK.
    Min volume = 6.24616e-05. Max volume = 30402.1.  Total volume = 4.49867e+08.  Cell volumes OK.
    Mesh non-orthogonality Max: 88.4737 average: 5.90217
   *Number of severely non-orthogonal faces: 3562.
    Non-orthogonality check OK.
  <<Writing 3562 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 2.99817 OK.

Mesh OK.
As you can see, I have a good quality mesh ("Mesh OK") at time 2 and 3, with however a warning on the non-orthogonality at time 3. Those non-orthogonal faces are located on flat faces, rounded faces (large radius) and along an edge which is covered by the layer (edge angle ~30deg). They lead to a crash during the computation, so I really need to avoid them.
I add layers while relaxing the mesh quality in the following way:
Code:
    relaxed
    {
    maxBoundarySkewness 1000; 
    maxInternalSkewness 40;
    minTetQuality -1e30; 
    minDeterminant -1;
    minTwist -1e30;
    maxNonOrtho 180;
    }
Of course, the relaxed maxNonOrtho allows those non-orthogonal faces to appear. If I don't relax this parameter, a too large part of the patches is not covered by layers. Does anyone has an idea about a way to improve the mesh quality in the layers so that the layers cover the whole patch without all those non-orthogonal errors?

Regards,
Eloïse
Eloise is offline   Reply With Quote

Old   October 25, 2012, 05:35
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

there is a good thread here, but I do not find it now.
You can switch off all mesh quality parameters to create the layers on the whole patch.

What sHM are you using? I have no relaxation{} in my sHMD
Tobi is offline   Reply With Quote

Old   October 25, 2012, 05:59
Default
  #4
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
Hello Tobi,

If you find the link to that thread, I'd really be interested! I've been browsing quite a lot around but haven't read about that topic.

I am using OF2.0.1. The relaxation appears under the meshQualityControls in the following way:
Code:
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1e-13;
    minTetQuality 1e-30;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;

    // Advanced
    nSmoothScale 4;
    errorReduction 0.75;

    relaxed
    {
    maxBoundarySkewness 1000; 
    maxInternalSkewness 40;
    minTetQuality -1e30; 
    minDeterminant -1;
    minTwist -1e30;
    }
}
If I relax the maxNonOrtho, I indeed cover the whole surface with layers, but I get non-orthogonal faces in the layers which lead to a crash when solving.
If I don't relax, I get holes in my layers.

Regards,
Eloïse
Eloise is offline   Reply With Quote

Old   October 25, 2012, 06:36
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by Eloise View Post
Hello Tobi,

If you find the link to that thread, I'd really be interested! I've been browsing quite a lot around but haven't read about that topic.

I am using OF2.0.1. The relaxation appears under the meshQualityControls in the following way:
Code:
meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;
    minVol 1e-13;
    minTetQuality 1e-30;
    minArea -1;
    minTwist 0.02;
    minDeterminant 0.001;
    minFaceWeight 0.02;
    minVolRatio 0.01;
    minTriangleTwist -1;

    // Advanced
    nSmoothScale 4;
    errorReduction 0.75;

    relaxed
    {
    maxBoundarySkewness 1000; 
    maxInternalSkewness 40;
    minTetQuality -1e30; 
    minDeterminant -1;
    minTwist -1e30;
    }
}
If I relax the maxNonOrtho, I indeed cover the whole surface with layers, but I get non-orthogonal faces in the layers which lead to a crash when solving.
If I don't relax, I get holes in my layers.

Regards,
Eloïse

Hi,

thats nice to know. I am using 2.1.x and in my sHMDict I have no entry of the relaxation factors ...
If I get it I ll send it to you
Tobi is offline   Reply With Quote

Old   October 25, 2012, 16:38
Default
  #6
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by Tobi View Post
Hi,

thats nice to know. I am using 2.1.x and in my sHMDict I have no entry of the relaxation factors ...
If I get it I ll send it to you

Hi Eloïse,

do you get a output if you are setting layers that you use relaxed things?
I insert the relax entry but its not working
My output
Code:
Shrinking and layer addition phase
----------------------------------

Using mesh parameters 
{
    maxNonOrtho     65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave      60;
    minVol          1e-13;
    minTetQuality   1e-30;
    minArea         1e-30;
    minTwist        0.03;
    minDeterminant  0.001;
    minFaceWeight   0.03;
    minVolRatio     0.01;
    minTriangleTwist -1;
    nSmoothScale    4;
    errorReduction  0.75;
}
Hmmm :/


SOLVED

I insert the lines into the wrong section

Last edited by Tobi; October 25, 2012 at 18:49.
Tobi is offline   Reply With Quote

Old   October 29, 2012, 04:01
Default
  #7
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
Hi Tobi,

Great to read that it is still an option in OF 2.1

Have a nice week,
Eloïse
Eloise 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 08:56
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[snappyHexMesh] SHM is not extruding/adding Layers everywhere matthiasd OpenFOAM Meshing & Mesh Conversion 2 October 16, 2016 17:45
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 10:01
Unaligned accesses on IA64 andre OpenFOAM 5 June 23, 2008 11:37


All times are GMT -4. The time now is 04:49.