用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好像并没有生效。所以应该怎么定义呢?



  • 你的周期性边界看起来在sector4.stl上,我没这么做过,不过snappyHexMesh是自动划分网格,我预感它不会respect周期边界严格的点对应,可能做出来的网格不能用



  • 所以应该怎么做呢,直接在block Mesh里定义吗?这样就要用block Mesh生成一个扇形域?



  • 最好用blockMesh做好周期边界,然后别碰它,周期边界点对应非常严格



  • 我也试过用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的方法?



    1. 要不用cyclicAMI

    2. 要么用手动

    3. 要么createPatch,把matchTolerance放的特别大



  • @东岳 谢谢东岳老师
    我在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里面的periodic执行非常严格的标准,它使得block的vertices严格的一一对应,如果能用ICEM做并附加periodic操作,尽可能用ICEM做


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2