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

[snappyHexMesh] Troubles with layer adding in my mesh

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

Like Tree12Likes
  • 9 Post By Eloise
  • 1 Post By Eloise
  • 1 Post By nille_furtado
  • 1 Post By tonazza

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 27, 2012, 19:18
Default Troubles with layer adding in my mesh
  #1
New Member
 
Pierre Crepier
Join Date: Aug 2012
Location: Wageningen
Posts: 3
Rep Power: 14
Pierre.c is on a distinguished road
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
Pierre.c is offline   Reply With Quote

Old   August 27, 2012, 20:54
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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.
mturcios777 is offline   Reply With Quote

Old   August 29, 2012, 10:36
Default
  #3
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
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
Eloise is offline   Reply With Quote

Old   August 30, 2012, 17:50
Default
  #4
New Member
 
Pierre Crepier
Join Date: Aug 2012
Location: Wageningen
Posts: 3
Rep Power: 14
Pierre.c is on a distinguished road
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!
Pierre.c is offline   Reply With Quote

Old   August 30, 2012, 18:24
Default
  #5
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
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)
mturcios777 is offline   Reply With Quote

Old   August 31, 2012, 04:37
Default
  #6
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 14
Eloise is on a distinguished road
It is not a cell set but a face set. Use the command:
foamToVTK -faceSet nonOrthoFaces -latestTime
and import the created VTK in paraView
zjdedongxi likes this.
Eloise is offline   Reply With Quote

Old   August 31, 2012, 16:31
Default
  #7
New Member
 
Pierre Crepier
Join Date: Aug 2012
Location: Wageningen
Posts: 3
Rep Power: 14
Pierre.c is on a distinguished road
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:


the bad faces are those ones:

as seen from the top:


and some interior mesh details:



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
Pierre.c is offline   Reply With Quote

Old   September 20, 2012, 10:31
Default
  #8
hfs
Member
 
Join Date: Jul 2012
Posts: 66
Rep Power: 14
hfs is on a distinguished road
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
hfs is offline   Reply With Quote

Old   October 21, 2012, 10:06
Default same topic, different problem
  #9
New Member
 
Nils
Join Date: Oct 2012
Posts: 2
Rep Power: 0
nille_furtado is on a distinguished road
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.
Attached Images
File Type: jpg blade_time2_turbinePatch.jpg (64.8 KB, 380 views)
File Type: jpg blade_time3_turbinePatch.jpg (64.3 KB, 373 views)
File Type: jpg tower_time2_turbinePatch.jpg (86.5 KB, 377 views)
File Type: jpg tower_time3_turbinePatch+addedCells.jpg (87.6 KB, 362 views)
File Type: jpg tower_time3_addedCells.jpg (90.3 KB, 342 views)
namsivag likes this.
nille_furtado is offline   Reply With Quote

Old   February 10, 2013, 11:04
Default Problem with featureEdge feature
  #10
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Quote:
Originally Posted by nille_furtado View Post
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.
blaise is offline   Reply With Quote

Old   April 4, 2017, 20:21
Default
  #11
Senior Member
 
Yuehan
Join Date: Nov 2012
Posts: 142
Rep Power: 14
wc34071209 is on a distinguished road
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.
wc34071209 is offline   Reply With Quote

Old   June 21, 2019, 12:18
Default
  #12
New Member
 
Andrea Toninelli
Join Date: Jun 2019
Location: Torbole Casaglia(BS) - ITALY
Posts: 2
Rep Power: 0
tonazza is on a distinguished road
Send a message via Skype™ to tonazza
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 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
luofq_SYSU likes this.
tonazza is offline   Reply With Quote

Reply

Tags
addlayers, shm, snappyhexmesh, viscous layer

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] Error defining boundary layer around cube snappyHexMesh crizpi21 OpenFOAM Meshing & Mesh Conversion 5 October 16, 2021 11:56
[snappyHexMesh] Multi Region Mesh of a car filter Zephiro88 OpenFOAM Meshing & Mesh Conversion 3 September 11, 2019 20:34
[snappyHexMesh] Snappy Hex Mesh - issue with smoothness of the model edges olek.warc OpenFOAM Meshing & Mesh Conversion 1 August 31, 2018 12:31
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20


All times are GMT -4. The time now is 12:03.