MomentumTransportModels: Added omega() function
Replaces the local definition of the omega function in functionObjects::turbulenceFields. Will also be used in interfacial transfers and coupling in multiphase turbulence modelling where different turbulence models are used in different phases.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -191,7 +191,7 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
||||
}
|
||||
case compressibleField::omega:
|
||||
{
|
||||
processField<scalar>(f, omega(model));
|
||||
processField<scalar>(f, model.omega());
|
||||
break;
|
||||
}
|
||||
case compressibleField::nut:
|
||||
@ -249,7 +249,7 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
||||
}
|
||||
case compressibleField::omega:
|
||||
{
|
||||
processField<scalar>(f, omega(model));
|
||||
processField<scalar>(f, model.omega());
|
||||
break;
|
||||
}
|
||||
case compressibleField::nut:
|
||||
@ -308,7 +308,7 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
||||
}
|
||||
case incompressibleField::omega:
|
||||
{
|
||||
processField<scalar>(f, omega(model));
|
||||
processField<scalar>(f, model.omega());
|
||||
break;
|
||||
}
|
||||
case incompressibleField::nut:
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -161,10 +161,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;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -73,37 +73,4 @@ 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 volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
IOobject::groupName("omega", phaseName_),
|
||||
k.mesh().time().timeName(),
|
||||
k.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
epsilon/(Cmu*k),
|
||||
epsilon.boundaryField().types()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user