LES初始速度场设置和壁面函数设置
-
@cccrrryyy
这两天算了一下初始速度场(0 0 0)和有速度的(1 0 0),发现定量的阻力和升力差别不是太大,确实是有初始速度的稳定起来相对快一些。
我现在遇到的主要有两个问题:- 在1w雷诺数下,普通圆柱绕流的阻力系数几乎为1. 据文献来看应该在1.1左右比较正确。3w雷诺数下,阻力系数为1.08左右,相对而言比较可以接受。(两个case的模型一样,用的模型是3w的,也就是说yplus在1w的case下会比较小,大概在0.4-0.5左右)
- 表面有小凹槽的圆柱模型,3w雷诺数下,阻力系数却相对而言达到了1.2(试验和其他文献来看应该有所降低才对)。
综上来看,确实不是yplus的原因。不过我也怀疑是不是我的设置有问题,导致结果有偏差。我这里传上来我的几个文件,如果您有空可否帮我看看什么地方的设置有偏差?
非常感谢!!!
-
文件格式不支持上传,我重新上传了压缩文档。settings.zip
-
圆柱扰流之前在论坛看到也有人算,好像不太容易算准。大略看了一下你的设置,有以下几个问题,按我认为的重要性排列。
1、PIMPLE算法一般我会给至少20个nOuterCorrectors,然后2个nCorrectors。你的虽然是不可压的算例,不过nOuterCorrectors是不是也可以多给一些。现在每一个时间步都达到收敛要求了么?我觉得可以尝试pisoFoam,这样就不用管nOuterCorrectors,但相应的时间步可能需要小一点。
2、当前时间步你的CFL数是多少?
3、速度对流项的格式,LES还是尽量避免迎风吧。迎风总会有些数值耗散,会导致细节上有些地方不准确。中心差分最好,当然前提是网格质量要高,不然太容易发散。
你最好参考一下文献里面别人的设置,同样量级雷诺数下别人的入口条件、格式、网格等等,不然修改起来完全没有方向。 -
看到有人讨论圆柱绕流就很激动。
可是我已经挖了太多坑还没填。关注中,加油。
-
@cccrrryyy 非常感谢您的建议!
-
附上现在1w雷诺数的光滑圆柱绕流的例子的某个时间步的截图,用of里头的monitor监控的residual,我也一直很困惑Uz的曲线不像稳定的样子。
我现在把2个nOuterCorrectors由2提高到5(从31秒开始),算个十秒左右看看结果。 -
目前的时间步库朗数是控制在1.5以下。
-
这个十秒计算过之后,我会把速度对流格式换成中心差分继续跑看看结果是否有改善,到时候再过来更新!
-
-
@random_ran 欢迎吃瓜
-
前排小板凳,
附上现在1w雷诺数的光滑圆柱绕流的例子的某个时间步的截图,用of里头的monitor监控的residual,我也一直很困惑Uz的曲线不像稳定的样子。
为什么关注点再 U_z 不在 残差最大的 p 上投入精力?
我现在把2个nOuterCorrectors由2提高到5(从31秒开始),算个十秒左右看看结果。
这样做的原因是? 为什么是从2到5?而不是其他的数字,比如7?
目前的时间步库朗数是控制在1.5以下。
这个十秒计算过之后,我会把速度对流格式换成中心差分继续跑看看结果是否有改善,到时候再过来更新!
这个是 case 是机密么?如果能简单运行,我也想试试你的 case.
-
@random_ran
问得好!- Uz太抢眼了。我看了下之前算的几个例子,发现p的残差几乎都在0.001这个量级。不知道怎么才能继续降下去?
- 我一开始尝试增加到10个nOuterCorrectors, 发现第4~5个外循环开始残差下降不明显甚至开始上升,No Iteration也几乎为0。 为了节省时间所以设定到5。
PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 0.000154843, Final residual = 2.69652e-07, No Iterations 1 smoothSolver: Solving for Uy, Initial residual = 0.00295664, Final residual = 4.75419e-06, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 0.00438083, Final residual = 8.2538e-06, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00648663, Final residual = 8.19988e-05, No Iterations 4 GAMG: Solving for p, Initial residual = 0.000125942, Final residual = 4.5224e-05, No Iterations 1 time step continuity errors : sum local = 3.53308e-10, global = -1.25279e-13, cumulative = -2.33184e-10 GAMG: Solving for p, Initial residual = 0.000354817, Final residual = 8.87088e-05, No Iterations 1 GAMG: Solving for p, Initial residual = 0.000110154, Final residual = 9.47584e-07, No Iterations 8 time step continuity errors : sum local = 7.40376e-12, global = -2.0947e-13, cumulative = -2.33394e-10 PIMPLE: iteration 2 smoothSolver: Solving for Ux, Initial residual = 1.15813e-06, Final residual = 1.15813e-06, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 1.59673e-05, Final residual = 4.28047e-08, No Iterations 1 smoothSolver: Solving for Uz, Initial residual = 3.989e-05, Final residual = 1.15289e-07, No Iterations 1 GAMG: Solving for p, Initial residual = 0.00371771, Final residual = 8.15447e-05, No Iterations 3 GAMG: Solving for p, Initial residual = 0.000113078, Final residual = 4.60568e-05, No Iterations 1 time step continuity errors : sum local = 3.60026e-10, global = 4.84724e-15, cumulative = -2.33389e-10 GAMG: Solving for p, Initial residual = 0.000230915, Final residual = 6.19172e-05, No Iterations 1 GAMG: Solving for p, Initial residual = 8.10529e-05, Final residual = 8.7777e-07, No Iterations 8 time step continuity errors : sum local = 6.86178e-12, global = 1.42834e-14, cumulative = -2.33375e-10 PIMPLE: iteration 3 smoothSolver: Solving for Ux, Initial residual = 2.91121e-08, Final residual = 2.91121e-08, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 3.97728e-07, Final residual = 3.97728e-07, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 8.90301e-07, Final residual = 8.90301e-07, No Iterations 0 GAMG: Solving for p, Initial residual = 0.000168175, Final residual = 1.98109e-05, No Iterations 1 GAMG: Solving for p, Initial residual = 3.82521e-05, Final residual = 3.82521e-05, No Iterations 0 time step continuity errors : sum local = 2.99032e-10, global = -2.47605e-14, cumulative = -2.33399e-10 GAMG: Solving for p, Initial residual = 4.55083e-05, Final residual = 4.55083e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 4.55083e-05, Final residual = 9.29993e-07, No Iterations 3 time step continuity errors : sum local = 7.27013e-12, global = -1.36329e-15, cumulative = -2.33401e-10 PIMPLE: iteration 4 smoothSolver: Solving for Ux, Initial residual = 1.71081e-09, Final residual = 1.71081e-09, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.12255e-08, Final residual = 2.12255e-08, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 4.28694e-08, Final residual = 4.28694e-08, No Iterations 0 GAMG: Solving for p, Initial residual = 3.37196e-05, Final residual = 3.37196e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.37196e-05, Final residual = 3.37196e-05, No Iterations 0 time step continuity errors : sum local = 2.63599e-10, global = -1.96671e-15, cumulative = -2.33403e-10 GAMG: Solving for p, Initial residual = 3.64374e-05, Final residual = 3.64374e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.64374e-05, Final residual = 6.46133e-07, No Iterations 2 time step continuity errors : sum local = 5.05107e-12, global = 3.57324e-16, cumulative = -2.33402e-10 PIMPLE: iteration 5 smoothSolver: Solving for Ux, Initial residual = 3.81718e-10, Final residual = 3.81718e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 3.41675e-09, Final residual = 3.41675e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 5.30364e-09, Final residual = 5.30364e-09, No Iterations 0 GAMG: Solving for p, Initial residual = 2.63333e-05, Final residual = 2.63333e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 2.63333e-05, Final residual = 2.63333e-05, No Iterations 0 time step continuity errors : sum local = 2.05857e-10, global = 4.08418e-16, cumulative = -2.33402e-10 GAMG: Solving for p, Initial residual = 2.98151e-05, Final residual = 2.98151e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 2.98151e-05, Final residual = 9.1923e-07, No Iterations 1 time step continuity errors : sum local = 7.18597e-12, global = 1.67701e-15, cumulative = -2.334e-10 PIMPLE: iteration 6 smoothSolver: Solving for Ux, Initial residual = 1.86276e-10, Final residual = 1.86276e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.12072e-09, Final residual = 2.12072e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 1.8065e-09, Final residual = 1.8065e-09, No Iterations 0 GAMG: Solving for p, Initial residual = 2.79915e-05, Final residual = 2.79915e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 2.79915e-05, Final residual = 2.79915e-05, No Iterations 0 time step continuity errors : sum local = 2.1882e-10, global = 1.66412e-15, cumulative = -2.33398e-10 GAMG: Solving for p, Initial residual = 3.20665e-05, Final residual = 3.20665e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.20665e-05, Final residual = 7.84955e-07, No Iterations 1 time step continuity errors : sum local = 6.13629e-12, global = 2.44261e-15, cumulative = -2.33396e-10 PIMPLE: iteration 7 smoothSolver: Solving for Ux, Initial residual = 1.86182e-10, Final residual = 1.86182e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 1.67569e-09, Final residual = 1.67569e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 1.11517e-09, Final residual = 1.11517e-09, No Iterations 0 GAMG: Solving for p, Initial residual = 3.13138e-05, Final residual = 3.13138e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.13138e-05, Final residual = 3.13138e-05, No Iterations 0 time step continuity errors : sum local = 2.44792e-10, global = 2.48318e-15, cumulative = -2.33394e-10 GAMG: Solving for p, Initial residual = 3.63778e-05, Final residual = 3.63778e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.63778e-05, Final residual = 7.91691e-07, No Iterations 1 time step continuity errors : sum local = 6.18895e-12, global = 3.12078e-15, cumulative = -2.3339e-10 PIMPLE: iteration 8 smoothSolver: Solving for Ux, Initial residual = 1.92788e-10, Final residual = 1.92788e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.05456e-09, Final residual = 2.05456e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 9.56459e-10, Final residual = 9.56459e-10, No Iterations 0 GAMG: Solving for p, Initial residual = 3.49563e-05, Final residual = 3.49563e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.49563e-05, Final residual = 3.49563e-05, No Iterations 0 time step continuity errors : sum local = 2.73267e-10, global = 3.06099e-15, cumulative = -2.33387e-10 GAMG: Solving for p, Initial residual = 4.11002e-05, Final residual = 4.11002e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 4.11002e-05, Final residual = 7.86332e-07, No Iterations 1 time step continuity errors : sum local = 6.14706e-12, global = 3.60325e-15, cumulative = -2.33384e-10 PIMPLE: iteration 9 smoothSolver: Solving for Ux, Initial residual = 2.26526e-10, Final residual = 2.26526e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.22568e-09, Final residual = 2.22568e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 8.66044e-10, Final residual = 8.66044e-10, No Iterations 0 GAMG: Solving for p, Initial residual = 3.87527e-05, Final residual = 3.87527e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 3.87527e-05, Final residual = 3.87527e-05, No Iterations 0 time step continuity errors : sum local = 3.02945e-10, global = 3.67155e-15, cumulative = -2.3338e-10 GAMG: Solving for p, Initial residual = 4.62632e-05, Final residual = 4.62632e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 4.62632e-05, Final residual = 8.09623e-07, No Iterations 1 time step continuity errors : sum local = 6.32914e-12, global = 4.16309e-15, cumulative = -2.33376e-10 PIMPLE: iteration 10 smoothSolver: Solving for Ux, Initial residual = 2.52859e-10, Final residual = 2.52859e-10, No Iterations 0 smoothSolver: Solving for Uy, Initial residual = 2.63933e-09, Final residual = 2.63933e-09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 8.84599e-10, Final residual = 8.84599e-10, No Iterations 0 GAMG: Solving for p, Initial residual = 4.41963e-05, Final residual = 4.41963e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 4.41963e-05, Final residual = 4.41963e-05, No Iterations 0 time step continuity errors : sum local = 3.455e-10, global = 4.12535e-15, cumulative = -2.33372e-10 GAMG: Solving for p, Initial residual = 5.2893e-05, Final residual = 5.2893e-05, No Iterations 0 GAMG: Solving for p, Initial residual = 5.2893e-05, Final residual = 8.16536e-07, No Iterations 1 time step continuity errors : sum local = 6.38319e-12, global = 4.56977e-15, cumulative = -2.33367e-10 smoothSolver: Solving for k, Initial residual = 0.000235852, Final residual = 4.67513e-07, No Iterations 1
- 现在这边的例子是光滑圆柱,如果要算看看很高兴分享。(how)
-
Uz太抢眼了。
不知道坐标系是如何定义?
我看了下之前算的几个例子,发现p的残差几乎都在0.001这个量级。
非常有意思的问题,我之前没怎么考虑过 压力 残差的取值问题。我也好好思考一下。
不知道怎么才能继续降下去?
减小时间步长?提高收敛准则?或者优化网格形态?...
我一开始尝试增加到10个nOuterCorrectors, 发现第4~5个外循环开始残差下降不明显甚至开始上升,No Iteration也几乎为0。 为了节省时间所以设定到5。
我之前也一直在用 piso, 不过是默认值,没有动,我得好好看看 piso 算法再来回答你的问题。
现在这边的例子是光滑圆柱,如果要算看看很高兴分享。(how)
-
我记得论坛里有人分享过 *.zip 包含算例和运行脚本,简单点的办法就是做相同的事情
-
稍微难一点的是可以把楼主的 case 文件,在层主的 compute 仓库下
caseIdoNotUnderstand
然后我们一起来 hack.
-
-
@random_ran
我上传了case在google drive , 点击链接!(github 文件太大,我放弃了...)
晚些我会更新一下最近算的这个case的结果。 -
楼主 mesh 太大了,我把设置文件拷贝下来,打算用很小的脚本来生成圆柱网格.
这样的话,别人可以更方便地帮助你.
我们就可以一起讨论了.
-
@random_ran这个mesh是用ICEM生成的,我已经转化到openfoam了。
你真的太nice了!!!! -
@hoversoar 台兄过奖了。我只是好奇罢了。自己玩的很杂,可是遇到能一起玩的,实在不易,所以慢慢来。我在找 of 的脚本,自动生成。最好简单可控,小 mesh 大家可以互相交流,大 mesh 大家自己留着做研究就好。
-
今天才把case文件整理了一下,下一步找合适的网格.
@东岳 岳兄过奖了.
@hoversoar 今天才整理了一下你的 case.乃有新发现的话留言在这,大家都能看到,或者帮助你,我只能尽力,还是要靠氖自己的.
-
@random_ran 非常感谢!慢慢会成长的哈哈哈
-
上次算到step2的中心差分的50.5s处,说可能会阻力又下降。
那之后我把它继续算到了59.5s,然后速度对流项的linear换到了limitedLinear。把结果贴上来一下。
几个发现:
- 整体看起来的话,三个阶段的定量CdCl差距不是很大。和文献也对的比较上。初步认定是速度对流项选择了迎风格式造成的。
- 跟之前的猜想有关,在55s处残差的Uy震荡明显,造成了Cd上升,Cl振幅也增大。
- 换成limitedLinear 0.5 之后,可以发现残差有明显的下降。@random_ran 是否可以回答前面的问题,虽然P的量级并没有发生变化。但是Uz的曲线震荡明显(相比中心差分),猜想可能是由于TVD 里头那个0.5造成的,混入了一部分迎风格式,造成耗散?
一些疑问:
- 我这样中途切换差分格式是否ok?
- 这个网格是纯结构化的光滑圆柱,但是如果是非结构化质量并没有那么高的情况下,TVD的系数应该怎么取?可能要参考经验感觉来试?
下一步:
根据@cccrrryyy 的建议,和疑问中的1点。
我把这个case在limitedlinear 0.5的条件下,从头开始算。并且将pimple改为piso,步长缩小,并控制CFL小于0.8。且看结果。
good night