turbulenceModels/LES/kEqn: Added support for fvOptions

This commit is contained in:
Henry Weller 2015-12-03 13:39:55 +00:00
parent 05fa38f5e3
commit e8f532f857

View File

@ -24,6 +24,7 @@ License
\*---------------------------------------------------------------------------*/
#include "kEqn.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -39,6 +40,7 @@ void kEqn<BasicTurbulenceModel>::correctNut()
{
this->nut_ = Ck_*sqrt(k_)*this->delta();
this->nut_.correctBoundaryConditions();
fv::options::New(this->mesh_).correct(this->nut_);
BasicTurbulenceModel::correctNut();
}
@ -171,6 +173,7 @@ void kEqn<BasicTurbulenceModel>::correct()
const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi_;
const volVectorField& U = this->U_;
volScalarField& nut = this->nut_;
fv::options& fvOptions(fv::options::New(this->mesh_));
LESeddyViscosity<BasicTurbulenceModel>::correct();
@ -190,10 +193,13 @@ void kEqn<BasicTurbulenceModel>::correct()
- fvm::SuSp((2.0/3.0)*alpha*rho*divU, k_)
- fvm::Sp(this->Ce_*alpha*rho*sqrt(k_)/this->delta(), k_)
+ kSource()
+ fvOptions(alpha, rho, k_)
);
kEqn().relax();
fvOptions.constrain(kEqn());
solve(kEqn);
fvOptions.correct(k_);
bound(k_, this->kMin_);
correctNut();