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] SnappyHexMesh Problem with edge matching (https://www.cfd-online.com/Forums/openfoam-meshing/61539-snappyhexmesh-problem-edge-matching.html)

andersking August 25, 2008 04:21

SnappyHexMesh Problem with edge matching
 
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.

http://www.cfd-online.com/OpenFOAM_D...ges/1/8845.jpg

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

Cheers,
Andrew

johndeas August 25, 2008 05:13

Just a little question: are th
 
Just a little question: are there advantages to snap hex to mesh instead of creating polygons which would better fit the immersed object ?

andersking August 25, 2008 07:22

Actually, I should explain my
 
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

fra76 August 25, 2008 14:43

As far as I know, snappyHexMes
 
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

andersking August 26, 2008 00:01

Thanks Francesco. I managed
 
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

xyz August 12, 2009 22:20

Is there anyone have any hope that edge capturing will be a possibility with snappy. I think that a must for many peoples..

preichl November 2, 2010 19:29

snapEdge may be what you are looking for
 
snapEdge may be what you are looking for

see

http://openfoamwiki.net/index.php/Contrib_snapEdge

Horsty March 6, 2013 03:51

edges of 3D wing
 
1 Attachment(s)
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
Attachment 19610

preichl March 6, 2013 07:39

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

Horsty March 6, 2013 10:43

surfaceFeatureExtract
 
1 Attachment(s)
Well, that pretty much did the job.

Thanks a lot mate!

Attachment 19634

sivakumar August 25, 2013 07:26

enges in sHM
 
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

sivakumar August 25, 2013 07:28

1 Attachment(s)
figure for the previous post

farahiam January 21, 2015 05:00

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

sitajeje August 24, 2017 02:32

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


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