mergePatchPairs error (please help me out)
Please help me out...:D
I want to use mergePatchPairs option for merging two patches A (master patch ) and B (slave patch) where B forms half portion of A (do shares common edges). I got this blockMesh error : --> FOAM FATAL ERROR: :eek: Face 212808 reduced to less than 3 points. Topological/cutting error B. Old face: 2(1733 1737) new face: 2(1733 1737) (The OF tutorial asks to declare both A and B as master patches (if they share a common edge)!... which i could n't see anywhere an example).. I need anyone's kind help |
Hi,
can you post your blockMeshDict? Martin |
1 Attachment(s)
hi martin,
sorry for being late...I have attached the blockMeshDict file..thanks |
Just define the two slave walls in a single patch:
Code:
patch slave_1 Martin |
1 Attachment(s)
hi martin,
Thanx for ur suggestion and it did work for that case...but that was actually a part of a bigger blockmesh file what i am doing ..when i implemented it for the bigger case i got the same error as i told in my earlier post.....sorry for disturbing again...i have attached the bigger blockMeshDict file... Error : --> FOAM FATAL ERROR: Face 105084 reduced to less than 3 points. Topological/cutting error B. Old face: 2(5476 6808) new face: 2(5476 6808) |
1 Attachment(s)
Hi,
you can try to separate the master and slave patch even further (have a look at the attached screenshot, the slave part is exploded a bit). Make blocks for the mesh that don't share a common vertex number. Of course, the coordinates are the same, but the vertex numbers in the hex definition and in the patch definition are different. The slave patch is going to have four entries, the master patch will have three entries (clear?). Another solution would be to define the mesh topology without usage of mergePatchPairs. The structure of the slave part must be continued up to the center of the geometry. Feel free to ask if my explanations are unclear... Martin |
Hi,
"Make blocks for the mesh that don't share a common vertex number. Of course, the coordinates are the same, but the vertex numbers in the hex definition and in the patch definition are different." That was not clear to me unless the below corrections are correct. blocks \\ i modified ( hex (52 51 49 50 21 17 5 9) (6 2 3) simpleGrading (1 1 1) \\ quadrant 1st half hex (22 18 6 10 52 51 49 50) (6 2 3) simpleGrading (1 1 1) \\ quadrant 2nd half ); \\ and " The slave patch is going to have four entries, the master patch will have three entries" patch master ( (9 5 17 21) (5 6 18 17) (6 10 22 18) ) patch slave ( (5 9 21 17) (51 17 5 49) (49 6 18 51) (10 6 18 22) ) and of course the patches repeat! --dot-- And the second option i too thought :rolleyes:, but left (as it seems cumbersome for my geometry and i ll do if this case fails ) |
Well, in your modified solution the vertices are still shared, at least in the patches definition (both master and slave have "(9 5 17 21)").
You may look at your y-coordinates, too. You have values of "0", "5", "185" and "190". The blocks might not fit to each other quite well... If you don't use it yet have a look at your blockMeshDict with the pyFoamDisplayBlockMesh.py tool, which comes with pyFoam. It's very useful to find problems in the hex definition. Further more you can add a name to each block this way: Code:
hex (1 2 3 4 13 14 15 16) rectangularBlock (36 36 3) simpleGrading (1 1 1) Code:
foamToVTK -cellSet rectangularBlock Do you have a sketch of your final geometry that you can post? Martin |
2 Attachment(s)
Hi martin,
Thanks for ur OF tips and i am trying those things:)...btw find the geometry ( i am simulating the flow inside a vortex tube ) also, I simply remove the patches from the constant/polymesh/boundary file even after defining those in blockMeshDict ...is that fine!:cool: |
hi martin
i have a same kind of problem with merge patch , and i find you are rly good at this ,so maybe you can help me with my case if you have some time , i copy my blockmesh here , there are some errors when i run it which i can not understand, thank you very much for your attentions /*--------------------------------*- 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 0.01; vertices // definition des points ( (0 0 0) //0 (1 0 0) //1 (2 0 0) //2 (0 1 0) //3 (1 1 0) //4 (0 1 0) //5 (1 1 0) //6 (0 2 0) //7 (1 2 0) //8 (2 2 0) //9 (0 0 1) //10 (1 0 1) //11 (2 0 1) //12 (0 1 1) //13 (1 1 1) //14 (0 1 1) //15 (1 1 1) //16 (0 2 1) //17 (1 2 1) //18 (2 2 1) //19 (1 0 0) //20 (1 0 1) //21 (1 2 0) //22 (1 2 1) //23 ); blocks ( hex (0 1 4 3 10 11 14 13) (1 1 1) simpleGrading (1 1 1) hex (5 6 8 7 15 16 18 17) (1 1 1) simpleGrading (1 1 1) hex (20 2 9 22 21 12 19 23) (1 2 1) simpleGrading (1 1 1) ); patches ( wall fixedWalls ( (7 17 18 8) (22 23 19 9) (0 1 11 10) (20 2 12 21) (17 7 5 15) ) patch entree ( (13 3 0 10) ) patch sortie ( (19 12 2 9) ) empty front ( (13 10 11 14) (17 15 16 18) (23 21 12 19) ) empty back ( (7 8 6 5) (3 4 1 0) (22 9 2 20) ) patch inter1 ( (3 13 14 4) ) patch inter2 ( (5 6 16 15) ) patch master ( (23 22 20 21) ) patch slave ( (18 16 6 8) (14 11 1 4) ) ); mergePatchPairs ( (inter1 inter2) (master slave) ); |
Hi gaofeng,
I don't think you can do it that way. blockMesh has difficulties to handle a merged patch twice, and it can't merge the T-shape patches you have at once. You could try to create two completely separated meshes instead and merge them with the mergeMeshes utility, but I don't think it's worth the effort. I suppose this is not your final geometry, so if you post a sketch or your final blockMeshDict I can help you finding a working topology. Martin |
hi martin
i'm so glad that you can help me and i'm very appreciate it ,yeah it is not my final geometry but only a test one the following is my real blockmeshdict: /*--------------------------------*- 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 0.01; vertices // definition des points ( (0 0 0) //0 (235 0 0) //1 (265 0 0) //2 (500 0 0) //3 (0 20 0) //4 (235 20 0) //5 (0 180 0 ) //6 (235 180 0) //7 (265 180 0) //8 (500 180 0)//9 (0 200 0) //10 (500 200 0) //11 (0 0 200) //12 (235 0 200) //13 (265 0 200) //14 (500 0 200) //15 (0 20 200) //16 (235 20 200) //17 (0 180 200) //18 (235 180 200) //19 (265 180 200) //20 (500 180 200) //21 (0 200 200) //22 (500 200 200) //23 ); blocks ( hex (0 1 5 4 12 13 17 16) (235 20 1) simpleGrading (1 1 1) hex (4 5 7 6 16 17 19 18) (235 160 1) simpleGrading (1 1 1) hex (1 2 8 7 13 14 20 19) (30 180 1) simpleGrading (1 1 1) hex (2 3 9 8 14 15 21 20) (235 180 1) simpleGrading (1 1 1) hex (6 9 11 10 18 21 23 22) (500 20 1) simpleGrading (1 1 1) ); patches ( patch fixedWalls ( (10 22 23 11) (22 10 6 18) (18 6 4 16) (21 15 3 9) (0 1 13 12) (2 3 15 14) ) patch entree ( (1 2 14 13) ) patch sortie ( (16 4 0 12) (11 23 21 9) ) empty front ( (16 12 13 17) (18 16 17 19) (13 14 20 19) (20 14 15 21) (22 18 21 23) ) empty back ( (0 4 5 1) (4 6 7 5) (1 7 8 2) (2 8 9 3) (10 11 9 6) ) ); i run blockMesh and every thing is ok, but when i run icoFoam ,i get the following error message: --> 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. From function emptyFvPatchField<Type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 150. http://www.cfd-online.com/Forums/%3C....com/rSS5v.png and also i post the sketch at following http://imgur.com/rSS5v thank you again http://www.cfd-online.com/Forums/dat...BJRU5ErkJggg== |
in fact , in my blockmesh defined there are 4 defaut faces , but in parafoam just 2 of them are visible, so normally they should be visible or nonvisible ?http://www.cfd-online.com/Forums/dat...BJRU5ErkJggg==
|
Hi gaofeng,
the easiest way is to define nine blocks for your topology: Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
hi martin
thank you so much , now my simulation works well, you have given me a big favor all best |
Hi Martin,
I am trying to merge parts of my geometry so I can use topoSetDict without much trouble for a conjugate heat transfer problem. As illustrated below, my geometry is a 2D house with a curved dome resting on top of a rectangular plate of air. From the image you will notice there are walls on the left, right, and bottom. I am trying to merge the dome so I may apply the cylinderToCell command in the topoSetDict but for some strange reason this is not working appropriately. Could you please help me to merge the dome? /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.01; // Geometry Description: This geometry serves as a mean for the simulation of the // Rayleigh-Benard convection problem. The entities that constitute this geometry // include: an upper wall, a lower wall, and a block of air in between. The purpose // of this problem is to simulate conjugate heat transfer and analyze its effects // on the convective cells. vertices ( /*Left Air*/ (0 0 0) // vertex 0 (7.5 0 0) // vertex 1 (7.5 10 0) // vertex 2 (0 10 0) // vertex 3 (0 0 1) // vertex 4 (7.5 0 1) // vertex 5 (7.5 10 1) // vertex 6 (0 10 1) // vertex 7 /*Right Air*/ (12.5 0 0) // vertex 8 (20 0 0) // vertex 9 (20 10 0) // vertex 10 (12.5 10 0) // vertex 11 (12.5 0 1) // vertex 12 (20 0 1) // vertex 13 (20 10 1) // vertex 14 (12.5 10 1) // vertex 15 /*Arc Points*/ // Top Rectangle (7.5 15 0) // vertex 16 (12.5 15 0) // vertex 17 (7.5 15 1) // vertex 18 (12.5 15 1) // vertex 19 // Arc (5 18.66 0) // vertex 20 (5 18.66 1) // vertex 21 (15 18.66 0) // vertex 22 (15 18.66 1) // vertex 23 /*Bottom Wall*/ (0 -2 0) // vertex 24 (20 -2 0) // vertex 25 (0 -2 1) // vertex 26 (20 -2 1) // vertex 27 /*Left Wall*/ (-2 0 0) // vertex 28 (-2 10 0) // vertex 29 (-2 10 1) // vertex 30 (-2 0 1) // vertex 31 /*Right Wall*/ (22 0 0) // vertex 32 (22 10 0) // vertex 33 (22 10 1) // vertex 34 (22 0 1) // vertex 35 /*Bottom Wall Mid*/ (7.5 -2 0) // vertex 36 (12.5 -2 0) // vertex 37 (7.5 -2 1) // vertex 38 (12.5 -2 1) // vertex 39 /*Interface 2*/ (7.5 0 0) // vertex 1 (7.5 0 1) // vertex 5 (7.5 -2 1) // vertex 38 (7.5 -2 0) // vertex 36 ); blocks ( // Make sure to consistently define the blocks that make up the geometry // in order to be able to mesh surface. hex (0 1 2 3 4 5 6 7) (20 10 1) simpleGrading (1 1 1) // left air hex (8 9 10 11 12 13 14 15) (20 10 1) simpleGrading (1 1 1) // right air hex (1 8 11 2 5 12 15 6) (20 10 1) simpleGrading (1 1 1) // mid air hex (2 11 17 16 6 15 19 18) (20 20 1) simpleGrading (1 1 1) // box air dome hex (3 2 16 20 7 6 18 21) (20 20 1) simpleGrading (1 1 1) // left air dome hex (11 10 22 17 15 14 23 19) (20 20 1) simpleGrading (1 1 1) // right air dome hex (16 17 22 20 18 19 23 21) (20 20 1) simpleGrading (1 1 1) // center air dome hex (24 36 1 0 26 38 5 4) (20 10 1) simpleGrading (1 1 1) // bottom left wall hex (36 37 8 1 38 39 12 5) (20 10 1) simpleGrading (1 1 1) // bottom center wall hex (37 25 9 8 39 27 13 12) (20 10 1) simpleGrading (1 1 1) // bottom right wall hex (28 0 3 29 31 4 7 30) (20 10 1) simpleGrading (1 1 1) // left wall hex (9 32 33 10 13 35 34 14) (20 10 1) simpleGrading (1 1 1) // right wall ); edges ( // Dome arc 3 20 (1.5 15 0) arc 20 22 (10 20 0) arc 22 10 (18.5 15 0) arc 7 21 (1.5 15 1) arc 21 23 (10 20 1) arc 23 14 (18.5 15 1) // Arc arc 2 16 (7 12.5 0) arc 6 18 (7 12.5 1) arc 16 17 (10 15.5 0) arc 18 19 (10 15.5 1) arc 17 11 (13 12.5 0) arc 19 15 (13 12.5 1) ); //Obs.: Name boundary conditions on folder 0 like the boundary section. boundary ( airdome { type patch; faces ( // Since this problem is 2-D both front and back surfaces // do not need to be included in the given geometry. (20 22 23 21) (3 20 21 7) (10 14 23 22) ); } leftWall { type wall; faces ( // Since this problem is 2-D both front and back surfaces // do not need to be included in the given geometry. (28 29 30 31) (29 3 7 30) (28 31 4 0) ); } bottomWall { type wall; faces ( // There is no need to define the inner surfaces between // the upper block and the core block. Same applies to the // lower block. (26 24 36 38) (38 36 37 39) (39 37 25 27) (13 27 25 9) (0 24 26 4) /*(0 4 5 1)*/ ); } rightWall { type wall; faces ( // Since this problem is 2-D both front and back surfaces // do not need to be included in the given geometry. (35 34 33 32) (9 13 35 32) (10 33 34 14) ); } master { type patch; faces ( // Since this problem is 2-D both front and back surfaces // do not need to be included in the given geometry. (20 22 23 21) ); } slave { type patch; faces ( // Since this problem is 2-D both front and back surfaces // do not need to be included in the given geometry. (16 17 19 18) (17 22 23 19) (16 20 21 18) ); } ); mergePatchPairs ( (master slave) ); Thanks a lot, Lucas |
mergePatchPairs error
Hi all,
I am new to OpenFOAM meshing. I am using OF 4. I have a 3D geometry with 4 pairs of patches that need to merged. They have the exact same vertices. So, as the documentation says, I left those pairs undefined in patches so that they will be considered internal faces. Everything went well during blockMesh and checkMesh. But when I run the solver it throws the following error. Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? Code:
convertToMeters 0.001; Code:
Adding point and face zones Any help or directions will be appreciated! Thank you! |
All times are GMT -4. The time now is 08:14. |