initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / utilities / mesh / generation / snappyHexMesh / snappyHexMeshDict
blobcd7c13d7833918b5386b977d7a7a04aed077c975
1 /*--------------------------------*- C++ -*----------------------------------*\
2 | =========                 |                                                 |
3 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4 |  \\    /   O peration     | Version:  1.6                                   |
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             }
135             // Optional angle to detect small-large cell situation perpendicular
136             // to the surface. Is the angle of face w.r.t the local surface
137             // normal. Use on flat(ish) surfaces only. Otherwise
138             // leave out or set to negative number.
139             //perpendicularAngle 10;
140         }
141     }
143     resolveFeatureAngle 30;
146     // Region-wise refinement
147     // ~~~~~~~~~~~~~~~~~~~~~~
149     // Specifies refinement level for cells in relation to a surface. One of
150     // three modes
151     // - distance. 'levels' specifies per distance to the surface the
152     //   wanted refinement level. The distances need to be specified in
153     //   descending order.
154     // - inside. 'levels' is only one entry and only the level is used. All
155     //   cells inside the surface get refined up to the level. The surface
156     //   needs to be closed for this to be possible.
157     // - outside. Same but cells outside.
159     refinementRegions
160     {
161         box1x1x1
162         {
163             mode inside;
164             levels ((1.0 4));
165         }
166         //sphere.stl
167         //{
168         //    mode distance;
169         //    levels ((1.0 5) (2.0 3));
170         //}
171     }
174     // Mesh selection
175     // ~~~~~~~~~~~~~~
177     // After refinement patches get added for all refinementSurfaces and
178     // all cells intersecting the surfaces get put into these patches. The
179     // section reachable from the locationInMesh is kept.
180     // NOTE: This point should never be on a face, always inside a cell, even
181     // after refinement.
182     locationInMesh (5 0.28 0.43);
187 // Settings for the snapping.
188 snapControls
190     //- Number of patch smoothing iterations before finding correspondence
191     //  to surface
192     nSmoothPatch 3;
194     //- Relative distance for points to be attracted by surface feature point
195     //  or edge. True distance is this factor times local
196     //  maximum edge length.
197     tolerance 4.0;
199     //- Number of mesh displacement relaxation iterations.
200     nSolveIter 30;
202     //- Maximum number of snapping relaxation iterations. Should stop
203     //  before upon reaching a correct mesh.
204     nRelaxIter 5;
209 // Settings for the layer addition.
210 addLayersControls
212     // Are the thickness parameters below relative to the undistorted
213     // size of the refined cell outside layer (true) or absolute sizes (false).
214     relativeSizes true;
216     // Per final patch (so not geometry!) the layer information
217     layers
218     {
219         sphere.stl_firstSolid
220         {
221             nSurfaceLayers 1;
223         }
224         maxY
225         {
226             nSurfaceLayers 1;
227         }
228     }
230     // Expansion factor for layer mesh
231     expansionRatio 1.0;
234     //- Wanted thickness of final added cell layer. If multiple layers
235     //  is the thickness of the layer furthest away from the wall.
236     //  See relativeSizes parameter.
237     finalLayerThickness 0.3;
239     //- Minimum thickness of cell layer. If for any reason layer
240     //  cannot be above minThickness do not add layer.
241     //  See relativeSizes parameter.
242     minThickness 0.25;
244     //- If points get not extruded do nGrow layers of connected faces that are
245     //  also not grown. This helps convergence of the layer addition process
246     //  close to features.
247     nGrow 1;
250     // Advanced settings
252     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
253     //  make straight angle.
254     featureAngle 60;
256     //- Maximum number of snapping relaxation iterations. Should stop
257     //  before upon reaching a correct mesh.
258     nRelaxIter 5;
260     // Number of smoothing iterations of surface normals
261     nSmoothSurfaceNormals 1;
263     // Number of smoothing iterations of interior mesh movement direction
264     nSmoothNormals 3;
266     // Smooth layer thickness over surface patches
267     nSmoothThickness 10;
269     // Stop layer growth on highly warped cells
270     maxFaceThicknessRatio 0.5;
272     // Reduce layer growth where ratio thickness to medial
273     // distance is large
274     maxThicknessToMedialRatio 0.3;
276     // Angle used to pick up medial axis points
277     minMedianAxisAngle 130;
279     // Create buffer region for new layer terminations
280     nBufferCellsNoExtrude 0;
283     // Overall max number of layer addition iterations
284     nLayerIter 50;
286     // Max number of iterations after which relaxed meshQuality controls
287     // get used.
288     nRelaxedIter 20;
293 // Generic mesh quality settings. At any undoable phase these determine
294 // where to undo.
295 meshQualityControls
297     //- Maximum non-orthogonality allowed. Set to 180 to disable.
298     maxNonOrtho 65;
300     //- Max skewness allowed. Set to <0 to disable.
301     maxBoundarySkewness 20;
302     maxInternalSkewness 4;
304     //- Max concaveness allowed. Is angle (in degrees) below which concavity
305     //  is allowed. 0 is straight face, <0 would be convex face.
306     //  Set to 180 to disable.
307     maxConcave 80;
309     //- Minimum projected area v.s. actual area. Set to -1 to disable.
310     minFlatness 0.5;
312     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
313     //  Set to a sensible fraction of the smallest cell volume expected.
314     //  Set to very negative number (e.g. -1E30) to disable.
315     minVol 1e-13;
317     //- Minimum face area. Set to <0 to disable.
318     minArea -1;
320     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
321     //- and face centre triangles normal
322     minTwist 0.05;
324     //- minimum normalised cell determinant
325     //- 1 = hex, <= 0 = folded or flattened illegal cell
326     minDeterminant 0.001;
328     //- minFaceWeight (0 -> 0.5)
329     minFaceWeight 0.05;
331     //- minVolRatio (0 -> 1)
332     minVolRatio 0.01;
334     //must be >0 for Fluent compatibility
335     minTriangleTwist -1;
337     //- if >0 : preserve single cells with all points on the surface if the
338     //  resulting volume after snapping (by approximation) is larger than
339     //  minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
340     //  If <0 : delete always.
341     //minVolCollapseRatio 0.5;
344     // Advanced
346     //- Number of error distribution iterations
347     nSmoothScale 4;
348     //- amount to scale back displacement at error points
349     errorReduction 0.75;
353     // Optional : some meshing phases allow usage of relaxed rules.
354     // See e.g. addLayersControls::nRelaxedIter.
355     relaxed
356     {
357         //- Maximum non-orthogonality allowed. Set to 180 to disable.
358         maxNonOrtho 75;
359     }
363 // Advanced
365 // Flags for optional output
366 // 0 : only write final meshes
367 // 1 : write intermediate meshes
368 // 2 : write volScalarField with cellLevel for postprocessing
369 // 4 : write current intersections as .obj files
370 debug 0;
373 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
374 // Note: the write tolerance needs to be higher than this.
375 mergeTolerance 1E-6;
378 // ************************************************************************* //