用rhoPimpleFoam计算T型管冷热流混合,计算几步就停掉
-
各位老师,大家好,我在使用rhoPimpleFoam求解器计算一个T型管冷热空气掺混算例的时候,总是计算几步就停止掉了。之前从来没有计算过这种和热有关的算例,我感觉有可能是边界条件设置的问题,烦请有经验的老师给指导一下。
这是T型管算例的大概示意图
这是0/p文件:dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; boundaryField { INLET_HOT { type fixedValue; value uniform 101550; } INLET_COLD { type zeroGradient; } OUTLET { type fixedValue; value uniform 101350; } WALL_HOT { type zeroGradient; } WALL_MID { type zeroGradient; } }
这是0/T文件:
dimensions [0 0 0 1 0 0 0]; internalField uniform 300; boundaryField { INLET_HOT { type fixedValue; value uniform 1673.15; } INLET_COLD { type fixedValue; value uniform 438.15; } OUTLET { type inletOutlet; value $internalField; inletValue $internalField; } WALL_HOT { type zeroGradient; } WALL_MID { type zeroGradient; } }
这是0/U文件:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { INLET_HOT { type pressureInletVelocity; value uniform (0 0 0); } INLET_COLD { type pressureInletVelocity; value uniform (0 0 0); } OUTLET { type pressureInletOutletVelocity; value uniform (0 0 0); } WALL_HOT { type noSlip; } WALL_MID { type noSlip; } }
这是0/alphat文件:
dimensions [1 -1 -1 0 0 0 0]; internalField uniform 1e-3; boundaryField { INLET_HOT { type calculated; value $internalField; } INLET_COLD { type calculated; value $internalField; } OUTLET { type calculated; value $internalField; } WALL_HOT { type compressible::alphatWallFunction; value $internalField; } WALL_MID { type compressible::alphatWallFunction; value $internalField; } }
这是0/epsilon文件:
dimensions [0 2 -3 0 0 0 0]; internalField uniform 2.2667; boundaryField { INLET_HOT { type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 2.2667; } INLET_COLD { type turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; value uniform 2.2667; } OUTLET { type inletOutlet; inletValue uniform 2.2667; value uniform 2.2667; } WALL_HOT { type epsilonWallFunction; value uniform 2.2667; } WALL_MID { type epsilonWallFunction; value uniform 2.2667; } }
这是0/k文件:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.054; boundaryField { INLET_HOT { type turbulentIntensityKineticEnergyInlet; intensity 0.05; value uniform 0.054; } INLET_COLD { type turbulentIntensityKineticEnergyInlet; intensity 0.05; value uniform 0.054; } OUTLET { type inletOutlet; inletValue uniform 0.054; value uniform 0.054; } WALL_HOT { type kqRWallFunction; value uniform 0.054; } WALL_MID { type kqRWallFunction; value uniform 0.054; } }
这是0/nut文件:
dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { INLET_HOT { type calculated; value uniform 0; } INLET_COLD { type calculated; value uniform 0; } OUTLET { type calculated; value uniform 0; } WALL_HOT { type nutkWallFunction; value uniform 0; } WALL_MID { type nutkWallFunction; value uniform 0; } }
这是constant/thermophysicalProperties文件:
thermoType { type hePsiThermo; mixture pureMixture; transport sutherland; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } mixture { specie { molWeight 28.9; } thermodynamics { Cp 1007; Hf 0; } transport { As 1.4792e-06; Ts 116; } }
这是system/fvScheme文件:
ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { default none; div(phi,U) Gauss upwind; div(phid,p) Gauss upwind; div(phiv,p) Gauss linear; div(phi,K) Gauss linear; div(phi,e) Gauss upwind; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(phi,omega) Gauss upwind; div((rho*R)) Gauss linear; div(R) Gauss linear; div(U) Gauss linear; div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } laplacianSchemes { default Gauss linear corrected; } interpolationSchemes { default linear; } snGradSchemes { default corrected; }
这是system/fvSolution文件:
solvers { p { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-05; relTol 0; smoother GaussSeidel; cacheAgglomeration true; } tolerance 1e-05; relTol 0.1; } pFinal { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-06; relTol 0; smoother GaussSeidel; cacheAgglomeration true; } tolerance 1e-06; relTol 0.1; } "(rho|U|e|k|epsilon|omega)" { solver PBiCGStab; preconditioner DILU; tolerance 1e-06; relTol 0; } "(rho|U|e|k|epsilon|omega)Final" { $U; relTol 0; } } PIMPLE { momentumPredictor yes; transonic no; nOuterCorrectors 50; nCorrectors 1; nNonOrthogonalCorrectors 0; consistent yes; SIMPLErho yes; pMaxFactor 1.5; pMinFactor 0.9; residualControl { "(U|k|epsilon)" { relTol 0; tolerance 0.00001; } } turbOnFinalIterOnly no; } relaxationFactors { fields { "p.*" 0.5; "rho.*" 1; } equations { "U.*" 0.9; "e.*" 0.7; "(k|epsilon|omega).*" 0.8; } }
然后,这是运行rhoPimpleFoam时保存的log文件,看不出非常明显的报错信息:
PIMPLE: iteration 25 DILUPBiCGStab: Solving for Ux, Initial residual = 0.188633, Final residual = 6.22293e-07, No Iterations 4 DILUPBiCGStab: Solving for Uy, Initial residual = 0.108362, Final residual = 3.91435e-07, No Iterations 4 DILUPBiCGStab: Solving for Uz, Initial residual = 0.36688, Final residual = 5.86313e-07, No Iterations 4 DILUPBiCGStab: Solving for e, Initial residual = 0.170771, Final residual = 1.74252e-07, No Iterations 3 ------------------------------------------------------- Primary job terminated normally, but 1 process returned a non-zero exit code. Per user-direction, the job has been aborted. -------------------------------------------------------
这是在集群上计算停止后保存的errput文件,不知道是否有用,先放上 :
-------------------------------------------------------------------------- [[18352,1],4]: A high-performance Open MPI point-to-point messaging module was unable to find any relevant network interfaces: Module: OpenFabrics (openib) Host: c01n02 Another transport will be used instead, although this may result in lower performance. NOTE: You can disable this warning by setting the MCA parameter btl_base_warn_component_unused to 0. -------------------------------------------------------------------------- [c01n02:275299] 31 more processes have sent help message help-mpi-btl-base.txt / btl:no-nics [c01n02:275299] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages [16] #0 Foam::error::printStack(Foam::Ostream&)[15] #0 Foam::error::printStack(Foam::Ostream&) at ??:? at ??:? [15] #1 Foam::sigFpe::sigHandler(int)[16] #1 Foam::sigFpe::sigHandler(int) at ??:? [15] #2 ? at ??:? [16] #2 ? in /usr/lib64/libpthread.so.0 [15] #3 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool) in /usr/lib64/libpthread.so.0 [16] #3 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool) at ??:? [15] #4 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? [16] #4 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? [15] #5 at ??:? [16] #5 ?? at ??:? [15] #6 __libc_start_main at ??:? [16] #6 __libc_start_main in /usr/lib64/libc.so.6 [15] #7 in /usr/lib64/libc.so.6 [16] #7 ?? at ??:? [c01n02:275348:0:275348] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2)) at ??:? [c01n02:275349:0:275349] Caught signal 8 (Floating point exception: tkill(2) or tgkill(2)) ==== backtrace ==== 0 0x000000000000f4ab raise() ???:0 1 0x000000000000f5e0 _L_unlock_13() funlockfile.c:0 2 0x00000000002addcf Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() ???:0 3 0x00000000002aea19 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() ???:0 4 0x00000000004255e6 main() ???:0 5 0x0000000000021c05 __libc_start_main() ???:0 6 0x000000000042d711 _start() ???:0 =================== ==== backtrace ==== 0 0x000000000000f4ab raise() ???:0 1 0x000000000000f5e0 _L_unlock_13() funlockfile.c:0 2 0x00000000002addcf Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() ???:0 3 0x00000000002aea19 Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() ???:0 4 0x00000000004255e6 main() ???:0 5 0x0000000000021c05 __libc_start_main() ???:0 6 0x000000000042d711 _start() ???:0 =================== -------------------------------------------------------------------------- mpirun noticed that process rank 16 with PID 0 on node c01n02 exited on signal 8 (Floating point exception). --------------------------------------------------------------------------
烦请有时间、有经验的老师给提一下建议
-
我记得我有段时间算流化床,卡住的原因是连接处的网格问题,就像你这个小管子和大管子连接处,有没有做过渡啊。。。如果太尖锐了就可能卡住的。。。
-
@hurricane007 多谢老师提醒,我这里并没有特别地去做一些明显的过渡,我去试一下看能不能解决问题。
-
@wangfei9088 多谢老师提醒,这个地方确实是把INLET_COLD和OUTLET的边界条件写反了,我尝试改了过来,但是仍旧没有解决问题。
-
@李东岳 感谢李老师 ,但是没有T型管的试验数据。原本是要计算一个掺合阀的,原理类似于T型管,但是那个掺合阀模型比这个T型管要复杂很多,尤其在小口径管和大口径管结合的地方,那个模型一直计算不下去就画了个简单的T型管。这个T型管的边界条件,是我按照厂子里面测试掺合阀的实验条件放上的,如果按照他们的试验的话,热流进口是应该大概是在930-1600摄氏度范围内,冷流大概是160-170摄氏度,掺合阀调控的混合流出口温度大概在220-260摄氏度。李老师,厂子里面实验条件非常简陋,仅作小小参考 只要结果不太一样,那就勇敢地相信是他们试验做得不对