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

[snappyHexMesh] SnappyHexMesh Problem with edge matching

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By sitajeje

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2008, 04:21
Default SnappyHexMesh Problem with edge matching
  #1
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
Hi,
Is there a way to get snappyHexMesh to follow sharp edges? I have meshed a geometry however patch boundaries become irregular, which is causing problems in the solution. The attached image hopefully makes it clearer.



I would like to get this to work, otherwise I'll have to go back to another mesher.

Cheers,
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   August 25, 2008, 05:13
Default Just a little question: are th
  #2
Senior Member
 
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17
johndeas is on a distinguished road
Just a little question: are there advantages to snap hex to mesh instead of creating polygons which would better fit the immersed object ?
johndeas is offline   Reply With Quote

Old   August 25, 2008, 07:22
Default Actually, I should explain my
  #3
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
Actually, I should explain my diagram a bit better. The red and blue patches actually do line up (I moved one so that the join can be seen) the problem are the non flat faces in the red patch.

To answer your question - I use snappyHexMesh as it generally gives a very well behaved mesh, and is (very) easy to set up for complex geometries (stl surfaces).

Prior to this I have generally used netget/gmsh. I have tried to use polyDualMesh to convert these to polyhedral meshes, but without much success. I have downloaded engrid and am going to give it a try instead.

Cheers,
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   August 25, 2008, 14:43
Default As far as I know, snappyHexMes
  #4
Senior Member
 
Francesco Del Citto
Join Date: Mar 2009
Location: Zürich Area, Switzerland
Posts: 237
Rep Power: 18
fra76 is on a distinguished road
As far as I know, snappyHexMesh has no automatic feature line capturing, unfortunately. You can somehow explicitly provide some feature edge through a file separated from the STL, but I haven't tried it and don't know how well it works.

Cheers,
Francesco
fra76 is offline   Reply With Quote

Old   August 26, 2008, 00:01
Default Thanks Francesco. I managed
  #5
Member
 
Andrew King
Join Date: Mar 2009
Location: Perth, Western Australia, Australia
Posts: 82
Rep Power: 17
andersking is on a distinguished road
Thanks Francesco.

I managed to find this thread after another search http://www.cfd-online.com/cgi-bin/Op...c=1&post=24651 - It appears that edge matching won't be a part of snappyHex Mesh for quite a while. It's a pity as apart from this I am impressed with the meshes snappyHexMesh creates. Looks like I'll have to go back to netgen for now.

Cheers,
Andrew
__________________
Dr Andrew King
Fluid Dynamics Research Group
Curtin University
andersking is offline   Reply With Quote

Old   August 12, 2009, 22:20
Default
  #6
xyz
New Member
 
Join Date: Jul 2009
Posts: 3
Rep Power: 16
xyz is on a distinguished road
Is there anyone have any hope that edge capturing will be a possibility with snappy. I think that a must for many peoples..
xyz is offline   Reply With Quote

Old   November 2, 2010, 19:29
Default snapEdge may be what you are looking for
  #7
Member
 
Paul Reichl
Join Date: Feb 2010
Location: Melbourne, Victoria, Australia
Posts: 33
Rep Power: 16
preichl is on a distinguished road
snapEdge may be what you are looking for

see

http://openfoamwiki.net/index.php/Contrib_snapEdge
preichl is offline   Reply With Quote

Old   March 6, 2013, 03:51
Default edges of 3D wing
  #8
New Member
 
Join Date: Jan 2013
Posts: 2
Rep Power: 0
Horsty is on a distinguished road
Hi,

I'm encountering the same problem as andersking. Using snappyHexMesh, don't get the edges of my NACA0012 straight. Any suggestions for improvement?

Cheers,
Horsty
NACA0012.jpg
Horsty is offline   Reply With Quote

Old   March 6, 2013, 07:39
Default
  #9
Member
 
Paul Reichl
Join Date: Feb 2010
Location: Melbourne, Victoria, Australia
Posts: 33
Rep Power: 16
preichl is on a distinguished road
Hi Horsty,

Try looking at the flange example (http://www.openfoam.com/news/snappyH...ature-edge.php)

While I have not tried it for an aerofoil a similar approach involving the use of:
surfaceFeatureExtract
(as per the flange example) should hopefully help.

The flange example should be in tutorials/mesh/snappyHexMesh/flange

Cheers,

Paul
preichl is offline   Reply With Quote

Old   March 6, 2013, 10:43
Default surfaceFeatureExtract
  #10
New Member
 
Join Date: Jan 2013
Posts: 2
Rep Power: 0
Horsty is on a distinguished road
Well, that pretty much did the job.

Thanks a lot mate!

NACA0012_featSurfExtract_#.jpg
Horsty is offline   Reply With Quote

Old   August 25, 2013, 07:26
Default enges in sHM
  #11
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hi there,
I am trying to use sHM for fan, I am having the problem with the edges of the fan please see the attached fig.

I am struggling to get the fine edges for last 2 weeks, please give me some information.

I have used surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/fanGeo.stl fanGeo get fine edge but I am not getting good result.


snappyHexMeshDict:

Code:
 // Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       false;

geometry
{
    fanGeo.stl
    {
        type triSurfaceMesh;
    name fanGeo;
        regions
    {
       FACE.24
       {
        name OLR0;
       }

       FACE.23
       {
        name outlet;
       }

       FACE.25
       {
        name top2;
       }

       FACE.20
       {
        name CLR0;
       }

       FACE.26
       {
        name center1;
       }

       FACE.22
       {
        name OLR1;
       }

           FACE.10
       {
        name top1;
       }

       FACE.16
       {
        name ILR0;
       }

       FACE.9
       {
        name fan;
       }

       FACE.19
       {
        name CLR1;
       }

       FACE.15
       {
        name top0;
       }

       FACE.2
       {
        name fan;
       }

       FACE.11
       {
        name fan;
       }

       FACE.18
       {
        name inlet;
       }

       FACE.13
       {
        name center0;
       }

       FACE.14
       {
        name ILR1;
       }
    }
  }
};



// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    maxLocalCells 2000000;
    maxGlobalCells 20000000;
    minRefinementCells 4;
    maxLoadUnbalance 0.10;
    nCellsBetweenLevels 5;

    features
    (
        {
           file "fanGeo.eMesh";
           level 4;
        }
    );

    refinementSurfaces
    {
        fanGeo
        {
            level (3 3); //change (4 4)
        }
     }
    // Resolve sharp angles
    resolveFeatureAngle 30;

    refinementRegions
    {
        
    }

    locationInMesh (0.15 0.46 1);

    allowFreeStandingZoneFaces true;
}



// Settings for the snapping.
snapControls
{
    nSmoothPatch 5;
    tolerance 1;
    nSolveIter 300;
    nRelaxIter 5;
    nFeatureSnapIter 20;
}



// Settings for the layer addition.
addLayersControls
{

    relativeSizes true;

    layers
    {
        fanGeo_Object
        {
            nSurfaceLayers 3;
        }
    }

    expansionRatio 1.1;
    finalLayerThickness 0.9;
    minThickness 0.1;
    nGrow 0;
    featureAngle 30;
    nRelaxIter 3;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 90;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
}



// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
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;

    nSmoothScale 4;
    errorReduction 0.75;
}


// Advanced

// Flags for optional output
// 0 : only write final meshes
// 1 : write intermediate meshes
// 2 : write volScalarField with cellLevel for postprocessing
// 4 : write current intersections as .obj files
debug 0;


// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;
Thanks,
Sivakumar

Last edited by wyldckat; August 25, 2013 at 07:53. Reason: Added [CODE][/CODE]
sivakumar is offline   Reply With Quote

Old   August 25, 2013, 07:28
Default
  #12
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
figure for the previous post
Attached Images
File Type: jpg trailingEdge.jpg (93.7 KB, 330 views)
sivakumar is offline   Reply With Quote

Old   January 21, 2015, 05:00
Default
  #13
New Member
 
farahidayu
Join Date: Aug 2010
Posts: 20
Rep Power: 15
farahiam is on a distinguished road
hello.

did you manage to solve the problem coz I am now having similar problem like yours.

i am volume meshing with shm for my wind turbine but the mesh is not smooth around the blade.

thanks

Ayu
farahiam is offline   Reply With Quote

Old   August 24, 2017, 02:32
Default
  #14
Member
 
Join Date: Sep 2016
Posts: 63
Rep Power: 9
sitajeje is on a distinguished road
Hello sivakumar,

I believe you have solved your problem, just for other interested snappyHexMesh users: try to use the same level of refinement on edges and surfaces would help.

Hello Horsty,

I have a similar problem as yours. I used surfaceFeatureExtract and explicitFeatureSnap but without success. I wonder whether you can give me some suggestions on my thread below, thank you very much in advance!
https://www.cfd-online.com/Forums/op...le-please.html

Best regards,
sitajeje
JulioPieri likes this.
sitajeje 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
[snappyHexMesh] Problem airfoil snappyhexmesh add layer bye bye my blue OpenFOAM Meshing & Mesh Conversion 1 May 5, 2017 05:56
[snappyHexMesh] snappyHexMesh problem shengqiming OpenFOAM Meshing & Mesh Conversion 0 December 15, 2016 08:35
[snappyHexMesh] SnappyHexMesh Parallel run - face ordering problem DaveR OpenFOAM Meshing & Mesh Conversion 8 November 9, 2016 10:53
[snappyHexMesh] SnappyHexMesh Patch Problem Perschr OpenFOAM Meshing & Mesh Conversion 0 October 8, 2016 12:09
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 01:07


All times are GMT -4. The time now is 16:54.