|
[Sponsors] |
[snappyHexMesh] SHM does not follow STL geometry well |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 18, 2016, 13:04 |
SHM does not follow STL geometry well
|
#1 |
Member
Axel
Join Date: May 2016
Location: Augsburg, Germany
Posts: 46
Rep Power: 10 |
I want to mesh a geometry from STL files with SHM. The resulting mesh looks imo fine at first sight. However it does not follow the STL file properly, which causes problem in the simulation, because I need to use cyclicAMI boundary conditions. Unfortunatly I can not post the geometry or pictures of the whole mesh, because the product is still in development. I am trying to provide as much as possible.
The extracted feature edges are represented in red in the images. A major problem I see with the created mesh, is that the boundaries Upper_Ducts and Lower_Ducts have a significantly different number of faces, although they should have the same geometry. This is indicated in the 2nd and 3rd image below. If you have any further questions about the set-up please ask. Thanks for your help in advance! snappyHexMeshDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; geometry // Load in STL files here { Flow_Inlet.stl {type triSurfaceMesh; name Flow_Inlet;} Flow_Outlet.stl {type triSurfaceMesh; name Flow_Outlet;} Left_Ducts.stl {type triSurfaceMesh; name Left_Ducts;} Right_Ducts.stl {type triSurfaceMesh; name Right_Ducts;} Lower_Ducts.stl {type triSurfaceMesh; name Lower_Ducts;} Upper_Ducts.stl {type triSurfaceMesh; name Upper_Ducts;} Walls.stl {type triSurfaceMesh; name Walls;} All_Faces.stl {type triSurfaceMesh; name All_Faces;} }; castellatedMeshControls { maxLocalCells 1500000; //max cells per CPU core maxGlobalCells 8000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages nCellsBetweenLevels 3; // expansion factor between each high & low refinement zone maxLoadUnbalance 0.10; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command features ( {file "Flow_Inlet.eMesh"; level 0;} {file "Flow_Outlet.eMesh"; level 0;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level. Block is needed to define faces. { Flow_Inlet {level (0 0);} Flow_Outlet {level (0 0);} Left_Ducts {level (0 0);} Right_Ducts {level (0 0);} Lower_Ducts {level (0 0);} Upper_Ducts {level (0 0);} Walls {level (0 0);} } refinementRegions // In descending levels of fine-ness. For finer regions. { } resolveFeatureAngle 30; // Resolve sharp angles // Default 30 locationInMesh (2e-02 0 2e-03); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { nSmoothPatch 3; tolerance 4.0; nSolveIter 30; nRelaxIter 5; nFeatureSnapIter 3; // default is 10 Highly experimental! // New settings from openfoam 2.2 onwards for SHMesh implicitFeatureSnap false; // default is false - detects without doing surfaceFeatureExtract explicitFeatureSnap true; // default is true multiRegionFeatureSnap false; // deafault is false - detects features between multiple surfaces } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes true; // was true layers { Walls {nSurfaceLayers 3;} } expansionRatio 1.2; finalLayerThickness 0.3; minThickness 0.1; nGrow 0; // Advanced settings featureAngle 110; nRelaxIter 3; //- Max snapping relaxation iter. Should stop before upon reaching a correct mesh. nSmoothSurfaceNormals 1; // Number of smoothing iterations of surface normals nSmoothNormals 3; // Number of smoothing iterations of interior mesh movement direction nSmoothThickness 10; // Smooth layer thickness over surface patches maxFaceThicknessRatio 0.7; maxThicknessToMedialRatio 0.3; minMedianAxisAngle 100; nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations nLayerIter 50; // Overall max number of layer addition iterations } meshQualityControls { maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; maxConcave 80; minFlatness 0.5; minVol 1e-13; minTetQuality 1e-9; minArea -1; minTwist 0.02; minDeterminant 0.001; minFaceWeight 0.02; minVolRatio 0.01; minTriangleTwist -1; // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced 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; // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 3.0.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 7 ( Flow_Inlet { type patch; nFaces 5354; startFace 12356791; } Flow_Outlet { type patch; nFaces 5222; startFace 12362145; } Left_Ducts { type patch; nFaces 14586; startFace 12367367; } Right_Ducts { type patch; nFaces 15369; startFace 12381953; } Lower_Ducts { type patch; nFaces 7665; startFace 12397322; } Upper_Ducts { type patch; nFaces 5200; startFace 12404987; } Walls { type wall; nFaces 426170; startFace 12410187; } ) // ************************************************************************* // |
|
July 18, 2016, 13:09 |
|
#2 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Just taking a quick look at your settings, I see that all of your refinement surfaces are set to a refinement level of 0 0. For example:
Code:
refinementSurfaces // Surface-wise min and max refinement level. Block is needed to define faces. { Flow_Inlet {level (0 0);} Flow_Outlet {level (0 0);} Left_Ducts {level (0 0);} Right_Ducts {level (0 0);} Lower_Ducts {level (0 0);} Upper_Ducts {level (0 0);} Walls {level (0 0);} } Code:
Right_Ducts {level (1 2);} Last edited by chegdan; July 18, 2016 at 21:36. Reason: words |
|
July 19, 2016, 07:44 |
|
#3 |
Member
Axel
Join Date: May 2016
Location: Augsburg, Germany
Posts: 46
Rep Power: 10 |
Hey Dan, thanks for your reply!
As you recommended I changed the following things in my snappyHexMeshDict: Code:
features ( {file "Flow_Inlet.eMesh"; level 0;} {file "Flow_Outlet.eMesh"; level 0;} {file "Walls.eMesh"; level 1;} ); Code:
refinementSurfaces // Surface-wise min and max refinement level. Block is needed to define faces. { Flow_Inlet {level (0 0);} Flow_Outlet {level (0 0);} Left_Ducts {level (0 0);} Right_Ducts {level (0 0);} Lower_Ducts {level (0 0);} Upper_Ducts {level (0 0);} Walls {level (1 2);} } Code:
Lower_Ducts { type patch; nFaces 9098; startFace 30712726; } Upper_Ducts { type patch; nFaces 17952; startFace 30721824; } Do you have any further ideas to enhance my mesh? Thanks in advance for any help! |
|
July 19, 2016, 10:24 |
|
#4 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
You're moving in the right direction. Most of the issues with meshing with snappyHexMesh, whether that be resolving features or adding layers, can be fixed with more refinement (edge, surface, and volume refinement). To answer some of your questions:
Last edited by wyldckat; October 18, 2023 at 08:02. Reason: Updated the link to the AndrewJackson shared folder |
|
July 20, 2016, 07:07 |
|
#5 |
Member
Axel
Join Date: May 2016
Location: Augsburg, Germany
Posts: 46
Rep Power: 10 |
Hi Dan, thanks for your reply again!
So I took a few steps back and oriented myself at the snappyHexMeshDict of the motorBike tutorial. The first huge difference I noticed was, that the inital block mesh in the motorBike example was much coarser than in my case. I now changed it to Code:
blocks ( hex (0 1 2 3 4 5 6 7) (50 6 4) simpleGrading (1 1 1) ); Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers true; // Geometry. Definition of all surfaces. All surfaces are of class // searchableSurface. // Surfaces are used // - to specify refinement for any mesh cell intersecting it // - to specify refinement for any mesh cell inside/outside/near // - to 'snap' the mesh boundary to the surface geometry // Load in STL files here { Flow_Inlet.stl {type triSurfaceMesh; name Flow_Inlet;} Flow_Outlet.stl {type triSurfaceMesh; name Flow_Outlet;} Left_Ducts.stl {type triSurfaceMesh; name Left_Ducts;} Right_Ducts.stl {type triSurfaceMesh; name Right_Ducts;} Lower_Ducts.stl {type triSurfaceMesh; name Lower_Ducts;} Upper_Ducts.stl {type triSurfaceMesh; name Upper_Ducts;} Walls.stl {type triSurfaceMesh; name Walls;} All_Faces.stl {type triSurfaceMesh; name All_Faces;} }; castellatedMeshControls { // Refinement parameters // ~~~~~~~~~~~~~~~~~~~~~ // If local number of cells is >= maxLocalCells on any processor // switches from from refinement followed by balancing // (current method) to (weighted) balancing before refinement. maxLocalCells 100000; // Overall cell limit (approximately). Refinement will stop immediately // upon reaching this number so a refinement level might not complete. // Note that this is the number of cells before removing the part which // is not 'visible' from the keepPoint. The final number of cells might // actually be a lot less. maxGlobalCells 2000000; // The surface refinement loop might spend lots of iterations refining just a // few cells. This setting will cause refinement to stop if <= minimumRefine // are selected for refinement. Note: it will at least do one iteration // (unless the number of cells to refine is 0) minRefinementCells 10; // Allow a certain level of imbalance during refining // (since balancing is quite expensive) // Expressed as fraction of perfect balance (= overall number of cells / // nProcs). 0=balance always. maxLoadUnbalance 0.10; // Number of buffer layers between different levels. // 1 means normal 2:1 refinement restriction, larger means slower // refinement. nCellsBetweenLevels 3; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command features ( {file "Flow_Inlet.eMesh"; level 6;} {file "Flow_Outlet.eMesh"; level 6;} {file "Walls.eMesh"; level 6;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level. Block is needed to define faces. { Flow_Inlet {level (5 6);} Flow_Outlet {level (5 6);} Left_Ducts {level (5 6);} Right_Ducts {level (5 6);} Lower_Ducts {level (5 6);} Upper_Ducts {level (5 6);} Walls {level (5 6);} } refinementRegions { } resolveFeatureAngle 30; // Resolve sharp angles // Default 30 locationInMesh (2e-02 0 2e-03); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. tolerance 2.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; // Feature snapping //- Number of feature edge snapping iterations. // Leave out altogether to disable. nFeatureSnapIter 10; //- Detect (geometric only) features by sampling the surface // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) explicitFeatureSnap true; //- Detect points on multiple surfaces (only for explicitFeatureSnap) multiRegionFeatureSnap false; } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes true; // was true layers { Walls { nSurfaceLayers 3; } } // Expansion factor for layer mesh expansionRatio 1.0; // Wanted thickness of final added cell layer. If multiple layers // is the thickness of the layer furthest away from the wall. // Relative to undistorted size of cell outside layer. // See relativeSizes parameter. finalLayerThickness 0.3; // Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. // Relative to undistorted size of cell outside layer. minThickness 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. // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; // Advanced settings // When not to extrude surface. 0 is flat surface, 90 is when two faces // are perpendicular featureAngle 60; // At non-patched sides allow mesh to slip if extrusion direction makes // angle larger than slipFeatureAngle. slipFeatureAngle 30; // Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 3; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 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 // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; // Overall max number of layer addition iterations. The mesher will exit // if it reaches this number of iterations; possibly with an illegal // mesh. nLayerIter 50; } // Generic mesh quality settings. At any undoable phase these determine // where to undo. // disabled // enabled meshQualityControls { //- Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 65; //- Max skewness allowed. Set to <0 to disable. maxBoundarySkewness 20; maxInternalSkewness 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 80; //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to a sensible fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-13; //- Minimum quality of the tet formed by the face-centre // and variable base point minimum decomposition triangles and // the cell centre. This has to be a positive number for tracking // to work. Set to very negative number (e.g. -1E30) to // disable. // <0 = inside out tet, // 0 = flat tet // 1 = regular tet minTetQuality 1e-15; //- Minimum face area. Set to <0 to disable. minArea -1; //- Minimum face twist. Set to <-1 to disable. dot product of face normal // and face centre triangles normal minTwist 0.02; //- Minimum normalised cell determinant. This is the determinant of all // the areas of internal faces. It is a measure of how much of the // outside area of the cell is to other cells. The idea is that if all // outside faces of the cell are 'floating' (zeroGradient) the // 'fixedness' of the cell is determined by the area of the internal faces. // 1 = hex, <= 0 = folded or flattened illegal cell minDeterminant 0.001; //- Relative position of face in relation to cell centres (0.5 for orthogonal // mesh) (0 -> 0.5) minFaceWeight 0.05; //- Volume ratio of neighbouring cells (0 -> 1) minVolRatio 0.01; //- Per triangle normal compared to average normal. Like face twist // but now per (face-centre decomposition) triangle. Must be >0 for Fluent // compatibility minTriangleTwist -1; //- If >0 : preserve cells with all points on the surface if the // resulting volume after snapping (by approximation) is larger than // minVolCollapseRatio times old volume (i.e. not collapsed to flat cell). // If <0 : delete always. //minVolCollapseRatio 0.1; } // Advanced 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; // ************************************************************************* // |
|
July 20, 2016, 12:37 |
|
#6 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
I would get out a pen, a piece of paper, and a calculator and determine the size of all the levels that you are using in your mesh.
I would turn off layer addition for now until you have good snapping and then go back and turn that back on. I woudl also make sure that all your mesh quality settings are their default and work on decreasing the base mesh sizing or refinement until you get snapping. Once you have a mesh resolved, simulate and then adjust your mesh accordingly. |
|
July 22, 2016, 12:18 |
|
#7 |
Member
Axel
Join Date: May 2016
Location: Augsburg, Germany
Posts: 46
Rep Power: 10 |
Hi Dan,
I was able to get a very nice looking snapped mesh w/o layers. What confuses me is that the snapping quality somehow decreases when I'm increasing the refinement level. The image I attached belongs to the following sHMDict: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; snap true; addLayers false; geometry // Load in STL files here { Flow_Inlet.stl {type triSurfaceMesh; name Flow_Inlet;} Flow_Outlet.stl {type triSurfaceMesh; name Flow_Outlet;} Left_Ducts.stl {type triSurfaceMesh; name Left_Ducts;} Right_Ducts.stl {type triSurfaceMesh; name Right_Ducts;} Lower_Ducts.stl {type triSurfaceMesh; name Lower_Ducts;} Upper_Ducts.stl {type triSurfaceMesh; name Upper_Ducts;} Walls.stl {type triSurfaceMesh; name Walls;} All_Faces.stl {type triSurfaceMesh; name All_Faces;} }; castellatedMeshControls { maxLocalCells 1500000; //max cells per CPU core maxGlobalCells 8000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages nCellsBetweenLevels 3; // expansion factor between each high & low refinement zone maxLoadUnbalance 0.10; // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command features ( {file "Flow_Inlet.eMesh"; level 0;} {file "Flow_Outlet.eMesh"; level 0;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level. Block is needed to define faces. { Flow_Inlet {level (0 0);} Flow_Outlet {level (0 0);} Left_Ducts {level (0 0);} Right_Ducts {level (0 0);} Lower_Ducts {level (0 0);} Upper_Ducts {level (0 0);} Walls {level (0 0);} } refinementRegions // In descending levels of fine-ness. For finer regions. { // Lower_Ducts // { // mode distance; // levels ((0.0005 2)); // } } resolveFeatureAngle 30; // Resolve sharp angles // Default 30 locationInMesh (2e-02 0 2e-03); //to decide which side of mesh to keep ** allowFreeStandingZoneFaces true; } // Settings for the snapping. snapControls { //- Number of patch smoothing iterations before finding correspondence // to surface nSmoothPatch 3; //- Relative distance for points to be attracted by surface feature point // or edge. True distance is this factor times local // maximum edge length. tolerance 2.0; //- Number of mesh displacement relaxation iterations. nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 5; // Feature snapping //- Number of feature edge snapping iterations. // Leave out altogether to disable. nFeatureSnapIter 10; //- Detect (geometric only) features by sampling the surface // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) explicitFeatureSnap true; //- Detect points on multiple surfaces (only for explicitFeatureSnap) multiRegionFeatureSnap false; } // Settings for the layer addition. addLayersControls //add the PATCH names from inside the STL file so STLpatchName_insideSTLName { relativeSizes true; // was true layers { Walls {nSurfaceLayers 3;} } // Expansion factor for layer mesh expansionRatio 1.0; // Wanted thickness of final added cell layer. If multiple layers // is the thickness of the layer furthest away from the wall. // Relative to undistorted size of cell outside layer. // See relativeSizes parameter. finalLayerThickness 0.15; // Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. // Relative to undistorted size of cell outside layer. minThickness 0.05; // 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. // Note: changed(corrected) w.r.t 17x! (didn't do anything in 17x) nGrow 0; // Advanced settings // When not to extrude surface. 0 is flat surface, 90 is when two faces // are perpendicular featureAngle 60; // At non-patched sides allow mesh to slip if extrusion direction makes // angle larger than slipFeatureAngle. slipFeatureAngle 30; // Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. nRelaxIter 3; // Number of smoothing iterations of surface normals nSmoothSurfaceNormals 1; // Number of smoothing iterations of interior mesh movement direction nSmoothNormals 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 // Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x. minMedianAxisAngle 90; // Create buffer region for new layer terminations nBufferCellsNoExtrude 0; // Overall max number of layer addition iterations. The mesher will exit // if it reaches this number of iterations; possibly with an illegal // mesh. nLayerIter 50; } meshQualityControls { //- Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 65; //- Max skewness allowed. Set to <0 to disable. maxBoundarySkewness 20; maxInternalSkewness 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 80; //- Minimum pyramid volume. Is absolute volume of cell pyramid. // Set to a sensible fraction of the smallest cell volume expected. // Set to very negative number (e.g. -1E30) to disable. minVol 1e-13; //- Minimum quality of the tet formed by the face-centre // and variable base point minimum decomposition triangles and // the cell centre. This has to be a positive number for tracking // to work. Set to very negative number (e.g. -1E30) to // disable. // <0 = inside out tet, // 0 = flat tet // 1 = regular tet minTetQuality 1e-15; //- Minimum face area. Set to <0 to disable. minArea -1; //- Minimum face twist. Set to <-1 to disable. dot product of face normal // and face centre triangles normal minTwist 0.02; //- Minimum normalised cell determinant. This is the determinant of all // the areas of internal faces. It is a measure of how much of the // outside area of the cell is to other cells. The idea is that if all // outside faces of the cell are 'floating' (zeroGradient) the // 'fixedness' of the cell is determined by the area of the internal faces. // 1 = hex, <= 0 = folded or flattened illegal cell minDeterminant 0.001; //- Relative position of face in relation to cell centres (0.5 for orthogonal // mesh) (0 -> 0.5) minFaceWeight 0.05; //- Volume ratio of neighbouring cells (0 -> 1) minVolRatio 0.01; //- Per triangle normal compared to average normal. Like face twist // but now per (face-centre decomposition) triangle. Must be >0 for Fluent // compatibility minTriangleTwist -1; // Optional minFlatness 0.5; // Advanced nSmoothScale 4; errorReduction 0.75; } // Advanced 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; // ************************************************************************* // Code:
features ( {file "Flow_Inlet.eMesh"; level 1;} {file "Flow_Outlet.eMesh"; level 1;} {file "Left_Ducts.eMesh"; level 1;} {file "Right_Ducts.eMesh"; level 1;} {file "Upper_Ducts.eMesh"; level 1;} {file "Lower_Ducts.eMesh"; level 1;} ); |
|
July 23, 2016, 12:07 |
|
#8 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
Depending on your application, 1e6 or 2e6 is still a small mesh where the cell count ultimately depends on a balance between desired accuracy and computational resources. Meaning, you will mesh, simulation, check your solution,assess, and remesh. Continue this cycle until your solltuion does not "significantly" change or you run out of computational resources. I regularly run simulations on meshes anywhere from 1e6 to 1e9 cells in order to get the results i need. lastly, the sole reason layers where not added is becasue when added, the mesh quality criteria were not met so it was scaled back. Refine more to get small enough cells or try adding a single layer to start.
Last edited by chegdan; July 23, 2016 at 14:17. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] different sHM results on same geometry when everythin is in one or several stl-files. | Laika | OpenFOAM Meshing & Mesh Conversion | 1 | September 8, 2016 05:09 |
[snappyHexMesh] Using STL Geometry | vegaonline | OpenFOAM Meshing & Mesh Conversion | 5 | February 25, 2014 10:43 |
[ICEM] Mesh unable to follow curved geometry | Ananthakrishnan | ANSYS Meshing & Geometry | 27 | July 7, 2012 04:15 |
fan with geometry stl | Hitomi | OpenFOAM | 1 | August 18, 2011 12:27 |