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. 求助:blockMesh网格生成问题

求助:blockMesh网格生成问题

已定时 已固定 已锁定 已移动 OpenFOAM
4 帖子 3 发布者 6.1k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • T 离线
    T 离线
    TaXLee
    写于 最后由 编辑
    #1

    大家好,刚开始学OpenFoam,在用porousSimpleFoam。想用blockMesh生成一个这样的几何图形:
    0_1519588386883_1.png
    图片中的数字是点的编号,中心的正方体是一个多孔介质区域,外围就是正常的水域。想研究流体从左侧流入后,遇到多孔介质后的流体变化。
    本来是建立了一个大正方体,里面有一个小正方体,但是发现流体直接传过去了,没有发生干扰的现象,不知道该怎么修改,所以换了这个麻烦的方法。
    blockMeshDict中主体代码是这样的:

    scale   0.01;
    
    vertices
    (
    	(0 0 0) //0//
    	(0 0 100) //1//
    	(36 0 0) //2//
    	(36 0 36) //3//
    	(36 0 64) //4//
    	(36 0 100) //5//
    	(64 0 0) //6//
    	(64 0 36) //7//
    	(64 0 64) //8//
    	(64 0 100) //9//
    	(100 0 0) //10//
    	(100 0 100) //11//
    	(36 36 36) //12//
    	(36 36 64) //13//
    	(64 36 36) //14//
    	(64 36 64) //15//
    	(36 64 36) //16//
    	(36 64 64) //17//
    	(64 64 36) //18//
    	(64 64 64) //19//
    	(0 100 0) //20//
    	(0 100 100) //21//
    	(36 100 0) //22//
    	(36 100 36) //23//
    	(36 100 64) //24//
    	(36 100 100) //25//
    	(64 100 0) //26//
    	(64 100 36) //27//
    	(64 100 64) //28//
    	(64 100 100) //29//
    	(100 100 0) //30//
    	(100 100 100) //31//
    );
    
    blocks
    (
        // wall block
        hex (0 1 5 2 20 21 25 22) 
    	inlet ( 15 20 20 ) simpleGrading (1 1 1)
    	
    	hex (2 3 7 6 22 23 27 26)
    	middle1 ( 20 20 20 ) simpleGrading (1 1 1)
    	
        hex (16 17 19 18 23 24 28 27)
    	middle2	( 20 20 20 ) simpleGrading (1 1 1)
    	
    	hex (3 4 8 7 12 13 15 14)
    	middle3 ( 20 20 20 ) simpleGrading (1 1 1)
    	
    	hex (4 5 9 8 24 25 29 28)
    	middle4 ( 20 20 20 ) simpleGrading (1 1 1)
    	
    	hex (6 9 11 10 26 29 31 30) 
    	outlet ( 20 20 20 )  simpleGrading (1 1 1)
    	
        // porosity block
        hex (12 13 15 14 16 17 19 18) 
    	porosity ( 20 20 20 ) simpleGrading (1 1 1)
    );
    
    edges
    (
    );
    
    patches
    (
    
        wall front
        (
    		(1 5 25 21)
    		(5 9 29 25)
    		(9 11 31 29)
        )
    
        wall back
        (
    		(0 2 22 20)
    		(2 6 26 22)
    		(6 10 30 26)
        )
    
        wall walls
        (
    		(0 1 5 2)
    		(4 5 9 8)
    		(3 4 8 7)
    		(2 3 7 6)
    		(6 9 11 10)
    		(20 21 25 22)
    		(22 23 27 26)
    		(23 24 28 27)
    		(24 25 29 28)
    		(26 29 31 30)
        )
    
        wall porosityWall
        (
    	(16 17 19 18)
    	(16 17 13 12)
    	(13 12 14 15)
    	(14 15 19 18)
    	(17 13 15 19)
    	(16 12 14 18)
        )
    
        patch inlet
        (
    	(0 1 21 20)
        )
    
        patch outlet
        (
    	(10 11 31 30)
        )
    );
    
    mergePatchPairs
    (
    );
    
    

    运行blockMesh后报错是这样的:

    /*---------------------------------------------------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v1712                                 |
    |   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    Build  : v1712
    Arch   : "LSB;label=32;scalar=64"
    Exec   : blockMesh
    Date   : Feb 25 2018
    Time   : 19:32:16
    Host   : "DESKTOP-PB8VIPU"
    PID    : 839
    I/O    : uncollated
    Case   : /mnt/e/tutorials/incompressible/porousSimpleFoam/Try1
    nProcs : 1
    trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
    fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
    allowSystemOperations : Allowing user-supplied system call operations
    
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    Create time
    
    Deleting polyMesh directory
        "/mnt/e/tutorials/incompressible/porousSimpleFoam/Try1/constant/polyMesh"
    Creating block mesh from
        "/mnt/e/tutorials/incompressible/porousSimpleFoam/Try1/system/blockMeshDict"
    Creating block edges
    No non-planar block faces defined
    Creating topology blocks
    Creating topology patches
    
    Reading patches section
    
    Creating block mesh topology
    
    Reading physicalType from existing boundary file
    
    Default patch type set to empty
    
    
    --> FOAM FATAL ERROR:
    Trying to specify a boundary face 4(16 17 19 18) on the face on cell 2 which is either an internal face or already belongs to some other patch.  This is face 0 of patch 3 named porosityWall.
    
        From function void Foam::polyMesh::setTopology(const cellShapeList&, const faceListList&, const wordList&, Foam::labelList&, Foam::labelList&, Foam::label&, Foam::label&, Foam::cellList&)
        in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 322.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&)sh: 1: addr2line: not found
     addr2line failed
    #1  Foam::error::abort()sh: 1: addr2line: not found
     addr2line failed
    #2  Foam::polyMesh::setTopology(Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<int>&, Foam::List<int>&, int&, int&, Foam::List<Foam::cell>&)sh: 1: addr2line: not found
     addr2line failed
    #3  Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::PtrList<Foam::dictionary> const&, Foam::word const&, Foam::word const&, bool)sh: 1: addr2line: not found
     addr2line failed
    #4  Foam::blockMesh::createTopology(Foam::IOdictionary const&, Foam::word const&)sh: 1: addr2line: not found
     addr2line failed
    #5  Foam::blockMesh::blockMesh(Foam::IOdictionary const&, Foam::word const&)sh: 1: addr2line: not found
     addr2line failed
    #6  ?sh: 1: addr2line: not found
     addr2line failed
    #7  __libc_start_mainsh: 1: addr2line: not found
     addr2line failed
    #8  ?sh: 1: addr2line: not found
     addr2line failed
    Aborted (core dumped)
    

    刚开始学OpenFoam,还比较小白,问题应该是出在(16 17 19 18),也就是多孔介质的上层,和流域的block重叠了,也就是这一块:
    0_1519588912801_2.png
    求助,应该怎么修改?万分感谢!

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #2

    本来是建立了一个大正方体,里面有一个小正方体,但是发现流体直接传过去了,没有发生干扰的现象,不知道该怎么修改,

    多孔介质这面不需要你做这种网格。多孔介质区域是需要网格的,因此你不需要套空。另外,我强烈建议你采用专业的网格生成软件来制作这个网格。blockMesh稍微复杂点的网格debug非常费事 :xinlei:

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

    T 1 条回复 最后回复
  • T 离线
    T 离线
    TaXLee
    在 中回复了 李东岳 最后由 编辑
    #3

    @李东岳 好的,谢谢东岳大大的建议!我再琢磨琢磨!

    1 条回复 最后回复
  • 向 离线
    向 离线
    向晚正愁余
    写于 最后由 编辑
    #4

    参考interDyMFoam下面floatingObject算例,用topoSet生成中间的小方块

    1 条回复 最后回复

  • 登录

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