mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: turbulenceFields FO - added nuTilda and turbulence length scale
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -54,12 +54,14 @@ Foam::functionObjects::turbulenceFields::compressibleFieldNames_
|
|||||||
{ compressibleField::cfK, "k" },
|
{ compressibleField::cfK, "k" },
|
||||||
{ compressibleField::cfEpsilon, "epsilon" },
|
{ compressibleField::cfEpsilon, "epsilon" },
|
||||||
{ compressibleField::cfOmega, "omega" },
|
{ compressibleField::cfOmega, "omega" },
|
||||||
|
{ compressibleField::cfNuTilda, "nuTilda" },
|
||||||
{ compressibleField::cfMut, "mut" },
|
{ compressibleField::cfMut, "mut" },
|
||||||
{ compressibleField::cfMuEff, "muEff" },
|
{ compressibleField::cfMuEff, "muEff" },
|
||||||
{ compressibleField::cfAlphat, "alphat" },
|
{ compressibleField::cfAlphat, "alphat" },
|
||||||
{ compressibleField::cfAlphaEff, "alphaEff" },
|
{ compressibleField::cfAlphaEff, "alphaEff" },
|
||||||
{ compressibleField::cfR, "R" },
|
{ compressibleField::cfR, "R" },
|
||||||
{ compressibleField::cfDevRhoReff, "devRhoReff" },
|
{ compressibleField::cfDevRhoReff, "devRhoReff" },
|
||||||
|
{ compressibleField::cfL, "L" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -72,10 +74,12 @@ Foam::functionObjects::turbulenceFields::incompressibleFieldNames_
|
|||||||
{ incompressibleField::ifK, "k" },
|
{ incompressibleField::ifK, "k" },
|
||||||
{ incompressibleField::ifEpsilon, "epsilon" },
|
{ incompressibleField::ifEpsilon, "epsilon" },
|
||||||
{ incompressibleField::ifOmega, "omega" },
|
{ incompressibleField::ifOmega, "omega" },
|
||||||
|
{ incompressibleField::ifNuTilda, "nuTilda" },
|
||||||
{ incompressibleField::ifNut, "nut" },
|
{ incompressibleField::ifNut, "nut" },
|
||||||
{ incompressibleField::ifNuEff, "nuEff" },
|
{ incompressibleField::ifNuEff, "nuEff" },
|
||||||
{ incompressibleField::ifR, "R" },
|
{ incompressibleField::ifR, "R" },
|
||||||
{ incompressibleField::ifDevReff, "devReff" },
|
{ incompressibleField::ifDevReff, "devReff" },
|
||||||
|
{ incompressibleField::ifL, "L" },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -193,6 +197,11 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, omega(model));
|
processField<scalar>(f, omega(model));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case cfNuTilda:
|
||||||
|
{
|
||||||
|
processField<scalar>(f, nuTilda(model));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case cfMut:
|
case cfMut:
|
||||||
{
|
{
|
||||||
processField<scalar>(f, model.mut());
|
processField<scalar>(f, model.mut());
|
||||||
@ -223,6 +232,11 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<symmTensor>(f, model.devRhoReff());
|
processField<symmTensor>(f, model.devRhoReff());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case cfL:
|
||||||
|
{
|
||||||
|
processField<scalar>(f, L(model));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
@ -256,6 +270,11 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, omega(model));
|
processField<scalar>(f, omega(model));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ifNuTilda:
|
||||||
|
{
|
||||||
|
processField<scalar>(f, nuTilda(model));
|
||||||
|
break;
|
||||||
|
}
|
||||||
case ifNut:
|
case ifNut:
|
||||||
{
|
{
|
||||||
processField<scalar>(f, model.nut());
|
processField<scalar>(f, model.nut());
|
||||||
@ -276,6 +295,11 @@ bool Foam::functionObjects::turbulenceFields::execute()
|
|||||||
processField<symmTensor>(f, model.devReff());
|
processField<symmTensor>(f, model.devReff());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ifL:
|
||||||
|
{
|
||||||
|
processField<scalar>(f, L(model));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd.
|
\\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -65,6 +65,7 @@ Usage
|
|||||||
k | turbulence kinetic energy
|
k | turbulence kinetic energy
|
||||||
epsilon | turbulence kinetic energy dissipation rate
|
epsilon | turbulence kinetic energy dissipation rate
|
||||||
omega | turbulence specific dissipation rate
|
omega | turbulence specific dissipation rate
|
||||||
|
nuTilda | turbulence modified viscosity
|
||||||
nut | turbulence viscosity (incompressible)
|
nut | turbulence viscosity (incompressible)
|
||||||
nuEff | effective turbulence viscosity (incompressible)
|
nuEff | effective turbulence viscosity (incompressible)
|
||||||
mut | turbulence viscosity (compressible)
|
mut | turbulence viscosity (compressible)
|
||||||
@ -74,6 +75,7 @@ Usage
|
|||||||
R | Reynolds stress tensor
|
R | Reynolds stress tensor
|
||||||
devReff | Deviatoric part of the effective Reynolds stress
|
devReff | Deviatoric part of the effective Reynolds stress
|
||||||
devRhoReff | Divergence of the Reynolds stress
|
devRhoReff | Divergence of the Reynolds stress
|
||||||
|
L | turbulence length scale
|
||||||
\endplaintable
|
\endplaintable
|
||||||
|
|
||||||
See also
|
See also
|
||||||
@ -116,12 +118,14 @@ public:
|
|||||||
cfK,
|
cfK,
|
||||||
cfEpsilon,
|
cfEpsilon,
|
||||||
cfOmega,
|
cfOmega,
|
||||||
|
cfNuTilda,
|
||||||
cfMut,
|
cfMut,
|
||||||
cfMuEff,
|
cfMuEff,
|
||||||
cfAlphat,
|
cfAlphat,
|
||||||
cfAlphaEff,
|
cfAlphaEff,
|
||||||
cfR,
|
cfR,
|
||||||
cfDevRhoReff
|
cfDevRhoReff,
|
||||||
|
cfL
|
||||||
};
|
};
|
||||||
static const Enum<compressibleField> compressibleFieldNames_;
|
static const Enum<compressibleField> compressibleFieldNames_;
|
||||||
|
|
||||||
@ -130,10 +134,12 @@ public:
|
|||||||
ifK,
|
ifK,
|
||||||
ifEpsilon,
|
ifEpsilon,
|
||||||
ifOmega,
|
ifOmega,
|
||||||
|
ifNuTilda,
|
||||||
ifNut,
|
ifNut,
|
||||||
ifNuEff,
|
ifNuEff,
|
||||||
ifR,
|
ifR,
|
||||||
ifDevReff
|
ifDevReff,
|
||||||
|
ifL
|
||||||
};
|
};
|
||||||
static const Enum<incompressibleField> incompressibleFieldNames_;
|
static const Enum<incompressibleField> incompressibleFieldNames_;
|
||||||
|
|
||||||
@ -165,6 +171,14 @@ protected:
|
|||||||
template<class Model>
|
template<class Model>
|
||||||
tmp<volScalarField> omega(const Model& model) const;
|
tmp<volScalarField> omega(const Model& model) const;
|
||||||
|
|
||||||
|
//- Return nuTilda calculated from k and omega
|
||||||
|
template<class Model>
|
||||||
|
tmp<volScalarField> nuTilda(const Model& model) const;
|
||||||
|
|
||||||
|
//- Return L calculated from k and epsilon
|
||||||
|
template<class Model>
|
||||||
|
tmp<volScalarField> L(const Model& model) const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -91,7 +91,7 @@ Foam::functionObjects::turbulenceFields::omega
|
|||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
(
|
(
|
||||||
"omega",
|
"omega.tmp",
|
||||||
k.mesh().time().timeName(),
|
k.mesh().time().timeName(),
|
||||||
k.mesh()
|
k.mesh()
|
||||||
),
|
),
|
||||||
@ -102,4 +102,43 @@ Foam::functionObjects::turbulenceFields::omega
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Model>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::functionObjects::turbulenceFields::nuTilda
|
||||||
|
(
|
||||||
|
const Model& model
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField("nuTilda.tmp", model.k()/omega(model))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Model>
|
||||||
|
Foam::tmp<Foam::volScalarField>
|
||||||
|
Foam::functionObjects::turbulenceFields::L
|
||||||
|
(
|
||||||
|
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());
|
||||||
|
const dimensionedScalar eps0("eps0", epsilon.dimensions(), SMALL);
|
||||||
|
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField
|
||||||
|
(
|
||||||
|
"L.tmp",
|
||||||
|
pow(Cmu, 0.75)*pow(k, 1.5)/(epsilon + eps0)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user