LES初始速度场设置和壁面函数设置



  • @东岳 poly的话四百多万,tetra一千二百万。
    因为坑的地方mesh尺寸很小,CFL数控制下的步长在-5次方量级。



  • @hoversoar 嗯,确实,要解析这么小的坑很麻烦,跟高尔夫球一样。不过你这个挺有意思



  • @东岳 把3D的图贴一下,这样比较直观。

    捕获.JPG
    如图1的样子,ratio 2-3的话,坑里放不下... 权衡之后取了1.3。
    多做了几个density box 逐渐扩大mesh的尺寸,在最靠近边界层的box尺寸取的比较小,来让过渡性处于2左右。

    因为计算时长较久,导致试错成本很高,也是一个大问题。



  • @cccrrryyy

    感觉ANSYS Meshing的思路是尽可能缩小五边形所占的比例,从而大量使用六边形?

    这个倒是没有研究, 就让他自动转化了。个人觉得可能形状没有太拘泥,如果不是edge的处不能合并三角形的话,尽量会合并成多边形并且满足所设定的size(也就是不会合并到过分大)。



  • @hoversoar

    因为计算时长较久,导致试错成本很高,也是一个大问题。

    你这个网格处理的很精细 很厉害 :duang:

    你这个是工程导向还是纯科研?什么上面有这种特别圆的孔?



  • @东岳 谢谢夸奖!
    算是基于工程的研究吧.. 桥索上用的


  • OpenFOAM副教授

    @hoversoar 哇,三维的,这网格数量惊人啊。提炼工程问题确实容易这样,需要花很多时间在前处理上,求解器本身其实也不应该特别特别重要。从这个角度讲,感觉可能你需要的是花大量精力在网格上,而不是求解器的那些参数调整。
    你之前提到过跟现有文献对比,是哪个文章呀,挺感兴趣的。



  • @cccrrryyy 你好,你贴的这个参考资料好像打不开了,可以更新下链接吗,谢谢,最近也在看壁面函数的内容。



  • @羽之下 还可以打开链接啊。
    再贴一次。
    壁面函数



  • @cccrrryyy

    从这个角度讲,感觉可能你需要的是花大量精力在网格上,而不是求解器的那些参数调整。

    之前几个月自己就一顿乱算,导致连光滑圆柱的结果都很奇怪。所以用那个简单的模型在探讨求解器,设置参数之类的。
    对得上了之后,再过来讨论这边这个圆柱的网格。

    你之前提到过跟现有文献对比,是哪个文章呀,挺感兴趣的。

    非光滑圆柱的话,参考的Experimental study on flow past a circular cylinder with rough surface这篇文献的。


  • OpenFOAM副教授

    @hoversoar 好!谢谢



  • 大家好,又有了新的困惑。
    我翻看教程的时候,发现pisofoam和pimplefoam里头LES案例的fvscheme 对流项设置有一些不同,觉得有点困惑。pimplefoam里头有一个B项,pisofoam里头则没有。
    pimplefoam/LES/channel395

    divSchemes
    {
        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也都没写这一项,估计是直接复制了摩托车的代码。不知道这项是不是必须的?


  • OpenFOAM副教授

    @hoversoar 说实话FOAM的tutorial里面的设置不太可靠,只能拿来做个参考。

    我看了pimpleFoam的这个算例,不太清楚具体是哪里用到了B,去掉的话可以算么?按道理说它用的是WALE模型,是个代数模型,不需要用方程去求解B才对。pisoFoam用的是SpalartAllmaras模型,不涉及到求解B,但要求解nuTilda。不太清楚为什么需要div(phi,k),可能这个去掉也可以算。

    这些设置我觉得主要是根据湍流模型的不同带来的,如果去掉某一个不能算我感觉重点可能在速度方程的turbulence->divDevReff(U)这一项里面,这个得去代码里面找了,不同版本好像还有点区别。



  • @cccrrryyy 感谢解答。

    我看了pimpleFoam的这个算例,不太清楚具体是哪里用到了B,去掉的话可以算么?按道理说它用的是WALE模型,是个代数模型,不需要用方程去求解B才对。pisoFoam用的是SpalartAllmaras模型,不涉及到求解B,但要求解nuTilda。不太清楚为什么需要div(phi,k),可能这个去掉也可以算。

    pimpleFoam没有B项也是可以算的,我这期间就是没发现还有个这个就一直在算..所以才会疑惑。



  • @hoversoar 怎么样,带坑的算了么。这种小尺度坑,感觉网格会特别多:135:



  • @东岳 完全失败中...



  • 尝试把湍流模型从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 ??:?
    
    


  • @hoversoar 应该是滤波的问题? 还不确定为什么会产生...



  • 报告一下,之前也算过dynamicKEqn并没有问题,检查了老半天。拿到之前另一个电脑算就可以运行。。
    在这个报错的of5的电脑上安装了of7,现在可以顺利地运行了。



  • 楼主还在么,,我最近也要做个 复杂圆柱的 LES模拟,,初步的 模型
    5c746512-45a6-4e45-a723-013c123854ad-image.png
    是这样的,,可以交流下么,,LES小白一个,,很多地方都是 懵懂中



  • 还有 用 Meshing画的多面体网格,OF能支持么,,Cache_34b32cbaed5f560f..jpg



  • 从头看到尾,懵逼居多,,我fluent用的居多,精力太分散,手头事情多如麻,哈哈,慢慢加油吧我:mianmo: ,即将研三的我瑟瑟发抖,,毕设还没动呢都



  • @红豆沙 你这个有什么问题么 单相流 直接算呗



  • @红豆沙 你是不能计算还是啥问题啊。 你导进去OF里头试看看。



  • @红豆沙 fluent meshing画的多面体of是支持的,多面体和六面体核心结合的新型网格形式of不支持,不知道新版的有没有更新


Log in to reply