komega模型求解传热算例的报错



  • 各位老师好,我是在DNS求解器的基础上引入湍流kOMega模型,并加入温度方程引入湍流热扩散系数(参照OF2.3中的传热求解器buoyanBoussinesqPimpleFoam 中的热扩散系数代码),求解器编译通过。

    参考代码:

    alphat = turbulence->nut()/Prt;
    alphat.correctBoundaryConditions();
    
    volScalarField alphaEff("alphaEff", turbulence->nu()/Pr + alphat);
    

    报错如下:

    Reading field T
    
    Reading/calculating face flux field phi
    
    Reading field phi_0
    
    Creating turbulence model
    
    Selecting incompressible transport model Newtonian
    Selecting turbulence model type RASModel
    Selecting RAS turbulence model kOmegaMHD//这里以上都能正确读取各个声明的场和模型,接下去本应该读取热扩散系数的alpha场的,但报以下一些错误。
    bounding omega, min: 0 max: 0 average: 0
    [39] [1] #0  Foam::error::printStack(Foam::Ostream&)[2] [11] [44] #[25] #0      
    Foam::error::printStack(Foam::Ostream&)#0  
    Foam::error::printStack(Foam::Ostream&)[26] #0      
    Foam::error::printStack(Foam::Ostream&)[40] #0  
    
    [16] #1  Foam::sigFpe::sigHandler(int) at ??:?//这个错误是除零错误
    [37] #1  Foam::sigFpe::sigHandler(int)[20] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    [2] #1  Foam::sigFpe::sigHandler(int) at ??:?
    [47] #4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/lib/x86_64-linux-gnu/libc.so.6"
    [23] #3  Foam::divide(Foam::Field<double>&, 
    Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
    
    [kdd:28991] *** Process received signal ***
    [kdd:28991] Signal: Floating point exception (8)//浮点数例外错误
    [kdd:28991] Signal code:  (-6)
    [kdd:28991] Failing at address: 0x3e80000713f
    
    --------------------------------------------------------------------------
    mpirun noticed that process rank 30 with PID 31201 on node kdd exited on signal 8 (Floating point exception).
    --------------------------------------------------------------------------
    2 total processes killed (some possibly by mpirun during cleanup)
    

    自带的模型中的Omega方程中的热扩散系数alpha如何理解?我本来将代码中的综合热扩散系数alphaEff去掉,并把alpht改成alpha来表示湍流热扩散系数来与模型保持一致,但依然报如上错误。

    OF自带的模型中的Omega方程

    tmp<fvScalarMatrix> omegaEqn
    (
        fvm::ddt(omega_)
      + fvm::div(phi_, omega_)
      - fvm::laplacian(DomegaEff(), omega_)
     ==
        alpha_*G*omega_/k_
      - fvm::Sp(beta_*omega_, omega_)
    );


  • Selecting incompressible transport model Newtonian
    Selecting turbulence model type RASModel
    Selecting RAS turbulence model kOmegaMHD//这里以上都能正确读取各个声明的场和模型,接下去本应该读取热扩散系数的alpha场的,但报以下一些错误。
    bounding omega, min: 0 max: 0 average: 0
    [39] [1] #0  Foam::error::printStack(Foam::Ostream&)[2] [11] [44] #[25] #0      
    Foam::error::printStack(Foam::Ostream&)#0  
    Foam::error::printStack(Foam::Ostream&)[26] #0      
    Foam::error::printStack(Foam::Ostream&)[40] #0  
    

    不太好判断呀,一上来就报错了,不太好判断



  • 是啊,老师。希望有人遇到过,给我解解惑,哈哈~


  • Linux讲师

    我记得openfoam的DNS不能用并行。可以试试不用并行能不能算。



  • 问题解决了,是因为我将Omega设置为零了,所以在计算的时,湍流模型在算湍流黏性系数是nut=k/Omega 出现除零错误。


Log in to reply