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] snappy works but does not add layers...why? (https://www.cfd-online.com/Forums/openfoam-meshing/115149-snappy-works-but-does-not-add-layers-why.html)

sandy13 March 25, 2013 06:28

snappy works but does not add layers...why?
 
2 Attachment(s)
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,

wyldckat March 25, 2013 17:18

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

sh.d May 16, 2013 06:17

help
 
hi sandy
i create geometry in solid and save it .stl
but when open in linux its there is wrong
can you help me?

sandy13 May 16, 2013 06:35

ascci stl
 
Quote:

Originally Posted by sh.d (Post 427948)
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,

sh.d May 17, 2013 09:07

help
 
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?

sandy13 May 17, 2013 10:19

ascii format
 
Quote:

Originally Posted by sh.d (Post 428242)
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,

sh.d May 17, 2013 11:01

Quote:

Originally Posted by sandy13 (Post 428265)
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 May 17, 2013 11:42

1 Attachment(s)
Quote:

Originally Posted by sh.d (Post 428286)
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?

sandy13 May 20, 2013 07:18

It is working
 
Quote:

Originally Posted by sh.d (Post 428296)
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

sh.d May 25, 2013 10:56

Hi Sandy
Do you know how to use Add layer?
thanks a lot

sandy13 May 26, 2013 07:29

Add layers
 
Quote:

Originally Posted by sh.d (Post 429982)
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,

nimasam May 26, 2013 07:39

Quote:

Originally Posted by sh.d (Post 429982)
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
        }

    }


sandy13 May 26, 2013 10:25

Quote:

Originally Posted by nimasam (Post 430085)
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,

nimasam May 26, 2013 11:44

1 Attachment(s)
Hello

look at the following test case:

sh.d May 26, 2013 15:27

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 May 27, 2013 02:44

1 Attachment(s)
hello
sandy look at the .stl file and name it in the file and name add layer in snappyHexMeshDict file

sh.d May 28, 2013 05:06

snap
 
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?

nimasam May 28, 2013 05:26

Quote:

Originally Posted by sh.d (Post 430427)
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 ?

sandy13 May 28, 2013 08:16

Quote:

Originally Posted by nimasam (Post 430434)
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,

sh.d May 28, 2013 08:30

snap
 
1 Attachment(s)
Hi nimasam
yes i use the extrudMesh
please look at the my testcase


All times are GMT -4. The time now is 04:02.