Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.03 KB | None | 0 0
  1. /*--------------------------------*- C++ -*----------------------------------*\
  2. ========= |
  3. \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
  4. \\ / O peration | Website: https://openfoam.org
  5. \\ / A nd | Version: 7
  6. \\/ M anipulation |
  7. \*---------------------------------------------------------------------------*/
  8. FoamFile
  9. {
  10. version 2.0;
  11. format ascii;
  12. class dictionary;
  13. object snappyHexMeshDict;
  14. }
  15. // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  16.  
  17. // Which of the steps to run
  18. castellatedMesh true;
  19. snap true;
  20. addLayers true;
  21.  
  22.  
  23. // Geometry. Definition of all surfaces. All surfaces are of class
  24. // searchableSurface.
  25. // Surfaces are used
  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
  29. geometry
  30. {
  31. foil
  32. {
  33. type triSurfaceMesh;
  34. file "foilj_10deg.stl";
  35.  
  36. regions
  37. {
  38. main
  39. {
  40. name foil_main;
  41. }
  42.  
  43. slat
  44. {
  45. name foil_slat;
  46. }
  47.  
  48. flap
  49. {
  50. name foil_flap;
  51. }
  52. }
  53. }
  54.  
  55. wakeregion
  56. {
  57. type searchableBox;
  58. min (-0.3 -0.2 0);
  59. max (3 0.2 1.75);
  60. }
  61.  
  62. airfoilregion
  63. {
  64.  
  65. type searchableCylinder;
  66. point1 (0.2 0 0);
  67. point2 (0.2 0 1.55);
  68. radius 0.35;
  69. }
  70. };
  71.  
  72.  
  73.  
  74. // Settings for the castellatedMesh generation.
  75. castellatedMeshControls
  76. {
  77.  
  78. // Refinement parameters
  79. // ~~~~~~~~~~~~~~~~~~~~~
  80.  
  81. // If local number of cells is >= maxLocalCells on any processor
  82. // switches from from refinement followed by balancing
  83. // (current method) to (weighted) balancing before refinement.
  84. maxLocalCells 100000;
  85.  
  86. // Overall cell limit (approximately). Refinement will stop immediately
  87. // upon reaching this number so a refinement level might not complete.
  88. // Note that this is the number of cells before removing the part which
  89. // is not 'visible' from the keepPoint. The final number of cells might
  90. // actually be a lot less.
  91. maxGlobalCells 2000000;
  92.  
  93. // The surface refinement loop might spend lots of iterations refining just
  94. // a few cells. This setting will cause refinement to stop if <=
  95. // minimumRefine are selected for refinement. Note: it will at least do one
  96. // iteration (unless the number of cells to refine is 0)
  97. minRefinementCells 10;
  98.  
  99. // Number of buffer layers between different levels.
  100. // 1 means normal 2:1 refinement restriction, larger means slower
  101. // refinement.
  102. nCellsBetweenLevels 1;
  103.  
  104.  
  105.  
  106. // Explicit feature edge refinement
  107. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  108.  
  109. // Specifies a level for any cell intersected by its edges.
  110. // This is a featureEdgeMesh, read from constant/triSurface for now.
  111. features
  112. (
  113. {
  114. file "foilj_10deg.eMesh";
  115. level 4;
  116. }
  117. );
  118.  
  119.  
  120.  
  121. // Surface based refinement
  122. // ~~~~~~~~~~~~~~~~~~~~~~~~
  123.  
  124. // Specifies two levels for every surface. The first is the minimum level,
  125. // every cell intersecting a surface gets refined up to the minimum level.
  126. // The second level is the maximum level. Cells that 'see' multiple
  127. // intersections where the intersections make an
  128. // angle > resolveFeatureAngle get refined up to the maximum level.
  129.  
  130. refinementSurfaces
  131. {
  132. foil
  133. {
  134. // Surface-wise min and max refinement level
  135. level (5 5);
  136.  
  137. }
  138. }
  139.  
  140. // Resolve sharp angles on fridges
  141. resolveFeatureAngle 10;
  142.  
  143.  
  144. // Region-wise refinement
  145. // ~~~~~~~~~~~~~~~~~~~~~~
  146.  
  147. // Specifies refinement level for cells in relation to a surface. One of
  148. // three modes
  149. // - distance. 'levels' specifies per distance to the surface the
  150. // wanted refinement level. The distances need to be specified in
  151. // descending order.
  152. // - inside. 'levels' is only one entry and only the level is used. All
  153. // cells inside the surface get refined up to the level. The surface
  154. // needs to be closed for this to be possible.
  155. // - outside. Same but cells outside.
  156.  
  157. refinementRegions
  158. {
  159. wakeregion
  160. {
  161. mode inside;
  162. levels ((1e15 3));
  163. }
  164.  
  165.  
  166. foil
  167. {
  168. mode distance;
  169. levels ((0.007 5) (0.04 4)); //(0.07 3)
  170. }
  171. }
  172.  
  173.  
  174. // Mesh selection
  175. // ~~~~~~~~~~~~~~
  176.  
  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
  181. // after refinement.
  182. locationInMesh (0.5 -1 0.5);
  183.  
  184.  
  185. // Whether any faceZones (as specified in the refinementSurfaces)
  186. // are only on the boundary of corresponding cellZones or also allow
  187. // free-standing zone faces. Not used if there are no faceZones.
  188. allowFreeStandingZoneFaces true;
  189. }
  190.  
  191.  
  192.  
  193. // Settings for the snapping.
  194. snapControls
  195. {
  196. //- Number of patch smoothing iterations before finding correspondence
  197. // to surface
  198. nSmoothPatch 4;
  199.  
  200. //- Relative distance for points to be attracted by surface feature point
  201. // or edge. True distance is this factor times local
  202. // maximum edge length.
  203. tolerance 2.0;
  204.  
  205. //- Number of mesh displacement relaxation iterations.
  206. nSolveIter 40;
  207.  
  208. //- Maximum number of snapping relaxation iterations. Should stop
  209. // before upon reaching a correct mesh.
  210. nRelaxIter 5;
  211.  
  212. // Feature snapping
  213.  
  214. //- Number of feature edge snapping iterations.
  215. // Leave out altogether to disable.
  216. nFeatureSnapIter 20;
  217.  
  218. //- Detect (geometric only) features by sampling the surface
  219. // (default=false).
  220. implicitFeatureSnap false;
  221.  
  222. //- Use castellatedMeshControls::features (default = true)
  223. explicitFeatureSnap true;
  224.  
  225. //- Detect points on multiple surfaces (only for explicitFeatureSnap)
  226. multiRegionFeatureSnap false;
  227. }
  228.  
  229.  
  230.  
  231. // Settings for the layer addition.
  232. addLayersControls
  233. {
  234. // Are the thickness parameters below relative to the undistorted
  235. // size of the refined cell outside layer (true) or absolute sizes (false).
  236. relativeSizes false;
  237.  
  238. // Per final patch (so not geometry!) the layer information
  239. layers
  240. {
  241. foil_main
  242. {
  243. nSurfaceLayers 6;
  244. }
  245.  
  246. foil_slat
  247. {
  248. nSurfaceLayers 6;
  249. }
  250.  
  251. foil_flap
  252. {
  253. nSurfaceLayers 6;
  254. }
  255.  
  256. }
  257.  
  258. // Expansion factor for layer mesh
  259. expansionRatio 1.1;
  260.  
  261. // Wanted thickness of final added cell layer. If multiple layers
  262. // is the thickness of the layer furthest away from the wall.
  263. // Relative to undistorted size of cell outside layer.
  264. // See relativeSizes parameter.
  265. firstLayerThickness 0.0003;
  266.  
  267. // Minimum thickness of cell layer. If for any reason layer
  268. // cannot be above minThickness do not add layer.
  269. // Relative to undistorted size of cell outside layer.
  270. // See relativeSizes parameter.
  271. minThickness 0.000001;
  272.  
  273. // If points get not extruded do nGrow layers of connected faces that are
  274. // also not grown. This helps convergence of the layer addition process
  275. // close to features.
  276. // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x)
  277. nGrow 0;
  278.  
  279. // Advanced settings
  280.  
  281. // When not to extrude surface. 0 is flat surface, 90 is when two faces
  282. // are perpendicular
  283. featureAngle 179;
  284.  
  285. // Maximum number of snapping relaxation iterations. Should stop
  286. // before upon reaching a correct mesh.
  287. nRelaxIter 10;
  288.  
  289. // Number of smoothing iterations of surface normals
  290. nSmoothSurfaceNormals 1;
  291.  
  292. // Number of smoothing iterations of interior mesh movement direction
  293. nSmoothNormals 3;
  294.  
  295. // Smooth layer thickness over surface patches
  296. nSmoothThickness 10;
  297.  
  298. // Stop layer growth on highly warped cells
  299. maxFaceThicknessRatio 0.5;
  300.  
  301. // Reduce layer growth where ratio thickness to medial
  302. // distance is large
  303. maxThicknessToMedialRatio 0.3;
  304.  
  305. // Angle used to pick up medial axis points
  306. // Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
  307. minMedianAxisAngle 5; //was 90
  308.  
  309. // Create buffer region for new layer terminations
  310. nBufferCellsNoExtrude 0;
  311.  
  312.  
  313. // Overall max number of layer addition iterations. The mesher will exit
  314. // if it reaches this number of iterations; possibly with an illegal
  315. // mesh.
  316. nLayerIter 50;
  317. }
  318.  
  319.  
  320.  
  321. // Generic mesh quality settings. At any undoable phase these determine
  322. // where to undo.
  323. meshQualityControls
  324. {
  325. //- Maximum non-orthogonality allowed. Set to 180 to disable.
  326. maxNonOrtho 65;
  327.  
  328. //- Max skewness allowed. Set to <0 to disable.
  329. maxBoundarySkewness 20;
  330. maxInternalSkewness 4;
  331.  
  332. //- Max concaveness allowed. Is angle (in degrees) below which concavity
  333. // is allowed. 0 is straight face, <0 would be convex face.
  334. // Set to 180 to disable.
  335. maxConcave 80;
  336.  
  337. //- Minimum pyramid volume. Is absolute volume of cell pyramid.
  338. // Set to a sensible fraction of the smallest cell volume expected.
  339. // Set to very negative number (e.g. -1E30) to disable.
  340. minVol 1e-13;
  341.  
  342. //- Minimum quality of the tet formed by the face-centre
  343. // and variable base point minimum decomposition triangles and
  344. // the cell centre. Set to very negative number (e.g. -1E30) to
  345. // disable.
  346. // <0 = inside out tet,
  347. // 0 = flat tet
  348. // 1 = regular tet
  349. minTetQuality 1e-30;
  350.  
  351. //- Minimum face area. Set to <0 to disable.
  352. minArea -1;
  353.  
  354. //- Minimum face twist. Set to <-1 to disable. dot product of face normal
  355. // and face centre triangles normal
  356. minTwist 0.05;
  357.  
  358. //- Minimum normalised cell determinant
  359. // 1 = hex, <= 0 = folded or flattened illegal cell
  360. minDeterminant 0.001;
  361.  
  362. //- minFaceWeight (0 -> 0.5)
  363. minFaceWeight 0.05;
  364.  
  365. //- minVolRatio (0 -> 1)
  366. minVolRatio 0.01;
  367.  
  368. // must be >0 for Fluent compatibility
  369. minTriangleTwist -1;
  370.  
  371.  
  372. // Advanced
  373.  
  374. //- Number of error distribution iterations
  375. nSmoothScale 4;
  376. //- Amount to scale back displacement at error points
  377. errorReduction 0.75;
  378. }
  379.  
  380.  
  381. // Advanced
  382.  
  383. // Merge tolerance. Is fraction of overall bounding box of initial mesh.
  384. // Note: the write tolerance needs to be higher than this.
  385. mergeTolerance 1e-6;
  386.  
  387.  
  388. // ************************************************************************* //
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement