用snappyHexMeshDict生成周期性边界问题
-
在Open FOAM里怎么在snappyHexMeshDict里面将某两个面定义为周期性边界啊。我在snappyHexMeshDict里面没有定义成功,就想用createPatchDict制造两个Patch,但提示如下错误,说两个面的face数不一样。所以想问一下大家应该怎样在snappyHexMeshDict里面定义周期性边界?
-
geometry { sector_part1 { type triSurfaceMesh; file "sector_part1.stl"; } sector_part2 { type triSurfaceMesh; file "sector_part2.stl"; } sector4 { type triSurfaceMesh; file "sector4.stl"; regions { patch0 { name patch0; type patch; } patch1 { name patch1; type symmetry; } patch2 { name patch2; type patch; } patch3 { name patch3; type cyclic; matchTolerance 0.0001; neighbourPatch patch4; transform noOrdering; } patch4 { name patch4; type cyclic; matchTolerance 0.0001; neighbourPatch patch3; transform noOrdering; } } } propellerL { type triSurfaceMesh; file "propellerL.stl"; } };
-
上面是我的snappyHexMeshDict的一部分,但是这样定义的cyclic 的type好像并没有生效。所以应该怎么定义呢?
-
所以应该怎么做呢,直接在block Mesh里定义吗?这样就要用block Mesh生成一个扇形域?
-
我也试过用blockMesh生成,可是我就是没想到办法可以不碰它,因为我要算的是螺旋桨,要做一个单通道的计算域,这样螺旋桨(及其旋转域)的两边都会和我的计算域两边的周期性边界重合,这样用snappyHexMesh生成网格的时候两边就会有切割和对齐的操作,就会产生不匹配。试了好几次都提示不匹配。
-
@东岳
--> FOAM FATAL ERROR: face 5120 area does not match neighbour by 2.02625% -- possible face ordering problem. patch:cyclic1 my area:6.14979e-05 neighbour area:6.02643e-05 matching tolerance:0.0001 Mesh face:3995462 fc:(0.0020217 0.0037764 5.81648) Neighbour fc:(-0.00217946 0.00377493 5.81651) If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file. Rerun with cyclic debug flag set for more information. From function void Foam::cyclicPolyPatch::calcTransforms(const primitivePatch&, const pointField&, const vectorField&, const pointField&, const vectorField&) in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 212. FOAM exiting
-
就会提示上述错误
-
@莫晓柒 在 用snappyHexMeshDict生成周期性边界问题 中说:
does not match neighbour
我用fluent3DMeshToFoam转化成OpenFOAM的网格的时候也遇到了does not match neighbour这个问题;我是手动改成cyclic边界的,貌似是要用createPatch的方法?
-
@东岳 谢谢东岳老师
我在cfd-online上面找到一种方法:
下面是原文:
“I encountered the same problem and I could solve it by defining rotational periodicity and then by declaring the corresponding vertices in ICEM as periodic. Then Right Click on Faces in the Blocking tree -> Periodic Faces -> ensure that really every periodic face is colored accordingly. createPatch went fine after this procedure.” ---by Fabian E.
然后我勾选了ICEM里面blocking里的faces的Periodic,再导入openfoam,发现就不会出现上述错误。
但我不太清楚为何这样会消除错误? -
-
-
-
-
@Calf-Z-DNS 在 用snappyHexMeshDict生成周期性边界问题 中说:
@东岳 谢谢东岳老师
我在cfd-online上面找到一种方法:
下面是原文:
“I encountered the same problem and I could solve it by defining rotational periodicity and then by declaring the corresponding vertices in ICEM as periodic. Then Right Click on Faces in the Blocking tree -> Periodic Faces -> ensure that really every periodic face is colored accordingly. createPatch went fine after this procedure.” ---by Fabian E.
然后我勾选了ICEM里面blocking里的faces的Periodic,再导入openfoam,发现就不会出现上述错误。
但我不太清楚为何这样会消除错误?请问同学可以告知是怎么设置的吗,icem里面有face pericdic吗?我这里只设置了点对称
-
-
@李东岳 网格是用
fluentMeshing
画的,严格按照周期性边界设置的,导入OpenFOAM
之后,当matchTolerance
很小的时候,使用createPatch
设置周期性边界的时候会报错,以下是
createPatch
代码patches ( { name cyclic1; patchInfo { type cyclic; neighbourPatch cyclic2; transform rotational; rotationAxis (0 0 1); rotationCentre (0 0 0); matchTolerance 1e10; } constructFrom patches; patches (cyclic_1); set f0; } { name cyclic2; patchInfo { type cyclic; neighbourPatch cyclic1; transform rotational; rotationAxis (0 0 1); rotationCentre (0 0 0); matchTolerance 1e10; } constructFrom patches; patches (cyclic_2); set f0; } );
以下是报错信息
--> FOAM FATAL ERROR: More than one patch accessing the same transform but not of the same sign. patch:cyclic2 transform:0 sign:1 current transforms:1(1) From function Foam::label Foam::globalIndexAndTransform::addToTransformIndex(Foam::label, Foam::label, bool, Foam::scalar) const in file lnInclude/globalIndexAndTransformI.H at line 210. FOAM exiting
发布 17 的 3