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

[snappyHexMesh] snappy works but does not add layers...why?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2013, 05:28
Default snappy works but does not add layers...why?
  #1
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Dear foamers,
Please any body can help me. My snappy utility for my work, but it does not add layers. My geometry and the snappy is like in photos, can any one have a go on my snappy dictionary below..
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap true;
addLayers true;

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


castellatedMeshControls
{
maxLocalCells 500000;
maxGlobalCells 1000000;
minRefinementCells 100;
nCellsBetweenLevels 6;
features
();
refinementSurfaces
{
injector
{
level (4 3);
}
}

refinementRegions
{
}
resolveFeatureAngle 200;

locationInMesh (0 0 0);
allowFreeStandingZoneFaces false;
}
snapControls
{
nSmoothPatch 3;
tolerance 4;
nSolveIter 60;
nRelaxIter 5;
}
addLayersControls
{
relativeSizes true;
layers
{
injector
{
nSurfaceLayers 4;
}
}/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

castellatedMesh true;
snap true;
addLayers true;

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


castellatedMeshControls
{
maxLocalCells 500000;
maxGlobalCells 1000000;
minRefinementCells 100;
nCellsBetweenLevels 6;
features
();
refinementSurfaces
{
injector
{
level (4 3);
}
}

refinementRegions
{
}
resolveFeatureAngle 200;

locationInMesh (0 0 0);
allowFreeStandingZoneFaces false;
}
snapControls
{
nSmoothPatch 3;
tolerance 4;
nSolveIter 60;
nRelaxIter 5;
}
addLayersControls
{
relativeSizes true;
layers
{
injector
{
nSurfaceLayers 4;
}
}
expansionRatio 1.0;
finalLayerThickness 0.3;
minThickness 0.1;
nGrow 1;
featureAngle 30;
nRelaxIter 3;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 130;
nBufferCellsNoExtrude 1;
nLayerIter 50;
}
meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol 1e-13;
minTetQuality 1e-30;
minArea -1;
minTwist 0.05;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
minFlatness 0.5;
}

debug 0;
mergeTolerance 1e-6;

expansionRatio 1.0;
finalLayerThickness 0.3;
minThickness 0.1;
nGrow 1;
featureAngle 30;
nRelaxIter 3;
nSmoothSurfaceNormals 1;
nSmoothNormals 3;
nSmoothThickness 10;
maxFaceThicknessRatio 0.5;
maxThicknessToMedialRatio 0.3;
minMedianAxisAngle 130;
nBufferCellsNoExtrude 1;
nLayerIter 50;
}
meshQualityControls
{
maxNonOrtho 65;
maxBoundarySkewness 20;
maxInternalSkewness 4;
maxConcave 80;
minVol 1e-13;
minTetQuality 1e-30;
minArea -1;
minTwist 0.05;
minDeterminant 0.001;
minFaceWeight 0.05;
minVolRatio 0.01;
minTriangleTwist -1;
nSmoothScale 4;
errorReduction 0.75;
minFlatness 0.5;
}

debug 0;
mergeTolerance 1e-6;

Sandy,
Attached Images
File Type: jpg paraview mesh.jpg (37.6 KB, 118 views)
File Type: jpg snappy picture.jpg (14.8 KB, 108 views)
sandy13 is offline   Reply With Quote

Old   March 25, 2013, 16:18
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Check the second tutorial at this page: http://openfoamwiki.net/index.php/Sn...als_and_Guides - namely the one from the 7th OpenFOAM Workshop
__________________
wyldckat is offline   Reply With Quote

Old   May 16, 2013, 05:17
Default help
  #3
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
hi sandy
i create geometry in solid and save it .stl
but when open in linux its there is wrong
can you help me?
sh.d is offline   Reply With Quote

Old   May 16, 2013, 05:35
Default ascci stl
  #4
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sh.d View Post
hi sandy
i create geometry in solid and save it .stl
but when open in linux its there is wrong
can you help me?
Dear sh.d,
In fact I do not why your file does not open with linux, but have you saved your file as an ascci format stl file. I think you should pick ascci when you save the file If you did not and I wish If I can help you more.
Sandy,
sandy13 is offline   Reply With Quote

Old   May 17, 2013, 08:07
Default help
  #5
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
Hi sandy
Thank you very much for answering my question. But I do not know how to save your file format ascci?
Do you know?
sh.d is offline   Reply With Quote

Old   May 17, 2013, 09:19
Default ascii format
  #6
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sh.d View Post
Hi sandy
Thank you very much for answering my question. But I do not know how to save your file format ascci?
Do you know?
Okay, you mad your geometry by solid works and saved it in STL. now go to linux and use blender software. In blender import this STL file and open it you will see your geometry the export it as an STL and in the exporting window there is option of ascii, pick this option and unpick apply modifiers, so you will get it and then you can use it in OF.
Sandy,
sandy13 is offline   Reply With Quote

Old   May 17, 2013, 10:01
Default
  #7
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
Quote:
Originally Posted by sandy13 View Post
Okay, you mad your geometry by solid works and saved it in STL. now go to linux and use blender software. In blender import this STL file and open it you will see your geometry the export it as an STL and in the exporting window there is option of ascii, pick this option and unpick apply modifiers, so you will get it and then you can use it in OF.
Sandy,
thank you very very much sandy
sh.d is offline   Reply With Quote

Old   May 17, 2013, 10:42
Default
  #8
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
Quote:
Originally Posted by sh.d View Post
thank you very very much sandy
Dear sany
i import my geometry in blender but i cant see it!!!!!!!!!!!!!!!!!!
?



i open it
the all normal face is (0 0 0)
is it right?
Attached Files
File Type: zip New Folder 2.zip (599 Bytes, 8 views)

Last edited by wyldckat; May 17, 2013 at 17:40. Reason: too many consecutive posts with very little information... so they've been merged accordingly
sh.d is offline   Reply With Quote

Old   May 20, 2013, 06:18
Default It is working
  #9
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sh.d View Post
Dear sany
i import my geometry in blender but i cant see it!!!!!!!!!!!!!!!!!!
?



i open it
the all normal face is (0 0 0)
is it right?
Hi, I imported your geometry, it is working, I do not know what is going on with you, It should work...,
Sandy
sandy13 is offline   Reply With Quote

Old   May 25, 2013, 09:56
Default
  #10
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
Hi Sandy
Do you know how to use Add layer?
thanks a lot
sh.d is offline   Reply With Quote

Old   May 26, 2013, 06:29
Default Add layers
  #11
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by sh.d View Post
Hi Sandy
Do you know how to use Add layer?
thanks a lot
Hi, I never succeeded in adding layers, sorry I can not help you that much about it but If you manged to do it please post me...
Sandy,
sandy13 is offline   Reply With Quote

Old   May 26, 2013, 06:39
Default
  #12
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Quote:
Originally Posted by sh.d View Post
Hi Sandy
Do you know how to use Add layer?
thanks a lot
first :
Code:
addLayers       true;
second: in addLayersControls
Code:
     layers
    {

        ".*" //put your patch name here
        {
            nSurfaceLayers 1; //put numbers of your layers here
        }

    }
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   May 26, 2013, 09:25
Default
  #13
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by nimasam View Post
first :
Code:
addLayers       true;
second: in addLayersControls
Code:
     layers
    {

        ".*" //put your patch name here
        {
            nSurfaceLayers 1; //put numbers of your layers here
        }

    }
Hi, thank you so much for your post, I tried to do the same without any success, may be I have something wrong some where. Thank you so much.
Sandy,
sandy13 is offline   Reply With Quote

Old   May 26, 2013, 10:44
Default
  #14
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Hello

look at the following test case:
Attached Files
File Type: gz sphere.tar.gz (7.3 KB, 42 views)
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   May 26, 2013, 14:27
Default
  #15
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
hi sandi
probably your name of addlayer is wrong
i think its true:
injector.stl_injector
second injector is the name in .stl file and not geometry
sh.d is offline   Reply With Quote

Old   May 27, 2013, 01:44
Default
  #16
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
hello
sandy look at the .stl file and name it in the file and name add layer in snappyHexMeshDict file
Attached Files
File Type: gz aerofoil.tar.gz (11.2 KB, 22 views)
sh.d is offline   Reply With Quote

Old   May 28, 2013, 04:06
Default snap
  #17
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
hi
i want to create 2d mesh around airfoil
but when i use checkMesh is this error:Number of edges not aligned with or perpendicular to non-empty directions
and the surface of airfoil not snap
can you help me please?
sh.d is offline   Reply With Quote

Old   May 28, 2013, 04:26
Default
  #18
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
Quote:
Originally Posted by sh.d View Post
hi
i want to create 2d mesh around airfoil
but when i use checkMesh is this error:Number of edges not aligned with or perpendicular to non-empty directions
and the surface of airfoil not snap
can you help me please?
did you try to use extrudeMesh ?
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   May 28, 2013, 07:16
Default
  #19
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 74
Rep Power: 13
sandy13 is on a distinguished road
Quote:
Originally Posted by nimasam View Post
did you try to use extrudeMesh ?
Dear searcher,
Sorry I can not help you that much about this error, and I did not use extrudeMesh before, sorry again and good luck with your research.
Sandy,
sandy13 is offline   Reply With Quote

Old   May 28, 2013, 07:30
Default snap
  #20
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 13
sh.d is on a distinguished road
Hi nimasam
yes i use the extrudMesh
please look at the my testcase
Attached Files
File Type: gz testcase.tar.gz (18.8 KB, 27 views)
sh.d 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] Impossible to add layers in SnappyHexMesh knightwalker OpenFOAM Meshing & Mesh Conversion 4 March 27, 2019 17:09
[OpenFOAM] Checking layers generated by snappy with paraview bentkj ParaView 1 February 22, 2018 03:32
[snappyHexMesh] snappy does not add layer to whole body 5tern OpenFOAM Meshing & Mesh Conversion 0 October 20, 2016 10:09
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Meshing & Mesh Conversion 1 April 22, 2013 02:32
[snappyHexMesh] Add layers and deformation Prosiaczek OpenFOAM Meshing & Mesh Conversion 0 April 11, 2012 18:27


All times are GMT -4. The time now is 13:11.