关于边界条件externalWallHeatFluxTemperature的问题



  • 在计算某忽略浮力的传热问题时,我想使用可压缩求解器rhoSimpleFoam,并给定热流密度作为边界条件,发现可以使用externalWallHeatFluxTemperature或turbulentHeatFluxTemperature,但是在OpenFOAM 5.0中后者已经被整合到前者之中,因此使用前者,并通过修改可压缩求解器rhoSimpleFoam的算例squareBend中的温度边界条件进行验证。

    原算例的温度T边界条件为以下:

    boundaryField
    {
        Default_Boundary_Region
        {
            type            zeroGradient;
        }
    
        inlet
        {
            type            fixedValue;
            value           uniform 1000;
        }
    
        outlet
        {
            type            inletOutlet;
            //type            zeroGradient;
            value           uniform 1000;
            inletValue      uniform 1000;
        }
    }
    

    修改为热流密度边界条件后的温度T边界条件为以下:

    boundaryField
    {
        Default_Boundary_Region
        {
            type            externalWallHeatFluxTemperature;
            mode            flux;
            q               uniform 300;
            /*
            thicknessLayers no;
            kappaLayers     (1 2 3 4);
            kappa           fluidThermo;
            */
            kappaMethod     fluidThermo;
            value           $internalField;
        }
    
        inlet
        {
            type            fixedValue;
            value           uniform 1000;
        }
    
        outlet
        {
            type            inletOutlet;
            //type            zeroGradient;
            value           uniform 1000;
            inletValue      uniform 1000;
        }
    }
    

    但是,原算例可以正常计算,而采用热流密度边界条件的新算例发生错误,如以下所示:

    Starting time loop
    
    Time = 1
    
    GAMG:  Solving for Ux, Initial residual = 1, Final residual = 2.2028e-05, No Iterations 1
    GAMG:  Solving for Uy, Initial residual = 1, Final residual = 2.75277e-05, No Iterations 1
    GAMG:  Solving for Uz, Initial residual = 1, Final residual = 6.83017e-05, No Iterations 1
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::sigFpe::sigHandler(int) at ??:?
    #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
    #3  Foam::heThermo<Foam::psiThermo, Foam::pureMixture<Foam::sutherlandTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::he(Foam::Field<double> const&, Foam::Field<double> const&, int) const at ??:?
    #4  Foam::mixedEnergyFvPatchScalarField::updateCoeffs() at ??:?
    #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
    #6  Foam::tmp<Foam::fvMatrix<double> > Foam::fv::optionList::operator()<double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) at ??:?
    #7  ? at ??:?
    #8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
    #9  ? at ??:?
    Floating point exception (core dumped)
    

    另外,将buoyantSimpleFoam中算例hotRadiationRoomFvDOM的边界条件修改为externalWallHeatFluxTemperature定义的热流密度时,却可以正常计算。

    因此,我的问题是:

    • 为什么会出现修改为热流密度边界条件后计算不了的问题,应该怎么解决?

    • externalWallHeatFluxTemperature是不是只能在传热类的求解器中使用,而不能在可压缩类的求解器中使用?

    • 如果只能使用传热类的求解器,那么在使用如buoyantSimpleFoam的求解器时,想要忽略浮力的作用,是否可以直接将g设置为0?

    谢谢!



  • 尝试在可压缩类的求解器rhoPimpleFoam中使用externalWallHeatFluxTemperature边界条件,选择的算例是rhoPimpleFoam/RAS/cavity,将其T边界条件修改为以下后,发现可以正常计算,因此externalWallHeatFluxTemperature应该不是只能在传热类的求解器中使用,也可以用于可压缩类求解器。

    分析上述出错的原因,可能在于能量方程的选择。在可以计算的cavity算例中能量方程为sensibleEnthalpy,而在上述出错的算例中能量方程为sensibleInternalEnergy。

    据此,我修改了能量方程,但是fvschems和fvsolution可能还有点问题,目前还没有计算收敛。


登录后回复
 

与 CFD中文网 的连接断开,我们正在尝试重连,请耐心等待