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
23 // Geometry. Definition of all surfaces. All surfaces are of class
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
47 // Settings for the castellatedMesh generation.
48 castellatedMeshControls
51 // Refinement parameters
52 // ~~~~~~~~~~~~~~~~~~~~~
54 // If local number of cells is >= maxLocalCells on any processor
55 // switches from from refinement followed by balancing
56 // (current method) to (weighted) balancing before refinement.
57 maxLocalCells 1000000;
59 // Overall cell limit (approximately). Refinement will stop immediately
60 // upon reaching this number so a refinement level might not complete.
61 // Note that this is the number of cells before removing the part which
62 // is not 'visible' from the keepPoint. The final number of cells might
63 // actually be a lot less.
64 maxGlobalCells 2000000;
66 // The surface refinement loop might spend lots of iterations refining just a
67 // few cells. This setting will cause refinement to stop if <= minimumRefine
68 // are selected for refinement. Note: it will at least do one iteration
69 // (unless the number of cells to refine is 0)
70 minRefinementCells 10;
72 // Allow a certain level of imbalance during refining
73 // (since balancing is quite expensive)
74 // Expressed as fraction of perfect balance (= overall number of cells /
75 // nProcs). 0=balance always.
76 maxLoadUnbalance 0.10;
79 // Number of buffer layers between different levels.
80 // 1 means normal 2:1 refinement restriction, larger means slower
82 nCellsBetweenLevels 3;
86 // Explicit feature edge refinement
87 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89 // Specifies a level for any cell intersected by its edges.
90 // This is a featureEdgeMesh, read from constant/triSurface for now.
94 // file "someLine.eMesh";
101 // Surface based refinement
102 // ~~~~~~~~~~~~~~~~~~~~~~~~
104 // Specifies two levels for every surface. The first is the minimum level,
105 // every cell intersecting a surface gets refined up to the minimum level.
106 // The second level is the maximum level. Cells that 'see' multiple
107 // intersections where the intersections make an
108 // angle > resolveFeatureAngle get refined up to the maximum level.
114 // Surface-wise min and max refinement level
119 // Resolve sharp angles
120 resolveFeatureAngle 30;
123 // Region-wise refinement
124 // ~~~~~~~~~~~~~~~~~~~~~~
126 // Specifies refinement level for cells in relation to a surface. One of
128 // - distance. 'levels' specifies per distance to the surface the
129 // wanted refinement level. The distances need to be specified in
131 // - inside. 'levels' is only one entry and only the level is used. All
132 // cells inside the surface get refined up to the level. The surface
133 // needs to be closed for this to be possible.
134 // - outside. Same but cells outside.
149 // After refinement patches get added for all refinementSurfaces and
150 // all cells intersecting the surfaces get put into these patches. The
151 // section reachable from the locationInMesh is kept.
152 // NOTE: This point should never be on a face, always inside a cell, even
154 locationInMesh (3 3 0.43);
157 // Whether any faceZones (as specified in the refinementSurfaces)
158 // are only on the boundary of corresponding cellZones or also allow
159 // free-standing zone faces. Not used if there are no faceZones.
160 allowFreeStandingZoneFaces true;
165 // Settings for the snapping.
168 //- Number of patch smoothing iterations before finding correspondence
172 //- Relative distance for points to be attracted by surface feature point
173 // or edge. True distance is this factor times local
174 // maximum edge length.
177 //- Number of mesh displacement relaxation iterations.
180 //- Maximum number of snapping relaxation iterations. Should stop
181 // before upon reaching a correct mesh.
184 //- Highly experimental and wip: number of feature edge snapping
185 // iterations. Leave out altogether to disable.
186 // Do not use here since mesh resolution too low and baffles present
187 //nFeatureSnapIter 10;
192 // Settings for the layer addition.
195 // Are the thickness parameters below relative to the undistorted
196 // size of the refined cell outside layer (true) or absolute sizes (false).
199 // Per final patch (so not geometry!) the layer information
202 "(lowerWall|motorBike).*"
208 // Expansion factor for layer mesh
211 //- Wanted thickness of final added cell layer. If multiple layers
213 // thickness of the layer furthest away from the wall.
214 // Relative to undistorted size of cell outside layer.
215 // is the thickness of the layer furthest away from the wall.
216 // See relativeSizes parameter.
217 finalLayerThickness 0.3;
219 //- Minimum thickness of cell layer. If for any reason layer
220 // cannot be above minThickness do not add layer.
221 // Relative to undistorted size of cell outside layer.
224 //- If points get not extruded do nGrow layers of connected faces that are
225 // also not grown. This helps convergence of the layer addition process
226 // close to features.
227 // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
232 //- When not to extrude surface. 0 is flat surface, 90 is when two faces
233 // make straight angle.
236 //- Maximum number of snapping relaxation iterations. Should stop
237 // before upon reaching a correct mesh.
240 // Number of smoothing iterations of surface normals
241 nSmoothSurfaceNormals 1;
243 // Number of smoothing iterations of interior mesh movement direction
246 // Smooth layer thickness over surface patches
249 // Stop layer growth on highly warped cells
250 maxFaceThicknessRatio 0.5;
252 // Reduce layer growth where ratio thickness to medial
254 maxThicknessToMedialRatio 0.3;
256 // Angle used to pick up medial axis points
257 // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
258 minMedianAxisAngle 90;
261 // Create buffer region for new layer terminations
262 nBufferCellsNoExtrude 0;
265 // Overall max number of layer addition iterations. The mesher will exit
266 // if it reaches this number of iterations; possibly with an illegal
273 // Generic mesh quality settings. At any undoable phase these determine
277 //- Maximum non-orthogonality allowed. Set to 180 to disable.
280 //- Max skewness allowed. Set to <0 to disable.
281 maxBoundarySkewness 20;
282 maxInternalSkewness 4;
284 //- Max concaveness allowed. Is angle (in degrees) below which concavity
285 // is allowed. 0 is straight face, <0 would be convex face.
286 // Set to 180 to disable.
289 //- Minimum pyramid volume. Is absolute volume of cell pyramid.
290 // Set to a sensible fraction of the smallest cell volume expected.
291 // Set to very negative number (e.g. -1E30) to disable.
294 //- Minimum quality of the tet formed by the face-centre
295 // and variable base point minimum decomposition triangles and
296 // the cell centre. This has to be a positive number for tracking
297 // to work. Set to very negative number (e.g. -1E30) to
299 // <0 = inside out tet,
304 //- Minimum face area. Set to <0 to disable.
307 //- Minimum face twist. Set to <-1 to disable. dot product of face normal
308 //- and face centre triangles normal
311 //- minimum normalised cell determinant
312 //- 1 = hex, <= 0 = folded or flattened illegal cell
313 minDeterminant 0.001;
315 //- minFaceWeight (0 -> 0.5)
318 //- minVolRatio (0 -> 1)
321 //must be >0 for Fluent compatibility
327 //- Number of error distribution iterations
329 //- amount to scale back displacement at error points
336 // Flags for optional output
337 // 0 : only write final meshes
338 // 1 : write intermediate meshes
339 // 2 : write volScalarField with cellLevel for postprocessing
340 // 4 : write current intersections as .obj files
344 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
345 // Note: the write tolerance needs to be higher than this.
349 // ************************************************************************* //