@李东岳 一个普通的打工研究生罢了。。。
E
Elliott
@Elliott
帖子
-
blockMeshDict报错相邻面数量不一致怎么解决? -
blockMeshDict报错相邻面数量不一致怎么解决?@Amadeus 相当于nBox这个节点数量要在同一个位置上对应才行,我以为都是按照x,y,z轴的顺序进行设置,这么说openfoam的网格节点设置有时候不是按照x,y,z轴顺序设置嘛
-
blockMeshDict报错相邻面数量不一致怎么解决?@Amadeus 非常感谢非常感谢,这两天没有工作,回复比较迟,真的很厉害,我先自己试一下理解一下,再次感谢
-
blockMeshDict报错相邻面数量不一致怎么解决?@Amadeus 感谢您的帮助,您指出的问题非常关键,我重新粘贴一次给您看一下。然后这个问题我也思考过,我的几何体出了中心块是一个长方体,其他块在edge部分投影成圆弧前,block部分应该都是梯形六面体,然后各个方向上的节点数量我也是在前面nR 32;nR_1 10;nR_2 10;nR_3 20;nR_4 400;nBox 40;nZ 2100;定义中定义好了,按道理应该是固定了的,为什么会出现网格节点不一致呢
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001;//mm //radius radius 3;//内管内壁半径 radius_1 3.5;//内管外壁半径 radius_2 4;//外管内壁半径 radius_3 5;//外管外壁半径 radius_4 25;//计算域边界 //half_side box 1; hs 2.12130344; hs_1 2.474873734; hs_2 2.828427125; hs_3 3.535533906; hs_4 17.67766953; boxNeg -1; hsNeg -2.12130344; hsNeg_1 -2.474873734; hsNeg_2 -2.828427125; hsNeg_3 -3.535533906; hsNeg_4 -17.67766953; zMax 210;//zMax和zMin定义圆柱体的长度 zMin 0.0; nR 32;//扇形block半径上的节点数 nR_1 10; nR_2 10; nR_3 20; nR_4 400; nBox 20;//矩形block正方形边上的节点数 nZ 1000;//轴向方向上的节点数 verbose no; geometry { cylinder { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius; } cylinder_1 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_1; } cylinder_2 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_2; } cylinder_3 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_3; } cylinder_4 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_4; } } scale 1; vertices ( // Inner ($boxNeg $boxNeg $zMin)//0 ($box $boxNeg $zMin)//1 ($box $box $zMin)//2 ($boxNeg $box $zMin)//3 // cylinder project ($hsNeg $hsNeg $zMin) (cylinder)//4 project ($hs $hsNeg $zMin) (cylinder)//5 project ($hs $hs $zMin) (cylinder)//6 project ($hsNeg $hs $zMin) (cylinder)//7 // cylinder_1 project ($hsNeg_1 $hsNeg_1 $zMin) (cylinder_1)//8 project ($hs_1 $hsNeg_1 $zMin) (cylinder_1)//9 project ($hs_1 $hs_1 $zMin) (cylinder_1)//10 project ($hsNeg_1 $hs_1 $zMin) (cylinder_1)//11 // cylinder_2 project ($hsNeg_2 $hsNeg_2 $zMin) (cylinder_2)//12 project ($hs_2 $hsNeg_2 $zMin) (cylinder_2)//13 project ($hs_2 $hs_2 $zMin) (cylinder_2)//14 project ($hsNeg_2 $hs_2 $zMin) (cylinder_2)//15 // cylinder_3 project ($hsNeg_3 $hsNeg_3 $zMin) (cylinder_3)//16 project ($hs_3 $hsNeg_3 $zMin) (cylinder_3)//17 project ($hs_3 $hs_3 $zMin) (cylinder_3)//18 project ($hsNeg_3 $hs_3 $zMin) (cylinder_3)//19 // cylinder_4 project ($hsNeg_4 $hsNeg_4 $zMin) (cylinder_4)//20 project ($hs_4 $hsNeg_4 $zMin) (cylinder_4)//21 project ($hs_4 $hs_4 $zMin) (cylinder_4)//22 project ($hsNeg_4 $hs_4 $zMin) (cylinder_4)//23 // Inner ($boxNeg $boxNeg $zMax)//24 ($box $boxNeg $zMax)//25 ($box $box $zMax)//26 ($boxNeg $box $zMax)//27 // cylinder project ($hsNeg $hsNeg $zMax) (cylinder)//28 project ($hs $hsNeg $zMax) (cylinder)//29 project ($hs $hs $zMax) (cylinder)//30 project ($hsNeg $hs $zMax) (cylinder)//31 // cylinder_1 project ($hsNeg_1 $hsNeg_1 $zMax) (cylinder_1)//32 project ($hs_1 $hsNeg_1 $zMax) (cylinder_1)//33 project ($hs_1 $hs_1 $zMax) (cylinder_1)//34 project ($hsNeg_1 $hs_1 $zMax) (cylinder_1)//35 // cylinder_2 project ($hsNeg_2 $hsNeg_2 $zMax) (cylinder_2)//36 project ($hs_2 $hsNeg_2 $zMax) (cylinder_2)//37 project ($hs_2 $hs_2 $zMax) (cylinder_2)//38 project ($hsNeg_2 $hs_2 $zMax) (cylinder_2)//39 // cylinder_3 project ($hsNeg_3 $hsNeg_3 $zMax) (cylinder_3)//40 project ($hs_3 $hsNeg_3 $zMax) (cylinder_3)//41 project ($hs_3 $hs_3 $zMax) (cylinder_3)//42 project ($hsNeg_3 $hs_3 $zMax) (cylinder_3)//43 // cylinder_4 project ($hsNeg_4 $hsNeg_4 $zMax) (cylinder_4)//44 project ($hs_4 $hsNeg_4 $zMax) (cylinder_4)//45 project ($hs_4 $hs_4 $zMax) (cylinder_4)//46 project ($hsNeg_4 $hs_4 $zMax) (cylinder_4)//47 ); blocks ( hex (0 1 2 3 24 25 26 27) ($nBox $nBox $nZ) simpleGrading (1 1 1) hex (0 4 5 1 24 28 29 25) ($nBox $nR $nZ) simpleGrading (1 1 1) hex (1 5 6 2 25 29 30 26) ($nR $nBox $nZ) simpleGrading (1 1 1) hex (2 6 7 3 26 30 31 27) ($nBox $nR $nZ) simpleGrading (1 1 1) hex (3 7 4 0 27 31 28 24) ($nR $nBox $nZ) simpleGrading (1 1 1) hex (4 8 9 5 28 32 33 29) ($nBox $nR_1 $nZ) simpleGrading (1 1 1) hex (5 9 10 6 29 33 34 30) ($nR_1 $nBox $nZ) simpleGrading (1 1 1) hex (6 10 11 7 30 34 35 31) ($nBox $nR_1 $nZ) simpleGrading (1 1 1) hex (7 11 8 4 31 35 32 28) ($nR_1 $nBox $nZ) simpleGrading (1 1 1) hex (8 12 13 9 32 36 37 33) ($nBox $nR_2 $nZ) simpleGrading (1 1 1) hex (9 13 14 10 33 37 38 34) ($nR_2 $nBox $nZ) simpleGrading (1 1 1) hex (10 14 15 11 34 38 39 35) ($nBox $nR_2 $nZ) simpleGrading (1 1 1) hex (11 15 12 8 35 39 36 32) ($nR_2 $nBox $nZ) simpleGrading (1 1 1) hex (12 16 17 13 36 40 41 37) ($nBox $nR_3 $nZ) simpleGrading (1 1 1) hex (13 17 18 14 37 41 42 38) ($nR_3 $nBox $nZ) simpleGrading (1 1 1) hex (14 18 19 15 38 42 43 39) ($nBox $nR_3 $nZ) simpleGrading (1 1 1) hex (15 19 16 12 39 43 40 36) ($nR_3 $nBox $nZ) simpleGrading (1 1 1) hex (16 20 21 17 40 44 45 41) ($nBox $nR_4 $nZ) simpleGrading (1 1 1) hex (17 21 22 18 41 45 46 42) ($nR_4 $nBox $nZ) simpleGrading (1 1 1) hex (18 22 23 19 42 46 47 43) ($nBox $nR_4 $nZ) simpleGrading (1 1 1) hex (19 23 20 16 43 47 44 40) ($nR_4 $nBox $nZ) simpleGrading (1 1 1) ); edges ( project 4 5 (cylinder) project 5 6 (cylinder) project 6 7 (cylinder) project 7 4 (cylinder) project 28 29 (cylinder) project 29 30 (cylinder) project 30 31 (cylinder) project 31 28 (cylinder) project 8 9 (cylinder_1) project 9 10 (cylinder_1) project 10 11 (cylinder_1) project 11 8 (cylinder_1) project 32 33 (cylinder_1) project 33 34 (cylinder_1) project 34 35 (cylinder_1) project 35 32 (cylinder_1) project 12 13 (cylinder_2) project 13 14 (cylinder_2) project 14 15 (cylinder_2) project 15 12 (cylinder_2) project 36 37 (cylinder_2) project 37 38 (cylinder_2) project 38 39 (cylinder_2) project 39 36 (cylinder_2) project 16 17 (cylinder_3) project 17 18 (cylinder_3) project 18 19 (cylinder_3) project 19 16 (cylinder_3) project 40 41 (cylinder_3) project 41 42 (cylinder_3) project 42 43 (cylinder_3) project 43 40 (cylinder_3) project 20 21 (cylinder_4) project 21 22 (cylinder_4) project 22 23 (cylinder_4) project 23 20 (cylinder_4) project 44 45 (cylinder_4) project 45 46 (cylinder_4) project 46 47 (cylinder_4) project 47 44 (cylinder_4) ); boundary ( inlet_1 { type patch; faces ( (0 3 2 1) (0 1 5 4) (1 2 6 5) (2 3 7 6) (3 0 4 7) ); } inlet_2 { type patch; faces ( (8 9 13 12) (9 10 14 13) (10 11 15 14) (11 8 12 15) ); } pipe_1 { type wall; faces ( (4 5 9 8) (5 6 10 9) (6 7 11 10) (7 4 8 11) ); } pipe_2 { type wall; faces ( (12 13 17 16) (13 14 18 17) (14 15 19 18) (15 12 16 19) ); } bottom { type patch; faces ( (16 17 21 20) (17 18 22 21) (18 19 23 22) (19 16 20 23) ); } wall { type patch; faces ( (20 21 45 44) (21 22 46 45) (22 23 47 46) (23 20 44 47) ); } outlet { type patch; faces ( (24 25 26 27) (24 28 29 25) (25 29 30 26) (26 30 31 27) (27 31 28 24) (28 32 33 29) (29 33 34 30) (30 34 35 31) (31 35 32 28) (32 36 37 33) (33 37 38 34) (34 38 39 35) (35 39 36 32) (36 40 41 37) (37 41 42 38) (38 42 43 39) (39 43 40 36) (40 44 45 41) (41 45 46 42) (42 46 47 43) (43 47 44 40) ); } ); mergePatchPairs ( ); // ************************************************************************* //
-
blockMeshDict报错相邻面数量不一致怎么解决?我运行blockMeshwang画网格报错--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 0 and 1
附上我的blockMeshDict内容,各位大佬帮我看一下我到底是哪里写错了/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 0.001;//mm //radius radius 3;//内管内壁半径 radius_1 3.5;//内管外壁半径 radius_2 4;//外管内壁半径 radius_3 5;//外管外壁半径 radius_4 25;//计算域边界 //half_side box 1; hs 2.12130344; hs_1 2.474873734; hs_2 2.828427125; hs_3 3.535533906; hs_4 17.67766953; boxNeg -1; hsNeg -2.12130344; hsNeg_1 -2.474873734; hsNeg_2 -2.828427125; hsNeg_3 -3.535533906; hsNeg_4 -17.67766953; zMax 210;//zMax和zMin定义圆柱体的长度 zMin 0.0; nR 32;//扇形block半径上的节点数 nR_1 10; nR_2 10; nR_3 20; nR_4 400; nBox 40;//矩形block正方形边上的节点数 nZ 2100;//轴向方向上的节点数 verbose no; geometry { cylinder { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius; } cylinder_1 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_1; } cylinder_2 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_2; } cylinder_3 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_3; } cylinder_4 { type searchableCylinder; point1 (0 0 -0.1);//由point1和point2构成的区域要大于zMax和zMin构成的区域 point2 (0 0 211); radius $radius_4; } } scale 1; vertices ( // Inner ($boxNeg $boxNeg $zMin)//0 ($box $boxNeg $zMin)//1 ($box $box $zMin)//2 ($boxNeg $box $zMin)//3 // cylinder project ($hsNeg $hsNeg $zMin) (cylinder)//4 project ($hs $hsNeg $zMin) (cylinder)//5 project ($hs $hs $zMin) (cylinder)//6 project ($hsNeg $hs $zMin) (cylinder)//7 // cylinder_1 project ($hsNeg_1 $hsNeg_1 $zMin) (cylinder_1)//8 project ($hs_1 $hsNeg_1 $zMin) (cylinder_1)//9 project ($hs_1 $hs_1 $zMin) (cylinder_1)//10 project ($hsNeg_1 $hs_1 $zMin) (cylinder_1)//11 // cylinder_2 project ($hsNeg_2 $hsNeg_2 $zMin) (cylinder_2)//12 project ($hs_2 $hsNeg_2 $zMin) (cylinder_2)//13 project ($hs_2 $hs_2 $zMin) (cylinder_2)//14 project ($hsNeg_2 $hs_2 $zMin) (cylinder_2)//15 // cylinder_3 project ($hsNeg_3 $hsNeg_3 $zMin) (cylinder_3)//16 project ($hs_3 $hsNeg_3 $zMin) (cylinder_3)//17 project ($hs_3 $hs_3 $zMin) (cylinder_3)//18 project ($hsNeg_3 $hs_3 $zMin) (cylinder_3)//19 // cylinder_4 project ($hsNeg_4 $hsNeg_4 $zMin) (cylinder_4)//20 project ($hs_4 $hsNeg_4 $zMin) (cylinder_4)//21 project ($hs_4 $hs_4 $zMin) (cylinder_4)//22 project ($hsNeg_4 $hs_4 $zMin) (cylinder_4)//23 // Inner ($boxNeg $boxNeg $zMax)//24 ($box $boxNeg $zMax)//25 ($box $box $zMax)//26 ($boxNeg $box $zMax)//27 // cylinder project ($hsNeg $hsNeg $zMax) (cylinder)//28 project ($hs $hsNeg $zMax) (cylinder)//29 project ($hs $hs $zMax) (cylinder)//30 project ($hsNeg $hs $zMax) (cylinder)//31 // cylinder_1 project ($hsNeg_1 $hsNeg_1 $zMax) (cylinder_1)//32 project ($hs_1 $hsNeg_1 $zMax) (cylinder_1)//33 project ($hs_1 $hs_1 $zMax) (cylinder_1)//34 project ($hsNeg_1 $hs_1 $zMax) (cylinder_1)//35 // cylinder_2 project ($hsNeg_2 $hsNeg_2 $zMax) (cylinder_2)//36 project ($hs_2 $hsNeg_2 $zMax) (cylinder_2)//37 project ($hs_2 $hs_2 $zMax) (cylinder_2)//38 project ($hsNeg_2 $hs_2 $zMax) (cylinder_2)//39 // cylinder_3 project ($hsNeg_3 $hsNeg_3 $zMax) (cylinder_3)//40 project ($hs_3 $hsNeg_3 $zMax) (cylinder_3)//41 project ($hs_3 $hs_3 $zMax) (cylinder_3)//42 project ($hsNeg_3 $hs_3 $zMax) (cylinder_3)//43 // cylinder_4 project ($hsNeg_4 $hsNeg_4 $zMax) (cylinder_4)//44 project ($hs_4 $hsNeg_4 $zMax) (cylinder_4)//45 project ($hs_4 $hs_4 $zMax) (cylinder_4)//46 project ($hsNeg_4 $hs_4 $zMax) (cylinder_4)//47 ); blocks ( hex (0 1 2 3 24 25 26 27) ($nBox $nBox $nZ) simpleGrading (1 1 1) hex (0 4 5 1 24 28 29 25) ($nBox $nR $nZ) simpleGrading (1 1 1) hex (1 5 6 2 25 29 30 26) ($nR $nBox $nZ) simpleGrading (1 1 1) hex (2 6 7 3 26 30 31 27) ($nBox $nR $nZ) simpleGrading (1 1 1) hex (3 7 4 0 27 31 28 24) ($nR $nBox $nZ) simpleGrading (1 1 1) hex (4 8 9 5 28 32 33 29) ($nBox $nR_1 $nZ) simpleGrading (1 1 1) hex (5 9 10 6 29 33 34 30) ($nR_1 $nBox $nZ) simpleGrading (1 1 1) hex (6 10 11 7 30 34 35 31) ($nBox $nR_1 $nZ) simpleGrading (1 1 1) hex (7 11 8 4 31 35 32 28) ($nR_1 $nBox $nZ) simpleGrading (1 1 1) hex (8 12 13 9 32 36 37 33) ($nBox $nR_2 $nZ) simpleGrading (1 1 1) hex (9 13 14 10 33 37 38 34) ($nR_2 $nBox $nZ) simpleGrading (1 1 1) hex (10 14 15 11 34 38 39 35) ($nBox $nR_2 $nZ) simpleGrading (1 1 1) hex (11 15 12 8 35 39 36 32) ($nR_2 $nBox $nZ) simpleGrading (1 1 1) hex (12 16 17 13 36 40 41 37) ($nBox $nR_3 $nZ) simpleGrading (1 1 1) hex (13 17 18 14 37 41 42 38) ($nR_3 $nBox $nZ) simpleGrading (1 1 1) hex (14 18 19 15 38 42 43 39) ($nBox $nR_3 $nZ) simpleGrading (1 1 1) hex (15 19 16 12 39 43 40 36) ($nR_3 $nBox $nZ) simpleGrading (1 1 1) hex (16 20 21 17 40 44 45 41) ($nBox $nR_4 $nZ) simpleGrading (1 1 1) hex (17 21 22 18 41 45 46 42) ($nR_4 $nBox $nZ) simpleGrading (1 1 1) hex (18 22 23 19 42 46 47 43) ($nBox $nR_4 $nZ) simpleGrading (1 1 1) hex (19 23 20 16 43 47 44 40) ($nR_4 $nBox $nZ) simpleGrading (1 1 1) ); edges ( project 4 5 (cylinder) project 5 6 (cylinder) project 6 7 (cylinder) project 7 4 (cylinder) project 28 29 (cylinder) project 29 30 (cylinder) project 30 31 (cylinder) project 31 28 (cylinder) project 8 9 (cylinder_1) project 9 10 (cylinder_1) project 10 11 (cylinder_1) project 11 8 (cylinder_1) project 32 33 (cylinder_1) project 33 34 (cylinder_1) project 34 35 (cylinder_1) project 35 32 (cylinder_1) project 12 13 (cylinder_2) project 13 14 (cylinder_2) project 14 15 (cylinder_2) project 15 12 (cylinder_2) project 36 37 (cylinder_2) project 37 38 (cylinder_2) project 38 39 (cylinder_2) project 39 36 (cylinder_2) project 16 17 (cylinder_3) project 17 18 (cylinder_3) project 18 19 (cylinder_3) project 19 16 (cylinder_3) project 40 41 (cylinder_3) project 41 42 (cylinder_3) project 42 43 (cylinder_3) project 43 40 (cylinder_3) project 20 21 (cylinder_4) project 21 22 (cylinder_4) project 22 23 (cylinder_4) project 23 20 (cylinder_4) project 44 45 (cylinder_4) project 45 46 (cylinder_4) project 46 47 (cylinder_4) project 47 44 (cylinder_4) ); boundary ( inlet_1 { type patch; faces ( (0 3 2 1) (0 1 5 4) (1 2 6 5) (2 3 7 6) (3 0 4 7) ); } inlet_2 { type patch; faces ( (8 9 13 12) (9 10 14 13) (10 11 15 14) (11 8 12 15) ); } pipe_1 { type wall; faces ( (4 5 9 8) (5 6 10 9) (6 7 11 10) (7 4 8 11) ); } pipe_2 { type wall; faces ( (12 13 17 16) (13 14 18 17) (14 15 19 18) (15 12 16 19) ); } bottom { type patch; faces ( (16 17 21 20) (17 18 22 21) (18 19 23 22) (19 16 20 23) ); } wall { type patch; faces ( (20 21 45 44) (21 22 46 45) (22 23 47 46) (23 20 44 47) ); } outlet { type patch; faces ( (24 25 26 27) (24 28 29 25) (25 29 30 26) (26 30 31 27) (27 31 28 24) (28 32 33 29) (29 33 34 30) (30 34 35 31) (31 35 32 28) (32 36 37 33) (33 37 38 34) (34 38 39 35) (35 39 36 32) (36 40 41 37) (37 41 42 38) (38 42 43 39) (39 43 40 36) (40 44 45 41) (41 45 46 42) (42 46 47 43) (43 47 44 40) ); } ); mergePatchPairs ( ); // ************************************************************************* //
我的几何结构大概是几个同心圆柱,同心圆柱的底面如下图