1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | foam-extend: Open Source CFD |
4 | \\ / O peration | Version: 3.2 |
5 | \\ / A nd | Web: http://www.foam-extend.org |
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.
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 its edges.
103 // This is a featureEdgeMesh, read from constant/triSurface for now.
107 // file "someLine.eMesh";
112 // Surface based refinement
113 // ~~~~~~~~~~~~~~~~~~~~~~~~
115 // Specifies two levels for every surface. The first is the minimum level,
116 // every cell intersecting a surface gets refined up to the minimum level.
117 // The second level is the maximum level. Cells that 'see' multiple
118 // intersections where the intersections make an
119 // angle > resolveFeatureAngle get refined up to the maximum level.
125 // Surface-wise min and max refinement level
128 // Optional region-wise level specification
137 // Optional angle to detect small-large cell situation perpendicular
138 // to the surface. Is the angle of face w.r.t the local surface
139 // normal. Use on flat(ish) surfaces only. Otherwise
140 // leave out or set to negative number.
141 //perpendicularAngle 10;
145 resolveFeatureAngle 30;
147 // Region-wise refinement
148 // ~~~~~~~~~~~~~~~~~~~~~~
150 // Specifies refinement level for cells in relation to a surface. One of
152 // - distance. 'levels' specifies per distance to the surface the
153 // wanted refinement level. The distances need to be specified in
155 // - inside. 'levels' is only one entry and only the level is used. All
156 // cells inside the surface get refined up to the level. The surface
157 // needs to be closed for this to be possible.
158 // - outside. Same but cells outside.
170 // levels ((1.0 5) (2.0 3));
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
182 locationInMesh (5 0.28 0.43);
184 // Whether any faceZones (as specified in the refinementSurfaces)
185 // are only on the boundary of corresponding cellZones or also allow
186 // free-standing zone faces
187 allowFreeStandingZoneFaces true;
190 // Settings for the snapping.
193 //- Number of patch smoothing iterations before finding correspondence
197 //- Relative distance for points to be attracted by surface feature point
198 // or edge. True distance is this factor times local
199 // maximum edge length.
202 //- Number of mesh displacement relaxation iterations.
205 //- Maximum number of snapping relaxation iterations. Should stop
206 // before upon reaching a correct mesh.
210 // Settings for the layer addition.
213 // Are the thickness parameters below relative to the undistorted
214 // size of the refined cell outside layer (true) or absolute sizes (false).
217 // Per final patch (so not geometry!) the layer information
220 sphere.stl_firstSolid
231 // Expansion factor for layer mesh
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.
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.
251 //- When not to extrude surface. 0 is flat surface, 90 is when two faces
252 // make straight angle.
255 //- Maximum number of snapping relaxation iterations. Should stop
256 // before upon reaching a correct mesh.
259 // Number of smoothing iterations of surface normals
260 nSmoothSurfaceNormals 1;
262 // Number of smoothing iterations of interior mesh movement direction
265 // Smooth layer thickness over surface patches
268 // Stop layer growth on highly warped cells
269 maxFaceThicknessRatio 0.5;
271 // Reduce layer growth where ratio thickness to medial
273 maxThicknessToMedialRatio 0.3;
275 // Angle used to pick up medial axis points
276 minMedianAxisAngle 130;
278 // Create buffer region for new layer terminations
279 nBufferCellsNoExtrude 0;
281 // Overall max number of layer addition iterations. The mesher will exit
282 // if it reaches this number of iterations; possibly with an illegal
286 // Max number of iterations after which relaxed meshQuality controls
287 // get used. Up to nRelaxIter it uses the settings in meshQualityControls,
288 // after nRelaxIter it uses the values in meshQualityControls::relaxed.
292 // Generic mesh quality settings. At any undoable phase these determine
296 //- Maximum non-orthogonality allowed. Set to 180 to disable.
299 //- Max skewness allowed. Set to <0 to disable.
300 maxBoundarySkewness 20;
301 maxInternalSkewness 4;
303 //- Max concaveness allowed. Is angle (in degrees) below which concavity
304 // is allowed. 0 is straight face, <0 would be convex face.
305 // Set to 180 to disable.
308 //- Minimum projected area v.s. actual area. Set to -1 to disable.
311 //- Minimum pyramid volume. Is absolute volume of cell pyramid.
312 // Set to a sensible fraction of the smallest cell volume expected.
313 // Set to very negative number (e.g. -1E30) to disable.
316 //- Minimum face area. Set to <0 to disable.
319 //- Minimum face twist. Set to <-1 to disable. dot product of face normal
320 //- and face centre triangles normal
323 //- minimum normalised cell determinant
324 //- 1 = hex, <= 0 = folded or flattened illegal cell
325 minDeterminant 0.001;
327 //- minFaceWeight (0 -> 0.5)
330 //- minVolRatio (0 -> 1)
333 //must be >0 for Fluent compatibility
336 //- if >0 : preserve single cells with all points on the surface if the
337 // resulting volume after snapping (by approximation) is larger than
338 // minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
339 // If <0 : delete always.
340 //minVolCollapseRatio 0.5;
344 //- Number of error distribution iterations
346 //- amount to scale back displacement at error points
349 // Optional : some meshing phases allow usage of relaxed rules.
350 // See e.g. addLayersControls::nRelaxedIter.
353 //- Maximum non-orthogonality allowed. Set to 180 to disable.
360 // Flags for optional output
361 // 0 : only write final meshes
362 // 1 : write intermediate meshes
363 // 2 : write volScalarField with cellLevel for postprocessing
364 // 4 : write current intersections as .obj files
367 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
368 // Note: the write tolerance needs to be higher than this.
371 // ************************************************************************* //