diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/functionObjects/field/turbulenceFields/turbulenceFields.C index 986ad7a958..f35eec6944 100644 --- a/src/functionObjects/field/turbulenceFields/turbulenceFields.C +++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2015-2020 OpenCFD Ltd. + Copyright (C) 2015-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -184,7 +184,7 @@ bool Foam::functionObjects::turbulenceFields::execute() } case cfOmega: { - processField(f, omega(model)); + processField(f, model.omega()); break; } case cfNuTilda: @@ -261,7 +261,7 @@ bool Foam::functionObjects::turbulenceFields::execute() } case ifOmega: { - processField(f, omega(model)); + processField(f, model.omega()); break; } case ifNuTilda: diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/functionObjects/field/turbulenceFields/turbulenceFields.H index 773a93bbee..60d1b0263d 100644 --- a/src/functionObjects/field/turbulenceFields/turbulenceFields.H +++ b/src/functionObjects/field/turbulenceFields/turbulenceFields.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2013-2016 OpenFOAM Foundation - Copyright (C) 2015-2020 OpenCFD Ltd. + Copyright (C) 2015-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -187,6 +187,7 @@ public: //- Turbulence closure model name static const word modelName_; + protected: // Protected Data @@ -208,10 +209,6 @@ protected: const tmp>& tvalue ); - //- Return omega calculated from k and epsilon - template - tmp omega(const Model& model) const; - //- Return nuTilda calculated from k and omega template tmp nuTilda(const Model& model) const; diff --git a/src/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C b/src/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C index 5506a0b9fd..5fa3970f17 100644 --- a/src/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C +++ b/src/functionObjects/field/turbulenceFields/turbulenceFieldsTemplates.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2012-2016 OpenFOAM Foundation - Copyright (C) 2018-2020 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -75,33 +75,6 @@ void Foam::functionObjects::turbulenceFields::processField } -template -Foam::tmp -Foam::functionObjects::turbulenceFields::omega -( - const Model& model -) const -{ - const scalar Cmu = 0.09; - - // Assume k and epsilon are available - const volScalarField k(model.k()); - const volScalarField epsilon(model.epsilon()); - - return tmp::New - ( - IOobject - ( - "omega.tmp", - k.mesh().time().timeName(), - k.mesh() - ), - epsilon/(Cmu*k), - epsilon.boundaryField().types() - ); -} - - template Foam::tmp Foam::functionObjects::turbulenceFields::nuTilda @@ -109,10 +82,12 @@ Foam::functionObjects::turbulenceFields::nuTilda const Model& model ) const { + const dimensionedScalar omega0(dimless/dimTime, SMALL); + return tmp::New ( "nuTilda.tmp", - model.k()/omega(model) + model.k()/(model.omega() + omega0) ); }