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] Troubles with layer adding in my mesh (https://www.cfd-online.com/Forums/openfoam-meshing/106388-troubles-layer-adding-my-mesh.html)

Pierre.c August 27, 2012 18:18

Troubles with layer adding in my mesh
 
Hello everybody,

So I've been starting using OPENFoam those last days and I am a bit stuck at the layer insertion in my mesh.

First of all : I'm meshing a 3D profile (clarkypt) for some remote controlled device to know more about the ground effect on such slender body ... slender because for 1m long, I have only 0.1m of width! so it is 3D since I'm interested in 3D effects.

So for now I generated a mesh without surface layers, to keep it simple, but know, I'd like to add it to capture accurately my boundary layer.

The problem : sHM seems to be detecting that he needs to add layers ... but it clearly says : no layer extruded ... so my question is: why ?

here is the dictionnary I'm using:
http://pastebin.com/rDVyc9wt

and the output of SHM:

http://pastebin.com/NkCNnzXz

So if someone could give me a hint of were it could go wrong ... I would really appreciate it!

for now what I tried is :
play with feature Angle up to 180° : result is above,
play a bit with the mesh quality : reduce the tolerance to allow bad cells ... doesn't seem to have an effect.

I have to say that I am a bit lost!

Thanks for reading,

Pierre

mturcios777 August 27, 2012 19:54

Looking at the output, this appears to hold the key:

Code:

Checking mesh with layer ...
Checking faces in error :
non-orthogonality > 60 degrees : 0
faces with face pyramid volume < -1e+13 : 0
faces with face-decomposition tet quality < 0.01 : 1067680
faces with concavity > 80 degrees : 0
faces with skewness > 4 (internal) or 20 (boundary) : 0
faces with interpolation weights (0..1) < 0.05 : 0
faces with volume ratio of neighbour cells < 0.01 : 0
faces with face twist < 0.05 : 0
faces on cells with determinant < 0.001 : 0
Detected 1067680 illegal faces (concave, zero area or negative cell pyramid volume)
Extruding 0 out of 66660 faces (0%). Removed extrusion at 37854 faces.

sHM tries to extrude but finds that the quality of the new mesh is bad (note the number of faces with poor tet quality and the number of illegal faces are the same). You'll need to change your layer insertion settings and find a combination that works.

Eloise August 29, 2012 09:36

Hi Pierre,

Try to deactivate all the mesh quality controls for the layer insertion
Code:

maxNonOrtho 180;
  maxBoundarySkewness -1;
  maxInternalSkewness -1;
  maxConcave 180;
  minVol -1e33;
  minTetQuality -1e30;
  minTwist -1e30;
  minDeterminant -1;
  minFaceWeight -1;
  minVolRatio -1;

This should allow you to have layers inserted. Run then the checkMesh utility which will create sets of illegal faces. Visualize those sets in paraView and try to understand how to improve the mesh quality at those locations.

Good luck!
Eloïse

Pierre.c August 30, 2012 16:50

Hi everyone,

So first, after the remark of mturcios, I rounded the trailing edge of my profile to get a better there (I can understand that adding such a layer on such a sharp corner can lead to sh***y cells). It did not helped a lot, so I tried by using some more permissive orthogonality settings ... and still didn't worked.

And I just tried the solution of Éloïse ... and WOW, it worked! that was a good solution! but know, new problem : how do I visualize the bad cells in paraView ? I enabled the sets, choose the nonorthoblabla set ... and nothing appeared when in the checkMesh I have this :

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : checkMesh -latestTime
Date  : Aug 30 2012
Time  : 22:33:16
Host  : "zib-desktop"
PID    : 7225
Case  : /home/zib/OpenFOAM/zib-2.1.1/run/openDomainRefined
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 3

Time = 3

Mesh stats
    points:          2420646
    faces:            7011837
    internal faces:  6939387
    cells:            2296002
    boundary patches: 7
    point zones:      0
    face zones:      0
    cell zones:      0

Overall number of cells of each type:
    hexahedra:    2211760
    prisms:        6906
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    77336

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                 
    outlet              450      506      ok (non-closed singly connected) 
    inlet              100      121      ok (non-closed singly connected) 
    outer              1450    1516    ok (non-closed singly connected) 
    leadingEdge_OBJECT  17122    17303    ok (non-closed singly connected) 
    foil_OBJECT        28512    28878    ok (non-closed singly connected) 
    trailingEdge_OBJECT 22770    23368    ok (non-closed singly connected) 
    trailingEdgeEnd_OBJECT2046    2311    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (-2 -1 -1) (7 1 1)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-3.57353e-18 7.56963e-16 -7.41408e-16) OK.
    Max cell openness = 2.10983e-14 OK.
    Max aspect ratio = 428.46 OK.
    Minumum face area = 1.93605e-09. Maximum face area = 0.0402104.  Face area magnitudes OK.
    Min volume = 5.90847e-13. Max volume = 0.00804138.  Total volume = 35.9919.  Cell volumes OK.
    Mesh non-orthogonality Max: 82.6553 average: 5.93784
  *Number of severely non-orthogonal faces: 976.
    Non-orthogonality check OK.
  <<Writing 976 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
    Max skewness = 1.84672 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End

so 976 cells that I do not see ... is there some technique do see them ?

thanks a lot!

mturcios777 August 30, 2012 17:24

You'll need to do a foamToVTK and include the set. Open your mesh case in paraview, then open the VTK file that contains your cellSet (will be in the VTK folder by default)

Eloise August 31, 2012 03:37

It is not a cell set but a face set. Use the command:
foamToVTK -faceSet nonOrthoFaces -latestTime
and import the created VTK in paraView

Pierre.c August 31, 2012 15:31

thanks for the tips, I saw the command in one of your posts Éloïse. And so now it raises new questions!

Now it is more about the mesh quality than inserting the viscous layer but I keep posting on this topic, if a moderator thinks I should start another topic, then I'll do so!

So here is my 3D profile:
http://www.zimagez.com/miniature/profile13.png

the bad faces are those ones:
http://www.zimagez.com/miniature/badfaces.png
as seen from the top:
http://www.zimagez.com/miniature/badcellstopview.png

and some interior mesh details:
http://www.zimagez.com/miniature/detailsmeshle.png
http://www.zimagez.com/miniature/detailsmeshte.png

Now I am wondering why I get those bad faces (and by the way, I do not see 976 faces ... some are missing, where do they go ?) in such "easy" location ??

what are the parameters to tune up to get a very correct mesh (and you can also see that the snapping kinda deform the geometry but I have to play with sHM to solve this with featureEdges I guess)

So every advice is appreciated!

And by the way a more general question on the limits of OpenFOAM : what is a very bad grid (orthogonality, skewness etc ..) for openfoam ?

Thanks a lot for your time,

Cheers,
Pierre

hfs September 20, 2012 09:31

Have you tried Feature Edge Handling‏

http://www.openfoam.com/news/snappyH...ature-edge.php
http://www.cfd-online.com/Forums/ope...ture-edge.html

I guess this will fix your problem

nille_furtado October 21, 2012 09:06

same topic, different problem
 
5 Attachment(s)
Hi everyone, I've got a problem with my layer addition in SHM. I've read a lot about the whole topic, but never heard something about this problem. Perhaps you could help me out.
I am meshing a wind turbine an therefore used SHM, especially the new snapEdge feature of SHM (nFeatureSnapIter). The results for time 2 are very good, but when it comes to layer addition, some "undo"-iterations occur which destroy some of the snapped edges. Furthermore in some of these regions (and only there!) no layers are added. All my checkMesh controls are disabled. I am using a featureAngle of 180.

blaise February 10, 2013 10:04

Problem with featureEdge feature
 
Quote:

Originally Posted by nille_furtado (Post 387752)
Hi everyone, I've got a problem with my layer addition in SHM. I've read a lot about the whole topic, but never heard something about this problem. Perhaps you could help me out.
I am meshing a wind turbine an therefore used SHM, especially the new snapEdge feature of SHM (nFeatureSnapIter). The results for time 2 are very good, but when it comes to layer addition, some "undo"-iterations occur which destroy some of the snapped edges. Furthermore in some of these regions (and only there!) no layers are added. All my checkMesh controls are disabled. I am using a featureAngle of 180.

Hello Nils,

I don't know if this thread is still being watched, but I will give it a try anyway...

Did you solve this problem? I am experiencing the same behaviour of SHM with a ship hull geometry, and the more layer addition iterations I allow to SHM, the less cells are extruded, resulting in a grid almost without any layers. I experimented a lot with all the settings in the layer addition part, but I cannot get better than about 85% of extruded cell layers. Unfortunately, the 15% of layers are missing in quite essential parts. Do you have any helpful hint?

Cheers,

Pascal.

wc34071209 April 4, 2017 19:21

Hi,

Sorry to pop up this thread again. I just would like to know if there is any improvment in SHM's layer addtion in new versions of OF. Layer addtion failure, at least to me, has been a persisting problem when handling complex geometries using SHM.

tonazza June 21, 2019 11:18

Hello everyone,

I'm a newbie in CFD and I've been using OpenFoam with HELYX-OS interface just since 3 months, so I'm no expert at all :D however, I just wanted to share my experience on this subject.

I've had problems in layer insertion from the start, so I set up a very simple case (a bended pipe) and then, using the advice by Eloise in this thread, I've played around with the parameters.

In the end, I identified that in my case the quality control parameters that were forbidding boundary layer insertion were mainly the following 3:

maxBoundarySkewness - which I ended up leaving deactivated (-1)
maxInternalSkewness - which I ended up leaving deactivated (-1)
minTetQuality - which I ended up leaving at a very small value (1E-30)

(even if the skewness limits are deactivated, if the mesh dimensions are specified correctly the resulting mesh doesn't suffer any skewness - at list in my experience with the simplified geometry)

Furthermore, I've also seen that (maybe it's obvious to you) the simulation geometry quality can have a significant impact on meshing: the process of exporting a parametric CAD file (e.g. STEP) to STL can give very different results depending on the software (in my experience, for example, between FreeCad and SALOME) and this in turn applies to the mesh.

...just my 2 cents :)

Andrea


All times are GMT -4. The time now is 09:43.