Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. 修改boundary文件中的类型导致错误

修改boundary文件中的类型导致错误

已定时 已固定 已锁定 已移动 OpenFOAM
3 帖子 2 发布者 1.2k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 杜 离线
    杜 离线
    杜浚平
    写于2024年7月24日 05:31 最后由 编辑
    #1

    各位佬,本人初学openfoam,网格划分采用ICEM,做的算例是NACA0018的升阻力系数计算,画的是一个三维网格,想要导入of后将front和back设为empty,以此来进行二维翼型的运算,报错为:
    Number of edges not aligned with or perpendicular to non-empty directions: 8191
    Writing 16382 points on non-aligned edges to set nonAlignedEdges

    网格展向0.01m,划分为一个网格,网格如下:
    naca.png

    在导入后boundary文件如下:

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | foam-extend: Open Source CFD                    |
    |  \\    /   O peration     | Version:     3.2                                |
    |   \\  /    A nd           | Web:         http://www.foam-extend.org         |
    |    \\/     M anipulation  | For copyright notice see file Copyright         |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       polyBoundaryMesh;
        location    "constant/polyMesh";
        object      boundary;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    4
    (
        AIRFOIL
        {
            type            wall;
            nFaces          488;
            startFace       124440;
        }
        BACK
        {
            type            symmetryPlane;
            nFaces          62464;
            startFace       124928;
        }
        FRONT
        {
            type            symmetryPlane;
            nFaces          62464;
            startFace       187392;
        }
        FAR
        {
            type            patch;
            nFaces          488;
            startFace       249856;
        }
    )
    
    // ************************************************************************* //
    
    

    checkMesh的结果如下:

    /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | foam-extend: Open Source CFD                    |
    |  \\    /   O peration     | Version:     3.2                                |
    |   \\  /    A nd           | Web:         http://www.foam-extend.org         |
    |    \\/     M anipulation  | For copyright notice see file Copyright         |
    \*---------------------------------------------------------------------------*/
    Build    : 3.2-0b2838935026
    Exec     : checkMesh
    Date     : Jul 24 2024
    Time     : 13:00:35
    Host     : ad
    PID      : 24129
    CtrlDict : "/home/ad/foam/ad-3.2/run/try4/18/system/controlDict"
    Case     : /home/ad/foam/ad-3.2/run/try4/18
    nProcs   : 1
    SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create polyMesh for time = 0
    
    Time = 0
    
    Mesh stats
        all points:           125904
        live points:          125904
        all faces:            250344
        live faces:           250344
        internal faces:       124440
        cells:                62464
        boundary patches:     4
        point zones:          0
        face zones:           1
        cell zones:           1
    
    Overall number of cells of each type:
        hexahedra:     62464
        prisms:        0
        wedges:        0
        pyramids:      0
        tet wedges:    0
        tetrahedra:    0
        polyhedra:     0
    
    Checking topology...
        Boundary definition OK.
        Point usage OK.
        Upper triangular ordering OK.
        Face vertices OK.
        Number of regions: 1 (OK).
    
    Checking patch topology for multiply connected surfaces ...
        Patch               Faces    Points   Area [m^2]  Surface topology                  
        AIRFOIL             488      976      0.0207938   ok (non-closed singly connected)  
        BACK                62464    62952    737.046     ok (non-closed singly connected)  
        FRONT               62464    62952    737.046     ok (non-closed singly connected)  
        FAR                 488      976      0.962719    ok (non-closed singly connected)  
    
    Checking geometry...
        This is a 3-D mesh
        Overall domain bounding box (-14.9955 -15.3298 -1.43395e-42) (15.9509 14.9979 0.01)
        Mesh (non-empty, non-wedge) directions (1 1 1)
        Mesh (non-empty) directions (1 1 1)
        Mesh (non-empty, non-wedge) dimensions 3
        Boundary openness (-1.86694e-20 -1.04152e-19 -4.57649e-15) Threshold = 1e-06 OK.
        Max cell openness = 2.46007e-15 OK.
        Max aspect ratio = 381.414 OK.
        Minumum face area = 3.3198e-09. Maximum face area = 0.100407.  Face area magnitudes OK.
        Min volume = 3.3198e-11. Max volume = 0.00100407.  Total volume = 7.37046.  Cell volumes OK.
        Mesh non-orthogonality Max: 44.6101 average: 9.96793 Threshold = 70
        Non-orthogonality check OK.
        Face pyramids OK.
        Max skewness = 0.733611 OK.
    
    Mesh OK.
    
    End
    
    
    

    将boundary文件修改为:

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | foam-extend: Open Source CFD                    |
    |  \\    /   O peration     | Version:     3.2                                |
    |   \\  /    A nd           | Web:         http://www.foam-extend.org         |
    |    \\/     M anipulation  | For copyright notice see file Copyright         |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       polyBoundaryMesh;
        location    "constant/polyMesh";
        object      boundary;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    4
    (
        AIRFOIL
        {
            type            wall;
            nFaces          488;
            startFace       124440;
        }
        BACK
        {
            type            empty;
            nFaces          62464;
            startFace       124928;
        }
        FRONT
        {
            type            empty;
            nFaces          62464;
            startFace       187392;
        }
        FAR
        {
            type            patch;
            nFaces          488;
            startFace       249856;
        }
    )
    
    // ************************************************************************* //
    
    

    checkMesh得到:

    /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | foam-extend: Open Source CFD                    |
    |  \\    /   O peration     | Version:     3.2                                |
    |   \\  /    A nd           | Web:         http://www.foam-extend.org         |
    |    \\/     M anipulation  | For copyright notice see file Copyright         |
    \*---------------------------------------------------------------------------*/
    Build    : 3.2-0b2838935026
    Exec     : checkMesh
    Date     : Jul 24 2024
    Time     : 13:02:01
    Host     : ad
    PID      : 24163
    CtrlDict : "/home/ad/foam/ad-3.2/run/try4/18/system/controlDict"
    Case     : /home/ad/foam/ad-3.2/run/try4/18
    nProcs   : 1
    SigFpe   : Enabling floating point exception trapping (FOAM_SIGFPE).
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Create polyMesh for time = 0
    
    Time = 0
    
    Mesh stats
        all points:           125904
        live points:          125904
        all faces:            250344
        live faces:           250344
        internal faces:       124440
        cells:                62464
        boundary patches:     4
        point zones:          0
        face zones:           1
        cell zones:           1
    
    Overall number of cells of each type:
        hexahedra:     62464
        prisms:        0
        wedges:        0
        pyramids:      0
        tet wedges:    0
        tetrahedra:    0
        polyhedra:     0
    
    Checking topology...
        Boundary definition OK.
        Point usage OK.
        Upper triangular ordering OK.
        Face vertices OK.
        Number of regions: 1 (OK).
    
    Checking patch topology for multiply connected surfaces ...
        Patch               Faces    Points   Area [m^2]  Surface topology                  
        AIRFOIL             488      976      0.0207938   ok (non-closed singly connected)  
        BACK                62464    62952    737.046     ok (non-closed singly connected)  
        FRONT               62464    62952    737.046     ok (non-closed singly connected)  
        FAR                 488      976      0.962719    ok (non-closed singly connected)  
    
    Checking geometry...
        This is a 2-D mesh
        Overall domain bounding box (-14.9955 -15.3298 -1.43395e-42) (15.9509 14.9979 0.01)
        Mesh (non-empty, non-wedge) directions (1 1 0)
        Mesh (non-empty) directions (1 1 0)
        Mesh (non-empty, non-wedge) dimensions 2
     ***Number of edges not aligned with or perpendicular to non-empty directions: 8191
      Writing 16382 points on non-aligned edges to set nonAlignedEdges
        Boundary openness (-1.86694e-20 -1.04152e-19 -4.57649e-15) Threshold = 1e-06 OK.
        Max cell openness = 2.46007e-15 OK.
        Max aspect ratio = 381.414 OK.
        Minumum face area = 3.3198e-09. Maximum face area = 0.100407.  Face area magnitudes OK.
        Min volume = 3.3198e-11. Max volume = 0.00100407.  Total volume = 7.37046.  Cell volumes OK.
        Mesh non-orthogonality Max: 44.6101 average: 9.96793 Threshold = 70
        Non-orthogonality check OK.
        Face pyramids OK.
        Max skewness = 0.733611 OK.
    
    Failed 1 mesh checks.
    
    End
    
    
    

    我该如何修改?:haqi:

    1 条回复 最后回复
  • 李 离线
    李 离线
    李东岳 管理员
    写于2024年7月24日 05:38 最后由 编辑
    #2

    你用symmetryPlane;算没问题,不用改

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    杜 1 条回复 最后回复 2024年7月24日 05:55
  • 杜 离线
    杜 离线
    杜浚平
    在 2024年7月24日 05:55 中回复了 李东岳 最后由 编辑
    #3

    @李东岳 好的,谢谢东岳老师!

    1 条回复 最后回复
2024年7月24日 05:31

2/3

2024年7月24日 05:38

2024年7月24日 05:55
  • 登录

  • 登录或注册以进行搜索。
2 / 3
  • 第一个帖子
    2/3
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]