mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
functionObjects/utilities/turbulenceFields/turbulenceFields: Added k and epsilon
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1870
This commit is contained in:
@ -35,27 +35,31 @@ namespace Foam
|
|||||||
defineTypeNameAndDebug(turbulenceFields, 0);
|
defineTypeNameAndDebug(turbulenceFields, 0);
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const char* NamedEnum<turbulenceFields::compressibleField, 6>::names[] =
|
const char* NamedEnum<turbulenceFields::compressibleField, 8>::names[] =
|
||||||
{
|
{
|
||||||
"R",
|
"k",
|
||||||
"devRhoReff",
|
"epsilon",
|
||||||
"mut",
|
"mut",
|
||||||
"muEff",
|
"muEff",
|
||||||
"alphat",
|
"alphat",
|
||||||
"alphaEff"
|
"alphaEff",
|
||||||
|
"R",
|
||||||
|
"devRhoReff"
|
||||||
};
|
};
|
||||||
const NamedEnum<turbulenceFields::compressibleField, 6>
|
const NamedEnum<turbulenceFields::compressibleField, 8>
|
||||||
turbulenceFields::compressibleFieldNames_;
|
turbulenceFields::compressibleFieldNames_;
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
const char* NamedEnum<turbulenceFields::incompressibleField, 4>::names[] =
|
const char* NamedEnum<turbulenceFields::incompressibleField, 6>::names[] =
|
||||||
{
|
{
|
||||||
"R",
|
"k",
|
||||||
"devReff",
|
"epsilon",
|
||||||
"nut",
|
"nut",
|
||||||
"nuEff"
|
"nuEff",
|
||||||
|
"R",
|
||||||
|
"devReff"
|
||||||
};
|
};
|
||||||
const NamedEnum<turbulenceFields::incompressibleField, 4>
|
const NamedEnum<turbulenceFields::incompressibleField, 6>
|
||||||
turbulenceFields::incompressibleFieldNames_;
|
turbulenceFields::incompressibleFieldNames_;
|
||||||
|
|
||||||
const word turbulenceFields::modelName = turbulenceModel::propertiesName;
|
const word turbulenceFields::modelName = turbulenceModel::propertiesName;
|
||||||
@ -174,14 +178,14 @@ void Foam::turbulenceFields::execute()
|
|||||||
const word& f = iter.key();
|
const word& f = iter.key();
|
||||||
switch (compressibleFieldNames_[f])
|
switch (compressibleFieldNames_[f])
|
||||||
{
|
{
|
||||||
case cfR:
|
case cfK:
|
||||||
{
|
{
|
||||||
processField<symmTensor>(f, model.R());
|
processField<scalar>(f, model.k());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case cfDevRhoReff:
|
case cfEpsilon:
|
||||||
{
|
{
|
||||||
processField<symmTensor>(f, model.devRhoReff());
|
processField<scalar>(f, model.epsilon());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case cfMut:
|
case cfMut:
|
||||||
@ -204,6 +208,16 @@ void Foam::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, model.alphaEff());
|
processField<scalar>(f, model.alphaEff());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case cfR:
|
||||||
|
{
|
||||||
|
processField<symmTensor>(f, model.R());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case cfDevRhoReff:
|
||||||
|
{
|
||||||
|
processField<symmTensor>(f, model.devRhoReff());
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorIn("void Foam::turbulenceFields::execute()")
|
FatalErrorIn("void Foam::turbulenceFields::execute()")
|
||||||
@ -222,14 +236,14 @@ void Foam::turbulenceFields::execute()
|
|||||||
const word& f = iter.key();
|
const word& f = iter.key();
|
||||||
switch (incompressibleFieldNames_[f])
|
switch (incompressibleFieldNames_[f])
|
||||||
{
|
{
|
||||||
case ifR:
|
case ifK:
|
||||||
{
|
{
|
||||||
processField<symmTensor>(f, model.R());
|
processField<scalar>(f, model.k());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ifDevReff:
|
case ifEpsilon:
|
||||||
{
|
{
|
||||||
processField<symmTensor>(f, model.devReff());
|
processField<scalar>(f, model.epsilon());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ifNut:
|
case ifNut:
|
||||||
@ -242,6 +256,16 @@ void Foam::turbulenceFields::execute()
|
|||||||
processField<scalar>(f, model.nuEff());
|
processField<scalar>(f, model.nuEff());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ifR:
|
||||||
|
{
|
||||||
|
processField<symmTensor>(f, model.R());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case ifDevReff:
|
||||||
|
{
|
||||||
|
processField<symmTensor>(f, model.devReff());
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
FatalErrorIn("void Foam::turbulenceFields::execute()")
|
FatalErrorIn("void Foam::turbulenceFields::execute()")
|
||||||
@ -263,15 +287,11 @@ void Foam::turbulenceFields::end()
|
|||||||
|
|
||||||
|
|
||||||
void Foam::turbulenceFields::timeSet()
|
void Foam::turbulenceFields::timeSet()
|
||||||
{
|
{}
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::turbulenceFields::write()
|
void Foam::turbulenceFields::write()
|
||||||
{
|
{}
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,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-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,22 +53,24 @@ Description
|
|||||||
|
|
||||||
\heading Function object usage
|
\heading Function object usage
|
||||||
\table
|
\table
|
||||||
Property | Description | Required | Default value
|
Property | Description | Required | Default value
|
||||||
type | type name: processorField | yes |
|
type | type name: processorField | yes |
|
||||||
fields | fields to store (see below) | yes |
|
fields | fields to store (see below) | yes |
|
||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
Where \c fields can include:
|
Where \c fields can include:
|
||||||
\plaintable
|
\plaintable
|
||||||
R | Stress tensor
|
k | turbulence kinetic energy
|
||||||
devRhoReff |
|
epsilon | turbulence kinetic energy dissipation rate
|
||||||
|
nut | turbulence viscosity (incompressible)
|
||||||
|
nuEff | effective turbulence viscosity (incompressible)
|
||||||
mut | turbulence viscosity (compressible)
|
mut | turbulence viscosity (compressible)
|
||||||
muEff | effective turbulence viscosity (compressible)
|
muEff | effective turbulence viscosity (compressible)
|
||||||
alphat | turbulence thermal diffusivity (compressible)
|
alphat | turbulence thermal diffusivity (compressible)
|
||||||
alphaEff | effective turbulence thermal diffusivity (compressible)
|
alphaEff | effective turbulence thermal diffusivity (compressible)
|
||||||
devReff |
|
R | Reynolds stress tensor
|
||||||
nut | turbulence viscosity (incompressible)
|
devReff | Deviatoric part of the effective Reynolds stress
|
||||||
nuEff | effective turbulence viscosity (incompressible)
|
devRhoReff | Divergence of the Reynolds stress
|
||||||
\endplaintable
|
\endplaintable
|
||||||
|
|
||||||
SeeAlso
|
SeeAlso
|
||||||
@ -109,23 +111,27 @@ public:
|
|||||||
|
|
||||||
enum compressibleField
|
enum compressibleField
|
||||||
{
|
{
|
||||||
cfR,
|
cfK,
|
||||||
cfDevRhoReff,
|
cfEpsilon,
|
||||||
cfMut,
|
cfMut,
|
||||||
cfMuEff,
|
cfMuEff,
|
||||||
cfAlphat,
|
cfAlphat,
|
||||||
cfAlphaEff
|
cfAlphaEff,
|
||||||
|
cfR,
|
||||||
|
cfDevRhoReff
|
||||||
};
|
};
|
||||||
static const NamedEnum<compressibleField, 6> compressibleFieldNames_;
|
static const NamedEnum<compressibleField, 8> compressibleFieldNames_;
|
||||||
|
|
||||||
enum incompressibleField
|
enum incompressibleField
|
||||||
{
|
{
|
||||||
ifR,
|
ifK,
|
||||||
ifDevReff,
|
ifEpsilon,
|
||||||
ifNut,
|
ifNut,
|
||||||
ifNuEff
|
ifNuEff,
|
||||||
|
ifR,
|
||||||
|
ifDevReff
|
||||||
};
|
};
|
||||||
static const NamedEnum<incompressibleField, 4> incompressibleFieldNames_;
|
static const NamedEnum<incompressibleField, 6> incompressibleFieldNames_;
|
||||||
|
|
||||||
static const word modelName;
|
static const word modelName;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user