1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
4 | \\ / O peration | Version: 2.0.0 |
5 | \\ / A nd | Web: www.OpenFOAM.com |
6 | \\/ M anipulation | |
7 \*---------------------------------------------------------------------------*/
13 object snappyHexMeshDict;
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 // Which of the steps to run
22 // Geometry. Definition of all surfaces. All surfaces are of class
25 // - to specify refinement for any mesh cell intersecting it
26 // - to specify refinement for any mesh cell inside/outside/near
27 // - to 'snap' the mesh boundary to the surface
41 //tolerance 1E-5; // optional:non-default tolerance on intersections
42 //maxTreeDepth 10; // optional:depth of octree. Decrease only in case
43 // of memory limitations.
45 // Per region the patchname. If not provided will be <name>_<region>.
57 type searchableSphere;
63 // Settings for the castellatedMesh generation.
64 castellatedMeshControls
67 // Refinement parameters
68 // ~~~~~~~~~~~~~~~~~~~~~
70 // If local number of cells is >= maxLocalCells on any processor
71 // switches from from refinement followed by balancing
72 // (current method) to (weighted) balancing before refinement.
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)
88 // Allow a certain level of imbalance during refining
89 // (since balancing is quite expensive)
90 // Expressed as fraction of perfect balance (= overall number of cells /
91 // nProcs). 0=balance always.
92 maxLoadUnbalance 0.10;
94 // Number of buffer layers between different levels.
95 // 1 means normal 2:1 refinement restriction, larger means slower
97 nCellsBetweenLevels 1;
99 // Explicit feature edge refinement
100 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
102 // Specifies a level for any cell intersected by explicitly provided
104 // This is a featureEdgeMesh, read from constant/triSurface for now.
108 // file "someLine.eMesh";
113 // Surface based refinement
114 // ~~~~~~~~~~~~~~~~~~~~~~~~
116 // Specifies two levels for every surface. The first is the minimum level,
117 // every cell intersecting a surface gets refined up to the minimum level.
118 // The second level is the maximum level. Cells that 'see' multiple
119 // intersections where the intersections make an
120 // angle > resolveFeatureAngle get refined up to the maximum level.
126 // Surface-wise min and max refinement level
129 // Optional region-wise level specification
138 // Optional specification of patch type (default is wall). No
139 // constraint types (cyclic, symmetry) etc. are allowed.
145 //- Optional angle to detect small-large cell situation
146 // perpendicular to the surface. Is the angle of face w.r.t.
147 // the local surface normal. Use on flat(ish) surfaces only.
148 // Otherwise leave out or set to negative number.
149 //perpendicularAngle 10;
151 //- Optional faceZone and (for closed surface) cellZone with
152 // how to select the cells that are in the cellZone
153 // (inside / outside / specified insidePoint)
156 //cellZoneInside inside; //outside/insidePoint
160 resolveFeatureAngle 30;
162 // Region-wise refinement
163 // ~~~~~~~~~~~~~~~~~~~~~~
165 // Specifies refinement level for cells in relation to a surface. One of
167 // - distance. 'levels' specifies per distance to the surface the
168 // wanted refinement level. The distances need to be specified in
170 // - inside. 'levels' is only one entry and only the level is used. All
171 // cells inside the surface get refined up to the level. The surface
172 // needs to be closed for this to be possible.
173 // - outside. Same but cells outside.
185 // levels ((1.0 5) (2.0 3));
192 // After refinement patches get added for all refinementSurfaces and
193 // all cells intersecting the surfaces get put into these patches. The
194 // section reachable from the locationInMesh is kept.
195 // NOTE: This point should never be on a face, always inside a cell, even
197 locationInMesh (5 0.28 0.43);
199 // Whether any faceZones (as specified in the refinementSurfaces)
200 // are only on the boundary of corresponding cellZones or also allow
201 // free-standing zone faces. Not used if there are no faceZones.
202 allowFreeStandingZoneFaces true;
205 // Settings for the snapping.
208 //- Number of patch smoothing iterations before finding correspondence
212 //- Maximum relative distance for points to be attracted by surface.
213 // True distance is this factor times local maximum edge length.
214 // Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
217 //- Number of mesh displacement relaxation iterations.
220 //- Maximum number of snapping relaxation iterations. Should stop
221 // before upon reaching a correct mesh.
224 //- Highly experimental and wip: number of feature edge snapping
225 // iterations. Leave out altogether to disable.
226 //nFeatureSnapIter 10;
229 // Settings for the layer addition.
232 // Are the thickness parameters below relative to the undistorted
233 // size of the refined cell outside layer (true) or absolute sizes (false).
236 // Per final patch (so not geometry!) the layer information
239 sphere.stl_firstSolid
250 // Expansion factor for layer mesh
253 //- Wanted thickness of final added cell layer. If multiple layers
255 // thickness of the layer furthest away from the wall.
256 // Relative to undistorted size of cell outside layer.
257 // is the thickness of the layer furthest away from the wall.
258 // See relativeSizes parameter.
259 finalLayerThickness 0.3;
261 //- Minimum thickness of cell layer. If for any reason layer
262 // cannot be above minThickness do not add layer.
263 // See relativeSizes parameter.
266 //- If points get not extruded do nGrow layers of connected faces that are
267 // also not grown. This helps convergence of the layer addition process
268 // close to features.
269 // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
274 //- When not to extrude surface. 0 is flat surface, 90 is when two faces
275 // make straight angle.
278 //- Maximum number of snapping relaxation iterations. Should stop
279 // before upon reaching a correct mesh.
282 // Number of smoothing iterations of surface normals
283 nSmoothSurfaceNormals 1;
285 // Number of smoothing iterations of interior mesh movement direction
288 // Smooth layer thickness over surface patches
291 // Stop layer growth on highly warped cells
292 maxFaceThicknessRatio 0.5;
294 // Reduce layer growth where ratio thickness to medial
296 maxThicknessToMedialRatio 0.3;
298 // Angle used to pick up medial axis points
299 // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
300 minMedianAxisAngle 90;
302 // Create buffer region for new layer terminations
303 nBufferCellsNoExtrude 0;
305 // Overall max number of layer addition iterations. The mesher will exit
306 // if it reaches this number of iterations; possibly with an illegal
310 // Max number of iterations after which relaxed meshQuality controls
311 // get used. Up to nRelaxIter it uses the settings in meshQualityControls,
312 // after nRelaxIter it uses the values in meshQualityControls::relaxed.
316 // Generic mesh quality settings. At any undoable phase these determine
320 //- Maximum non-orthogonality allowed. Set to 180 to disable.
323 //- Max skewness allowed. Set to <0 to disable.
324 maxBoundarySkewness 20;
325 maxInternalSkewness 4;
327 //- Max concaveness allowed. Is angle (in degrees) below which concavity
328 // is allowed. 0 is straight face, <0 would be convex face.
329 // Set to 180 to disable.
332 //- Minimum pyramid volume. Is absolute volume of cell pyramid.
333 // Set to a sensible fraction of the smallest cell volume expected.
334 // Set to very negative number (e.g. -1E30) to disable.
337 //- Minimum quality of the tet formed by the face-centre
338 // and variable base point minimum decomposition triangles and
339 // the cell centre. This has to be a positive number for tracking
340 // to work. Set to very negative number (e.g. -1E30) to
342 // <0 = inside out tet,
347 //- Minimum face area. Set to <0 to disable.
350 //- Minimum face twist. Set to <-1 to disable. dot product of face normal
351 //- and face centre triangles normal
354 //- minimum normalised cell determinant
355 //- 1 = hex, <= 0 = folded or flattened illegal cell
356 minDeterminant 0.001;
358 //- minFaceWeight (0 -> 0.5)
361 //- minVolRatio (0 -> 1)
364 //must be >0 for Fluent compatibility
367 //- if >0 : preserve single cells with all points on the surface if the
368 // resulting volume after snapping (by approximation) is larger than
369 // minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
370 // If <0 : delete always.
371 //minVolCollapseRatio 0.5;
375 //- Number of error distribution iterations
377 //- amount to scale back displacement at error points
380 // Optional : some meshing phases allow usage of relaxed rules.
381 // See e.g. addLayersControls::nRelaxedIter.
384 //- Maximum non-orthogonality allowed. Set to 180 to disable.
391 // Flags for optional output
392 // 0 : only write final meshes
393 // 1 : write intermediate meshes
394 // 2 : write volScalarField with cellLevel for postprocessing
395 // 4 : write current intersections as .obj files
398 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
399 // Note: the write tolerance needs to be higher than this.
402 // ************************************************************************* //