devReff()通过devRhoReff()实现其功能 (rho =1)?(OF4.x)
-
- IncompressibleTurbulenceModel.C 中的代码:
首先给出devReff() 和devRhoReff()的代码,如下:
template<class TransportModel> Foam::tmp<Foam::volSymmTensorField> Foam::IncompressibleTurbulenceModel<TransportModel>::devReff() const { return devRhoReff(); } ... template<class TransportModel> Foam::tmp<Foam::volSymmTensorField> Foam::IncompressibleTurbulenceModel<TransportModel>:: devRhoReff() const { NotImplemented; return devReff(); }
可以看到,devReff()调用了 devRhoReff()。然而在IncompressibleTurbulenceModel.C中,并没有找到这两个函数更进一步的细节
- 接着,在linearViscousStress.C 中的的代码中,
发现devRhoReff()的定义
template<class BasicTurbulenceModel> Foam::tmp<Foam::volSymmTensorField> Foam::linearViscousStress<BasicTurbulenceModel>::devRhoReff() const { return tmp<volSymmTensorField> ( new volSymmTensorField ( IOobject ( IOobject::groupName("devRhoReff", this->U_.group()), this->runTime_.timeName(), this->mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), (-(this->alpha_*this->rho_*this->nuEff())) *dev(twoSymm(fvc::grad(this->U_))) ) ); }
- 先将问题总结如下:
1)NotImplemented是什么意思?为什么不可压中devRhoReff()返回的是devReff()?
是否可以理解为,不可压缩流里面的devReff()执行的是其它代码(linearViscousStress.C)中的devRhoReff()?
template<class TransportModel> Foam::tmp<Foam::volSymmTensorField> Foam::IncompressibleTurbulenceModel<TransportModel>:: devRhoReff() const { NotImplemented; return devReff(); }
2)若devReff() 实际上执行的是devRhoReff()(linearViscousStress.C)
并且在CFDonline一个帖子里,链接文本,有人说devReff()实际上是devRhoReff()中rho为1时的情况
''it seems like it's best to simply search for "devRhoReff()", because "devReff()" is just when "rho" is simply 1.0.''。
若是如此,这里面rho_=1是在哪里定义的,我一直没找到相应代码望各位不吝赐教 :)!
- IncompressibleTurbulenceModel.C 中的代码:
-