Total number of faces on empty patches is not divisible by the number of cells in the
Hi I am new to OpenFOAM, I am trying to simulate flow over cylinder problem. But I'm facing issues in generating mesh as the above error keeps on popping (Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D). I am pasting my blockMeshDict file, please give your valuable suggestions.
vertices ( (-20 -25 0) (20 -25 0) (40 -25 0) (-0.7071 -0.7071 0) (0.7071 -0.7071 0) (-0.7070 0.7071 0) (0.7071 0.7071 0) (-20 25 0) (20 25 0) (40 25 0) (-20 -25 1) (20 -25 1) (40 -25 1) (-0.7071 -0.7071 1) (0.7071 -0.7071 1) (-0.7071 0.7071 1) (0.7071 0.7071 1) (-20 25 1) (20 25 1) (40 25 1) ); blocks ( hex (0 3 5 7 10 13 15 17) (10 10 1) simpleGrading (1 1 1) hex (1 4 3 0 11 14 13 10) (10 10 1) simpleGrading (1 1 1) hex (4 1 8 6 14 11 18 16) (10 10 1) simpleGrading (1 1 1) hex (6 8 7 5 16 18 17 15) (10 10 1) simpleGrading (1 1 1) hex (1 2 9 8 11 12 19 18) (10 10 1) simpleGrading (1 1 1) ); edges ( ); patches ( ); mergePatchPairs ( ); |
Hi ankit,
i think you have to define the boundary like in the Users Guide (http://www.openfoam.org/docs/user/blockMesh.php). Otherwise the faces are set as empty patches. Empty patches are useful to define symmetry planes in case of 1D or 2D meshes. greetings Alex |
Thanks alex,
Pardon me, but is it really necessary to define boundary conditions for a mesh generation? cause I'd watched few online tutorials and they didn't mention anything about boundary condition for mesh generation only. |
You are right.
You don t need boundary conditions for the mesh generation. But your boundary has to be defined properly. So you have to tell OF what kind of walls or borders your mesh has, otherwise OF suggest the simplest kind of border for them all (empty as seen in your error message). But you don t have to tell OF the values of the different fields (e.g. U, T, p ...) in the mesh, because you don t want to compute any fields yet. |
I converted gmsh file with Openfoam and changed the boundary type to empty to get a 2D msh , but check mesh is failed [before was ok]
Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D. what can be done? Code:
|
Hello,
I had the same issue with "***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D." I have attached the blockMeshDict file and checkMesh log file here - log.checkmesh file - Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 234421 faces: 654100 internal faces: 605900 cells: 210000 faces per cell: 6 boundary patches: 5 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 210000 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. ***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D. 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 1000 1111 ok (non-closed singly connected) outlet 1000 1111 ok (non-closed singly connected) top 2100 2321 ok (non-closed singly connected) hillGround 2100 2321 ok (non-closed singly connected) frontAndBack 42000 42622 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-20 0.5 0) (25 25 10) Mesh has 2 geometric (non-empty/wedge) directions (1 1 0) Mesh has 2 solution (non-empty) directions (1 1 0) All edges aligned with or perpendicular to non-empty directions. Boundary openness (1.585055e-17 -5.3718505e-15 -1.8733849e-14) OK. Max cell openness = 2.3241059e-16 OK. Max aspect ratio = 6.2306125 OK. Minimum face area = 0.0053744038. Maximum face area = 0.62424545. Face area magnitudes OK. Min volume = 0.0053744038. Max volume = 0.23409204. Total volume = 10936.61. Cell volumes OK. Mesh non-orthogonality Max: 32.871842 average: 9.856776 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.29386884 OK. Coupled point location match (average 0) OK. Mesh OK. End blockMeshDict file - H 2.5; vertices ( ( -20 0.5 0 ) // 0 ( -5 0.5 0 ) // 1 ( 5 0.5 0 ) // 2 ( 25 0.5 0 ) // 3 ( 25 25 0 ) // 4 ( 5 25 0 ) // 5 ( -5 25 0 ) // 6 ( -20 25 0 ) // 7 ( -20 0.5 10 ) // 8 ( -5 0.5 10 ) // 9 ( 5 0.5 10 ) // 10 ( 25 0.5 10 ) // 11 ( 25 25 10 ) // 12 ( 5 25 10 ) // 13 ( -5 25 10 ) // 14 ( -20 25 10 ) // 15 ); blocks ( // Medium level for tutorial hex ( 0 8 9 1 7 15 14 6 ) (10 40 100) simpleGrading (1 1 10) hex ( 1 9 10 2 6 14 13 5 ) (10 100 100) simpleGrading (1 1 10) hex ( 2 10 11 3 5 13 12 4 ) (10 70 100) simpleGrading (1 1 10) ); edges #codeStream { codeInclude #{ #include "pointField.H" #include "mathematicalConstants.H" #}; code #{ const scalar xMin = -5; const scalar xMax = 5; const label nPoints = 1000; const scalar dx = (xMax - xMin)/scalar(nPoints - 1); os << "(" << nl << "spline 1 2" << nl; pointField profile(nPoints); const scalar pi = constant::mathematical::pi; for (label i = 0; i < nPoints; ++i) { scalar x = xMin + i*dx; profile[i].x() = x; profile[i].y() = pow($H,3)/(pow($H,2)+pow(x,2)); profile[i].z() = 0; } os << profile << nl; os << "spline 9 10" << nl; profile.replace(2, 10); os << profile << nl; os << ");" << nl; #}; }; boundary ( inlet { type patch; faces ( ( 0 8 15 7 ) ); } outlet { type patch; faces ( ( 4 12 11 3 ) ); } top { type symmetryPlane; faces ( ( 6 7 15 14 ) ( 5 6 14 13 ) ( 4 5 13 12 ) ); } hillGround { type wall; faces ( ( 0 1 9 8 ) ( 1 2 10 9 ) ( 2 3 11 10 ) ); } frontAndBack { type empty; faces ( ( 14 15 8 9 ) ( 13 14 9 10 ) ( 12 13 10 11 ) ( 7 6 1 0 ) ( 6 5 2 1 ) ( 5 4 3 2 ) ); } ); mergePatchPairs ( ); Can someone please help me out with this? Thank you in advance |
All times are GMT -4. The time now is 23:49. |