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. activePressureForceBaffleVelocity/activeBaffleVelocity边界条件如何使用

activePressureForceBaffleVelocity/activeBaffleVelocity边界条件如何使用

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

    需求:在一个管子中间有一个阀门,压力大于一定值后阀门打开
    我在李东岳老师的建议下尝试使用activePressureForceBaffleVelocity/activeBaffleVelocity边界条件实现上述功能。查阅资料发现实现该功能需要在目标位置创建4个面(两个wall,两个cyclic),经过许多尝试,代码能够运行不报错,但是结果有明显问题。初始时刻的各种场出现诡异变化,如图所示。部分关键文件进行上传,请大佬帮忙指正错误。p.orig T.orig U.orig blockMeshDict createBafflesDict createPatchDict topoSetDict

    
    
    /*--------------------------------*- C++ -*----------------------------------*\
      =========                 |
      \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
       \\    /   O peration     | Website:  https://openfoam.org
        \\  /    A nd           | Version:  7
         \\/     M anipulation  |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    dimensions      [0 1 -1 0 0 0 0];
    internalField   uniform (0 0 0);
    boundaryField
    {
        cylinder1_wall_down
        {
            type            noSlip;
        }
        interface
        {
            type            noSlip;
        }
        cylinder1_wall_sides
        {
            type            noSlip;
        }
        
        
          blockedRaptureDiscBaffle
        {
            type            activeBaffleVelocity;//activePressureForceBaffleVelocity;
    
            // This is the name of the cyclic patch
            cyclicPatch     raptureDisc_master;
            openingTime     0.01;
            maxOpenFractionDelta 1;
            openFraction    0;
            orientation     -1;
    
            // This value is the opening or closing guy
            // Please see ISSUE 2360 - Bug in condition
            // https://develop.openfoam.com/Development/openfoam/-/issues/2360
            // -> if you dont have the patch installed, the BC will open at 3000 Pa
            minThresholdValue 210000;
            forceBased      false;
            opening         1;
            value           uniform (0 0 0);
        }
        
        raptureDisc_master
        {
            type            cyclic;
    
        }
        
        raptureDisc_slave
        {
            type            cyclic;
        }
    
    }
    // ************************************************************************* //
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /   F ield        | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v2106                                 |
    |   \\  /    A nd           | Website:                                        |
    |    \\/      M anipulation |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version         2012;
        format          ascii;
        class           dictionary;
        location        "system";
        object          createBafflesDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    
    internalFacesOnly true;
    
    //noFields        true;//false
    fields true;
    
    baffles
    {
        // Here we use the previous created faceSet to create 4 times the same
        // faces which are moved to different boundary conditions
        // The reason for that is that the activePressureForceBaffle needs
        // a) a cyclic boundary set (master/slave)
        // b) an additional wall
        quadruplicateTheInternalFaces
        {
            type            faceZone;
            zoneName        baffleFaces;
            patches
            {
                // a) Create the cyclic guys (RD = raptureDisc)
                RD_master_cyclic
                {
                    name            raptureDisc_master;
                    type            cyclic;
                    sampleMode      nearestPatchFace;
                    neighbourPatch  raptureDisc_slave;
                    sameGroup       off;
                    patchFields
                    {
                    }
                }
    
                RD_slave_cyclic
                {
                    name            raptureDisc_slave;
                    type            cyclic;
                    sampleMode      nearestPatchFace;
                    neighbourPatch  raptureDisc_master;
                    sameGroup       off;
                    patchFields
                    {
                    }
                }
    
                // b) create another set of walls (will be merged in the next step)
                RD_master_wall
                {
                    name            raptureDiscWall1;
                    type            wall;
                }
                RD_slave_wall
                {
                    name            raptureDiscWall2;
                    type            wall;
                    
                }
    
            }
        }
    }
    
    
    // ************************************************************************* //
    
    
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  v2106                                 |
    |   \\  /    A nd           | Website:                                        |
    |    \\/     M anipulation  |                                                 |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.0;
        format      ascii;
        class       dictionary;
        object      createPatchDict;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    pointSync false;
    
    // Patches to create.
    patches
    (
        {
            // Name of new patch
            name blockedRaptureDiscBaffle;
    
            // Dictionary to construct new patch from
            patchInfo
            {
                type wall;
            }
    
            // How to construct: either from 'patches' or 'set'
            constructFrom patches;
    
            patches (raptureDiscWall1 raptureDiscWall2);
        }
    );
    
    // ************************************************************************* //
    
    

    92f93eeb-23b9-4ae9-898b-2043a9303e0b-image.png

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

    https://cfd-china.com/topic/8018

    算例发上来我看看

    9月CFD算法编程课: http://dyfluid.com/class.html

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

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

    @李东岳。感谢李老师的回复,文件见附件。
    Allrun命令可直接运行,plot.gp能出来纵向几个监测点的压力数据图,用作辅助结果判断。
    该算例基于openFoam7的XiFoam求解器运行,不需对照实验结果。
    更多信息可见文件中readme.txt文件。

    XiFoam_duct.tar

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

    你有测试pisoFoam这种单相流么

    9月CFD算法编程课: http://dyfluid.com/class.html

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

    X 1 条回复 最后回复
  • X 离线
    X 离线
    xuqiming
    在 中回复了 李东岳 最后由 编辑
    #5

    @李东岳 没有测试过,是基于自己要做的算例来的,不加这个东西的时候,算例是能运行的。

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

    测试这个边界条件,最好使用一个基础的求解器比如pisoFoam,使用自带的2D pitzdaily算例来单核运行测试,测试通过后将其衍生到你的算例。我在近期可以顺着我的路子弄一个。不过如果你可以弄一个上传的话,可以加快这个进程。

    9月CFD算法编程课: http://dyfluid.com/class.html

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

    X 2 条回复 最后回复
  • X 离线
    X 离线
    xuqiming
    写于 最后由 编辑
    #7

    好的,我看一下。

    1 条回复 最后回复
  • X 离线
    X 离线
    xuqiming
    在 中回复了 李东岳 最后由 编辑
    #8

    @李东岳
    李老师,我试了一下和我这比较接近的工况,rhoPimpleFoam中的激波管,结果是对的,能够挡住,超过压力也能开启,同时开口度之类的设置都有效,文件见附件。
    shockTube.zip
    02d7f466-dccb-485c-9d79-a41780d09882-image.png

    1 条回复 最后回复
  • X 离线
    X 离线
    xuqiming
    在 中回复了 李东岳 最后由 xuqiming 编辑
    #9

    @李东岳 经过一天的努力,问题解决了,感谢李老师的帮忙,问题在于orientation 不能设置-1,只能设置为1,这似乎表示初始状态下盘移动方向。
    分享的算例修改这一个参数就能正常运行,需要注意的是minThresholdValue 应该是表示两侧压差,但是实际上准大差一些,具体大多少无法确定。

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

    感谢分享!!

    9月CFD算法编程课: http://dyfluid.com/class.html

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

    1 条回复 最后回复
  • X 离线
    X 离线
    xuqiming
    写于 最后由 编辑
    #11

    李老师有时间可以继续帮忙看一下吗,他这个边界条件很奇怪,activeBaffleVelocity只能实现一个单向阀的效果,要不关不上,要不打不开。activePressureForceBaffleVelocity能实现阀门的效果,但是真实阈值和设置阈值没啥关系,初始条件或者工况改变后,真实阈值会出现很大的变化。

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

    一个2D的算例更好。可以调节进口速度,来测试是否是正常的。
    1D算例由于通量守恒,不好测试

    9月CFD算法编程课: http://dyfluid.com/class.html

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

    1 条回复 最后回复

  • 登录

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