intersection with triangle plane for miss
[OpenFOAM-1.5.x.git] / tutorials / snappyHexMesh / motorBike / system / snappyHexMeshDict
blobe3d24a69219cfb53bbcb51cb9d2e02bc7ed434f5
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     motorBike.stl
33     {
34         type triSurfaceMesh;
35         name motorBike;
36     }
38     refinementBox
39     {
40         type searchableBox;
41         min (-0.3 -0.4 -0.1);
42         max ( 3.0  0.4  1.4);
43     }
48 // Settings for the castellatedMesh generation.
49 castellatedMeshControls
52     // Refinement parameters
53     // ~~~~~~~~~~~~~~~~~~~~~
55     // While refining maximum number of cells per processor. This is basically
56     // the number of cells that fit on a processor. If you choose this too small
57     // it will do just more refinement iterations to obtain a similar mesh.
58     maxLocalCells 1000000;
60     // Overall cell limit (approximately). Refinement will stop immediately
61     // upon reaching this number so a refinement level might not complete.
62     // Note that this is the number of cells before removing the part which
63     // is not 'visible' from the keepPoint. The final number of cells might
64     // actually be a lot less.
65     maxGlobalCells 2000000;
67     // The surface refinement loop might spend lots of iterations refining just a
68     // few cells. This setting will cause refinement to stop if <= minimumRefine
69     // are selected for refinement. Note: it will at least do one iteration
70     // (unless the number of cells to refine is 0)
71     minRefinementCells 10;
73     // Number of buffer layers between different levels.
74     // 1 means normal 2:1 refinement restriction, larger means slower
75     // refinement.
76     nCellsBetweenLevels 2;
80     // Explicit feature edge refinement
81     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83     // Specifies a level for any cell intersected by its edges.
84     // This is a featureEdgeMesh, read from constant/triSurface for now.
85     features
86     (
87         //{
88         //    file "someLine.eMesh";
89         //    level 2;
90         //}
91     );
95     // Surface based refinement
96     // ~~~~~~~~~~~~~~~~~~~~~~~~
98     // Specifies two levels for every surface. The first is the minimum level,
99     // every cell intersecting a surface gets refined up to the minimum level.
100     // The second level is the maximum level. Cells that 'see' multiple
101     // intersections where the intersections make an
102     // angle > resolveFeatureAngle get refined up to the maximum level.
104     refinementSurfaces
105     {
106         motorBike
107         {
108             // Surface-wise min and max refinement level
109             level (5 6);
110         }
111     }
113     // Resolve sharp angles
114     resolveFeatureAngle 30;
117     // Region-wise refinement
118     // ~~~~~~~~~~~~~~~~~~~~~~
120     // Specifies refinement level for cells in relation to a surface. One of
121     // three modes
122     // - distance. 'levels' specifies per distance to the surface the
123     //   wanted refinement level. The distances need to be specified in
124     //   descending order.
125     // - inside. 'levels' is only one entry and only the level is used. All
126     //   cells inside the surface get refined up to the level. The surface
127     //   needs to be closed for this to be possible.
128     // - outside. Same but cells outside.
130     refinementRegions
131     {
132         refinementBox
133         {
134             mode inside;
135             levels ((1E15 4));
136         }
137     }
140     // Mesh selection
141     // ~~~~~~~~~~~~~~
143     // After refinement patches get added for all refinementSurfaces and
144     // all cells intersecting the surfaces get put into these patches. The
145     // section reachable from the locationInMesh is kept.
146     // NOTE: This point should never be on a face, always inside a cell, even
147     // after refinement.
148     locationInMesh (3 3 0.43);
153 // Settings for the snapping.
154 snapControls
156     //- Number of patch smoothing iterations before finding correspondence
157     //  to surface
158     nSmoothPatch 3;
160     //- Relative distance for points to be attracted by surface feature point
161     //  or edge. True distance is this factor times local
162     //  maximum edge length.
163     tolerance 4.0;
165     //- Number of mesh displacement relaxation iterations.
166     nSolveIter 30;
168     //- Maximum number of snapping relaxation iterations. Should stop
169     //  before upon reaching a correct mesh.
170     nRelaxIter 5;
175 // Settings for the layer addition.
176 addLayersControls
178     // Per final patch (so not geometry!) the layer information
179     layers
180     {
181         minZ
182         {
183             nSurfaceLayers 1;
184         }
185         motorBike_frt-fairing:001%1
186         {
187             nSurfaceLayers 1;
188         }
189         motorBike_windshield:002%2
190         {
191             nSurfaceLayers 1;
192         }
193         motorBike_rr-wh-rim:005%5
194         {
195             nSurfaceLayers 1;
196         }
197         motorBike_rr-wh-rim:010%10
198         {
199             nSurfaceLayers 1;
200         }
201         motorBike_fr-wh-rim:011%11
202         {
203             nSurfaceLayers 1;
204         }
205         motorBike_fr-wh-brake-disk:012%12
206         {
207             nSurfaceLayers 1;
208         }
209         motorBike_frame:016-shadow%13
210         {
211             nSurfaceLayers 1;
212         }
213         motorBike_rear-susp:014%14
214         {
215             nSurfaceLayers 1;
216         }
217         motorBike_rear-susp:014-shadow%15
218         {
219             nSurfaceLayers 1;
220         }
221         motorBike_frame:016%16
222         {
223             nSurfaceLayers 1;
224         }
225         motorBike_rr-wh-rim:005-shadow%17
226         {
227             nSurfaceLayers 1;
228         }
229         motorBike_rr-wh-chain-hub:022%22
230         {
231             nSurfaceLayers 1;
232         }
233         motorBike_rearseat%24
234         {
235             nSurfaceLayers 1;
236         }
237         motorBike_frt-fairing%25
238         {
239             nSurfaceLayers 1;
240         }
241         motorBike_windshield%26
242         {
243             nSurfaceLayers 1;
244         }
245         motorBike_headlights%27
246         {
247             nSurfaceLayers 1;
248         }
249         motorBike_driversseat%28
250         {
251             nSurfaceLayers 1;
252         }
253         motorBike_rear-body%29
254         {
255             nSurfaceLayers 1;
256         }
257         motorBike_fuel-tank%30
258         {
259             nSurfaceLayers 1;
260         }
261         motorBike_exhaust%31
262         {
263             nSurfaceLayers 1;
264         }
265         motorBike_rr-wh-rim%32
266         {
267             nSurfaceLayers 1;
268         }
269         motorBike_fr-mud-guard%33
270         {
271             nSurfaceLayers 1;
272         }
273         motorBike_fr-wh-rim%34
274         {
275             nSurfaceLayers 1;
276         }
277         motorBike_fr-wh-brake-disk%35
278         {
279             nSurfaceLayers 1;
280         }
281         motorBike_fr-brake-caliper%36
282         {
283             nSurfaceLayers 1;
284         }
285         motorBike_fr-wh-tyre%37
286         {
287             nSurfaceLayers 1;
288         }
289         motorBike_hbars%38
290         {
291             nSurfaceLayers 1;
292         }
293         motorBike_fr-forks%39
294         {
295             nSurfaceLayers 1;
296         }
297         motorBike_chain%40
298         {
299             nSurfaceLayers 1;
300         }
301         motorBike_rr-wh-tyre%41
302         {
303             nSurfaceLayers 1;
304         }
305         motorBike_square-dial%42
306         {
307             nSurfaceLayers 1;
308         }
309         motorBike_round-dial%43
310         {
311             nSurfaceLayers 1;
312         }
313         motorBike_dial-holder%44
314         {
315             nSurfaceLayers 1;
316         }
317         motorBike_rear-susp%45
318         {
319             nSurfaceLayers 1;
320         }
321         motorBike_rear-brake-lights%46
322         {
323             nSurfaceLayers 1;
324         }
325         motorBike_rear-light-bracket%47
326         {
327             nSurfaceLayers 1;
328         }
329         motorBike_frame%48
330         {
331             nSurfaceLayers 1;
332         }
333         motorBike_rear-mud-guard%49
334         {
335             nSurfaceLayers 1;
336         }
337         motorBike_rear-susp-spring-damp%50
338         {
339             nSurfaceLayers 1;
340         }
341         motorBike_fairing-inner-plate%51
342         {
343             nSurfaceLayers 1;
344         }
345         motorBike_clutch-housing%52
346         {
347             nSurfaceLayers 1;
348         }
349         motorBike_radiator%53
350         {
351             nSurfaceLayers 1;
352         }
353         motorBike_water-pipe%54
354         {
355             nSurfaceLayers 1;
356         }
357         motorBike_water-pump%55
358         {
359             nSurfaceLayers 1;
360         }
361         motorBike_engine%56
362         {
363             nSurfaceLayers 1;
364         }
365         motorBike_rear-shock-link%57
366         {
367             nSurfaceLayers 1;
368         }
369         motorBike_rear-brake-fluid-pot-bracket%58
370         {
371             nSurfaceLayers 1;
372         }
373         motorBike_rear-brake-fluid-pot%59
374         {
375             nSurfaceLayers 1;
376         }
377         motorBike_footpeg%60
378         {
379             nSurfaceLayers 1;
380         }
381         motorBike_rr-wh-chain-hub%61
382         {
383             nSurfaceLayers 1;
384         }
385         motorBike_rear-brake-caliper%62
386         {
387             nSurfaceLayers 1;
388         }
389         motorBike_rider-helmet%65
390         {
391             nSurfaceLayers 1;
392         }
393         motorBike_rider-visor%66
394         {
395             nSurfaceLayers 1;
396         }
397         motorBike_rider-boots%67
398         {
399             nSurfaceLayers 1;
400         }
401         motorBike_rider-gloves%68
402         {
403             nSurfaceLayers 1;
404         }
405         motorBike_rider-body%69
406         {
407             nSurfaceLayers 1;
408         }
409         motorBike_frame:0%70
410         {
411             nSurfaceLayers 1;
412         }
413         motorBike_frt-fairing:001-shadow%74
414         {
415             nSurfaceLayers 1;
416         }
417         motorBike_windshield-shadow%75
418         {
419             nSurfaceLayers 1;
420         }
421         motorBike_fr-mud-guard-shadow%81
422         {
423             nSurfaceLayers 1;
424         }
425         motorBike_fr-wh-brake-disk-shadow%83
426         {
427             nSurfaceLayers 1;
428         }
429         motorBike_rear-mud-guard-shadow%84
430         {
431             nSurfaceLayers 1;
432         }
433         motorBike_rear-susp-spring-damp-shadow%85
434         {
435             nSurfaceLayers 1;
436         }
437         motorBike_radiator-shadow%86
438         {
439             nSurfaceLayers 1;
440         }
441         motorBike_rear-shock-link-shadow%87
442         {
443             nSurfaceLayers 1;
444         }
445         motorBike_rear-brake-fluid-pot-bracket-shadow%88
446         {
447             nSurfaceLayers 1;
448         }
449         motorBike_rr-wh-chain-hub-shadow%89
450         {
451             nSurfaceLayers 1;
452         }
453     }
455     // Expansion factor for layer mesh
456     expansionRatio 1.0;
458     //- Wanted thickness of final added cell layer. If multiple layers
459     //  is the
460     //  thickness of the layer furthest away from the wall.
461     //  Relative to undistorted size of cell outside layer.
462     finalLayerRatio 0.3;
464     //- Minimum thickness of cell layer. If for any reason layer
465     //  cannot be above minThickness do not add layer.
466     //  Relative to undistorted size of cell outside layer.
467     minThickness 0.1;
469     //- If points get not extruded do nGrow layers of connected faces that are
470     //  also not grown. This helps convergence of the layer addition process
471     //  close to features.
472     nGrow 1;
475     // Advanced settings
477     //- When not to extrude surface. 0 is flat surface, 90 is when two faces
478     //  make straight angle.
479     featureAngle 30;
481     //- Maximum number of snapping relaxation iterations. Should stop
482     //  before upon reaching a correct mesh.
483     nRelaxIter 3;
485     // Number of smoothing iterations of surface normals
486     nSmoothSurfaceNormals 1;
488     // Number of smoothing iterations of interior mesh movement direction
489     nSmoothNormals 3;
491     // Smooth layer thickness over surface patches
492     nSmoothThickness 10;
494     // Stop layer growth on highly warped cells
495     maxFaceThicknessRatio 0.5;
497     // Reduce layer growth where ratio thickness to medial
498     // distance is large
499     maxThicknessToMedialRatio 0.3;
501     // Angle used to pick up medial axis points
502     minMedianAxisAngle 130;
504     // Create buffer region for new layer terminations
505     nBufferCellsNoExtrude 0;
510 // Generic mesh quality settings. At any undoable phase these determine
511 // where to undo.
512 meshQualityControls
514     //- Maximum non-orthogonality allowed. Set to 180 to disable.
515     maxNonOrtho 65;
517     //- Max skewness allowed. Set to <0 to disable.
518     maxBoundarySkewness 20;
519     maxInternalSkewness 4;
521     //- Max concaveness allowed. Is angle (in degrees) below which concavity
522     //  is allowed. 0 is straight face, <0 would be convex face.
523     //  Set to 180 to disable.
524     maxConcave 80;
526     //- Minimum projected area v.s. actual area. Set to -1 to disable.
527     minFlatness 0.5;
529     //- Minimum pyramid volume. Is absolute volume of cell pyramid.
530     //  Set to very negative number (e.g. -1E30) to disable.
531     minVol 1e-13;
533     //- Minimum face area. Set to <0 to disable.
534     minArea -1;
536     //- Minimum face twist. Set to <-1 to disable. dot product of face normal
537     //- and face centre triangles normal
538     minTwist 0.02;
540     //- minimum normalised cell determinant
541     //- 1 = hex, <= 0 = folded or flattened illegal cell
542     minDeterminant 0.001;
544     //- minFaceWeight (0 -> 0.5)
545     minFaceWeight 0.02;
547     //- minVolRatio (0 -> 1)
548     minVolRatio 0.01;
550     //must be >0 for Fluent compatibility
551     minTriangleTwist -1;
554     // Advanced
556     //- Number of error distribution iterations
557     nSmoothScale 4;
558     //- amount to scale back displacement at error points
559     errorReduction 0.75;
563 // Advanced
565 // Flags for optional output
566 // 0 : only write final meshes
567 // 1 : write intermediate meshes
568 // 2 : write volScalarField with cellLevel for postprocessing
569 // 4 : write current intersections as .obj files
570 debug 0;
573 // Merge tolerance. Is fraction of overall bounding box of initial mesh.
574 // Note: the write tolerance needs to be higher than this.
575 mergeTolerance 1E-6;
577 // ************************************************************************* //