LES初始速度场设置和壁面函数设置
-
大家好,又有了新的困惑。
我翻看教程的时候,发现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也都没写这一项,估计是直接复制了摩托车的代码。不知道这项是不是必须的? -
@hoversoar 说实话FOAM的tutorial里面的设置不太可靠,只能拿来做个参考。
我看了pimpleFoam的这个算例,不太清楚具体是哪里用到了B,去掉的话可以算么?按道理说它用的是WALE模型,是个代数模型,不需要用方程去求解B才对。pisoFoam用的是SpalartAllmaras模型,不涉及到求解B,但要求解nuTilda。不太清楚为什么需要div(phi,k),可能这个去掉也可以算。
这些设置我觉得主要是根据湍流模型的不同带来的,如果去掉某一个不能算我感觉重点可能在速度方程的turbulence->divDevReff(U)这一项里面,这个得去代码里面找了,不同版本好像还有点区别。
-
尝试把湍流模型从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 ??:?