极低雷诺数下,PIMPLE迭代初始残差保持为1,降不下来
-
请教各位!!李老师说,扩散项增加对角占优,有助于收敛。那如果雷诺数给极低,理论上会出现什么问题吗?
我使用pimpleFoam+动网格计算一竖排圆柱(直径为d,间距为10d)从静止开始加速平动,雷诺数给1e-3(基于d)。5个圆柱及以下,计算正常;9个圆柱及以上,计算出现问题(增大雷诺数至1e-2则可正常计算)。相邻圆柱的网格是对称的,增加圆柱个数其实单纯增加网格量而已。
症状:
- 圆柱数量多的情况,每次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
- 流场明显发散了
分析:
- 试过修改离散格式,问题可能不在于此。时间项改用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),网格非正交修正也都收敛了。雷诺数高一点能算,少几个圆柱也能算。
这里面有没有隐含着什么低雷诺数计算的理论缺陷呢?
-
@李东岳 感谢老师回复!动量预测是关掉了的。
打开试了试,步长极小,残差也一直保持在一个值不下降,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那些能收敛的算例比得还贼好