CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] non-orthogonal faces in layers (https://www.cfd-online.com/Forums/openfoam-meshing/107362-non-orthogonal-faces-layers.html)

Eloise September 25, 2012 09:31

non-orthogonal faces in layers
 
1 Attachment(s)
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

Eloise October 12, 2012 09:08

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

Tobi October 25, 2012 04:35

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 :)

Eloise October 25, 2012 04:59

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

Tobi October 25, 2012 05:36

Quote:

Originally Posted by Eloise (Post 388431)
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 ... :confused:
If I get it I ll send it to you

Tobi October 25, 2012 15:38

Quote:

Originally Posted by Tobi (Post 388436)
Hi,

thats nice to know. I am using 2.1.x and in my sHMDict I have no entry of the relaxation factors ... :confused:
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 :D

Eloise October 29, 2012 03:01

Hi Tobi,

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

Have a nice week,
Eloïse


All times are GMT -4. The time now is 20:42.