error: incomplete type is not allowed


  • OpenFOAM讲师

    各位老师好,我现在在openfoam5.0的reactingmultiphaseEulerFoam上作二次开发,在调用湍流模型时出现了如题的编译错误,请大家指点一下:

    //liquid phase 
    phaseModel& Liquidphase = phases[0];
    volScalarField& alphaLiquid = Liquidphase;
    const phaseCompressibleTurbulenceModel& Liquidturbulence=Liquidphase.turbulence();
    
    turbulencelength=sqrt(10*Liquidphase.mu()/Liquidphase.rho()*Liquidturbulence->k()/Liquidturbulence->epsilon());
    

    编译器指示位置为Liquidturbulence->k(),不太清楚怎么回事,之前单相的时候都是直接使用的turbulence->k()


  • OpenFOAM讲师

    在使用phaseCompressibleTurbulenceModel前,需要给出定义
    在主程序中添加#include "phaseCompressibleTurbulenceModel.H"


Log in to reply
 

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