@Zhy2022 我之前稳定了之后从1调到过5和10,结果没什么区别。仅供参考。
hoversoar
帖子
-
-
重新画了mesh,模型改成了sst。Re 5w
结果更奇怪了,直接算不下去。下图无量纲时间步
现在mesh的y+平均1.5,max 3,min0.11。应该是没什么问题,质量也很高。
上下cyclicAMI边界,圆形流域,spanwise piD。
没想到一个RANS花了这么多天还没算好。。
有大佬能帮我看看么k
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.0021; boundaryField { front { type cyclicAMI; value uniform 0.0021; } back { type cyclicAMI; value uniform 0.0021; } inlet { type fixedValue; value uniform 0.0021; } outlet { type inletOutlet; inletValue internalField; value $internalField; } cylinderwalls { type kqRWallFunction; value uniform 0.0021; } }
omega
dimensions [ 0 0 -1 0 0 0 0 ]; internalField uniform 10.9; boundaryField { cylinderwalls { type omegaWallFunction; value $internalField; } front { type cyclicAMI; } back { type cyclicAMI; } inlet { type fixedValue; value uniform 10.9; } outlet { type inletOutlet; inletValue internalField; value $internalField; } }
nut
dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type calculated; value uniform 0; } outlet { type calculated; value uniform 0; } cylinderwalls { type nutkWallFunction; value uniform 0; } front { type cyclicAMI; } back { type cyclicAMI; } }
p
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { front { type cyclicAMI; value uniform 0; } back { type cyclicAMI; value uniform 0; } inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } cylinderwalls { type zeroGradient; } }
U
dimensions [0 1 -1 0 0 0 0]; internalField uniform (7.5 0 0); boundaryField { front { type cyclicAMI; value uniform (7.5 0 0); } back { type cyclicAMI; value uniform (7.5 0 0); } inlet { type fixedValue; value uniform (7.5 0 0); } outlet { type zeroGradient; } cylinderwalls { type fixedValue; value uniform (0 0 0); } }
fvscheme
ddtSchemes { default backward; } gradSchemes { default Gauss linear; grad(p) Gauss linear; grad(U) Gauss linear; } divSchemes { default none; div(phi,U) Gauss limitedLinearV 0.5; div(phi,k) Gauss limitedLinear 1; div(phi,omega) Gauss limitedLinear 1; div(phi,R) Gauss limitedLinear 1; div(R) Gauss linear; div(phi,B) Gauss limitedLinear 1; div(B) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; interpolate(U) linear; } snGradSchemes { default corrected; } fluxRequired { default no; p; Phi; }
fvsolution
solvers { p { solver GAMG; tolerance 1e-04; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 200; agglomerator faceAreaPair; mergeLevels 1; } pFinal { solver GAMG; tolerance 1e-06; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 200; agglomerator faceAreaPair; mergeLevels 1; } "(U|k|nut|omega)" { solver PBiCG; preconditioner DILU; tolerance 1e-05; relTol 0; } "(U|k|nut|omega)Final" { $U; tolerance 1e-06; relTol 0; } } PIMPLE { nOuterCorrectors 3; nCorrectors 2; nNonOrthogonalCorrectors 1; pRefCell 0; pRefValue 0; }
-
更新一下
算了300个无量纲时间步,Cd-0.6,Clrms-0.31.
在15w雷诺数的时候应该还没有到临界,Cd应该在1-1.2的量级。
不知道是不是y+在背风面过小的问题(2.5左右)。
我加大了第一层网格,0.03D重新算。 -
之前一直用LES, 现在尝试RANS,有一些问题希望和大家探讨一下。
现在再算的算例基本概况:三维圆柱绕流,雷诺数15w,现在采用RNG k-epsilon模型,结构化网格质量较高。
虽然刚算了一会但是对于RANS的y+取值有一些困惑。- 网上基本上是说k-e模型的y+在30-200之间最好,要大于11。这个数值是针对的最大值,最小值,还是平均值呢?
查看了最近的时间步的y+,数值如下。可以看到最小值和最大值差的很远,最小值也是落在了粘性底层的范围内。(个人认为可能小范围的偏差不要紧,只要平均值满足即可,于是我查看了y+的分布)
Patch 2 named cylinderwalls y+ : min: 2.63471 max: 66.0352 average: 37.2911
y+分布如下。来流为x+方向。可以看到分离之后大片区域是在10以下的。
一开始打算算的是5w的例子,结果发现用该湍流模型min y+很难增大到所谓的30。 于是同时调整了雷诺数和网格厚度,现在的网格首层已经达到0.01D和15w雷诺,觉得已经很粗糙了。可是y+结果还是偏差比较大。
- 采用k-e算例是会使得y+难以增大到11以上吗,还是所谓的高雷诺数指的是相当量级的值(譬如50w)?
附上现在的算例文档,有感兴趣的同学可以一起探讨下。suanli.zip
-
我后来的做法是将网格做到y+<1,然后不采用壁面函数,k方程壁面边界条件为kqRwallFuction, omega边界条件为omegaWallFuction, nut边界条件为nutkWallFunction
另外,我觉得将网格做到y+>30,然后指定壁面函数也是可以的同样有疑问,指定了k w 和nut 的边界条件不就是采用了壁面函数吗?
还是说壁面函数有什么另外的指定方法?
(还是我认知错误) -
@random_ran OK 感谢! 很好的分享!
-
鼓掌,斯国一。非常感谢你的分享。
结果看来是对流格式得影响最大。
我之前对Re1w的圆柱绕流也是进行了很多尝试,主要是对流项的。为什么你这边要用linearUpwind作为基准呢?
我的网格质量由于不能做到很好,所以尝试的是limitedLinear,以及调整后面的参数。分别用了0.2,0.5和1。 但是后面的系数1的话重视安定性。0的话重视精度,如果在质量很好的网格下,0的结果应该是接近语linear的。
所以个人觉得并不是要避免使用limitedLinear模型,在网格质量不是太好的情况下,大家可以尝试这个系数的调整来达到精度和安定的平衡。(一点拙见) -
@红豆沙 你是不能计算还是啥问题啊。 你导进去OF里头试看看。
-
@kisssinger 看运行了几个核就知道有没有在运行了。或者terminal 打top查看。
-
报告一下,之前也算过dynamicKEqn并没有问题,检查了老半天。拿到之前另一个电脑算就可以运行。。
在这个报错的of5的电脑上安装了of7,现在可以顺利地运行了。 -
@hoversoar 应该是滤波的问题? 还不确定为什么会产生...
-
请问这个滤波为什么会报错有什么结果吗? 我现在也碰到报错了,但是其他mesh又可以用,在怀疑是不是mesh的问题?
-
尝试把湍流模型从kEqn换成了dynamicKEqn,结果报了错。没看懂,有大佬能帮我解释一下吗..
[10] #0 Foam::error::printStack(Foam::Ostream&)[12] #0 Foam::error::printStack(Foam::Ostream&)[13] #0 [7] #0 Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)[3] #0 [11] #0 Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&) at ??:? [12] #1 Foam::sigFpe::sigHandler(int) at ??:? at ??:? [11] #1 Foam::sigFpe::sigHandler(int)[10] #1 Foam::sigFpe::sigHandler(int) at ??:? [3] #1 Foam::sigFpe::sigHandler(int) at ??:? [13] #1 Foam::sigFpe::sigHandler(int) at ??:? [7] #1 Foam::sigFpe::sigHandler(int) at ??:? [12] #2 ? at ??:? [3] #2 ? at ??:? [11] #2 ? at ??:? [10] #2 ? at ??:? [7] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" [12] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:? [13] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" in "/lib/x86_64-linux-gnu/libc.so.6" [3] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/lib/x86_64-linux-gnu/libc.so.6" [10] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&)[7] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/lib/x86_64-linux-gnu/libc.so.6" [11] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/lib/x86_64-linux-gnu/libc.so.6" [13] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) at ??:? [12] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [3] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [10] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [7] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [11] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [12] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [13] #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::sqrt<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [3] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [10] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [11] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [7] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [12] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [10] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [13] #5 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::Ck(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:? [12] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? [3] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [11] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [7] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [13] #6 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? [12] #8 at ??:? [10] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? [11] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? [3] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? [7] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut()? at ??:? [13] #7 Foam::LESModels::dynamicKEqn<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? [11] #8 at ??:? [12] #9 __libc_start_main at ??:? [10] #8 at ??:? [13] #8 at ??:? [7] #8 at ??:? [3] #8 ?? in "/lib/x86_64-linux-gnu/libc.so.6" [12] #10 ?? at ??:? [11] #9 __libc_start_main at ??:? [13] #9 __libc_start_main?? in "/lib/x86_64-linux-gnu/libc.so.6" [13] #10 in "/lib/x86_64-linux-gnu/libc.so.6" [11] #10 at ??:? [10] #9 __libc_start_main at ??:? [3] #9 __libc_start_main at ??:? [7] #9 __libc_start_main?? in "/lib/x86_64-linux-gnu/libc.so.6" [10] #10 at ??:? [DL-BoxII:41641] *** Process received signal *** [DL-BoxII:41641] Signal: Floating point exception (8) [DL-BoxII:41641] Signal code: (-6) [DL-BoxII:41641] Failing at address: 0x3ea0000a2a9 [DL-BoxII:41641] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x2ad9e28f14b0] [DL-BoxII:41641] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x2ad9e28f1428] [DL-BoxII:41641] [ 2] in "/lib/x86_64-linux-gnu/libc.so.6" [3] #10 /lib/x86_64-linux-gnu/libc.so.6(+0x354b0)[0x2ad9e28f14b0] [DL-BoxII:41641] [ 3] /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam4sqrtERNS_5FieldIdEERKNS_5UListIdEE+0x28)[0x2ad9e1941728] [DL-BoxII:41641] [ 4] /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libincompressibleTurbulenceModels.so(_ZN4Foam4sqrtINS_12fvPatchFieldENS_7volMeshEEENS_3tmpINS_14GeometricFieldIdT_T0_EEEERKS7_+0x190)[0x2ad9ddd760f0] [DL-BoxII:41641] [ 5] /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libincompressibleTurbulenceModels.so(_ZNK4Foam9LESModels11dynamicKEqnINS_29IncompressibleTurbulenceModelINS_14transportModelEEEE2CkERKNS_14GeometricFieldINS_10SymmTensorIdEENS_12fvPatchFieldENS_7volMeshEEERKNS6_IdS9_SA_EE+0x2a5)[0x2ad9ddd87f15] [DL-BoxII:41641] [ 6] /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libincompressibleTurbulenceModels.so(_ZN4Foam9LESModels11dynamicKEqnINS_29IncompressibleTurbulenceModelINS_14transportModelEEEE10correctNutERKNS_14GeometricFieldINS_10SymmTensorIdEENS_12fvPatchFieldENS_7volMeshEEERKNS6_IdS9_SA_EE+0x79)[0x2ad9ddd88859] [DL-BoxII:41641] [ 7] /opt/openfoam5/platforms/linux64GccDPInt32Opt/lib/libincompressibleTurbulenceModels.so(_ZN4Foam9LESModels11dynamicKEqnINS_29IncompressibleTurbulenceModelINS_14transportModelEEEE10correctNutEv+0x1f4)[0x2ad9ddd89874] [DL-BoxII:41641] [ 8] pimpleFoam[0x4254ad] [DL-BoxII:41641] [ 9] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x2ad9e28dc830] [DL-BoxII:41641] [10] pimpleFoam[0x428729] [DL-BoxII:41641] *** End of error message *** at ??:?
-
@东岳 完全失败中...
-
@cccrrryyy 感谢解答。
我看了pimpleFoam的这个算例,不太清楚具体是哪里用到了B,去掉的话可以算么?按道理说它用的是WALE模型,是个代数模型,不需要用方程去求解B才对。pisoFoam用的是SpalartAllmaras模型,不涉及到求解B,但要求解nuTilda。不太清楚为什么需要div(phi,k),可能这个去掉也可以算。
pimpleFoam没有B项也是可以算的,我这期间就是没发现还有个这个就一直在算..所以才会疑惑。
-
大家好,又有了新的困惑。
我翻看教程的时候,发现pisofoam和pimplefoam里头LES案例的fvscheme 对流项设置有一些不同,觉得有点困惑。pimplefoam里头有一个B项,pisofoam里头则没有。
pimplefoam/LES/channel395divSchemes { default none; div(phi,U) Gauss linear; div(phi,k) Gauss limitedLinear 1; div(phi,B) Gauss limitedLinear 1; div(B) Gauss linear; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev2(T(grad(U))))) Gauss linear; }
pisofoam/LES/motobike:
divSchemes { default none; div(phi,U) Gauss LUST unlimitedGrad(U); div(phi,k) Gauss limitedLinear 1; div(phi,nuTilda) Gauss limitedLinear 1; div((nuEff*dev2(T(grad(U))))) Gauss linear; }
查了下LES对应的B,RAS用的R,是雷诺应力张量的求解。那既然default都是none,按照user guide是要对每一项进行定义的,为什么pisofoam里头缺失了这一项呢?
ps我看到我之前的case也都没写这一项,估计是直接复制了摩托车的代码。不知道这项是不是必须的? -
从这个角度讲,感觉可能你需要的是花大量精力在网格上,而不是求解器的那些参数调整。
之前几个月自己就一顿乱算,导致连光滑圆柱的结果都很奇怪。所以用那个简单的模型在探讨求解器,设置参数之类的。
对得上了之后,再过来讨论这边这个圆柱的网格。你之前提到过跟现有文献对比,是哪个文章呀,挺感兴趣的。
非光滑圆柱的话,参考的Experimental study on flow past a circular cylinder with rough surface这篇文献的。
-
@东岳 谢谢夸奖!
算是基于工程的研究吧.. 桥索上用的 -
感觉ANSYS Meshing的思路是尽可能缩小五边形所占的比例,从而大量使用六边形?
这个倒是没有研究, 就让他自动转化了。个人觉得可能形状没有太拘泥,如果不是edge的处不能合并三角形的话,尽量会合并成多边形并且满足所设定的size(也就是不会合并到过分大)。
-
@东岳 把3D的图贴一下,这样比较直观。
如图1的样子,ratio 2-3的话,坑里放不下... 权衡之后取了1.3。
多做了几个density box 逐渐扩大mesh的尺寸,在最靠近边界层的box尺寸取的比较小,来让过渡性处于2左右。因为计算时长较久,导致试错成本很高,也是一个大问题。
-
@东岳 poly的话四百多万,tetra一千二百万。
因为坑的地方mesh尺寸很小,CFL数控制下的步长在-5次方量级。 -
原来是ANSYS Meshing,近壁面是规整的四边型,然后五边型过渡,之后就是大量的六边型并掺杂一些不得不用的五边形。
我是用ANSYS meshing生成的全都是棱柱tetra,然后用fluent转化成polymesh就是五边形六边形的样子, 再用fluent with meshing 导出msh文件。
感觉四边型之后全部是三角形最好。不过这个可能不太会影响最终的结果,而且会让cell数量变大。
确实三角形的网格数量会大大增加,所以采用了转化到多边形来减小网格数提高计算效率。之前可能没说清楚,这个算例不是二维的是三维的。之前的polymesh的图是从z轴看过去的样子,所以可能像2D。
-
@东岳
上一个过渡性太大的例子算完了。
又做了个过渡性比较好的case,不过表面带坑的圆柱算起来特别久。一个大概要20天,还在跑现在。
prism的ratio取的1.3,然后减小了外面poly的尺寸(这样一来mesh数量会有增大很多),过渡率大概控制再2左右。
-
@东岳
这个值多少要保证网格渐变的过渡性。目前从你那个图来看过渡性很差。不过这个对结果影响多少不好说,我感觉差异会很小。你可以试试然后反馈
我也意识到过渡性差,但继续细化网格太庞大算不动。不知道prism处ratio=2这样的比例会不会太大。
你的粗糙算例听起来很好玩
麻子脸圆柱,就是算起来太耗时了...
-
@东岳 非常感谢您及时的回复!
我现在的ratio是1.05,所以是有些小吗?因为之前结构化网格也是用的这个ratio。 -
@东岳 回复好快.. 我还在等60s...
2和1是一个模型,都是10层prism。
网格是ansys自带的meshing做的。 -
订正:布置了十层。
-
@东岳 谢谢李老师!
有个问题想请教下大家。
由于用的是LES, 首层的y+满足了1的情况下,接下来还需要再布置多少层?
目前对于非结构化网格,我一共布置了5层。
但是由于首层厚度太小了,导致第五层和之后的外围网格的变化率有点大。
不知道这样的层数够吗,这个突变会导致对结果影响过大吗?
pic1是整体的流域的网格,pic2是近壁面的。
-
大家好..
我又来了...
更新一下近期结果。两个结果都是Re1.1w,网格一样。用piso代替了pimple,计算无量纲时间100s之后,取了大概20个周期。
唯一的不同是pic1用了limitedLinear0.5, pic2用的0.2。
两者的差别并不大,对于文献的1.1左右还是有一些差距。
这几个例子算下来,发现对于结构化网格的话,质量还不错用中心差分的结果应该是比较精确的了。 -
不清楚楼主研究的重点是?层主个人来说,是很好奇, linear -> limitedLinear 的区别.
不知楼主有没有对这些格式的比较?重点是在三分力这些定量系数,和流场机理。而不是在格式的研究,所以也没有深入探讨。
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
根据前辈们的算例几乎用的都是limitedLinear 格式,大家的系数取的也是各不相同。所以我也很困惑,问大家也说不出个所以然来。只好自己试了。
为什么不可以?如果是研究格式的问题,我可能也会这么做,省很多时间.但是如果是分析流体机理,最好从头开始用一种固定格式.
研究的是流体机理,所以我也会有点困惑中途换格式的问题。
另外还想请问LES下pimpleFoam的步长问题,库郎数看到可以稍大,但是看了很多例子发现有到10,也有在2的。这对于计算时长来说貌似影响很大。 -
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处,说可能会阻力又下降。
那之后我把它继续算到了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 -
@random_ran 非常感谢!慢慢会成长的哈哈哈
-
@东岳 今天刚好在看limitedLinear格式,后面的数字貌似指的就是这一串,max(min(2r/k,1),0)
-
@东岳 对,抱紧大腿!怎么加表情 - -
-
@random_ran这个mesh是用ICEM生成的,我已经转化到openfoam了。
你真的太nice了!!!! -
Step2. 38.5-51s, fvscheme中的速度对流项 从upwind 改为 Gauss linear
- 残差相比迎风格式,有明显的量级上升。Uz 呈现出收敛的趋势,稳定了。
- Uy同样的在47s处出现振幅下降,CdCl下降。
- 把40s处当成稳定,分为两个区段来考虑。CdClSt系数如下表。
看趋势50.5s处出现第二次Uy残差的振幅下降,51s之后会怎样?我打算继续算下去10s左右看看是不是周期性的。
-
更新一下。按照@cccrrryyy 的建议算了几天,虽然结果还是不尽如人意,还是贴上来和大家讨论下。
Step1,31-38s,把nOutercorrectors 从2改成5.
几点观察:
- 阻力系数,升力系数主要与Uy残差曲线有关
- 在34.5s处震荡减小,CdCl均明显下降。
- Uz曲线不稳定
-
@random_ran
我上传了case在google drive , 点击链接!(github 文件太大,我放弃了...)
晚些我会更新一下最近算的这个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)
-
@random_ran 欢迎吃瓜
-
@cccrrryyy 非常感谢您的建议!
-
附上现在1w雷诺数的光滑圆柱绕流的例子的某个时间步的截图,用of里头的monitor监控的residual,我也一直很困惑Uz的曲线不像稳定的样子。
我现在把2个nOuterCorrectors由2提高到5(从31秒开始),算个十秒左右看看结果。 -
目前的时间步库朗数是控制在1.5以下。
-
这个十秒计算过之后,我会把速度对流格式换成中心差分继续跑看看结果是否有改善,到时候再过来更新!
-
-
文件格式不支持上传,我重新上传了压缩文档。settings.zip
-
@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的原因。不过我也怀疑是不是我的设置有问题,导致结果有偏差。我这里传上来我的几个文件,如果您有空可否帮我看看什么地方的设置有偏差?
非常感谢!!!
-
@cccrrryyy 您好!非常感谢你的回答!
对于yplus小于1而言,我的case表面有很多细小的部分,所以有一些地方的max yplus会达到1.3-1.5这个范围。但是大部分区域和平均值又只有0.5不到。
所以我不知道是不是应该设置壁面函数来解决这个问题。另外,如果使用LES Y+在2-5的范围内的话,是否可以通过添加壁面函数来使得网格数量减小呢?
-
请问你还在做圆柱绕流吗?
我最近做到高雷诺数,结果不是很理想。看了你贴上来的文件,请问时间离散格式是为什么采用的Crank-Nicolson方法,取值0.5。
时间离散对结果影响大吗,还有Crank-Nicolson后面的系数应该怎么取?我看到用户手册写的推荐是0.9,取0.5有什么考虑吗?
谢谢! -
大家好。
最近开始做圆柱绕流,用的LES,pimpleFoam,雷诺数1e5有几个问题想要请教一下大家。-
看了tutorial,和前辈的算例。初始场速度的设置里头,有些设置是直接设置了速度的,比如LES pisoFoam里头motobike算例。
internalField uniform (20 0 0);
有一些则没有,例如同样文件夹下pitzDaily算例
internalField uniform (0 0 0);
不知道这两者对结果和计算速度是否有影响? 应该如何设置才正确。 -
对于使用LES时的避免函数,在边界层控制在yplus小于1的情况下,是否不需要设置壁面函数?因为看到@random_ran 的贴里有设置,觉得有点困惑。
希望和大家一起探讨,共同进步!
谢谢 -
-
@莫晓柒 不能输出Cp。你可以在后处理的时候对压力p进行处理直接获得Cp。
如果要获得Cpmean的话,我是运行过程输出压力平均场Pmean,然后同样后处理得到Cpmean。
希望有所帮助 -
您好,关注到你也在做高雷诺数下的圆柱绕流。看到你之前的Cd出现负值的情况,不知道解决了没有?
可否加个联系方式探讨一下?
十分感谢!
controlDict文件中关于自动调节库朗数
RANS 高雷诺数 圆柱绕流
RANS 高雷诺数 圆柱绕流
RANS 高雷诺数 圆柱绕流
关于OpenFOAM中K-Omega SST模型使用壁面函数时的Y+问题
圆柱扰流计算与物理现象问题思考
分享:OpenFOAM不同离散格式的简单研究
LES初始速度场设置和壁面函数设置
并行问题的请教
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
dynamicKEqn模型更换滤波器奇怪报错
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
limitedLinear格式
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
LES初始速度场设置和壁面函数设置
圆柱扰流计算与物理现象问题思考
LES初始速度场设置和壁面函数设置
OpenFOAM 里计算Cp,Cf等参数
dynamicKEqn模型更换滤波器奇怪报错