Navigation

    CFD中文网

    CFD中文网

    • Login
    • Search
    • 最新

    snappyHex划分网格,始终无法贴合

    OpenFOAM
    3
    6
    989
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DY大世界
      DY大世界 last edited by

      使用snappyHexMesh对圆柱体划分网格,在圆柱体外侧始终是六面体的方体网格,并不是紧贴在圆柱体面上的贴体光滑网格,不知道是什么原因?
      1.png
      但是在OF自带的一个案例中,所得到的网格就非常好,
      6.jpg
      OF中使用了如下的代码,

      #includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg"
      
      castellatedMesh on;
      snap            on;
      addLayers       off;
      
      geometry
      {
          fixed.obj
          {
              type triSurfaceMesh;
              name fixed;
              regions
              {
                  patch0 { name slipWall; }
                  patch1 { name outlet; }
                  patch2 { name inlet; }
              }
          }
          rotatingZone.obj
          {
              type triSurfaceMesh;
              name rotatingZone;
          }
      }
      
      castellatedMeshControls
      {
          features
          (
            { file "fixed.eMesh"; level 2; }
            { file "rotatingZone.eMesh"; level 4; }
          );
      
          refinementSurfaces
          {
              fixed
              {
                  level       (2 2);
                  patchInfo   { type wall; }
                  inGroups    (fixed);
      
                  regions
                  {
                      patch0
                      {
                          level (2 2);
                          patchInfo { type patch; }
                      }
      
                      patch1
                      {
                          level (2 2);
                          patchInfo { type patch; }
                      }
      
                      patch2
                      {
                          level (2 2);
                          patchInfo { type patch; }
                      }
                  }
              }
              rotatingZone
              {
                  level       (4 4);
                  faceZone    rotatingZone;
                  cellZone    rotatingZone;
                  cellZoneInside  inside;
              }
      
          }
      
          refinementRegions
          {
              fixed
              {
                  mode inside;
                  levels ((1e-5 1));
              }
              rotatingZone
              {
                  mode inside;
                  levels ((1e-5 4));
              }
          }
      
          locationInMesh (1e-5 -1e-2 1e-5);// Offset from (0 0 0) to avoid
                                           // coinciding with face or edge and keep
                                           // away from disk itself
      }
      

      这里是需要在几何模型中对模型的面进行重命名,然后再对面进行特征加密吗?
      为什么直接使用网格snappy就始终不可以呢?
      请老师大神们指点!感激不尽!

      七 1 Reply Last reply Reply Quote
      • 七
        七辆战车 @DY大世界 last edited by

        @DY大世界 snappyHexMesh -overwrite,估计是这个问题

        DY大世界 1 Reply Last reply Reply Quote
        • DY大世界
          DY大世界 @七辆战车 last edited by

          @七辆战车 您好,谢谢您的回答,请问overwrite是什么意思,是关于网格贴合吗,我这个是不是snap方面的问题呢,就感觉网格被移除后没有贴合到几何体上。

          F 1 Reply Last reply Reply Quote
          • F
            freevector @DY大世界 last edited by

            @DY大世界 运行snappyHexMesh命令时,后面添加 -overwrite

            DY大世界 1 Reply Last reply Reply Quote
            • DY大世界
              DY大世界 @freevector last edited by

              @freevector 好的,谢谢您的回复,已经进行了修改,现在的网格效果已经比较不错了。

              F 1 Reply Last reply Reply Quote
              • F
                freevector @DY大世界 last edited by

                @DY大世界 :baobao:

                1 Reply Last reply Reply Quote
                • First post
                  Last post

                CFD中文网 | 东岳流体 | 京ICP备15017992号-2