twoPhaseEulerFoam:frictionalStressModel/Schaeffer: Correct mut on processor boundaries
[OpenFOAM-1.7.x.git] / tutorials / multiphase / interPhaseChangeFoam / cavitatingBullet / system / snappyHexMeshDict
blob381e0e7c0903629ad57d4d0c3fa1346700066880
1 /*--------------------------------*- C++ -*----------------------------------*\
2 | =========                 |                                                 |
3 | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
4 |  \\    /   O peration     | Version:  1.7.1                                 |
5 |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
6 |    \\/     M anipulation  |                                                 |
7 \*---------------------------------------------------------------------------*/
8 FoamFile
10     version     2.0;
11     format      ascii;
12     class       dictionary;
13     object      snappyHexMeshDict;
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     bullet.stl
33     {
34         type triSurfaceMesh;
35         name bullet;
37         regions
38         {
39             bullet
40             {
41                 name bullet;
42             }
43         }
44     }
46     refinement1
47     {
48         type searchableSphere;
49         centre (0 0 0.0025);
50         radius 0.0075;
51     }
53     refinement2
54     {
55         type searchableCylinder;
56         point1 (0 0 0);
57         point2 (0 0 0.03);
58         radius 0.0075;
59     }
64 // Settings for the castellatedMesh generation.
65 castellatedMeshControls
68     // Refinement parameters
69     // ~~~~~~~~~~~~~~~~~~~~~
71     // While refining maximum number of cells per processor. This is basically
72     // the number of cells that fit on a processor. If you choose this too small
73     // it will do just more refinement iterations to obtain a similar mesh.
74     maxLocalCells 1000000;
76     // Overall cell limit (approximately). Refinement will stop immediately
77     // upon reaching this number so a refinement level might not complete.
78     // Note that this is the number of cells before removing the part which
79     // is not 'visible' from the keepPoint. The final number of cells might
80     // actually be a lot less.
81     maxGlobalCells 2000000;
83     // The surface refinement loop might spend lots of iterations refining just a
84     // few cells. This setting will cause refinement to stop if <= minimumRefine
85     // are selected for refinement. Note: it will at least do one iteration
86     // (unless the number of cells to refine is 0)
87     minRefinementCells 10;
89     // Number of buffer layers between different levels.
90     // 1 means normal 2:1 refinement restriction, larger means slower
91     // refinement.
92     nCellsBetweenLevels 2;
96     // Explicit feature edge refinement
97     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99     // Specifies a level for any cell intersected by its edges.
100     // This is a featureEdgeMesh, read from constant/triSurface for now.
101     features
102     (
103         //{
104         //    file "someLine.eMesh";
105         //    level 2;
106         //}
107     );
111     // Surface based refinement
112     // ~~~~~~~~~~~~~~~~~~~~~~~~
114     // Specifies two levels for every surface. The first is the minimum level,
115     // every cell intersecting a surface gets refined up to the minimum level.
116     // The second level is the maximum level. Cells that 'see' multiple
117     // intersections where the intersections make an
118     // angle > resolveFeatureAngle get refined up to the maximum level.
120     refinementSurfaces
121     {
122         bullet
123         {
124             // Surface-wise min and max refinement level
125             level (4 4);
126         }
127     }
129     // Resolve sharp angles
130     resolveFeatureAngle -1;
133     // Region-wise refinement
134     // ~~~~~~~~~~~~~~~~~~~~~~
136     // Specifies refinement level for cells in relation to a surface. One of
137     // three modes
138     // - distance. 'levels' specifies per distance to the surface the
139     //   wanted refinement level. The distances need to be specified in
140     //   descending order.
141     // - inside. 'levels' is only one entry and only the level is used. All
142     //   cells inside the surface get refined up to the level. The surface
143     //   needs to be closed for this to be possible.
144     // - outside. Same but cells outside.
146     refinementRegions
147     {
148         refinement1
149         {
150             mode inside;
151             levels ((0.0 3));
152         }
153         refinement2
154         {
155             mode inside;
156             levels ((0.0 3));
157         }
158     }
161     // Mesh selection
162     // ~~~~~~~~~~~~~~
164     // After refinement patches get added for all refinementSurfaces and
165     // all cells intersecting the surfaces get put into these patches. The
166     // section reachable from the locationInMesh is kept.
167     // NOTE: This point should never be on a face, always inside a cell, even
168     // after refinement.
169     locationInMesh (0 0 -10e-3);
171     allowFreeStandingZoneFaces false;
176 // Settings for the snapping.
177 snapControls
179     //- Number of patch smoothing iterations before finding correspondence
180     //  to surface
181     nSmoothPatch 3;
183     //- Relative distance for points to be attracted by surface feature point
184     //  or edge. True distance is this factor times local
185     //  maximum edge length.
186     tolerance 4.0;
188     //- Number of mesh displacement relaxation iterations.
189     nSolveIter 30;
191     //- Maximum number of snapping relaxation iterations. Should stop
192     //  before upon reaching a correct mesh.
193     nRelaxIter 5;
198 // Settings for the layer addition.
199 addLayersControls
201     // Are the thickness parameters below relative to the undistorted
202     // size of the refined cell outside layer (true) or absolute sizes (false).
203     relativeSizes true;
205     // Per final patch (so not geometry!) the layer information
206     layers
207     {
208     }
210     // Expansion factor for layer mesh
211     expansionRatio 1.0;
213     //- Wanted thickness of final added cell layer. If multiple layers
214     //  is the
215     //  thickness of the layer furthest away from the wall.
216     //  Relative to undistorted size of cell outside layer.
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.
222     minThickness 0.1;
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     nGrow 1;
230     // Advanced settings
232     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
233     //  make straight angle.
234     featureAngle 30;
236     //- Maximum number of snapping relaxation iterations. Should stop
237     //  before upon reaching a correct mesh.
238     nRelaxIter 3;
240     // Number of smoothing iterations of surface normals
241     nSmoothSurfaceNormals 1;
243     // Number of smoothing iterations of interior mesh movement direction
244     nSmoothNormals 3;
246     // Smooth layer thickness over surface patches
247     nSmoothThickness 10;
249     // Stop layer growth on highly warped cells
250     maxFaceThicknessRatio 0.5;
252     // Reduce layer growth where ratio thickness to medial
253     // distance is large
254     maxThicknessToMedialRatio 0.3;
256     // Angle used to pick up medial axis points
257     minMedianAxisAngle 130;
259     // Create buffer region for new layer terminations
260     nBufferCellsNoExtrude 0;
262     // Overall max number of layer addition iterations. The mesher will exit
263     // if it reaches this number of iterations; possibly with an illegal
264     // mesh.
265     nLayerIter 50;
267     // Max number of iterations after which relaxed meshQuality controls
268     // get used. Up to nRelaxIter it uses the settings in meshQualityControls,
269     // after nRelaxIter it uses the values in meshQualityControls::relaxed.
270     nRelaxedIter 20;
275 // Generic mesh quality settings. At any undoable phase these determine
276 // where to undo.
277 meshQualityControls
279     //- Maximum non-orthogonality allowed. Set to 180 to disable.
280     maxNonOrtho 65;
282     //- Max skewness allowed. Set to <0 to disable.
283     maxBoundarySkewness 20;
284     maxInternalSkewness 4;
286     //- Max concaveness allowed. Is angle (in degrees) below which concavity
287     //  is allowed. 0 is straight face, <0 would be convex face.
288     //  Set to 180 to disable.
289     maxConcave 80;
291     //- Minimum projected area v.s. actual area. Set to -1 to disable.
292     minFlatness 0.5;
294     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
295     //  Set to very negative number (e.g. -1E30) to disable.
296     minVol 1e-20;
298     //- Minimum face area. Set to <0 to disable.
299     minArea -1;
301     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
302     //- and face centre triangles normal
303     minTwist 0.02;
305     //- minimum normalised cell determinant
306     //- 1 = hex, <= 0 = folded or flattened illegal cell
307     minDeterminant 0.001;
309     //- minFaceWeight (0 -> 0.5)
310     minFaceWeight 0.02;
312     //- minVolRatio (0 -> 1)
313     minVolRatio 0.01;
315     //must be >0 for Fluent compatibility
316     minTriangleTwist -1;
319     // Advanced
321     //- Number of error distribution iterations
322     nSmoothScale 4;
323     //- amount to scale back displacement at error points
324     errorReduction 0.75;
328 // Advanced
330 // Flags for optional output
331 // 0 : only write final meshes
332 // 1 : write intermediate meshes
333 // 2 : write volScalarField with cellLevel for postprocessing
334 // 4 : write current intersections as .obj files
335 debug 0;
338 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
339 // Note: the write tolerance needs to be higher than this.
340 mergeTolerance 1E-6;
343 // ************************************************************************* //