新的湍流模型如何输出yPlus值



  • 最近调用一个新写的湍流模型进行计算,发现无法调用yPlus,报错如下:

    yPlusLES yPlusLES output:
    
    
    --> FOAM FATAL ERROR: 
    
        lookup of LESProperties from objectRegistry region0 successful
        but it is not a LESModel, it is a DMNM
    
        From function objectRegistry::lookupObject<Type>(const word&) const
        in file /home/lly/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 181.
    
    FOAM aborting
    
    #0  Foam::error::printStack(Foam::Ostream&) at ??:?
    #1  Foam::error::abort() at ??:?
    #2  Foam::incompressible::LESModel const& Foam::objectRegistry::lookupObject<Foam::incompressible::LESModel>(Foam::word const&) const at ??:?
    #3  Foam::yPlusLES::calcIncompressibleYPlus(Foam::fvMesh const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) at ??:?
    #4  Foam::yPlusLES::execute() at ??:?
    #5  Foam::OutputFilterFunctionObject<Foam::yPlusLES>::execute(bool) at ??:?
    #6  Foam::functionObjectList::execute(bool) at ??:?
    #7  Foam::Time::run() const at ??:?
    #8  
     at ??:?
    #9  __libc_start_main in "/lib64/libc.so.6"
    #10  
     at ??:?
    
    

    根据错误信息,感觉是yPlusLES函数库没有包含这个新的湍流模型DMNM,导致无法调用,但自己又不知道怎么解决:zoule:

    请哪一位朋友能给一些解决的思路 或者 建议呢?:chitang:



  • 在新版本里面已经没有这个工具了,通过下面这个命令可以包含,对于你那个,可以重新编译一下y+工具

    yPlus1
        {
            type        yPlus;
            libs        ("libfieldFunctionObjects.so");
            ...
        }
    


  • 感谢老师的回复!问题已经解决,在yPlusLES.C文件里面做对应的修改即可

    在最前面加入一行代码

    #include "incompressible/LESNonlinear/LESNonlinearModel.H"
    

    后面部分代码作相应修改

    const incompressible::LESNonlinearModel& model =
            mesh.lookupObject<incompressible::LESNonlinearModel>("LESProperties");
    

Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2