Skip to content
Snippets Groups Projects
Commit 6a932318 authored by Kutalmış Berçin's avatar Kutalmış Berçin
Browse files

BUG: turbulenceFields: use omega funcs of turbulence models (fixes #2132)

parent 6595429f
No related merge requests found
......@@ -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<scalar>(f, omega(model));
processField<scalar>(f, model.omega());
break;
}
case cfNuTilda:
......@@ -261,7 +261,7 @@ bool Foam::functionObjects::turbulenceFields::execute()
}
case ifOmega:
{
processField<scalar>(f, omega(model));
processField<scalar>(f, model.omega());
break;
}
case ifNuTilda:
......
......@@ -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<GeometricField<Type, fvPatchField, volMesh>>& tvalue
);
//- Return omega calculated from k and epsilon
template<class Model>
tmp<volScalarField> omega(const Model& model) const;
//- Return nuTilda calculated from k and omega
template<class Model>
tmp<volScalarField> nuTilda(const Model& model) const;
......
......@@ -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<class Model>
Foam::tmp<Foam::volScalarField>
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<volScalarField>::New
(
IOobject
(
"omega.tmp",
k.mesh().time().timeName(),
k.mesh()
),
epsilon/(Cmu*k),
epsilon.boundaryField().types()
);
}
template<class Model>
Foam::tmp<Foam::volScalarField>
Foam::functionObjects::turbulenceFields::nuTilda
......@@ -109,10 +82,12 @@ Foam::functionObjects::turbulenceFields::nuTilda
const Model& model
) const
{
const dimensionedScalar omega0(dimless/dimTime, SMALL);
return tmp<volScalarField>::New
(
"nuTilda.tmp",
model.k()/omega(model)
model.k()/(model.omega() + omega0)
);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment