intersection with triangle plane for miss
[OpenFOAM-1.5.x.git] / tutorials / snappyHexMesh / iglooWithFridges / system / snappyHexMeshDict
blobdfe2e37e9792090d5c3c8fd561df669712ecdce8
1 /*--------------------------------*- C++ -*----------------------------------*\
2 | =========                 |                                                 |
3 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4 |  \\    /   O peration     | Version:  1.5                                   |
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       true;
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     fridgeA
33     {
34         type searchableBox;
35         min (2 2 0);
36         max (3 3 2);
37     }
39     fridgeB
40     {
41         type searchableBox;
42         min (3.5 3 0);
43         max (4.3 3.8 1.8);
44     }
46     igloo
47     {
48         type searchableSphere;
49         centre (3 3 0);
50         radius 4;
51     }
56 // Settings for the castellatedMesh generation.
57 castellatedMeshControls
60     // Refinement parameters
61     // ~~~~~~~~~~~~~~~~~~~~~
63     // While refining maximum number of cells per processor. This is basically
64     // the number of cells that fit on a processor. If you choose this too small
65     // it will do just more refinement iterations to obtain a similar mesh.
66     maxLocalCells 1000000;
68     // Overall cell limit (approximately). Refinement will stop immediately
69     // upon reaching this number so a refinement level might not complete.
70     // Note that this is the number of cells before removing the part which
71     // is not 'visible' from the keepPoint. The final number of cells might
72     // actually be a lot less.
73     maxGlobalCells 2000000;
75     // The surface refinement loop might spend lots of iterations refining just a
76     // few cells. This setting will cause refinement to stop if <= minimumRefine
77     // are selected for refinement. Note: it will at least do one iteration
78     // (unless the number of cells to refine is 0)
79     minRefinementCells 0;
81     // Number of buffer layers between different levels.
82     // 1 means normal 2:1 refinement restriction, larger means slower
83     // refinement.
84     nCellsBetweenLevels 1;
88     // Explicit feature edge refinement
89     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91     // Specifies a level for any cell intersected by its edges.
92     // This is a featureEdgeMesh, read from constant/triSurface for now.
93     features
94     (
95         {
96             file "fridgeA.eMesh";
97             level 3;
98         }
99     );
103     // Surface based refinement
104     // ~~~~~~~~~~~~~~~~~~~~~~~~
106     // Specifies two levels for every surface. The first is the minimum level,
107     // every cell intersecting a surface gets refined up to the minimum level.
108     // The second level is the maximum level. Cells that 'see' multiple
109     // intersections where the intersections make an
110     // angle > resolveFeatureAngle get refined up to the maximum level.
112     refinementSurfaces
113     {
114         fridgeA
115         {
116             // Surface-wise min and max refinement level
117             level (2 2);
118         }
119         fridgeB
120         {
121             // Surface-wise min and max refinement level
122             level (2 2);
123         }
124         igloo
125         {
126             // Surface-wise min and max refinement level
127             level (1 1);
128         }
129     }
131     // Resolve sharp angles on fridges
132     resolveFeatureAngle 60;
135     // Region-wise refinement
136     // ~~~~~~~~~~~~~~~~~~~~~~
138     // Specifies refinement level for cells in relation to a surface. One of
139     // three modes
140     // - distance. 'levels' specifies per distance to the surface the
141     //   wanted refinement level. The distances need to be specified in
142     //   descending order.
143     // - inside. 'levels' is only one entry and only the level is used. All
144     //   cells inside the surface get refined up to the level. The surface
145     //   needs to be closed for this to be possible.
146     // - outside. Same but cells outside.
148     refinementRegions
149     {
150     }
153     // Mesh selection
154     // ~~~~~~~~~~~~~~
156     // After refinement patches get added for all refinementSurfaces and
157     // all cells intersecting the surfaces get put into these patches. The
158     // section reachable from the locationInMesh is kept.
159     // NOTE: This point should never be on a face, always inside a cell, even
160     // after refinement.
161     locationInMesh (3 0.28 0.43);
166 // Settings for the snapping.
167 snapControls
169     //- Number of patch smoothing iterations before finding correspondence
170     //  to surface
171     nSmoothPatch 3;
173     //- Relative distance for points to be attracted by surface feature point
174     //  or edge. True distance is this factor times local
175     //  maximum edge length.
176     tolerance 4.0;
178     //- Number of mesh displacement relaxation iterations.
179     nSolveIter 30;
181     //- Maximum number of snapping relaxation iterations. Should stop
182     //  before upon reaching a correct mesh.
183     nRelaxIter 5;
188 // Settings for the layer addition.
189 addLayersControls
191     // Per final patch (so not geometry!) the layer information
192     layers
193     {
194         fridgeA_region0
195         {
196             nSurfaceLayers 1;
197         }
198         fridgeB_region0
199         {
200             nSurfaceLayers 1;
201         }
202         igloo_region0
203         {
204             nSurfaceLayers 1;
205         }
206     }
208     // Expansion factor for layer mesh
209     expansionRatio 1.0;
211     //- Wanted thickness of final added cell layer. If multiple layers
212     //  is the
213     //  thickness of the layer furthest away from the wall.
214     //  Relative to undistorted size of cell outside layer.
215     finalLayerRatio 0.5;
217     //- Minimum thickness of cell layer. If for any reason layer
218     //  cannot be above minThickness do not add layer.
219     //  Relative to undistorted size of cell outside layer.
220     minThickness 0.25;
222     //- If points get not extruded do nGrow layers of connected faces that are
223     //  also not grown. This helps convergence of the layer addition process
224     //  close to features.
225     nGrow 0;
228     // Advanced settings
230     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
231     //  make straight angle.
232     featureAngle 60;
234     //- Maximum number of snapping relaxation iterations. Should stop
235     //  before upon reaching a correct mesh.
236     nRelaxIter 5;
238     // Number of smoothing iterations of surface normals
239     nSmoothSurfaceNormals 1;
241     // Number of smoothing iterations of interior mesh movement direction
242     nSmoothNormals 3;
244     // Smooth layer thickness over surface patches
245     nSmoothThickness 10;
247     // Stop layer growth on highly warped cells
248     maxFaceThicknessRatio 0.5;
250     // Reduce layer growth where ratio thickness to medial
251     // distance is large
252     maxThicknessToMedialRatio 0.3;
254     // Angle used to pick up medial axis points
255     minMedianAxisAngle 130;
257     // Create buffer region for new layer terminations
258     nBufferCellsNoExtrude 0;
263 // Generic mesh quality settings. At any undoable phase these determine
264 // where to undo.
265 meshQualityControls
267     //- Maximum non-orthogonality allowed. Set to 180 to disable.
268     maxNonOrtho 65;
270     //- Max skewness allowed. Set to <0 to disable.
271     maxBoundarySkewness 20;
272     maxInternalSkewness 4;
274     //- Max concaveness allowed. Is angle (in degrees) below which concavity
275     //  is allowed. 0 is straight face, <0 would be convex face.
276     //  Set to 180 to disable.
277     maxConcave 80;
279     //- Minimum projected area v.s. actual area. Set to -1 to disable.
280     minFlatness 0.5;
282     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
283     //  Set to very negative number (e.g. -1E30) to disable.
284     minVol 1e-13;
286     //- Minimum face area. Set to <0 to disable.
287     minArea -1;
289     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
290     //- and face centre triangles normal
291     minTwist 0.05;
293     //- minimum normalised cell determinant
294     //- 1 = hex, <= 0 = folded or flattened illegal cell
295     minDeterminant 0.001;
297     //- minFaceWeight (0 -> 0.5)
298     minFaceWeight 0.05;
300     //- minVolRatio (0 -> 1)
301     minVolRatio 0.01;
303     //must be >0 for Fluent compatibility
304     minTriangleTwist -1;
307     // Advanced
309     //- Number of error distribution iterations
310     nSmoothScale 4;
311     //- amount to scale back displacement at error points
312     errorReduction 0.75;
316 // Advanced
318 // Flags for optional output
319 // 0 : only write final meshes
320 // 1 : write intermediate meshes
321 // 2 : write volScalarField with cellLevel for postprocessing
322 // 4 : write current intersections as .obj files
323 debug 0;
326 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
327 // Note: the write tolerance needs to be higher than this.
328 mergeTolerance 1E-6;
330 // ************************************************************************* //