initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / applications / utilities / mesh / generation / snappyHexMesh / snappyHexMeshDict
blob5777ae8a8a3680e6b502ba363731541fba9d1074
1 /*--------------------------------*- C++ -*----------------------------------*\
2 | =========                 |                                                 |
3 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4 |  \\    /   O peration     | Version:  1.5                                   |
5 |   \\  /    A nd           | Web:      http://www.OpenFOAM.org               |
6 |    \\/     M anipulation  |                                                 |
7 \*---------------------------------------------------------------------------*/
8 FoamFile
10     version     2.0;
11     format      ascii;
12     class       dictionary;
13     object      autoHexMeshDict;
16 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
18 // Which of the steps to run
19 castellatedMesh true;
20 snap            true;
21 addLayers       false;
24 // Geometry. Definition of all surfaces. All surfaces are of class
25 // searchableSurface.
26 // Surfaces are used
27 // - to specify refinement for any mesh cell intersecting it
28 // - to specify refinement for any mesh cell inside/outside/near
29 // - to 'snap' the mesh boundary to the surface
30 geometry
32     box1x1x1
33     {
34         type searchableBox;
35         min (1.5 1 -0.5);
36         max (3.5 2 0.5);
37     }
39     sphere.stl
40     {
41         type triSurfaceMesh;
43         // Per region the patchname. If not provided will be <name>_<region>.
44         regions
45         {
46             secondSolid
47             {
48                 name mySecondPatch;
49             }
50         }
51     }
53     sphere2
54     {
55         type searchableSphere;
56         centre  (1.5 1.5 1.5);
57         radius  1.03;
58     }
63 // Settings for the castellatedMesh generation.
64 castellatedMeshControls
67     // Refinement parameters
68     // ~~~~~~~~~~~~~~~~~~~~~
70     // While refining maximum number of cells per processor. This is basically
71     // the number of cells that fit on a processor. If you choose this too small
72     // it will do just more refinement iterations to obtain a similar mesh.
73     maxLocalCells 1000000;
75     // Overall cell limit (approximately). Refinement will stop immediately
76     // upon reaching this number so a refinement level might not complete.
77     // Note that this is the number of cells before removing the part which
78     // is not 'visible' from the keepPoint. The final number of cells might
79     // actually be a lot less.
80     maxGlobalCells 2000000;
82     // The surface refinement loop might spend lots of iterations refining just a
83     // few cells. This setting will cause refinement to stop if <= minimumRefine
84     // are selected for refinement. Note: it will at least do one iteration
85     // (unless the number of cells to refine is 0)
86     minRefinementCells 0;
88     // Number of buffer layers between different levels.
89     // 1 means normal 2:1 refinement restriction, larger means slower
90     // refinement.
91     nCellsBetweenLevels 1;
95     // Explicit feature edge refinement
96     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
98     // Specifies a level for any cell intersected by its edges.
99     // This is a featureEdgeMesh, read from constant/triSurface for now.
100     features
101     (
102         //{
103         //    file "someLine.eMesh";
104         //    level 2;
105         //}
106     );
110     // Surface based refinement
111     // ~~~~~~~~~~~~~~~~~~~~~~~~
113     // Specifies two levels for every surface. The first is the minimum level,
114     // every cell intersecting a surface gets refined up to the minimum level.
115     // The second level is the maximum level. Cells that 'see' multiple
116     // intersections where the intersections make an
117     // angle > resolveFeatureAngle get refined up to the maximum level.
119     refinementSurfaces
120     {
121         sphere.stl
122         {
123             // Surface-wise min and max refinement level
124             level (2 2);
126             // Optional region-wise level specification
127             regions
128             {
129                 secondSolid
130                 {
131                     level (3 3);
132                 }
133             }
134         }
135     }
137     resolveFeatureAngle 30;
140     // Region-wise refinement
141     // ~~~~~~~~~~~~~~~~~~~~~~
143     // Specifies refinement level for cells in relation to a surface. One of
144     // three modes
145     // - distance. 'levels' specifies per distance to the surface the
146     //   wanted refinement level. The distances need to be specified in
147     //   descending order.
148     // - inside. 'levels' is only one entry and only the level is used. All
149     //   cells inside the surface get refined up to the level. The surface
150     //   needs to be closed for this to be possible.
151     // - outside. Same but cells outside.
153     refinementRegions
154     {
155         box1x1x1
156         {
157             mode inside;
158             levels ((1.0 4));
159         }
160         //sphere.stl
161         //{
162         //    mode distance;
163         //    levels ((1.0 5) (2.0 3));
164         //}
165     }
168     // Mesh selection
169     // ~~~~~~~~~~~~~~
171     // After refinement patches get added for all refinementSurfaces and
172     // all cells intersecting the surfaces get put into these patches. The
173     // section reachable from the locationInMesh is kept.
174     // NOTE: This point should never be on a face, always inside a cell, even
175     // after refinement.
176     locationInMesh (5 0.28 0.43);
181 // Settings for the snapping.
182 snapControls
184     //- Number of patch smoothing iterations before finding correspondence
185     //  to surface
186     nSmoothPatch 3;
188     //- Relative distance for points to be attracted by surface feature point
189     //  or edge. True distance is this factor times local
190     //  maximum edge length.
191     tolerance 4.0;
193     //- Number of mesh displacement relaxation iterations.
194     nSolveIter 30;
196     //- Maximum number of snapping relaxation iterations. Should stop
197     //  before upon reaching a correct mesh.
198     nRelaxIter 5;
203 // Settings for the layer addition.
204 addLayersControls
206     // Per final patch (so not geometry!) the layer information
207     layers
208     {
209         sphere.stl_firstSolid
210         {
211             nSurfaceLayers 1;
213         }
214         maxY
215         {
216             nSurfaceLayers 1;
217         }
218     }
220     // Expansion factor for layer mesh
221     expansionRatio 1.0;
223     //- Wanted thickness of final added cell layer. If multiple layers
224     //  is the
225     //  thickness of the layer furthest away from the wall.
226     //  Relative to undistorted size of cell outside layer.
227     finalLayerRatio 0.3;
229     //- Minimum thickness of cell layer. If for any reason layer
230     //  cannot be above minThickness do not add layer.
231     //  Relative to undistorted size of cell outside layer.
232     minThickness 0.25;
234     //- If points get not extruded do nGrow layers of connected faces that are
235     //  also not grown. This helps convergence of the layer addition process
236     //  close to features.
237     nGrow 1;
240     // Advanced settings
242     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
243     //  make straight angle.
244     featureAngle 60;
246     //- Maximum number of snapping relaxation iterations. Should stop
247     //  before upon reaching a correct mesh.
248     nRelaxIter 5;
250     // Number of smoothing iterations of surface normals
251     nSmoothSurfaceNormals 1;
253     // Number of smoothing iterations of interior mesh movement direction
254     nSmoothNormals 3;
256     // Smooth layer thickness over surface patches
257     nSmoothThickness 10;
259     // Stop layer growth on highly warped cells
260     maxFaceThicknessRatio 0.5;
262     // Reduce layer growth where ratio thickness to medial
263     // distance is large
264     maxThicknessToMedialRatio 0.3;
266     // Angle used to pick up medial axis points
267     minMedianAxisAngle 130;
269     // Create buffer region for new layer terminations
270     nBufferCellsNoExtrude 0;
275 // Generic mesh quality settings. At any undoable phase these determine
276 // where to undo.
277 meshQualityControls
279     //- Maximum non-orthogonality allowed. Set to 180 to disable.
280     maxNonOrtho 65;
282     //- Max skewness allowed. Set to <0 to disable.
283     maxBoundarySkewness 20;
284     maxInternalSkewness 4;
286     //- Max concaveness allowed. Is angle (in degrees) below which concavity
287     //  is allowed. 0 is straight face, <0 would be convex face.
288     //  Set to 180 to disable.
289     maxConcave 80;
291     //- Minimum projected area v.s. actual area. Set to -1 to disable.
292     minFlatness 0.5;
294     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
295     //  Set to very negative number (e.g. -1E30) to disable.
296     minVol 1e-13;
298     //- Minimum face area. Set to <0 to disable.
299     minArea -1;
301     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
302     //- and face centre triangles normal
303     minTwist 0.05;
305     //- minimum normalised cell determinant
306     //- 1 = hex, <= 0 = folded or flattened illegal cell
307     minDeterminant 0.001;
309     //- minFaceWeight (0 -> 0.5)
310     minFaceWeight 0.05;
312     //- minVolRatio (0 -> 1)
313     minVolRatio 0.01;
315     //must be >0 for Fluent compatibility
316     minTriangleTwist -1;
319     // Advanced
321     //- Number of error distribution iterations
322     nSmoothScale 4;
323     //- amount to scale back displacement at error points
324     errorReduction 0.75;
328 // Advanced
330 // Flags for optional output
331 // 0 : only write final meshes
332 // 1 : write intermediate meshes
333 // 2 : write volScalarField with cellLevel for postprocessing
334 // 4 : write current intersections as .obj files
335 debug 0;
338 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
339 // Note: the write tolerance needs to be higher than this.
340 mergeTolerance 1E-6;
343 // ************************************************************************* //