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

snappy works but does not add layers...why?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 25, 2013, 07:28
Default snappy works but does not add layers...why?
  #1
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 38 views)
File Type: jpg snappy picture.jpg (14.8 KB, 33 views)
sandy13 is offline   Reply With Quote

Old   March 25, 2013, 18:18
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 7,697
Blog Entries: 33
Rep Power: 75
wyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the roughwyldckat is a jewel in the rough
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, 06:17
Default help
  #3
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 06:35
Default ascci stl
  #4
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 09:07
Default help
  #5
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 10:19
Default ascii format
  #6
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 11:01
Default
  #7
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 11:42
Default
  #8
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 6 views)

Last edited by wyldckat; May 17, 2013 at 18: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, 07:18
Default It is working
  #9
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 10:56
Default
  #10
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 07:29
Default Add layers
  #11
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 07:39
Default
  #12
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,092
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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
        }

    }
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   May 26, 2013, 10:25
Default
  #13
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 11:44
Default
  #14
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,092
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
Hello

look at the following test case:
Attached Files
File Type: gz sphere.tar.gz (7.3 KB, 13 views)
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   May 26, 2013, 15:27
Default
  #15
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 02:44
Default
  #16
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 8 views)
sh.d is offline   Reply With Quote

Old   May 28, 2013, 05:06
Default snap
  #17
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 05:26
Default
  #18
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,092
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
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 ?
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   May 28, 2013, 08:16
Default
  #19
Member
 
sandy
Join Date: Mar 2013
Location: Cardiff, UK
Posts: 70
Rep Power: 3
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, 08:30
Default snap
  #20
Member
 
Join Date: Oct 2012
Posts: 47
Rep Power: 4
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, 15 views)
sh.d 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
Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Native Meshers: snappyHexMesh and Others 1 April 22, 2013 03:32
No layers in a small gap bobburnquist OpenFOAM Native Meshers: snappyHexMesh and Others 2 November 25, 2012 09:54
Add layers and deformation Prosiaczek OpenFOAM Native Meshers: snappyHexMesh and Others 0 April 11, 2012 19:27
Can not add a new user defined visualization parameter in Cut plot! george85 FloEFD, FloWorks & FloTHERM 5 November 9, 2011 14:33
Add Measure Markings or Coordinates to the Contour Colin FLUENT 4 August 25, 2004 10:54


All times are GMT -4. The time now is 08:27.