|
[Sponsors] |
Does extrude and createPatch utilities degrade mesh quality? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 11, 2019, 11:04 |
Does extrude and createPatch utilities degrade mesh quality?
|
#1 |
New Member
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
Hi guys,
Im relatively new to the OpenFoam, and my question is as mentioned above. The point of this project is to project a 3d chemical reactor to a 2d dimension. The problem is, the snappyHexMesh works just fine, the checkMesh report is as shown below: Checking geometry... Overall domain bounding box (-0.02026639 -0.4499996 -0.3381794) (0.02 2.914998 20.32082) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (-4.47195e-15 -1.377571e-16 -1.32104e-18) OK. Max cell openness = 7.084912e-16 OK. Max aspect ratio = 67.56328 OK. Minimum face area = 4.65e-10. Maximum face area = 0.002978817. Face area magnitudes OK. Min volume = 9.507243e-10. Max volume = 0.0001199761. Total volume = 0.8087285. Cell volumes OK. Mesh non-orthogonality Max: 65.00413 average: 12.09625 Non-orthogonality check OK. Face pyramids OK. Max skewness = 3.908088 OK. Coupled point location match (average 0) OK. Mesh OK. But as I was trying to extrude the relatively thin Mesh to a paper thin(one cell layer) The mesh got degraded and the report went wrong ***Zero or negative face area detected. Minimum area: 0 <<Writing 8 zero area faces to set zeroAreaFaces Min volume = 4.4325e-10. Max volume = 0.0001489268. Total volume = 0.9998755. Cell volumes OK. Mesh non-orthogonality Max: 85.722 average: 8.44269 *Number of severely non-orthogonal (> 70 degrees) faces: 45. Non-orthogonality check OK. <<Writing 45 non-orthogonal faces to set nonOrthoFaces ***Error in face pyramids: 1 faces are incorrectly oriented. <<Writing 1 faces with incorrect orientation to set wrongOrientedFaces ***Max skewness = 5.384117e+151, 53 highly skew faces detected which may impair the quality of the results <<Writing 53 skew faces to set skewFaces Coupled point location match (average 0) OK. Failed 3 mesh checks. Can somebody be so kind and help me with it? If not the specific solutions, telling me where the errors would be is also very appreciated! Im stucked here for more than one week, tried everything but just cant figure it out. Thank you guys so much! I would attach the Dict files below. |
|
February 11, 2019, 16:25 |
|
#2 | |
Member
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 10 |
Could you please update your case file?
Quote:
__________________
Yours in CFD, Ran |
||
February 11, 2019, 16:59 |
|
#3 |
New Member
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
HI
I'm not sure if I have posted it, its my first time being here |
|
February 11, 2019, 17:01 |
|
#4 |
New Member
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
||
February 11, 2019, 17:08 |
|
#5 |
New Member
Join Date: Dec 2018
Posts: 4
Rep Power: 8 |
I think I just figured out how to post it in between the text.
For the convenience blockMeshDict Code:
convertToMeters 1; // does nothing in this case, 0.1 would shrink it by 10x vertices // (x y z) ( (-0.1 -1 -1) // was 0 0 0 (0.1 -1 -1) // was 0.2 0 0 (0.1 4 -1) // was 0.2 0.2 0 (-0.1 4 -1) // was 0 0.2 0 (-0.1 -1 23) // was 0 0 0.2 (0.1 -1 23) // was 0.2 0 0.2 (0.1 4 23) // was 0.2 0.2 0.2 (-0.1 4 23) // was 0 0.2 0.2 ); blocks ( hex (0 1 2 3 4 5 6 7) (100 100 100) simpleGrading (1 1 1) ); edges ( ); patches //copied from DICAT shm example "M3_mixing elbow1" ( patch maxY ( (3 7 6 2) ) patch minX ( (0 4 7 3) ) patch maxX ( (2 6 5 1) ) patch minY ( (1 5 4 0) ) patch minZ ( (0 3 2 1) ) patch maxZ ( (4 5 6 7) ) ); mergePatchPairs ( ); // ************************************************************************* // snappyHexMesh Code:
FoamFile { version 2.0; format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Which of the steps to run castellatedMesh true; // make basic mesh ? snap true; // decide to snap back to surface ? addLayers true; // decide to add viscous layers ? geometry // Load in STL files here { coldWalls.stl {type triSurfaceMesh; name coldWalls;} hotWalls.stl {type triSurfaceMesh; name hotWalls;} resevoir.stl {type triSurfaceMesh; name resevoir;} rohrOben.stl {type triSurfaceMesh; name rohrOben;} rohrUnten.stl {type triSurfaceMesh; name rohrUnten;} volume.stl {type triSurfaceMesh; name volume;} refinementBox {type searchableBox; min (-0.1 -0.1 -0.05); max ( 0.1 0.1 0.05);} }; castellatedMeshControls { maxLocalCells 1000000; //max cells per CPU core maxGlobalCells 2000000; //max cells to use before mesh deletion step minRefinementCells 10; //was 0 - zero means no bad cells are allowed during refinement stages maxLoadUnbalance 0.10; nCellsBetweenLevels 1; // expansion factor between each high & low refinement zone // Explicit feature edge refinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ features // taken from STL from each .eMesh file created by "SurfaceFeatureExtract" command ( {file "resevoir.eMesh"; level 2;} {file "coldWalls.eMesh"; level 2;} {file "hotWalls.eMesh"; level 2;} {file "rohrOben.eMesh"; level 2;} {file "rohrUnten.eMesh"; level 2;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level { coldWalls {level (2 2);} hotWalls {level (2 2);} // was 4 4 resevoir {level (2 2);} // was 4 4 rohrOben {level (2 2);} // was 4 4 rohrUnten {level (2 2);} // was 4 4 } resolveFeatureAngle 80; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness {volume {mode distance; levels ((0.0006 4) (0.002 3) (0.01 2));}} // was ((0.001 4) (0.003 3) (0.01 2)) locationInMesh (0 0 0); //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 15; // default is 10 // 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 false; // was true layers { coldWalls {nSurfaceLayers 2;} // was 3 hotWalls {nSurfaceLayers 2;} // was 3 resevoir {nSurfaceLayers 2;} // was 3 rohrOben {nSurfaceLayers 2;} // was 3 rohrUnten {nSurfaceLayers 2;} // was 3 } expansionRatio 1.3; finalLayerThickness 0.00016; //was 0.00016 minThickness 0.00008; //was 0.00008 nGrow 0; // was 1 // Advanced settings featureAngle 80; // was 70 //- When not to extrude surface. 0 is flat, 90 is right angle. nRelaxIter 3; //- Max# of 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.5; // Stop layer growth on highly warped cells maxThicknessToMedialRatio 0.3; // Reduce layer growth where ratio thickness to medial distance is large minMedianAxisAngle 130; // Angle used to pick up medial axis points nBufferCellsNoExtrude 0; // Create buffer region for new layer terminations nLayerIter 50; // Overall max number of layer addition iterations } // Generic mesh quality settings. At any undoable phase these determine // where to undo. 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; Code:
FoamFile { version 2.0; format ascii; class dictionary; object extrudeMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // What to extrude: // patch : from patch of another case ('sourceCase') // mesh : as above but with original case included // surface : from externally read surface constructFrom patch; sourceCase "../mammutSnappy"; sourcePatches (maxX); // If construct from patch: patch to use for back (can be same as sourcePatch) exposedPatchName minX; // Flip surface normals before usage. Valid only for extrude from surface or // patch. flipNormals false; //- Linear extrusion in point-normal direction extrudeModel linearNormal; nLayers 1; expansionRatio 1.0; linearNormalCoeffs { thickness 0.05; } linearDirectionCoeffs { direction (0 1 0); thickness 0.005; } sectorCoeffs { axisPt (0 0 0); axis (0 1 0); angle 1.000000; } // Do front and back need to be merged? Usually only makes sense for 360 // degree wedges. mergeFaces false; // true; // Merge small edges. Fraction of bounding box. mergeTol 0; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Code:
FoamFile { version 2.0; format ascii; class dictionary; object createPatchDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pointSync false; patches ( { // Name of new patch name front; // Type of new patch patchInfo { type empty; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (maxX); } { // Name of new patch name back; // Type of new patch patchInfo { type empty; } // How to construct: either from 'patches' or 'set' constructFrom patches; // If constructFrom = patches : names of patches. Wildcards allowed. patches (minX); } ); // ************************************************************************* // Thanks again for your patience and help |
|
Tags |
shm, skewness, snappyhexmesh, zeroareafaces |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Gmsh and createPatch (problem with mesh) | seboxx | OpenFOAM Meshing & Mesh Conversion | 5 | November 2, 2020 16:13 |
Extrude mesh with cyclic bc | lakeat | OpenFOAM Running, Solving & CFD | 2 | December 12, 2011 19:01 |