TurbulenceModels: Do not correct nut if the turbulence model is switched-off

This commit is contained in:
Henry 2013-08-01 22:18:54 +01:00
parent b0eb5b8ab5
commit dfddcad597
2 changed files with 10 additions and 12 deletions

View File

@ -166,6 +166,11 @@ tmp<fvScalarMatrix> kEqn<BasicTurbulenceModel>::kSource() const
template<class BasicTurbulenceModel>
void kEqn<BasicTurbulenceModel>::correct()
{
if (!this->turbulence_)
{
return;
}
// Local references
const alphaField& alpha = this->alpha_;
const rhoField& rho = this->rho_;
@ -174,12 +179,6 @@ void kEqn<BasicTurbulenceModel>::correct()
const volVectorField& U = this->U_;
volScalarField& nut = this->nut_;
if (!this->turbulence_)
{
correctNut();
return;
}
eddyViscosity<LESModel<BasicTurbulenceModel> >::correct();
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));

View File

@ -215,6 +215,11 @@ tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::epsilonSource() const
template<class BasicTurbulenceModel>
void kEpsilon<BasicTurbulenceModel>::correct()
{
if (!this->turbulence_)
{
return;
}
// Local references
const alphaField& alpha = this->alpha_;
const rhoField& rho = this->rho_;
@ -223,12 +228,6 @@ void kEpsilon<BasicTurbulenceModel>::correct()
const volVectorField& U = this->U_;
volScalarField& nut = this->nut_;
if (!this->turbulence_)
{
correctNut();
return;
}
eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));