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. 在运行过程中Courant Number突然变大很多倍导致模拟发散,这是为什么呢?

在运行过程中Courant Number突然变大很多倍导致模拟发散,这是为什么呢?

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

    各位老师同学大家好,我现在在运行一个模拟,在模拟的过程中出现了以下报错:

    Time = 8.34459
    
    Courant Number mean: 0.00149812 max: 1.90051
    smoothSolver:  Solving for Ux, Initial residual = 0.0914128, Final residual = 4.03307e-06, No Iterations 6
    smoothSolver:  Solving for Uy, Initial residual = 0.116317, Final residual = 4.73709e-06, No Iterations 7
    smoothSolver:  Solving for Uz, Initial residual = 0.140183, Final residual = 4.1816e-06, No Iterations 8
    Pressure gradient source: uncorrected Ubar = 0.056814, pressure gradient = 1279.18
    GAMG:  Solving for p, Initial residual = 0.0866448, Final residual = 0.00785603, No Iterations 2
    time step continuity errors : sum local = 4.49765e-06, global = -3.85726e-06, cumulative = -9.48652e-06
    Pressure gradient source: uncorrected Ubar = 0.0571471, pressure gradient = 1245.86
    GAMG:  Solving for p, Initial residual = 0.0145691, Final residual = 7.22072e-07, No Iterations 10
    time step continuity errors : sum local = 4.85089e-10, global = -5.57637e-11, cumulative = -9.48658e-06
    Pressure gradient source: uncorrected Ubar = 0.0578682, pressure gradient = 1173.73
    ExecutionTime = 57314.4 s  ClockTime = 57674 s
    
    Time = 8.3446
    
    Courant Number mean: 0.00199659 max: 2.63028
    smoothSolver:  Solving for Ux, Initial residual = 0.117271, Final residual = 4.41292e+10, No Iterations 1000
    smoothSolver:  Solving for Uy, Initial residual = 0.151209, Final residual = 1.72604e+11, No Iterations 1000
    smoothSolver:  Solving for Uz, Initial residual = 0.196965, Final residual = 5.62502e+11, No Iterations 1000
    Pressure gradient source: uncorrected Ubar = 1.59814e+11, pressure gradient = -1.59872e+16
    GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0855593, No Iterations 1
    time step continuity errors : sum local = 1.0959e+08, global = 6.17828e+07, cumulative = 6.17828e+07
    Pressure gradient source: uncorrected Ubar = 7.1484e+10, pressure gradient = -7.151e+15
    GAMG:  Solving for p, Initial residual = 0.491208, Final residual = 8.042e-07, No Iterations 13
    time step continuity errors : sum local = 1836.7, global = -208.498, cumulative = 6.17826e+07
    Pressure gradient source: uncorrected Ubar = -5.58949e+10, pressure gradient = 5.59152e+15
    ExecutionTime = 57314.8 s  ClockTime = 57674 s
    
    Time = 8.34461
    
    Courant Number mean: 2.96516e+09 max: 8.66454e+12
    
    

    Courant Number突然变大了很多倍导致模拟发散,这是什么原因呢?

    我在网上查到了造成这种问题的几种原因:

    1. 网格太小。但是我增大了网格后还是在这个时间点发散,所以应该不是网格大小的问题。
    2. 时间步长太大。我尝试减小为原来步长的1/100,结果还是发散。
    3. 边界条件的问题。以下是我的压力边界条件,但是不知道怎么调整,因为是按照论文上的边界条件设置的。
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0.0001;
    
        }
    
        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }
    
        bottom
        {
            type            zeroGradient;
        }
        
        top
        {
            type            zeroGradient;
        }
    
        particles
        {
            type            zeroGradient;
        }
    
        leftCyclic
        {
            type            cyclic;
        }
    
        rightCyclic
        {
            type            cyclic;
        }
    }
    

    希望大家给出一些指导,非常感谢!

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

    时间步长太大。我尝试减小为原来步长的1/100,结果还是发散。

    log贴上我看看

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

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

    @李东岳
    李老师,我搞错了!

    这个是原始时间步长0.00001,我把步长调整到0.000001后模拟的24小时后服务器自动停止了,模拟到了大概1.2还没有报错。

    我把网格大小调整到原来的2倍时,时间步长还是0.00001,模拟到了6.43259停止了

    Time = 6.43258
    
    Courant Number mean: 0.000543753 max: 6.7715
    smoothSolver:  Solving for Ux, Initial residual = 0.231482, Final residual = 9.69966e-06, No Iterations 126
    smoothSolver:  Solving for Uy, Initial residual = 0.25902, Final residual = 9.38213e-06, No Iterations 132
    smoothSolver:  Solving for Uz, Initial residual = 0.186149, Final residual = 9.45433e-06, No Iterations 103
    Pressure gradient source: uncorrected Ubar = 0.790879, pressure gradient = -71278.3
    GAMG:  Solving for p, Initial residual = 0.917227, Final residual = 0.0727314, No Iterations 3
    time step continuity errors : sum local = 0.000216653, global = 0.000125143, cumulative = 0.000121947
    Pressure gradient source: uncorrected Ubar = 0.842221, pressure gradient = -76413.3
    GAMG:  Solving for p, Initial residual = 0.0794726, Final residual = 9.42094e-07, No Iterations 11
    time step continuity errors : sum local = 1.40897e-08, global = 1.34162e-09, cumulative = 0.000121948
    Pressure gradient source: uncorrected Ubar = 0.882042, pressure gradient = -80396
    ExecutionTime = 17324 s  ClockTime = 28958 s
    
    Time = 6.43259
    
    Courant Number mean: 0.0154029 max: 158.928
    
    

    谢谢李老师!

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

    你这个看起来就是发散了,需要更深层次的debug,我目前来看就是Co比较大

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

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

    @李东岳

    李老师好,我的算例设置如下,也非常简单:

    1. 压力边界条件设置:
    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0.0001;
        }
        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }
        bottom
        {
            type            zeroGradient;
        }
        top
        {
            type            zeroGradient;
        }
        particles
        {
            type            zeroGradient;
        }
        leftCyclic
        {
            type            cyclic;
        }
        rightCyclic
        {
            type            cyclic;
        }
    }
    
    1. 速度边界条件设置:
    boundaryField
    {
        inlet
        {
            type            zeroGradient;
        }
        outlet
        {
            type            zeroGradient;
        }
        bottom
        {
            type            noSlip;
        }
        top
        {
            type            noSlip;
        }
        particles
        {
            type            noSlip;
        }
        leftCyclic
        {
            type            cyclic;
        }
        rightCyclic
        {
            type            cyclic;
        }
    }
    

    也就是rightCyclic和leftCyclic设置的是周期性边界条件,在inlet和outlet方向上由压力驱动,算例的计算域如下:
    dis.png

    李老师能不能给个debug的方向,现在比较迷茫,不知道从哪下手!

    谢谢李老师!

    1 条回复 最后回复
  • M 离线
    M 离线
    msm
    写于 最后由 编辑
    #6

    你好,请问一下您解决了吗?是什么原因造成的

    1 条回复 最后回复
  • zzkluckZ 离线
    zzkluckZ 离线
    zzkluck
    写于 最后由 编辑
    #7

    这其实是个常见问题。按我的理解,不是Courant Number突然变大很多倍导致模拟发散,而是速度求解先崩掉了导致Courant Number跟着增大,然后速度就更崩了,然后恶行循环。从崩溃的时间步往前看日志,应该能观察到Courant Number持续增大。

    1 条回复 最后回复
  • A 在线
    A 在线
    Amadeus 神
    写于 最后由 编辑
    #8

    考虑是不是网格质量太差了? 楼上说法很有道理

    博士在读,欢迎探讨,共同进步!

    1 条回复 最后回复

  • 登录

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