// Which of the steps to run castellatedMesh true; // true; snap true; // true; addLayers false; // true; geometry { GEOM.stl { type triSurfaceMesh; name stlSurface; regions { outletLeft { name outletLeft; } outletRight { name outletRight; } inlet { name inlet; } } } refinementBox { type searchableBox; min (-1 -1.5 -2); max (0.5 0.5 2.5); } refinementBox_outlR // for outlet right { type searchableBox; min (0.05 -0.25 -0.45); max (0.35 0.25 -0.15); } }; // Settings for the castellatedMesh generation. castellatedMeshControls { maxLocalCells 100000; maxGlobalCells 2000000; minRefinementCells 0; nCellsBetweenLevels 5; // 2; features ( { file "GEOM.eMesh"; level 4; } ); refinementSurfaces { stlSurface { // Surface-wise min and max refinement level level (3 4); // 5 6 regions { outletLeft { level (6 7); patchInfo { type patch; inGroups (stlSurface); } } outletRight { level (9 10); patchInfo { type patch; inGroups (stlSurface); } } inlet { level (5 6); patchInfo { type patch; inGroups (stlSurface); } } } } refinementBox { level (4 5); faceZone zoneA; cellZone zoneA; cellZoneInside inside; } refinementBox_outlR { level (5 6); faceZone zoneB; cellZone zoneB; cellZoneInside inside; } /*Reading refinement surfaces. 4 (outside / inside / none / insidePoint )*/ } resolveFeatureAngle 150; // 30;15 refinementRegions { refinementBox { mode inside; // inside; levels ((1.0e+15 6)); //1E15 4 } refinementBox_outlR { mode inside; // inside; levels ((1.0e+15 5)); //1E15 4 } } locationInMesh (0 0 -0.2); allowFreeStandingZoneFaces false; } // Settings for the snapping. snapControls { nSmoothPatch 3;//3 tolerance 0.1;//4 nSolveIter 300;//300 nRelaxIter 5; nFeatureSnapIter 10; //implicitFeatureSnap true; //explicitFeatureSnap true; //multiRegionFeatureSnap true; } addLayersControls { relativeSizes true; //true; // v 1.6 // Per final patch (so not geometry!) the layer information layers { stlSurface // a_surface_name { nSurfaceLayers 5; } outletLeft// a_surface_name { nSurfaceLayers 5; } outletRight { nSurfaceLayers 5; } inlet { nSurfaceLayers 5; } } expansionRatio 1.4; // 1.0; finalLayerThickness 0.3; // 0.3; // v 1.6 minThickness 0.1; // 0.1; //- If points get not extruded do nGrow layers of connected faces that are // also not grown. This helps convergence of the layer addition process // close to features. nGrow 1; // 1; // Advanced settings //- When not to extrude surface. 0 is flat surface, 90 is when two faces // make straight angle. featureAngle 180; // 30; 179 //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 10;//3 // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 10;//1 // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 10;//3 // Smooth layer thickness over surface patches nSmoothThickness 10; // Stop layer growth on highly warped cells maxFaceThicknessRatio 0.5; // Reduce layer growth where ratio thickness to medial // distance is large maxThicknessToMedialRatio 0.3; // Angle used to pick up medial axis points minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 2; // Overall max number of layer addition iterations // v 1.6 nLayerIter 50; // v 1.6 } // Generic mesh quality settings. At any undoable phase these determine // where to undo. meshQualityControls { //- Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 180;//65 //- Max skewness allowed. Set to <0 to disable. maxBoundarySkewness -1;//20 maxInternalSkewness -1;//4 //- Max concaveness allowed. Is angle (in degrees) below which concavity // is allowed. 0 is straight face, <0 would be convex face. // Set to 180 to disable. maxConcave 180;//80 //- Minimum projected area v.s. actual area. Set to -1 to disable. minFlatness -1;//0.5 //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-20; //- Minimum face area. Set to <0 to disable. minArea 1e-20; minTetQuality 1e-13; //- Minimum face twist. Set to <-1 to disable. dot product of face normal //- and face centre triangles normal minTwist -1;//0.02 //- minimum normalised cell determinant //- 1 = hex, <= 0 = folded or flattened illegal cell minDeterminant -1;//0.001 //- minFaceWeight (0 -> 0.5) minFaceWeight 0;//0.02 //- minVolRatio (0 -> 1) minVolRatio 0;//0.01 //must be >0 for Fluent compatibility minTriangleTwist -1; // Advanced //- Number of error distribution iterations nSmoothScale 4; //- amount to scale back displacement at error points errorReduction 0.75; } // Advanced // Flags for optional output // 0 : only write final meshes // 1 : write intermediate meshes // 2 : write volScalarField with cellLevel for postprocessing // 4 : write current intersections as .obj files debug 0; // Merge tolerance. Is fraction of overall bounding box of initial mesh. // Note: the write tolerance needs to be higher than this. mergeTolerance 1E-6; // ************************************************************************* //