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 -
Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology front 42924 43120 ok (non-closed singly connected) back 42924 43120 ok (non-closed singly connected) cylinderwalls 11564 11760 ok (non-closed singly connected) inlet 5782 5940 ok (non-closed singly connected) outlet 5782 5940 ok (non-closed singly connected) Checking geometry... Overall domain bounding box (-1.9999997 -1.9999999 -0.16500001) (1.9999997 1.9999999 0.16500001) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (1.6166424e-16 9.3817059e-18 -4.6447921e-15) OK. Max cell openness = 1.2635419e-15 OK. Max aspect ratio = 103.67801 OK. Minimum face area = 9.5109381e-08. Maximum face area = 0.0011336842. Face area magnitudes OK. Min volume = 5.3196771e-10. Max volume = 6.3409456e-06. Total volume = 4.1415295. Cell volumes OK. Mesh non-orthogonality Max: 2.405209 average: 0.4164805 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.12001675 OK. Coupled point location match (average 0) OK. Mesh OK.
贴一下现在这个mesh的check结果和样子。
-
上次算到step2的中心差分的50.5s处,说可能会阻力又下降。
建议楼主定一个准则.比如计算了 N 个 Vortex Shedding 周.之后又计算了 2N 个周期,然后比较一下所感兴趣的物理量.
那之后我把它继续算到了59.5s,然后速度对流项的linear换到了
limitedLinear。把结果贴上来一下。不清楚楼主研究的重点是?层主个人来说,是很好奇, linear -> limitedLinear 的区别.
整体看起来的话,三个阶段的定量CdCl差距不是很大。和文献也对的比较上。
初 步认定是速度对流项选择了迎风格式造成的。跟之前的猜想有关,在55s处残
差的Uy震荡明显,造成了Cd上升,Cl振幅也增大. 换成limitedLinear 0.5 之后,
可以发现残差有明显的下降。不知楼主有没有对这些格式的比较?
UDS 对网格要求更高.
"Peaks or rapid variations in the variables will be smeared out and,
because the rate of error reduction is only first order,
very fine grids are required to obtain accurate solutions."楼主还可以探索一下这些:
- Linear Interpolation (CDS)
- Quadratic Upwind Interpolation (QUICK)
- Higher-Order Schemes
@random_ran 是否可以回答前面的问题,虽然P的量级并没有发生变化。但是Uz
的曲线震荡明显(相比中心差分),猜想可能是由于TVD 里头那个0.5造成的,
混入了一部分迎风格式,造成耗散?我没法准确回答你,因为我自己没有太多探索过.
我这样中途切换差分格式是否ok?
为什么不可以?如果是研究格式的问题,我可能也会这么做,省很多时间.但是如果是分析流体机理,最好从头开始用一种固定格式.