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. 极低雷诺数下,PIMPLE迭代初始残差保持为1,降不下来

极低雷诺数下,PIMPLE迭代初始残差保持为1,降不下来

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

    请教各位!!李老师说,扩散项增加对角占优,有助于收敛。那如果雷诺数给极低,理论上会出现什么问题吗?

    我使用pimpleFoam+动网格计算一竖排圆柱(直径为d,间距为10d)从静止开始加速平动,雷诺数给1e-3(基于d)。5个圆柱及以下,计算正常;9个圆柱及以上,计算出现问题(增大雷诺数至1e-2则可正常计算)。相邻圆柱的网格是对称的,增加圆柱个数其实单纯增加网格量而已。
    mesh.png

    症状:

    • 圆柱数量多的情况,每次PIMPLE迭代(nOuterCorrectors)的压力方程初始残差降不下来也不发散
    Courant Number mean: 2.398253992e-06 max: 0.0215123576
    deltaT = 0.04
    Time = 6.7
    
    PIMPLE: iteration 1
    DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.09682197649, No Iterations 82
    DICPCG:  Solving for pcorr, Initial residual = 0.09688756857, Final residual = 0.00927208952, No Iterations 82
    DICPCG:  Solving for pcorr, Initial residual = 0.01741032791, Final residual = 0.00171820424, No Iterations 86
    DICPCG:  Solving for pcorr, Initial residual = 0.002315321063, Final residual = 0.0002293036835, No Iterations 341
    DICPCG:  Solving for pcorr, Initial residual = 0.0005365215345, Final residual = 9.975987647e-10, No Iterations 791
    time step continuity errors : sum local = 1.735383521e-22, global = 6.725543895e-25, cumulative = 3.656703828e-10
    GAMG:  Solving for p, Initial residual = 0.9443291304, Final residual = 0.002194485674, No Iterations 3
    GAMG:  Solving for p, Initial residual = 0.001947671658, Final residual = 1.846802379e-05, No Iterations 35
    GAMG:  Solving for p, Initial residual = 7.588154638e-05, Final residual = 7.535974383e-07, No Iterations 40
    GAMG:  Solving for p, Initial residual = 4.120836164e-06, Final residual = 4.025364261e-08, No Iterations 50
    GAMG:  Solving for p, Initial residual = 7.005626725e-07, Final residual = 6.534878288e-09, No Iterations 45
    time step continuity errors : sum local = 6.700624174e-17, global = 1.044778689e-17, cumulative = 3.656703932e-10
    GAMG:  Solving for p, Initial residual = 0.955093981, Final residual = 0.002181673685, No Iterations 3
    GAMG:  Solving for p, Initial residual = 0.001764171308, Final residual = 1.648106932e-05, No Iterations 35
    GAMG:  Solving for p, Initial residual = 7.35621349e-05, Final residual = 7.223433176e-07, No Iterations 42
    GAMG:  Solving for p, Initial residual = 3.059263044e-06, Final residual = 3.023418303e-08, No Iterations 62
    GAMG:  Solving for p, Initial residual = 3.427802208e-07, Final residual = 9.5003603e-10, No Iterations 84
    time step continuity errors : sum local = 9.859629733e-18, global = -1.244226379e-18, cumulative = 3.65670392e-10
    PIMPLE: iteration 2
    ...
    PIMPLE: iteration 29
    GAMG:  Solving for p, Initial residual = 0.9411617368, Final residual = 0.00215235933, No Iterations 3
    GAMG:  Solving for p, Initial residual = 0.001918610458, Final residual = 1.812341162e-05, No Iterations 35
    GAMG:  Solving for p, Initial residual = 7.116434841e-05, Final residual = 6.94389095e-07, No Iterations 43
    GAMG:  Solving for p, Initial residual = 3.125063719e-06, Final residual = 3.121354786e-08, No Iterations 60
    GAMG:  Solving for p, Initial residual = 3.47115616e-07, Final residual = 3.269278386e-09, No Iterations 53
    time step continuity errors : sum local = 3.261140983e-17, global = 4.05973866e-18, cumulative = 3.656704773e-10
    GAMG:  Solving for p, Initial residual = 0.9520350913, Final residual = 0.00217738456, No Iterations 3
    GAMG:  Solving for p, Initial residual = 0.001759034352, Final residual = 1.660230344e-05, No Iterations 35
    GAMG:  Solving for p, Initial residual = 7.423394075e-05, Final residual = 7.303987078e-07, No Iterations 42
    GAMG:  Solving for p, Initial residual = 3.089411582e-06, Final residual = 3.055292623e-08, No Iterations 62
    GAMG:  Solving for p, Initial residual = 3.343358255e-07, Final residual = 9.575916541e-10, No Iterations 84
    time step continuity errors : sum local = 9.662150084e-18, global = -1.230822196e-18, cumulative = 3.65670476e-10
    

    n21_re0.001.png

    • 流场明显发散了
      p.png
      u.png

    分析:

    • 试过修改离散格式,问题可能不在于此。时间项改用backward不影响;对流项采用linear或linearUpwind没有区别(毕竟对流项太弱);扩散项用的corrected;梯度项用linear或leastSquares(或加上限制器)都不影响其发散。
    ddtSchemes
    {
        default         Euler;
    }
    
    gradSchemes
    {
        default         cellMDLimited leastSquares 0.5;
    }
    
    divSchemes
    {
        default         none;
        div(phi,U)      bounded Gauss linearUpwind grad(U);
        div((nuEff*dev2(T(grad(U))))) Gauss linear;
    }
    
    laplacianSchemes
    {
        default         Gauss linear corrected;
    }
    
    • 试过修改计算域及边界条件,问题可能不在于此。计算域给10000d或更大,至少在初始运动阶段,该域是足够大的,但是都会很快发散。边界条件可动的地方也不多,把壁面p从零梯度改为fixedFluxPressure没用
    # U
        "cylinder.*"
        {
            type            movingWallVelocity;
            value           uniform (0 0 0);
        }
    
        "(up|bottom|inlet|outlet)"
        {
            type            pressureInletOutletVelocity;
            value                   uniform (0 0 0);
        }
    
    # p
        "cylinder.*"
        {
            type            fixedFluxPressure;
            //type            zeroGradient;
            value			uniform 0;
        }
        
        "(up|bottom|inlet|outlet)"
        {
            type            outletInlet;
            outletValue 	 uniform 0;
        }
    
    • 时间步长,迭代次数精度等,都修改过,也不影响其最终发散
    solvers
    {
        p
        {
            solver          GAMG;
            smoother        GaussSeidel;
            tolerance       1e-09;
            relTol          0.1;
        }
        pFinal
        {
            solver          GAMG;
            smoother        GaussSeidel;
            tolerance       1e-09;
            relTol          0;
        }
        pcorr
        {
            solver          PCG;
            smoother        GaussSeidel;
            tolerance       1e-09;
            relTol          0.1;
            preconditioner  DIC;
        }
        pcorrFinal
        {
            solver          PCG;
            smoother        GaussSeidel;
            tolerance       1e-09;
            relTol          0;
            preconditioner  DIC;
        }
    }
    
    PIMPLE
    {
        momentumPredictor off;
        correctPhi      yes;
        nOuterCorrectors 500;
        nCorrectors     2;
        nNonOrthogonalCorrectors 4;
        ddtCorr         true;
        residualControl
        {
            p
            {
                tolerance       1e-08;
                relTol          0;
            }
        }
    }
    
    relaxationFactors
    {
        equations
        {
            ".*"            1;
        }
    }
    
    • 网格。从流场上看,跟网格关系很大。但按理说低雷诺数计算对网格并不敏感,而且网格质量不差(平均non-orthogonality只6.5),网格非正交修正也都收敛了。雷诺数高一点能算,少几个圆柱也能算。

    这里面有没有隐含着什么低雷诺数计算的理论缺陷呢?

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

    把你的动量预测关掉看一下。

    我最近在美国,更深入的讨论得回法国之后的。

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

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

    @李东岳 感谢老师回复!动量预测是关掉了的。

    打开试了试,步长极小,残差也一直保持在一个值不下降,cumulative则很大,如下:

    Courant Number mean: 7.953414508e-05 max: 0.4993036972
    deltaT = 4.979675437e-35
    Time = 6.00001e-05
    
    PIMPLE: iteration 1
    DICPCG:  Solving for pcorr, Initial residual = 1, Final residual = 0.04941709914, No Iterations 29
    DICPCG:  Solving for pcorr, Initial residual = 0.03122316034, Final residual = 0.001556737496, No Iterations 121
    DICPCG:  Solving for pcorr, Initial residual = 0.006804280077, Final residual = 0.0003314734696, No Iterations 359
    DICPCG:  Solving for pcorr, Initial residual = 0.002308369425, Final residual = 9.709852492e-11, No Iterations 911
    time step continuity errors : sum local = 1.793718362e-20, global = 1.178518414e-23, cumulative = 1.037419916e+19
    smoothSolver:  Solving for Ux, Initial residual = 3.985498772e-05, Final residual = 2.227155701e-11, No Iterations 1
    smoothSolver:  Solving for Uy, Initial residual = 6.302253167e-05, Final residual = 2.385619185e-11, No Iterations 1
    GAMG:  Solving for p, Initial residual = 0.004038713667, Final residual = 0.0001722133227, No Iterations 18
    GAMG:  Solving for p, Initial residual = 0.0005583071565, Final residual = 2.673668049e-05, No Iterations 34
    GAMG:  Solving for p, Initial residual = 9.485975434e-05, Final residual = 4.53317788e-06, No Iterations 33
    GAMG:  Solving for p, Initial residual = 2.596708738e-05, Final residual = 1.231466526e-06, No Iterations 38
    time step continuity errors : sum local = 7.929103562e-15, global = -8.302368146e-16, cumulative = 1.037419916e+19
    GAMG:  Solving for p, Initial residual = 0.003717218882, Final residual = 0.000164557501, No Iterations 17
    GAMG:  Solving for p, Initial residual = 0.0005378364039, Final residual = 2.53035408e-05, No Iterations 34
    GAMG:  Solving for p, Initial residual = 9.265726415e-05, Final residual = 4.535601234e-06, No Iterations 36
    GAMG:  Solving for p, Initial residual = 2.556961887e-05, Final residual = 9.918214454e-11, No Iterations 548
    time step continuity errors : sum local = 6.482264028e-19, global = 6.603865839e-20, cumulative = 1.037419916e+19
    PIMPLE: iteration 2
    ...
    PIMPLE: iteration 50
    smoothSolver:  Solving for Ux, Initial residual = 1.226945138e-10, Final residual = 6.6691269e-16, No Iterations 1
    smoothSolver:  Solving for Uy, Initial residual = 1.651845516e-10, Final residual = 3.177048458e-16, No Iterations 1
    GAMG:  Solving for p, Initial residual = 0.000949721577, Final residual = 4.516299707e-05, No Iterations 41
    GAMG:  Solving for p, Initial residual = 0.0004457930337, Final residual = 2.206483819e-05, No Iterations 23
    GAMG:  Solving for p, Initial residual = 7.977007558e-05, Final residual = 3.747481321e-06, No Iterations 36
    GAMG:  Solving for p, Initial residual = 2.418915618e-05, Final residual = 1.162060008e-06, No Iterations 48
    time step continuity errors : sum local = 7.482194647e-15, global = -7.221446192e-16, cumulative = 1.037419916e+19
    GAMG:  Solving for p, Initial residual = 0.003705959955, Final residual = 0.0001646823634, No Iterations 17
    GAMG:  Solving for p, Initial residual = 0.0005377574684, Final residual = 2.535476181e-05, No Iterations 34
    GAMG:  Solving for p, Initial residual = 9.241219827e-05, Final residual = 4.525895839e-06, No Iterations 36
    GAMG:  Solving for p, Initial residual = 2.542969083e-05, Final residual = 9.774400044e-11, No Iterations 548
    time step continuity errors : sum local = 6.388632178e-19, global = 6.502735317e-20, cumulative = 1.037419916e+19
    PIMPLE: not converged within 50 iterations
    ExecutionTime = 21923.2 s  ClockTime = 21963 s
    
    Courant Number mean: 7.964991508e-05 max: 0.4989139005
    deltaT = 4.99051583e-35
    Time = 6.00001e-05
    

    看到站内其它的帖子,试了试有量纲/无量纲计算(此前圆柱直径0.05,nu=50;改为圆柱直径0.0005,nu=0.5),也无法收敛。

    走投无路试了一下StarCCM,多低雷诺数都能算,和OpenFOAM那些能收敛的算例比得还贼好

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

    今天才看到这个消息。不知道后来debug的怎么样了。

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

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

    @李东岳 最后还是没搞明白咋回事,怀疑是动网格不能用来算很低雷诺数的情况,外边界条件可能不匹配

    假如圆柱不动,多低雷诺数(甚至拿掉对流项)应该都可以算吧

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

    你上次发帖子的时候我刚办完课,然后去美国了。
    这次回帖子的时候我下周要回国办课了。
    两次都赶上我要么出国,要么回国。4月中旬从英国回来,或许可以给你看看。

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

    L 1 条回复 最后回复
  • L 离线
    L 离线
    lwjetmann
    在 中回复了 李东岳 最后由 编辑
    #7

    @李东岳 感觉这个问题挺有意义的,肯定可以从原理上说清楚为啥发散。给的是一个极大的单块网格平动(入口速度零,零法向压力梯度;出口压力零,零速度梯度),一直调不出来就放弃了,可能雷诺数低到某个程度,就不能靠放大计算域来使边界条件匹配了。

    祝李老师上课愉快!

    1 条回复 最后回复

  • 登录

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