在运行过程中Courant Number突然变大很多倍导致模拟发散,这是为什么呢?
-
各位老师同学大家好,我现在在运行一个模拟,在模拟的过程中出现了以下报错:
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/100,结果还是发散。
- 边界条件的问题。以下是我的压力边界条件,但是不知道怎么调整,因为是按照论文上的边界条件设置的。
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; } }
希望大家给出一些指导,非常感谢!
-
@李东岳
李老师,我搞错了!这个是原始时间步长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
谢谢李老师!
-
李老师好,我的算例设置如下,也非常简单:
- 压力边界条件设置:
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; } }
- 速度边界条件设置:
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方向上由压力驱动,算例的计算域如下:
李老师能不能给个debug的方向,现在比较迷茫,不知道从哪下手!
谢谢李老师!