mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TurbulenceModels: Do not correct nut if the turbulence model is switched-off
This commit is contained in:
@ -166,6 +166,11 @@ tmp<fvScalarMatrix> kEqn<BasicTurbulenceModel>::kSource() const
|
|||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void kEqn<BasicTurbulenceModel>::correct()
|
void kEqn<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
if (!this->turbulence_)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Local references
|
// Local references
|
||||||
const alphaField& alpha = this->alpha_;
|
const alphaField& alpha = this->alpha_;
|
||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
@ -174,12 +179,6 @@ void kEqn<BasicTurbulenceModel>::correct()
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
|
|
||||||
if (!this->turbulence_)
|
|
||||||
{
|
|
||||||
correctNut();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
eddyViscosity<LESModel<BasicTurbulenceModel> >::correct();
|
eddyViscosity<LESModel<BasicTurbulenceModel> >::correct();
|
||||||
|
|
||||||
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));
|
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));
|
||||||
|
|||||||
@ -215,6 +215,11 @@ tmp<fvScalarMatrix> kEpsilon<BasicTurbulenceModel>::epsilonSource() const
|
|||||||
template<class BasicTurbulenceModel>
|
template<class BasicTurbulenceModel>
|
||||||
void kEpsilon<BasicTurbulenceModel>::correct()
|
void kEpsilon<BasicTurbulenceModel>::correct()
|
||||||
{
|
{
|
||||||
|
if (!this->turbulence_)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Local references
|
// Local references
|
||||||
const alphaField& alpha = this->alpha_;
|
const alphaField& alpha = this->alpha_;
|
||||||
const rhoField& rho = this->rho_;
|
const rhoField& rho = this->rho_;
|
||||||
@ -223,12 +228,6 @@ void kEpsilon<BasicTurbulenceModel>::correct()
|
|||||||
const volVectorField& U = this->U_;
|
const volVectorField& U = this->U_;
|
||||||
volScalarField& nut = this->nut_;
|
volScalarField& nut = this->nut_;
|
||||||
|
|
||||||
if (!this->turbulence_)
|
|
||||||
{
|
|
||||||
correctNut();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
|
eddyViscosity<RASModel<BasicTurbulenceModel> >::correct();
|
||||||
|
|
||||||
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));
|
volScalarField divU(fvc::div(fvc::absolute(phi/fvc::interpolate(rho), U)));
|
||||||
|
|||||||
Reference in New Issue
Block a user