initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / tutorials / heatTransfer / buoyantBoussinesqSimpleFoam / iglooWithFridges / system / snappyHexMeshDict
blob714a95ebbfeecf3e1e137885890666da75641e4e
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      snappyHexMeshDict;
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 // Which of the steps to run
18 castellatedMesh true;
19 snap            true;
20 addLayers       true;
23 // Geometry. Definition of all surfaces. All surfaces are of class
24 // searchableSurface.
25 // Surfaces are used
26 // - to specify refinement for any mesh cell intersecting it
27 // - to specify refinement for any mesh cell inside/outside/near
28 // - to 'snap' the mesh boundary to the surface
29 geometry
31     igloo
32     {
33         type searchableSphere;
34         centre (3 3 0);
35         radius 4;
36     }
38     box1
39     {
40         type searchableBox;
41         min (0 0 0);
42         max (1 1 1);
43     }
45     fridgeFreezer
46     {
47         type searchableSurfaceCollection;
49         mergeSubRegions true;
51         freezer
52         {
53             surface box1;
54             scale (1 1 1);
55             transform
56             {
57                 type    cartesian;
58                 origin  (0 0 0);
59                 e1      (1 0 0);
60                 e3      (0 0 1);
61             }
62         }
63         fridge
64         {
65             surface box1;
66             scale (1 1 1.1);
67             transform
68             {
69                 type    cartesian;
70                 origin  (0 0 1);
71                 e1      (1 0 0);
72                 e3      (0 0 1);
73             }
74         }
75     }
77     twoFridgeFreezers
78     {
79         type searchableSurfaceCollection;
81         mergeSubRegions true;
83         seal
84         {
85             surface box1;
86             scale (1.0 1.0 2.1);
87             transform
88             {
89                 type    cartesian;
90                 origin  (2 2 0);
91                 e1      (1 0 0);
92                 e3      (0 0 1);
93             }
94         }
95         herring
96         {
97             surface box1;
98             scale (1.0 1.0 2.1);
99             transform
100             {
101                 type    cartesian;
102                 origin  (3.5 3 0);
103                 e1      (1 0 0);
104                 e3      (0 0 1);
105             }
106         }
107     }
112 // Settings for the castellatedMesh generation.
113 castellatedMeshControls
116     // Refinement parameters
117     // ~~~~~~~~~~~~~~~~~~~~~
119     // While refining maximum number of cells per processor. This is basically
120     // the number of cells that fit on a processor. If you choose this too small
121     // it will do just more refinement iterations to obtain a similar mesh.
122     maxLocalCells 1000000;
124     // Overall cell limit (approximately). Refinement will stop immediately
125     // upon reaching this number so a refinement level might not complete.
126     // Note that this is the number of cells before removing the part which
127     // is not 'visible' from the keepPoint. The final number of cells might
128     // actually be a lot less.
129     maxGlobalCells 2000000;
131     // The surface refinement loop might spend lots of iterations refining just a
132     // few cells. This setting will cause refinement to stop if <= minimumRefine
133     // are selected for refinement. Note: it will at least do one iteration
134     // (unless the number of cells to refine is 0)
135     minRefinementCells 100;
137     // Number of buffer layers between different levels.
138     // 1 means normal 2:1 refinement restriction, larger means slower
139     // refinement.
140     nCellsBetweenLevels 1;
144     // Explicit feature edge refinement
145     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
147     // Specifies a level for any cell intersected by its edges.
148     // This is a featureEdgeMesh, read from constant/triSurface for now.
149     features
150     (
151         {
152             file "fridgeA.eMesh";
153             level 3;
154         }
155     );
159     // Surface based refinement
160     // ~~~~~~~~~~~~~~~~~~~~~~~~
162     // Specifies two levels for every surface. The first is the minimum level,
163     // every cell intersecting a surface gets refined up to the minimum level.
164     // The second level is the maximum level. Cells that 'see' multiple
165     // intersections where the intersections make an
166     // angle > resolveFeatureAngle get refined up to the maximum level.
168     refinementSurfaces
169     {
170         twoFridgeFreezers
171         {
172             // Surface-wise min and max refinement level
173             level (2 2);
175             regions
176             {
177                 // Region-wise override
178                 "cook.*"
179                 {
180                     level (3 3);
181                 }
182             }
183         }
185         "iglo.*"
186         {
187             // Surface-wise min and max refinement level
188             level (1 1);
189         }
190     }
192     // Resolve sharp angles on fridges
193     resolveFeatureAngle 60;
196     // Region-wise refinement
197     // ~~~~~~~~~~~~~~~~~~~~~~
199     // Specifies refinement level for cells in relation to a surface. One of
200     // three modes
201     // - distance. 'levels' specifies per distance to the surface the
202     //   wanted refinement level. The distances need to be specified in
203     //   descending order.
204     // - inside. 'levels' is only one entry and only the level is used. All
205     //   cells inside the surface get refined up to the level. The surface
206     //   needs to be closed for this to be possible.
207     // - outside. Same but cells outside.
209     refinementRegions
210     {
211     }
214     // Mesh selection
215     // ~~~~~~~~~~~~~~
217     // After refinement patches get added for all refinementSurfaces and
218     // all cells intersecting the surfaces get put into these patches. The
219     // section reachable from the locationInMesh is kept.
220     // NOTE: This point should never be on a face, always inside a cell, even
221     // after refinement.
222     locationInMesh (3 0.28 0.43);
227 // Settings for the snapping.
228 snapControls
230     //- Number of patch smoothing iterations before finding correspondence
231     //  to surface
232     nSmoothPatch 3;
234     //- Relative distance for points to be attracted by surface feature point
235     //  or edge. True distance is this factor times local
236     //  maximum edge length.
237     tolerance 4.0;
239     //- Number of mesh displacement relaxation iterations.
240     nSolveIter 30;
242     //- Maximum number of snapping relaxation iterations. Should stop
243     //  before upon reaching a correct mesh.
244     nRelaxIter 5;
249 // Settings for the layer addition.
250 addLayersControls
252     relativeSizes true;
254     // Per final patch (so not geometry!) the layer information
255     layers
256     {
257         "two.*"
258         {
259             nSurfaceLayers 3;
260         }
261         "igloo_.*"
262         {
263             nSurfaceLayers 1;
264         }
265     }
267     // Expansion factor for layer mesh
268     expansionRatio 1.0;
270     //- Wanted thickness of final added cell layer. If multiple layers
271     //  is the
272     //  thickness of the layer furthest away from the wall.
273     //  Relative to undistorted size of cell outside layer.
274     finalLayerThickness 0.5;
276     //- Minimum thickness of cell layer. If for any reason layer
277     //  cannot be above minThickness do not add layer.
278     //  Relative to undistorted size of cell outside layer.
279     minThickness 0.25;
281     //- If points get not extruded do nGrow layers of connected faces that are
282     //  also not grown. This helps convergence of the layer addition process
283     //  close to features.
284     nGrow 0;
287     // Advanced settings
289     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
290     //  make straight angle.
291     featureAngle 60;
293     //- Maximum number of snapping relaxation iterations. Should stop
294     //  before upon reaching a correct mesh.
295     nRelaxIter 5;
297     // Number of smoothing iterations of surface normals
298     nSmoothSurfaceNormals 1;
300     // Number of smoothing iterations of interior mesh movement direction
301     nSmoothNormals 3;
303     // Smooth layer thickness over surface patches
304     nSmoothThickness 10;
306     // Stop layer growth on highly warped cells
307     maxFaceThicknessRatio 0.5;
309     // Reduce layer growth where ratio thickness to medial
310     // distance is large
311     maxThicknessToMedialRatio 0.3;
313     // Angle used to pick up medial axis points
314     minMedianAxisAngle 130;
316     // Create buffer region for new layer terminations
317     nBufferCellsNoExtrude 0;
319     // Overall max number of layer addition iterations
320     nLayerIter 50;
325 // Generic mesh quality settings. At any undoable phase these determine
326 // where to undo.
327 meshQualityControls
329     //- Maximum non-orthogonality allowed. Set to 180 to disable.
330     maxNonOrtho 65;
332     //- Max skewness allowed. Set to <0 to disable.
333     maxBoundarySkewness 20;
334     maxInternalSkewness 4;
336     //- Max concaveness allowed. Is angle (in degrees) below which concavity
337     //  is allowed. 0 is straight face, <0 would be convex face.
338     //  Set to 180 to disable.
339     maxConcave 80;
341     //- Minimum projected area v.s. actual area. Set to -1 to disable.
342     minFlatness 0.5;
344     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
345     //  Set to very negative number (e.g. -1E30) to disable.
346     minVol 1e-13;
348     //- Minimum face area. Set to <0 to disable.
349     minArea -1;
351     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
352     //- and face centre triangles normal
353     minTwist 0.05;
355     //- minimum normalised cell determinant
356     //- 1 = hex, <= 0 = folded or flattened illegal cell
357     minDeterminant 0.001;
359     //- minFaceWeight (0 -> 0.5)
360     minFaceWeight 0.05;
362     //- minVolRatio (0 -> 1)
363     minVolRatio 0.01;
365     //must be >0 for Fluent compatibility
366     minTriangleTwist -1;
369     // Advanced
371     //- Number of error distribution iterations
372     nSmoothScale 4;
373     //- amount to scale back displacement at error points
374     errorReduction 0.75;
378 // Advanced
380 // Flags for optional output
381 // 0 : only write final meshes
382 // 1 : write intermediate meshes
383 // 2 : write volScalarField with cellLevel for postprocessing
384 // 4 : write current intersections as .obj files
385 debug 0;
388 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
389 // Note: the write tolerance needs to be higher than this.
390 mergeTolerance 1E-6;
393 // ************************************************************************* //