|
[Sponsors] |
June 12, 2022, 08:08 |
Why is my axisymmetric mesh not working out?
|
#1 |
New Member
Join Date: Jan 2022
Posts: 20
Rep Power: 4 |
Hi there!
I am trying to set up an axisymmetric mesh of my original case (pipe+orifice) to save computational cost and time. I managed to set up the mesh but once I try to run interPhaseChangeFoam the simulation crashes (it does not even start). The problem is the mesh, given that checkMesh yields the following checkMesh Code:
Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 3162 internal points: 0 faces: 5840 internal faces: 2784 cells: 1431 faces per cell: 6.02655 boundary patches: 5 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 1265 prisms: 61 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 105 Breakdown of polyhedra by number of faces: faces number of cells 6 9 7 93 8 3 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology inlet 12 25 ok (non-closed singly connected) outlet 12 25 ok (non-closed singly connected) symmetry1 1431 1615 ok (non-closed singly connected) symmetry2 1431 1615 ok (non-closed singly connected) orifice 170 342 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-0.0615 0 -0.000327145) (0.1785 0.00749286 0.000327145) Mesh has 2 geometric (non-empty/wedge) directions (1 1 0) Mesh has 3 solution (non-empty) directions (1 1 1) Wedge symmetry1 with angle 2.5 degrees Wedge symmetry2 with angle 2.5 degrees All edges aligned with or perpendicular to non-empty directions. Boundary openness (-2.98248e-19 3.25799e-16 -2.20362e-16) OK. Max cell openness = 2.77951e-16 OK. Max aspect ratio = 8.88747 OK. Minimum face area = 1.66976e-10. Maximum face area = 4.13566e-06. Face area magnitudes OK. ***Zero or negative cell volume detected. Minimum negative volume: -9.17165e-10, Number of negative volume cells: 1431 <<Writing 1431 zero volume cells to set zeroVolumeCells Mesh non-orthogonality Max: 180 average: 168.009 ***Number of non-orthogonality errors: 2784. <<Writing 2784 non-orthogonal faces to set nonOrthoFaces ***Error in face pyramids: 8624 faces are incorrectly oriented. <<Writing 5840 faces with incorrect orientation to set wrongOrientedFaces ***Max skewness = 90.0887, 2 highly skew faces detected which may impair the quality of the results <<Writing 2 skew faces to set skewFaces Coupled point location match (average 0) OK. Failed 4 mesh checks. End I attach more relevant files below. Please let me know if more information is required. Thanks in advance! blockMesh Code:
convertToMeters 1000; vertices ( (-0.0615 0 0) (0.1785 0 0) (0.1785 0.01 0) (-0.0615 0.01 0) (-0.0615 0 0.01) (0.1785 0 0.01) (0.1785 0.01 0.01) (-0.0615 0.01 0.01) ); blocks ( hex (0 1 2 3 4 5 6 7) (180 24 24) simpleGrading (1 1 1) ); edges ( ); patches //clockwise (does this actually matter?) ( patch walls ( (3 7 6 2) //upper (4 5 6 7) //side-left wall ) patch inlet ( (0 4 7 3) ) patch outlet ( (2 6 5 1) ) symmetry symmetry1 ( (0 3 2 1) //side-right wall ) symmetry symmetry2 ( (1 5 4 0) //lower-wall ) ); mergePatchPairs ( ); // ************************************************************************* // Code:
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 { orifice { type triSurfaceMesh; file "orifice.stl"; } inlet { type triSurfaceMesh; file "inlet.stl"; } outlet { type triSurfaceMesh; file "outlet.stl"; } wall { type triSurfaceMesh; file "wall.stl"; } refinementBox { type searchableBox; min (-10 -8 -8); max (20 8 8); } EnclosingRefinementBox { type searchableBox; min (-20 -8 -8);//min (-60 -8 -8); max (40 8 8);//max (120 8 8); } }; 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 8; // 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 "orifice.eMesh"; level 3;} {file "wall.eMesh"; level 1;} ); // Surface based refinement // ~~~~~~~~~~~~~~~~~~~~~~~~ refinementSurfaces // Surface-wise min and max refinement level { orifice {level (3 3);} wall {level (1 1);} } resolveFeatureAngle 5; // Resolve sharp angles // Default 30 refinementRegions // In descending levels of fine-ness { refinementBox { mode inside; levels ((1E15 3)); } EnclosingRefinementBox { mode inside; levels ((1E15 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 { orifice { nSurfaceLayers 8; expansionRatio 1.1; finalLayerThickness 0.01; minThickness 0.001; } wall { nSurfaceLayers 8; expansionRatio 1.1; finalLayerThickness 0.1; minThickness 0.01; } } expansionRatio 1.2; finalLayerThickness 1.0; //was 0.00016 minThickness 0.05; //was 0.00008 nGrow 1; // 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 25; // 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 -1; 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:
constructFrom patch; sourceCase "$FOAM_CASE"; sourcePatches (symmetry1); exposedPatchName symmetry2; extrudeModel wedge; sectorCoeffs { axisPt (0 0 0); axis (1 0 0); angle 5; } flipNormals false; mergeFaces false; |
|
June 14, 2022, 12:35 |
|
#2 |
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14 |
Your first problem is:
Code:
***Zero or negative cell volume detected. Minimum negative volume: -9.17165e-10, Number of negative volume cells: 1431 <<Writing 1431 zero volume cells to set zeroVolumeCells Code:
axis (1 0 0); Code:
axis (-1 0 0); |
|
June 14, 2022, 14:20 |
|
#3 |
New Member
Join Date: Jan 2022
Posts: 20
Rep Power: 4 |
Thank you very much! The mesh is not perfect but now the simulation runs!
Code:
Checking geometry... Overall domain bounding box (-0.0615 0 -6.8029e-10) (0.1785 0.0075 0.000653668) Mesh has 2 geometric (non-empty/wedge) directions (1 1 0) Mesh has 3 solution (non-empty) directions (1 1 1) Wedge symmetry1 with angle 4.08921e-05 degrees Wedge symmetry2 with angle 5 degrees ***Number of edges not aligned with or perpendicular to non-empty directions: 1547 <<Writing 3094 points on non-aligned edges to set nonAlignedEdges Boundary openness (1.70427e-19 -1.91051e-17 -2.88085e-15) OK. Max cell openness = 2.2228e-16 OK. Max aspect ratio = 8.87889 OK. Minimum face area = 1.66977e-10. Maximum face area = 4.13566e-06. Face area magnitudes OK. Min volume = 1.7067e-12. Max volume = 9.17161e-10. Total volume = 5.81139e-07. Cell volumes OK. Mesh non-orthogonality Max: 60.7899 average: 11.9914 Non-orthogonality check OK. Face pyramids OK. ***Max skewness = 90.1051, 2 highly skew faces detected which may impair the quality of the results <<Writing 2 skew faces to set skewFaces Coupled point location match (average 0) OK. Failed 2 mesh checks. End |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] non uniform mesh near the stl object | vava10 | OpenFOAM Meshing & Mesh Conversion | 0 | January 31, 2021 15:41 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
Gambit problems | Althea | FLUENT | 22 | January 4, 2017 04:19 |
Mesh interfaces and reactions in porous media - why not working? | RossFS | FLUENT | 0 | December 15, 2013 06:40 |
Axisymmetric 2D mesh adaptation - ERROR | Pepe | CFX | 3 | May 30, 2011 09:28 |