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. 似乎第一步就发散了,是我的初边条设置的有问题吗?

似乎第一步就发散了,是我的初边条设置的有问题吗?

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

    是基于tutorial里面的waterChannel改的算例,模型是二维的一个溢洪道,边界条件就在原先的基础上改了一点:

    //alpha.water
    
    dimensions      [0 0 0 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 1;
        }
    
        walls
        {
            type            zeroGradient;
        }
    
        outlet
        {
            type            zeroGradient;
            value           uniform 0;
        }
    
        atmosphere
        {
            type            inletOutlet;
            inletValue      uniform 0;
            value           uniform 0;
        }
        BaseAndTop
        {
            type            empty;
        }
    }
    
    //k
    
    dimensions      [0 2 -2 0 0 0 0];
    
    internalField   uniform 0.0001;
    
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            intensity       0.05;
            value           $internalField;
        }
    
        walls
        {
            type            kqRWallFunction;
            value           $internalField;
        }
    
        outlet
        {
            type            inletOutlet;
            value           $internalField;
            inletValue      uniform 0;
    
        }
        
        BaseAndTop
        {
            type            empty;
        }
    
        ".*"
        {
            type            inletOutlet;
            inletValue      $internalField;
            value           $internalField;
        }
    }
    
    //nut
    
    dimensions      [0 2 -1 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        walls
        {
            type            nutkWallFunction;
            value           uniform 0;
        }
    
        BaseAndTop
        {
            type            empty;
        }
    
        ".*"
        {
            type            calculated;
            value           uniform 0;
        }
    }
    
    //omega
    
    dimensions      [0 0 -1 0 0 0 0];
    
    internalField   uniform 0.003;
    
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           $internalField;
        }
    
        walls
        {
            type            omegaWallFunction;
            value           $internalField;
        }
    
        outlet
        {
            type            inletOutlet;
            value           $internalField;
            inletValue      uniform 0;
    
        }
    
        BaseAndTop
        {
            type            empty;
        }
    
        ".*"
        {
            type            inletOutlet;
            inletValue      $internalField;
            value           $internalField;
        }
    }
    
    //p_rgh
    
    dimensions      [1 -1 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        atmosphere
        {
            type            totalPressure;
            p0              uniform 0;
        }
    
        inlet
        {
            type            zeroGradient;
        }
    
        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }
        
        BaseAndTop
        {
            type            empty;
        }
           
            
        walls
        {
            type            fixedFluxPressure;
            value           uniform 0;
        }
    }
    
    
    //s
    
    dimensions      [0 0 0 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0;
        }
    
        walls
        {
            type            zeroGradient;
        }
    
        outlet
        {
            type            zeroGradient;
            value           uniform 0;
        }
    
        atmosphere
        {
            type            inletOutlet;
            inletValue      uniform 0;
            value           uniform 0;
        }
    
        BaseAndTop
        {
            type            empty;
        }
    }
    
    //U
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (0 0 0);
    
    boundaryField
    {
        inlet
        {
            type            flowRateInletVelocity;
            volumetricFlowRate constant 50;
        }
    
        walls
        {
            type            noSlip;
        }
    
        atmosphere
        {
            type            pressureInletOutletVelocity;
            value           uniform (0 0 0);
        }
    
        outlet
        {
            type            inletOutlet;
            inletValue      uniform (0 0 0);
            value           $internalField;
        }
        
        BaseAndTop
        {
            type            empty;
        }
    }
    

    第一个迭代是个情况:

    Starting time loop
    
    Courant Number mean: 0.000528922 max: 0.136511
    Interface Courant Number mean: 0 max: 0
    deltaT = 0.0120048
    Time = 0.0120048
    
    PIMPLE: iteration 1
    smoothSolver:  Solving for alpha.water, Initial residual = 1, Final residual = 0.000281706, No Iterations 1000
    Phase-1 volume fraction = 0.00125164  Min(alpha.water) = 0  Max(alpha.water) = 1
    MULES: Correcting alpha.water
    Phase-1 volume fraction = 0.00125164  Min(alpha.water) = -2.54212e-24  Max(alpha.water) = 1
    GAMG:  Solving for p_rgh, Initial residual = 1, Final residual = 2.7816e+83, No Iterations 50
    time step continuity errors : sum local = 3.5015e+80, global = 2.12903e+77, cumulative = 2.12903e+77
    
    

    请问大佬们,这是边界条件的问题吗?

    1 条回复 最后回复
  • 火 离线
    火 离线
    火山口玩泥巴
    写于 最后由 编辑
    #2

    模型是这样的:

    a1e8375a-d2e8-4461-8fde-0fc04f02ed29.png

    1 条回复 最后回复
  • 火 离线
    火 离线
    火山口玩泥巴
    写于 最后由 编辑
    #3

    还有一点疑问,就是初始条件字典里的".*"是不是就是代表上文所有未定义的边界呢?

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

    *代表零个到多个任意字符

    第一步发散应该就是设置问题

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

    火 1 条回复 最后回复
  • 火 离线
    火 离线
    火山口玩泥巴
    在 中回复了 李东岳 最后由 编辑
    #5

    @李东岳 就是类似linux的通配符是吗?谢谢老师。
    设置问题是指初边条件还是离散格式求解设置什么的吗?还是说都有可能的?🙏

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

    边界条件有很大关系。

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

    火 1 条回复 最后回复
  • 火 离线
    火 离线
    火山口玩泥巴
    在 中回复了 李东岳 最后由 编辑
    #7

    @李东岳 好的老师,请问您有什么推荐的介绍openfoam边界条件的文章帖子吗,我找了很多但大多都讲得有些碎片化,不够系统。

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

    边界条件设置比较靠经验。理论跟设置这个中间断层很大。所以你会有碎片化,不够系统的感觉。边界条件这个理论基本看完了之后没啥用。:-)

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

    火 1 条回复 最后回复
  • 火 离线
    火 离线
    火山口玩泥巴
    在 中回复了 李东岳 最后由 编辑
    #9

    @李东岳 好的谢谢老师,课题组只有我一个做这个没有师兄师姐传授经验😢,所以是得多看看文章吗?

    1 条回复 最后回复

  • 登录

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