CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

snappyHexMesh feature edge

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

Like Tree12Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 23, 2012, 11:25
Default
  #41
New Member
 
Deepak Cheekati
Join Date: Jul 2012
Location: Chennai, India
Posts: 21
Rep Power: 4
Turbulence is on a distinguished road
Hi everyone

Are those smooth circular edges even possible?
I am trying to mesh a simple cylinder.I ran snappyhexmesh many times, took all the advice available online, but of no use. (used sufracefeatureextract also). PFA the image of 'cylinder after using sufracefeatureextract'.
Any help would be appreciated.
Attached Images
File Type: jpg Screenshot-1.jpg (97.0 KB, 286 views)
Attached Files
File Type: txt code.txt (64.6 KB, 31 views)
Turbulence is offline   Reply With Quote

Old   July 23, 2012, 12:23
Default
  #42
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
Your cylinder looks like the snap phase of snappyHexMesh has not taken place, just the castellated mesh was created.

Did you reconstructParMesh/look at the correct timestep 3?
Horus is offline   Reply With Quote

Old   July 24, 2012, 07:42
Default
  #43
New Member
 
Deepak Cheekati
Join Date: Jul 2012
Location: Chennai, India
Posts: 21
Rep Power: 4
Turbulence is on a distinguished road
Hi Horus

I just checked it. Its looks fine now. My bad

Thank You
Turbulence
Turbulence is offline   Reply With Quote

Old   September 20, 2012, 06:05
Default having prism layer through to the inlet
  #44
New Member
 
Sam-CFD's Avatar
 
Sam Mathew
Join Date: Apr 2010
Location: India
Posts: 19
Rep Power: 7
Sam-CFD is on a distinguished road
I found this thread quite helpful to have my mesh conform more to the geometry. Now, I am having trouble though, getting the prism layer extending all the way to the flow boundaries.

I would like to have something like this mesh (made using ICEM CFD) but as of now I only manage to get this one with the snappyHexMesh utility.

I would be glad for some reviews. Thank you.

Sam
Sam-CFD is offline   Reply With Quote

Old   September 20, 2012, 12:10
Default
  #45
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 725
Rep Power: 18
mturcios777 will become famous soon enough
You can either make the base cartesian mesh have that kind of underlying structure (but in that case you might as well create the mesh using blockMesh, it can be done), or user layer insertion with uniform layer thickness and lots of layers. This will require some experimentation.
mturcios777 is offline   Reply With Quote

Old   March 11, 2013, 08:23
Default
  #46
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
Hi all,
i would like to extract feature edges in a particular region of my domain. So i am usign -subsetBox option to remove edges outside specified bounding box. Which is the correct syntax?

the option -subsetBox ((1 1 1)(2 2 2)) does not work.

thank
andrea
Andrea_85 is offline   Reply With Quote

Old   March 11, 2013, 10:18
Default
  #47
Senior Member
 
Join Date: Mar 2010
Location: Germany
Posts: 112
Rep Power: 7
cutter is on a distinguished road
Is this really the correct syntax?!

See Extracting a subset of features
cutter is offline   Reply With Quote

Old   March 11, 2013, 10:45
Default
  #48
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
Hi,
you are right! great, now it works.

best


andrea
Andrea_85 is offline   Reply With Quote

Old   July 31, 2013, 02:58
Default
  #49
New Member
 
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 3
mina.basta is on a distinguished road
Dear all,,,

I have problem & I think it's related to the feature edge,, Could you help me ?

studying a valve case

best regards,
Mina
mina.basta is offline   Reply With Quote

Old   August 22, 2013, 10:10
Default sHM - edge snapping
  #50
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 8
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Dear All,
After going through this thread I have fixed some problem, but still I have some problem with edge snapping.

the steps I followed is:

1) I executed blockMesh after setting up the case ( 0 cons-> ( poly, trisurf) sys), see fig 1.

2) Secondly, as Bruno's post, the surfaceFeatureExtract command has been executed.
Code:
surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/fanGeo.stl fanGeo
3) Thirdly, I have edited the sHMDict as below,

Code:
castellatedMesh true;
snap            true;
addLayers       false;

geometry
{
    fanGeo.stl
    {
        type triSurfaceMesh;
        name fanGeo;
    }

     refinementBox
    {
        type searchableBox;
        min (-0.4 0.2 -0.1);
        max (0.4 0.8 0.1);
    }
};

// Settings for the castellatedMesh generation.
castellatedMeshControls
{

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

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

    refinementSurfaces
    {
        fanGeo
        {
            level (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;
}

// 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;
}
I tried many cases, but still the edge of the fan is not on the line. see fig.2 (bladeEdge)

please help me to get the good edge snapping.

Thanks,
Sivakumar
Attached Images
File Type: jpg Fig1.jpg (24.9 KB, 69 views)
File Type: jpg bladeEdge.jpg (64.4 KB, 97 views)

Last edited by wyldckat; August 22, 2013 at 10:44. Reason: Added [CODE][/CODE]
sivakumar is offline   Reply With Quote

Old   August 22, 2013, 10:46
Default
  #51
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Sivakumar,

The second image is too far from the blade details. I can't see how many cells you had available for adjusting the mesh to the blade.

Best regards,
Bruno

PS: please use the "[CODE]" markers, as explained on the second link on my signature.
wyldckat is offline   Reply With Quote

Old   August 22, 2013, 11:03
Default
  #52
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 8
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Dear Bruno,
Thank you very much for your quick reply, I didnt refine any particular region so far. I am trying to make it possible to use of it.
after getting some experience I want to do refining region and adding layers and so on...

I used the blockMeshDict as follows
Code:
convertToMeters 1;

a 10;
b 10;
c 150;
yi 0.2;
yf 0.8;
zi -1.55;
zf 6.05;
xi -0.4;
xf 0.4;

vertices
(
    ($xi $yi $zi) //0
    ($xf $yi $zi) //1
    ($xf $yf $zi) //2
    ($xi $yf $zi) //3
    ($xi $yi $zf) //4
    ($xf $yi $zf) //5
    ($xf $yf $zf) //6
    ($xi $yf $zf) //7
);


blocks
(
    hex (0 1 2 3 4 5 6 7) ($a $b $c) simpleGrading (1 1 1) // is it possible can I make 3 hex boxes?? instead of 1 so that I can give more refinement for particular region? 
);

edges
(
);

patches
(    
);

mergePatchPairs
(
);

If you dont mind please give me some information about defining the patches.

I tried as follows for another case to define patches in the blockMeshDict, but its not working.

convertToMeters 1;

vertices
(
    (-0.2 0 -1.5)
    (0.7 0 -1.5)
    (0.7 0.8 -1.5)
    (-0.2 0.8 -1.5)
    (-0.2 0 -0.1)
    (0.7 0 -0.1)
    (0.7 0.8 -0.1)
    (-0.2 0.8 -0.1)
    (-0.2 0 0)
    (0.7 0 0)
    (0.7 0.8 0)
    (-0.2 0.8 0)
    (-0.2 0 0.1)
    (0.7 0 0.1)
    (0.7 0.8 0.1)
    (-0.2 0.8 0.1)
    (-0.2 0 0.2)
    (0.7 0 0.2)
    (0.7 0.8 0.2)
    (-0.2 0.8 0.2)
    (-0.2 0 6)
    (0.7 0 6)
    (0.7 0.8 6)
    (-0.2 0.8 6)    
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (30 40 100) simpleGrading (1 1 1)
    hex (4 5 6 7 8 9 10 11) (30 40 20) simpleGrading (1 1 1)
    
    hex (8 9 10 11 12 13 14 15) 
    fan 
    (30 40 60) 
    simpleGrading (1 1 1)

    hex (12 13 14 15 16 17 18 19) (30 40 20) simpleGrading (1 1 1)
    hex (16 17 18 19 20 21 22 23) (30 40 500) simpleGrading (1 1 1)
);


boundary
(
    inlet
    {
        type patch;
        faces
        (
            (0 3 2 1)
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (20 21 22 23)
        );
    }
    
    top0
    {
        type wall;
        faces
        (
            (0 1 5 4)
        ); 
    }

    top1
    {
        type wall;
        faces
        (
            (4 5 9 8)
        ); 
    }

    top2 
    {
        type wall;       
        faces
        (
            (8 9 13 12)
        );
    }

    top3
    {
        type wall;
        faces
        (
            (12 13 17 16)
        ); 
    }

    top4
    {
        type wall;
        faces
        (
            (16 17 21 20)
        ); 
    }

    ILR0
    {
        type cyclic;
        neighbourPatch ILR1;
        faces
        (
            (0 4 7 3)           
        ); 
    }

    ILR1
    {
        type cyclic;
        neighbourPatch ILR0;
        faces
        (
            (1 5 6 2)           
        ); 
    }

    CLR0
    {
        type cyclic;
        neighbourPatch CLR1;
        faces
        (
            (4 8 11 7)           
        ); 
    }

    CLR1
    {
        type cyclic;
        neighbourPatch CLR0;
        faces
        (
            (5 9 10 6)           
        ); 
    }

    FCLR0
    {
        type cyclic;
        neighbourPatch FCLR1;
        faces
        (
            (12 16 19 15)           
        ); 
    }

    FCLR1
    {
        type cyclic;
        neighbourPatch FCLR0;
        faces
        (
            (13 17 18 14)           
        ); 
    }

    OLR0
    {
        type cyclic;
        neighbourPatch OLR1;
        faces
        (
            (16 20 23 19)           
        ); 
    }

    OLR1
    {
        type cyclic;
        neighbourPatch OLR0;
        faces
        (
            (17 21 22 18)           
        ); 
    }

    center0 
    {
        type wall;       
        faces
        (
            (3 7 6 2)
        );
    }

    center1 
    {
        type wall;       
        faces
        (
            (7 11 10 6)
        );
    } 

    center2 
    {
        type wall;       
        faces
        (
            (15 19 18 14)
        );
    }

    center3 
    {
        type wall;       
        faces
        (
            (19 23 22 18)
        );
    }
 
    fan 
    {
        type wall;       
        faces
        (
            (8 12 15 11)
            (11 15 14 10)
            (9 13 14 10)
        );
    }

   

);
Thanks,
Sivakumar

Last edited by wyldckat; August 22, 2013 at 11:40. Reason: Added [CODE][/CODE]
sivakumar is offline   Reply With Quote

Old   August 22, 2013, 11:45
Default
  #53
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Sivakumar,

There isn't much I can do with your "blockMeshDict" file. I wanted to see the zoom near the blade's edge, in order to be able to suggest anything useful.

Either way, I suggest that you try to use the currently available GUIs, which I'll quote from here: http://openfoamwiki.net/index.php/Sn..._Interfaces.29
Quote:
SwiftSnap
A very useful plug-in for Blender for configuring snappyHexMeshDict. There is SwiftBlock for blockMeshDict as well!

HelyxOS
A GUI for using OpenFOAM. See the video tutorials:
Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 22, 2013, 12:02
Default
  #54
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 8
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hi Bruno,
I have attached the some of the zoomed figures,


Thanks,
Sivakumar
Attached Images
File Type: jpg leadingEdge.jpg (98.2 KB, 72 views)
File Type: jpg trailingEdge0.jpg (97.3 KB, 58 views)
File Type: jpg trailingEdge1.jpg (93.0 KB, 49 views)
File Type: jpg trailingEdge2.jpg (98.2 KB, 52 views)
File Type: jpg trailingEdge3.jpg (98.4 KB, 50 views)
sivakumar is offline   Reply With Quote

Old   August 22, 2013, 12:23
Default
  #55
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,251
Blog Entries: 34
Rep Power: 84
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Sivakumar,

The number of cells available along the width of the blade, near this end of the blade, is far from enough. You need at least 2x the refinement that you have right now, near that end of the blade, for snappyHexMesh to be able to give you a barely good mesh.

The other detail is that you should keep in mind to have a good base mesh that is well aligned with the blade, if possible.
I think the tutorial "incompressible/pimpleDyMFoam/wingMotion", namely the sub-folder "wingMotion_snappyHexMesh", should give you a good idea of how things work.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   August 22, 2013, 12:37
Default
  #56
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: Cape Town - South Africa
Posts: 186
Rep Power: 8
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Thanks Bruno, I will have a look now.
sivakumar is offline   Reply With Quote

Old   May 28, 2014, 02:03
Default
  #57
Member
 
J.-H. Wang
Join Date: Oct 2010
Location: Ithaca, New York
Posts: 52
Rep Power: 6
f0208secretx is on a distinguished road
Hello all,

I was playing with this surfaceFeatureExtract tool today. Its pretty cool, except that I cannot seem to get it to work.

In particular I am playing with flow over a cube. After the eMesh file was created, I ran snappyHexMesh and got the following error:
Code:
 
--> FOAM FATAL IO ERROR: 
attempt to read beyond EOF

file: /Volumes/OpenFOAM-v2.3.0-git/jui-hsienwang-2.3.x/run/cube/system/snappyHexMeshDict.castellatedMeshControls.features at line 33.

    From function ITstream::read(token&)
    in file db/IOstreams/Tstreams/ITstream.C at line 83.

FOAM exiting
Any ideas where I should look? I attached a couple of related files for your reference. Thanks


JHW
Attached Files
File Type: zip Archive.zip (10.9 KB, 2 views)
f0208secretx is offline   Reply With Quote

Old   May 28, 2014, 15:22
Default
  #58
Member
 
J.-H. Wang
Join Date: Oct 2010
Location: Ithaca, New York
Posts: 52
Rep Power: 6
f0208secretx is on a distinguished road
Quote:
Originally Posted by f0208secretx View Post
Hello all,

I was playing with this surfaceFeatureExtract tool today. Its pretty cool, except that I cannot seem to get it to work.

In particular I am playing with flow over a cube. After the eMesh file was created, I ran snappyHexMesh and got the following error:
Code:
 
--> FOAM FATAL IO ERROR: 
attempt to read beyond EOF

file: /Volumes/OpenFOAM-v2.3.0-git/jui-hsienwang-2.3.x/run/cube/system/snappyHexMeshDict.castellatedMeshControls.features at line 33.

    From function ITstream::read(token&)
    in file db/IOstreams/Tstreams/ITstream.C at line 83.

FOAM exiting
Any ideas where I should look? I attached a couple of related files for your reference. Thanks


JHW

I managed to wipe my own ass. The correct snappyHexMeshDict file should have
Code:
    features
    (
      {
          file  "cube.eMesh";
          level 1;
      }
    );
But my original one is
Code:
    features
    (
          file  "cube.eMesh";
          level 1;
    );
Lesson learned! Great tool for sharp edges.


JHW
f0208secretx is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
How to use Explicit feature edge refinement ziemowitzima OpenFOAM Native Meshers: snappyHexMesh and Others 3 April 22, 2010 09:16
Actuator disk model audrich FLUENT 0 September 21, 2009 07:06
Where's the singularity/mesh flaw? audrich FLUENT 3 August 4, 2009 01:07
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 22:51.