Hi,
I tried to remove a wa
Hi,
I tried to remove a wall from the cavity case (tutorial/icoFoam/cavity) so I changed the blockMeshDict by moving a patch from fixedWall to frontAndBack in the boundary conditions : wall fixedWalls ( (2 6 5 1) (1 5 4 0) ) empty frontAndBack ( (0 4 7 3) (0 3 2 1) (4 5 6 7) ) Then I run blockMesh without problem but when I run icoFoam I get : --> FOAM FATAL ERROR : This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. I agree, the mesh is not 1D or 2D, but the cavity example neither and it works with "empty" patches ! What should I do ? My goal is to run a NS simulation in a open space over a ground with obstacles. TIA Olivier. |
empty patches are not included
empty patches are not included in any calculation. They are really only useful for front and back of a pure 2D simulation. This also means your domain should be only one celllayer thick (since otherwise you'd still have internal faces in the cross direction)
The cavity tutorial is a 2D simulation (no cross flow, no gradients in cross direction apart from truncation errors) |
ok, so I used
patch in
ok, so I used
patch in ( (0 4 7 3) ) patch out ( (2 6 5 1) ) and the right B.C. in 0/p and 0/U and it is ok. Thanks, Olivier. |
This mesh contains patches of type empty but is not 1D or 2D
Dear All
since I am a beginner, i try to make a 2D mesh by manual n blockMesh like shown below : /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1e-3; vertices ( (250 0 0) (300 0 0) (250 100 0) (300 100 0) (100 100 0) (250 100 0) (300 100 0) (0 175 0) (100 175 0) (100 175 0) (250 175 0) (300 175 0) (0 225 0) (100 225 0) (100 225 0) (250 225 0) (300 225 0) (100 550 0) (250 550 0) (300 550 0) (300 550 0) (400 550 0) (100 600 0) (250 600 0) (300 600 0) (300 600 0) (400 600 0) (250 0 1) (300 0 1) (250 100 1) (300 100 1) (100 100 1) (250 100 1) (300 100 1) (0 175 1) (100 175 1) (100 175 1) (250 175 1) (300 175 1) (0 225 1) (100 225 1) (100 225 1) (250 225 1) (300 225 1) (100 550 1) (250 550 1) (300 550 1) (300 550 1) (400 550 1) (100 600 1) (250 600 1) (300 600 1) (300 600 1) (400 600 1) ); blocks ( hex (0 1 3 2 27 28 30 29) (10 20 1) simpleGrading (1 1 1) hex (4 5 10 9 31 32 37 36) (30 15 1) simpleGrading (1 1 1) hex (5 6 11 10 32 33 38 37) (10 15 1) simpleGrading (1 1 1) hex (7 8 13 12 34 35 40 39) (20 10 1) simpleGrading (1 1 1) hex (9 10 15 14 36 37 42 41) (30 10 1) simpleGrading (1 1 1) hex (10 11 16 15 37 38 43 42) (10 10 1) simpleGrading (1 1 1) hex (14 15 18 17 41 42 45 44) (30 65 1) simpleGrading (1 1 1) hex (15 16 19 18 42 43 46 45) (10 65 1) simpleGrading (1 1 1) hex (17 18 23 22 44 45 50 49) (30 10 1) simpleGrading (1 1 1) hex (18 19 24 23 45 46 51 50) (10 10 1) simpleGrading (1 1 1) hex (20 21 26 25 47 48 53 52) (20 10 1) simpleGrading (1 1 1) ); edges ( ); patches ( wall walls ( (0 2 29 27) (1 3 30 28) (4 5 32 31) (4 9 36 31) (6 11 38 33) (7 8 35 34) (11 16 43 38) (12 13 40 39) (14 17 44 41) (16 19 46 43) (17 22 49 44) (20 21 48 47) (22 23 50 49) (23 24 51 50) (25 26 53 52) ) patch inlet ( (7 12 39 34) ) patch outletBottom ( (0 1 28 27) ) patch outletTop ( (21 26 53 48) ) empty frontAndBack ( (0 1 3 2) (4 5 10 9) (5 6 11 10) (9 10 15 14) (10 11 16 15) (14 15 18 17) (15 16 19 18) (17 18 23 22) (18 19 24 23) (7 8 13 12) (20 21 26 25) (27 28 30 29) (31 32 37 36) (32 33 38 37) (36 37 42 41) (37 38 43 42) (41 42 45 44) (42 43 46 45) (44 45 50 49) (45 46 51 50) (34 35 40 39) (47 48 53 52) ) ); mergePatchPairs ( ); // ************************************************** *********************** // i run checkMesh, and it said : Mesh OK. but, i got this following error message when tried to run my case (im using dieselFoam) : Creating field DpDt This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting anybody can help me please really really need help :( many thanks |
Hi Nugroho
I do not know if it is the source of all your problems, however you have multiple defined points, e.g.: (300 100 0) (100 100 0) (250 100 0) (300 100 0) and if you do not use the same points to define two blocks with common boundary, it will not automatically be merged. Remove all duplicate points and try again. By the way, the blockMesh do tell you that something is wrong by: Default patch type set to empty --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 576 Found 6 undefined faces in mesh; adding to default patch. This is a valuable warning, because you have manually made the front and back patches. Good luck, Niels |
Quote:
i will remove the duplicate point but, what do you mean with ''I have multiple defined points'' ? i still didnt understand :( Thanks Niels :) |
The point (300 100 0) is among others defined in the vertices-list more than once.
|
Quote:
i have removed the duplicate points like shown below : /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1e-3; vertices ( (250 0 0) //0 (300 0 0) //1 (300 100 0) //2 (250 100 0) //3 (100 100 0) //4 (0 175 0) //5 (100 175 0) //6 (250 175 0) //7 (300 175 0) //8 (300 225 0) //9 (250 225 0) //10 (100 225 0) //11 (0 225 0) //12 (100 550 0) //13 (250 550 0) //14 (300 550 0) //15 (400 550 0) //16 (400 600 0) //17 (300 600 0) //18 (250 600 0) //19 (100 600 0) //20 (250 0 1) //21 (300 0 1) //22 (300 100 1) //23 (250 100 1) //24 (100 100 1) //25 (0 175 1) //26 (100 175 1) //27 (250 175 1) //28 (300 175 1) //29 (300 225 1) //30 (250 225 1) //31 (100 225 1) //32 (0 225 1) //33 (100 550 1) //34 (250 550 1) //35 (300 550 1) //36 (400 550 1) //37 (400 600 1) //38 (300 600 1) //39 (250 600 1) //40 (100 600 1) //41 ); blocks ( hex (0 1 3 2 21 22 23 24) (10 20 1) simpleGrading (1 1 1) hex (4 3 7 6 25 24 28 27) (30 15 1) simpleGrading (1 1 1) hex (3 2 8 7 24 23 29 28) (10 15 1) simpleGrading (1 1 1) hex (5 6 11 12 26 27 32 33) (20 10 1) simpleGrading (1 1 1) hex (6 7 10 11 27 28 31 32) (30 10 1) simpleGrading (1 1 1) hex (7 8 9 10 28 29 30 31) (10 10 1) simpleGrading (1 1 1) hex (11 10 14 13 32 31 35 34) (30 65 1) simpleGrading (1 1 1) hex (10 9 15 14 31 30 36 35) (10 65 1) simpleGrading (1 1 1) hex (13 14 19 20 34 35 40 41) (30 10 1) simpleGrading (1 1 1) hex (14 15 18 19 35 36 39 40) (10 10 1) simpleGrading (1 1 1) hex (15 16 17 18 36 37 38 39) (20 10 1) simpleGrading (1 1 1) ); edges ( ); patches ( wall walls ( (0 3 24 21) (1 2 23 22) (4 3 24 25) (4 6 27 25) (2 8 29 23) (5 6 27 26) (8 9 30 29) (12 11 32 33) (11 13 34 32) (9 15 36 30) (13 20 41 34) (15 16 37 36) (20 19 40 41) (19 18 39 40) (18 17 38 39) ) patch inlet ( (5 12 33 26) ) patch outletBottom ( (0 1 22 21) ) patch outletTop ( (16 17 38 37) ) empty frontAndBack ( (0 1 3 2) (4 3 7 6) (3 2 8 7) (6 7 10 11) (7 8 9 10) (11 10 14 13) (10 9 15 14) (13 14 19 20) (14 15 18 19) (5 6 11 12) (15 16 17 18) (21 22 23 24) (25 24 28 27) (24 23 29 28) (27 28 31 32) (28 29 30 31) (32 31 35 34) (31 30 36 35) (34 35 40 41) (35 36 39 40) (26 27 32 33) (36 37 38 39) ) ); mergePatchPairs ( ); // ************************************************** *********************** // but i got this error message when i tried run blockMesh : face 0 in patch 0 does not have neighbour cell face: 4(0 3 24 21)#0 Foam::error::printStack(Foam::Ostream&) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::error::abort() in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/blockMesh" #3 Foam::polyMesh::facePatchFaceCells(Foam::List<Foam ::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #4 Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Field<Foam::Vector<double> > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/home/user/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so" #5 Foam::blockMesh::createTopology(Foam::IOdictionary &) in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/blockMesh" #6 Foam::blockMesh::blockMesh(Foam::IOdictionary&) in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/blockMesh" #7 main in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/blockMesh" #8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #9 __gxx_personality_v0 in "/home/user/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/blockMesh" From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 125. FOAM aborting Aborted i dont understand why this error message came? since i checked, for the face 0 in patch 0 (wall) it has neighbour cell . so why this error came ? :( |
The block
hex (0 1 3 2 21 22 23 24) (10 20 1) simpleGrading (1 1 1) is ill-defined. I suppose it needs to be: hex (0 1 2 3 21 22 23 24) (10 20 1) simpleGrading (1 1 1) Best regards, Niels |
oh my God!
i didnt see it. Thanks Niels. now my simulation is running :D |
Hello,
I am trying to run a 3D case in interFoam. I am able to run a case with just 1 cell in the z-direction. However, when I try to increase the number of cells in this direction i get the following error while running the interfoam case. There is no problem with the mesh as checkMesh indicates. Can someone comment on this please? Below is the error i get at execution, followed by my blockMesh file. Thanks // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading environmentalProperties Reading field pd --> FOAM Warning : From function Field<Type>::Field(const word& keyword, const dictionary& dict, const label s) in file /Network/Servers/controller.cluster/Homedir/stsriniv/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/Field.C at line 252 Reading "/Homedir/stsriniv/OpenFOAM/stsriniv-1.5/run/tutorials/interFoam/dropletShear_inletU/0/pd::outlet" from line 34 to line 35 expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0. Reading field gamma Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Calculating field g.h This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting ------------------------- My blockMesh file is: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1.0;//0.01; //0.146; vertices ( (-5.0 -1.5 -2.5) (5.0 -1.5 -2.5) (5.0 0 -2.5) (-5.0 0 -2.5) (5.0 1.5 -2.5) (-5.0 1.5 -2.5) (-5.0 -1.5 2.5) (5.0 -1.5 2.5) (5.0 0 2.5) (-5.0 0 2.5) (5.0 1.5 2.5) (-5.0 1.5 2.5) ); blocks ( hex (0 1 2 3 6 7 8 9) (200 30 4) simpleGrading (1 1 1) hex (3 2 4 5 9 8 10 11) (200 30 4) simpleGrading (1 1 1) // hex (0 1 2 3 6 7 8 9) (15 100 1) simpleGrading (1 1 1) // hex (3 2 4 5 9 8 10 11) (15 100 1) simpleGrading (1 1 1) // hex (5 4 6 7 15 14 16 17) (15 100 1) simpleGrading (1 1 1) // hex (7 6 8 9 17 16 18 19) (35 100 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet1 ( (1 2 8 7) ) patch inlet2 ( (3 5 11 9) ) patch outlet ( (2 4 10 8) (0 3 9 6) ) patch movingwall1 //atmosphere ( (4 5 11 10) // (0 6 7 1) ) patch movingwall2 //atmosphere ( // (4 5 11 10) (0 6 7 1) ) ); mergePatchPairs ( ); // ************************************************** *********************** // |
Quote:
Best regards Miels |
Hi Niels,
Thanks for the quick reply. However, I did not understand that error. All the patches are either inlets/outlets or walls. What is this empty patch? Is it referring to the the front and back surfaces? I have used the exact same blockMesh file for a 2D case by simply changing the block thickness in the z direction and setting the number of cells to 1. If you could throw more light on this. Thanks, S |
Hi Sechasai
The only thing I can come up with, is that sometimes I have experienced that the constant/polyMesh/boundary file is not updated. Try deleting it and re-blockMesh, then it should be the correct file, and hopefully it will solve your problem. Best regards, Niels |
Hi,
I have the same problem. I am trying to simulate the rising of bubble on a plate. I already used InterFoam (with the same mesh and without errors) but I need to compare my results using InterDyMFoam. The same message as above appears : Selected 176 cells for refinement out of 146800. Refined from 146800 to 148032 cells. Selected 0 split points out of a possible 176. Execution time for mesh.update() = 2.96 s This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting Here, is my blockMeshDict, /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.4 | | \\ / A nd | Web: http://www.openfoam.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; root ""; case ""; instance ""; local ""; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.004 0 0) (0.070 0 0) (0.08 0 0) (0 0 0.013) (0.004 0 0.013) (0.070 0 0.013) (0.08 0 0.013) (0 0 0.015) (0.004 0 0.015) (0.070 0 0.015) (0.08 0 0.015) (0 0 0.02) (0.004 0 0.02) (0.070 0 0.02) (0.08 0 0.02) (0 0.02 0) (0.004 0.02 0) (0.070 0.02 0) (0.08 0.02 0) (0 0.02 0.013) (0.004 0.02 0.013) (0.070 0.02 0.013) (0.08 0.02 0.013) (0 0.02 0.015) (0.004 0.02 0.015) (0.070 0.02 0.015) (0.08 0.02 0.015) (0 0.02 0.02) (0.004 0.02 0.02) (0.070 0.02 0.02) (0.08 0.02 0.02) ); blocks ( hex (0 1 17 16 4 5 21 20) (40 1 130) simpleGrading (1 1 1) hex (1 2 18 17 5 6 22 21) (660 1 130) simpleGrading (1 1 1) hex (2 3 19 18 6 7 23 22) (100 1 130) simpleGrading (1 1 1) hex (4 5 21 20 8 9 25 24) (40 1 20) simpleGrading (1 1 1) hex (6 7 23 22 10 11 27 26) (100 1 20) simpleGrading (1 1 1) hex (8 9 25 24 12 13 29 28) (40 1 50) simpleGrading (1 1 1) hex (9 10 26 25 13 14 30 29) (660 1 50) simpleGrading (1 1 1) hex (10 11 27 26 14 15 31 30) (100 1 50) simpleGrading (1 1 1) ); edges ( ); patches ( wall tankWall ( (0 16 17 1) (1 17 18 2) (2 18 19 3) (0 4 20 16) (4 8 24 20) (8 12 28 24) (12 13 29 28) (13 14 30 29) (14 15 31 30) ) patch inout ( (15 11 27 31) (11 7 23 27) (7 3 19 23) ) wall heatedPlate ( (5 6 22 21) ) wall adiaPlate ( (9 5 21 25) (9 25 26 10) (10 26 22 6) ) empty backAndFront ( (0 1 5 4) (4 5 9 8) (8 9 13 12) (1 2 6 5) (9 10 14 13) (2 3 7 6) (6 7 11 10) (10 11 15 14) (16 17 21 20) (20 21 25 24) (24 25 29 28) (17 18 22 21) (25 26 30 29) (18 19 23 22) (22 23 27 26) (26 27 31 30) ) ); mergePatchPairs ( ); // ************************************************** *********************** // Can someone help me please? Best Regards |
Hi guys, when I import my gambit .neu file into OpenFOAM, I check the mesh is OK. However, after I change the frontandback into empty (2D mesh) and check the mesh again, I get error message as follow:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.5 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Exec : checkMesh Date : Aug 07 2009 Time : 01:55:47 Host : localhost.localdomain PID : 5190 Case : /root/OpenFOAM/root-1.5/run/tutorials/LesInterPhaseChangeFoam/Hydrofoil/Sixdegree nProcs : 1 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = constant Time = constant Mesh stats points: 91414 internal points: 0 faces: 181229 internal faces: 89815 cells: 45174 boundary patches: 6 point zones: 0 face zones: 0 cell zones: 0 Number of cells of each type: hexahedra: 45174 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition 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 103 208 ok (non-closed singly connected) outlet 158 318 ok (non-closed singly connected) up 237 476 ok (non-closed singly connected) down 236 474 ok (non-closed singly connected) frontandback 90348 91414 ok (non-closed singly connected) foil 332 664 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-10 -10 0) (30 10 0.007) Mesh (non-empty) directions (1 1 0) Mesh (non-empty, non-wedge) dimensions 2 ***Number of edges not aligned with or perpendicular to non-empty directions: 38113 <<Writing 76226 points on non-aligned edges to set nonAlignedEdges Boundary openness (-8.9509e-24 9.15928e-22 -1.31298e-19) OK. Max cell openness = 2.56232e-16 OK. Max aspect ratio = 287.879 OK. Minumum face area = 2.19292e-05. Maximum face area = 0.452831. Face area magnitudes OK. Min volume = 2.41268e-07. Max volume = 0.00316982. Total volume = 5.29651. Cell volumes OK. Mesh non-orthogonality Max: 39.8412 average: 5.87407 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.763965 OK. Failed 1 mesh checks. End ============================== What's wrong with it? Could somebody help me out? Thanks a lot. |
Maybe I should try to get the mesh by the great Tool snappyHexMesh?
|
Comment deleted
|
hi,
as a beginner in OpenFOAM, i'm trying to run a 2D "virtual wind tunnel" with a square shaped obstacle using simplefoam. This is my BlockMeshDict: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.05; vertices ( (0 0 0) (20 0 0) (20 5 0) (0 5 0) (0 0 0.1) (20 0 0.1) //Z5 (20 5 0.1) (0 5 0.1) (40 5 0) (40 10 0) (20 10 0) //Z10 (40 5 0.1) (40 10 0.1) (20 10 0.1) (20 -5 0) (40 -5 0) //Z15 (40 0 0) (20 -5 0.1) (40 -5 0.1) (40 0 0.1) (27 1 0) //Z20 (32 1 0) (32 4 0) (27 4 0) (27 1 0.1) (32 1 0.1) //Z25 (32 4 0.1) (27 4 0.1) (27 0 0) (32 0 0) (32 0 0.1) //Z30 (27 0 0.1) (27 5 0) (32 5 0) (32 5 0.1) (27 5 0.1) //Z35 (20 1 0) (20 4 0) (20 4 0.1) (20 1 0.1) (40 1 0) //Z40 (40 4 0) (40 4 0.1) (40 1 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (20 5 1) simpleGrading (1 1 1) hex (2 8 9 10 6 11 12 13) (20 5 1) simpleGrading (1 1 1) hex (14 15 16 1 17 18 19 5) (20 5 1) simpleGrading (1 1 1) hex (1 28 20 36 5 31 24 39) (7 1 1) simpleGrading (1 1 1) hex (29 16 40 21 30 19 43 25) (8 1 1) simpleGrading (1 1 1) hex (36 20 23 37 39 24 27 38) (7 3 1) simpleGrading (1 1 1) hex (21 40 41 22 25 43 42 26) (8 3 1) simpleGrading (1 1 1) hex (37 23 32 2 38 27 35 6) (7 1 1) simpleGrading (1 1 1) hex (22 41 8 33 26 42 11 34) (8 1 1) simpleGrading (1 1 1) hex (28 29 21 20 31 30 25 24) (5 1 1) simpleGrading (1 1 1) hex (23 22 33 32 27 26 34 35) (5 1 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 3 7 4) ) patch outlet ( (16 40 43 19) (40 41 42 43) (41 8 11 42) ) wall walls ( (0 1 5 4) (3 7 6 2) (2 10 13 6) (10 9 12 13) (8 9 12 11) (15 16 19 18) (14 15 18 17) (14 1 5 17) (20 21 25 24) (23 22 26 27) (20 24 27 23) (21 22 26 25) ) empty frontAndBack ( (0 1 2 3) (4 5 6 7) (2 8 9 10) (6 11 12 13) (14 15 16 1) (17 18 19 5) (1 28 20 36) (5 31 24 39) (29 16 40 21) (30 19 43 25) (28 29 21 20) (31 30 25 24) (23 22 33 32) (27 26 34 35) (36 20 23 37) (39 24 27 38) (21 40 41 22) (25 43 42 26) (37 23 32 2) (38 27 35 6) (22 41 8 33) (26 42 11 34) ) ); mergePatchPairs ( ); // ************************************************** *********************** // blockmesh works but displays the warning: Default patch type set to empty --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file C:\tmp\OpenFOAM-1.5\src\OpenFOAM\meshes\polyMesh\polyMeshFromShape Mesh.C at line 576 Found 12 undefined faces in mesh; adding to default patch. when i try to run simplefoam, i get: Programme terminated with errors: exit code 1, status 0. Error messages: This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file C:\tmp\OpenFOAM-1.5\src\finiteVolume\fields\fvPatchFields\constrai nt\empty\/emptyFvPatchField.C at line 148. FOAM exiting i really don't know where those undefined patches are. Any help would be appreciated ;) |
When I make my meshes, I always changed the undefined type from empty to patch. For some reason a default empty patch causes me problems too.
|
ok, tried that... (simply set the boundary to patch in the boundary file generated by blockMesh)
it requires me to set the boundary conditions for p... when i set them to zeroGradient, i get // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading field p Programme terminated with errors: exit code 3, status 0. with no further explanation... when i set it to fixedValue and value 0, it works, but, of course, shows the same problems for the other variables (U, epsilon, NuTilda, R, k): won't work with zeroGradient, but does with fixedValue 0... but when i set all of them to fixedValue 0, i get // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting RAS turbulence model kEpsilon Starting time loop Time = 1 Programme terminated with errors: exit code 3, status 0. again without explanation... really don't know what to do :( (the simulation worked fine before i put the "obstacle" into it) |
Hi
bobby - your mesh is 3D in case you hadn't found out yet. i.e you have more than two different z values I'm having a similar problem re This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells... I've merged two meshes in order to be able to rotate one of them inside the other. They work individually as empty meshes, and merged when described as symmetryPlane, but I'd like to be able to use the empty BC for the combined mesh. Any suggestions anyone? Thanks Nick |
The mes contains patches of type empty
Hi,
I am trying to run a 2D fluid flow with an obstacle in its path and it is able to creat the mesh proprly but when i run icoFoam its giving the error as: Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 0.005 Courant Number mean: 0 max: 7.5 This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting Can anyone suggest what is the problem? Do i need to use any other solver than icoFoam? or is there any problem with the mesh as while running blockMesh, i got a warning as: Creating blockCorners Creating curved edges Creating blocks Creating patches Creating block mesh topology Default patch type set to empty --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577 Found 8 undefined faces in mesh; adding to default patch. Check block mesh topology Basic statistics Number of internal faces : 0 Number of boundary faces : 24 Number of defined boundary faces : 24 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list . Creating points with scale 1 Creating cells Creating patches Creating mesh from block mesh Default patch type set to empty Writing polyMesh End The blockMesh code is as follows: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.4 0 0) (0.6 0 0) (1 0 0) (0.4 0.2 0) (0.6 0.2 0) (0.4 0.4 0) (0.6 0.4 0) (0 0.6 0) (0.4 0.6 0) (0.6 0.6 0) (1 0.6 0) (0 0 0.1) (0.4 0 0.1) (0.6 0 0.1) (1 0 0.1) (0.4 0.2 0.1) (0.6 0.2 0.1) (0.4 0.4 0.1) (0.6 0.4 0.1) (0 0.6 0.1) (0.4 0.6 0.1) (0.6 0.6 0.1) (1 0.6 0.1) ); blocks ( hex (0 1 9 8 12 13 21 20) (30 45 1) simpleGrading (1 1 1) hex (1 2 5 4 13 14 17 16) (15 15 1) simpleGrading (1 1 1) hex (2 3 11 10 14 15 23 22) (30 45 1) simpleGrading (1 1 1) hex (6 7 10 9 18 19 22 21) (15 15 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 8 20 12) ) patch outlet ( (11 3 15 23) ) wall upperWalls ( (8 9 21 20) (10 11 23 22) (6 7 19 18) (9 10 22 21) ) wall lowerWalls ( (1 0 12 13) (3 2 14 15) (5 4 16 17) (2 1 13 14) ) empty frontAndBack ( (9 8 0 1) (10 9 6 7) (5 4 1 2) (11 10 2 3) (20 21 13 12) (21 22 19 18) (16 17 14 13) (22 23 15 14) ) ); mergePatchPairs ( ); // ************************************************** *********************** // |
You need to create the mesh using 8 blocks instead those 4 you have used. Two neighbouring blocks need to have a one-to-one match. Read the manual if in doubt.
Best regards, Niels |
blockMesh warning || mesh contains patches of type empty
Thank you for reply Niels.
I've converted it into 8 blocks...but still this error is there while running icoFoam : This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148. FOAM exiting But while running blockMesh, now the warning is only for 2 faces. I'm not getting which 2 faces are left? Create time Creating block mesh from "/home/gaurav/OpenFOAM/gaurav-1.6/run/tutorials/incompressible/icoFoam/obstacle/constant/polyMesh/blockMeshDict" Creating blockCorners Creating curved edges Creating blocks Creating patches Creating block mesh topology Default patch type set to empty --> FOAM Warning : From function polyMesh::polyMesh(... construct from shapes...) in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 577 Found 2 undefined faces in mesh; adding to default patch. Check block mesh topology Basic statistics Number of internal faces : 8 Number of boundary faces : 32 Number of defined boundary faces : 32 Number of undefined boundary faces : 0 Checking patch -> block consistency Creating block offsets Creating merge list . Creating points with scale 1 Creating cells Creating patches Creating mesh from block mesh Default patch type set to empty Writing polyMesh End The blockMeshDict code is is as follows: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (0.4 0 0) (0.6 0 0) (1 0 0) (0 0.2 0) (0.4 0.2 0) (0.6 0.2 0) (1 0.2 0) (0 0.4 0) (0.4 0.4 0) (0.6 0.4 0) (1 0.4 0) (0 0.6 0) (0.4 0.6 0) (0.6 0.6 0) (1 0.6 0) (0 0 0.1) (0.4 0 0.1) (0.6 0 0.1) (1 0 0.1) (0 0.2 0.1) (0.4 0.2 0.1) (0.6 0.2 0.1) (1 0.2 0.1) (0 0.4 0.1) (0.4 0.4 0.1) (0.6 0.4 0.1) (1 0.4 0.1) (0 0.6 0.1) (0.4 0.6 0.1) (0.6 0.6 0.1) (1 0.6 0.1) ); blocks ( hex (0 1 5 4 16 17 21 20) (30 15 1) simpleGrading (1 1 1) hex (1 2 6 5 17 18 22 21) (15 15 1) simpleGrading (1 1 1) hex (2 3 7 6 18 19 23 22) (30 15 1) simpleGrading (1 1 1) hex (4 5 9 8 20 21 25 24) (30 15 1) simpleGrading (1 1 1) hex (6 7 11 10 22 23 27 26) (30 15 1) simpleGrading (1 1 1) hex (8 9 13 12 24 25 29 28) (30 15 1) simpleGrading (1 1 1) hex (9 10 14 13 25 26 30 29) (15 15 1) simpleGrading (1 1 1) hex (10 11 15 14 26 27 31 30) (30 15 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch inlet ( (0 4 20 16) (4 8 24 20) (8 12 28 24) ) patch outlet ( (3 19 23 7) (7 23 27 11) (11 27 31 15) ) wall upperWalls ( (12 13 29 28) (14 15 31 30) (13 14 30 29) (9 10 26 25) ) wall lowerWalls ( (1 0 16 17) (3 2 18 19) (2 1 17 18) (5 6 22 21) ) empty frontAndBack ( (0 1 5 4) (1 2 6 5) (2 3 7 6) (4 5 9 8) (6 7 11 10) (8 9 13 12) (9 10 14 13) (10 11 15 14) (20 21 17 16) (21 22 18 17) (22 23 19 18) (24 25 21 20) (26 27 23 22) (28 29 25 24) (29 30 26 25) (30 31 27 26) ) ); mergePatchPairs ( ); // ************************************************** *********************** // |
Try the vertical walls inside the square.
Best regards, Niels |
mesh contains patches of type empty
Thank you Niels for your reply.
I've included those 2 faces and now its working properly :) |
Good.
In the future you can benefit from looking at the mesh in paraFoam before asking questions on the Forum. Best regards, Niels |
merged meshes
Hi - those with this problem that have merged meshes or more than one empty patch
I've just found that if you merge meshes with empty BCs on more than one of the previously separate meshes then they won't work unless you create a new single patch that includes the multiple patches. That is unless they have an equal quantity of faces whereby you won't get this division by number of cells problem. The only problem with this is that they need to be numerically sequential in the merged mesh to be able to rewrite the number of faces in /boundary (as the sum the previously separate empty nFaces). e.g. zSymT { type empty; nFaces 15438; startFace 66386; } ASymR { type empty; nFaces 69208; startFace 81824; } becomes: Sym { type empty; nFaces 84646; startFace 66386; } Hope that helps others |
Undefined and unconsistent
This is my blockMesh file some text in swedish:
Quote:
Quote:
And btw, how to find the 6 undefined faces? Thanks in advance! Regards Marco |
i'm trying to generate mesh for axisymmetric.
this is my blockMesh: convertToMeters 0.1; vertices ( (0 0 0) (10 0 0) (9.988 0.491 0) (0 0 10) (10 0 10) (9.988 0.491 10) ); blocks ( hex (0 1 2 3 4 5) (5 5 5) simpleGrading (1 1 1) ); edges ( arc 2 3 (0.9997 0.0245 0) arc 6 7 (0.9997 0.0245 1) ); patches ( patch movingWall ( (0 1 2 0) ) wall fixedWalls ( (3 3 4 5) (1 4 5 2) ) symmetryPlane axis ( (0 3 3 0) ) wedge front ( (0 3 4 1) ) wedge back ( (0 3 5 2) ) ); mergePatchPairs ( ); And this is my error: Create time Creating block mesh from "/home/david/OpenFOAM/david-1.7.0/run/tutorials/incompressible/icoFoam/cavmod/constant/polyMesh/blockMeshDict" Creating blockCorners Creating curved edges Creating blocks #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigSegv::sigSegvHandler(int) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: #3 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" #4 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" #5 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" #6 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" #7 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" #8 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6" #9 in "/opt/openfoam170/applications/bin/linuxGccDPOpt/blockMesh" sigmentation error. Maybe someone can help? :/ :confused: |
help
i want to create 2d mesh a round airfoil but when use checkMesh is this error:Number of edges not aligned with or perpendicular to non-empty directions
can you help me please? the surface of airfoil not snap! |
Hi SH,
Please read the following wiki-page and then come back and rephrase your question: http://openfoamwiki.net/index.php/Ho..._Message_Board Kind regards Niels |
1 Attachment(s)
hi
i want to create 2d mesh around airfoil but when i use checkMesh is this error: ***Max skewness = 5.87721, 2 highly skew faces detected which may impair the quality of the results <<Writing 2 skew faces to set skewFaces and the surface of airfoil not snap is it right:? 1:run blockMesh 2:snappyhexMeshDict -overwite 3:extrudeMesh |
Hi SH,
The first error seems to have been resolved. The error you mention is probably related to the settings in snappyHexDict, so I would recommend you to search the forum in the related threads. E.g.: Code:
http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/ Niels |
I Need Help
Hello all,
I have a question about blockMesh in OpenFOAM. in my geometry there are some faces that are shared between two blocks. How should I define such faces? As far as I know, we can not duplicate the vertices in blockMesh. On the other hand, when the shared face is defined in one of the blocks, the user receives a message as "trying to identify a boundary patch to the..." Tnx for your help! |
hi
this error is because of false hex assigning focus on choosing points in hex selection for example : hex ( 0 1 2 3 4 5 6 7) direction between 0 to 1 in all of hexes should be the same( e.g x axis) direction between 1 to 2 in all of hexes should be the same (e.g y axis) or we can say that you should use "right hand low" in assigning your hexes. Best wishes Ramin |
All times are GMT -4. The time now is 08:20. |