Commit ebd9f94a authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects/utilities/turbulenceFields/turbulenceFields: Added k and epsilon

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