关于修改湍流模型中非线性雷诺应力项的问题
-
@李东岳 @
谢谢老师指导,我最后按照方法二,完全按照他的格式来修改的,修改到最后我发现一个问题,如下public: //typedef typename BasicTurbulenceModel::alphaField alphaField; //typedef typename BasicTurbulenceModel::rhoField rhoField; //typedef typename BasicTurbulenceModel::transportModel transportModel; //- Runtime type information TypeName("MHDkOmega"); // Constructors //- Construct from components MHDkOmega ( //const alphaField& alpha, ???? //const rhoField& rho, const geometricOneField& alpha, const geometricOneField& rho, const volVectorField& U, const surfaceScalarField& alphaRhoPhi, const surfaceScalarField& phi, const transportModel& transport, const word& propertiesName = turbulenceModel::propertiesName, const word& type = typeName );
其中 alpha是定义为geometricOneField也就是定义为1,可我的模型是三层液体,采用了multiphaseInterFoam求解器又基于VOF,我才意识到是不是湍流模型一般不能适用于多相的情况,这个alpha能不能修改来适用于这个求解器,担心自己做了无用功,希望老师能帮忙解答
-
@李东岳
请老师看看G这部分代码可不可以这样写,
矢量场Snl有点搞不清=和()赋值,tgradU后面用不用加括号~tmp<volTensorField> tgradU = fvc::grad(U);//tmp reload to Field volScalarField S2(2*magSqr(symm(tgradU()))); tensor I(1,0,0,0,1,0,0,0,1); volSymmTensorField S(twoSymm(tgradU)); volTensorField W(twoSkew(tgradU)); volTensorField Snl = 1/omega_ *( S&S-(1/3)*magSqr(W)*I + twoSymm(S&W) + (2.5)*(W&W-(1/3)*magSqr(W)*I) ); volScalarField::Internal GbyNu(dev(twoSymm(tgradU()())+Snl) && tgradU()()); volScalarField::Internal G(this->GName(), nut()*GbyNu); tgradU.clear();