Adding warning msgs to RAS S-A models if requesting k or eps - not defined

This commit is contained in:
andy 2009-08-03 11:57:03 +01:00
parent 96f23c2796
commit ab4c4840b4
3 changed files with 59 additions and 34 deletions

View File

@ -249,6 +249,54 @@ SpalartAllmaras::SpalartAllmaras
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> SpalartAllmaras::k() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::k() const")
<< "Turbulence kinetic energy not defined for Spalart-Allmaras model. "
<< "Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"k",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
)
);
}
tmp<volScalarField> SpalartAllmaras::epsilon() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const")
<< "Turbulence kinetic energy dissipation rate not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"epslion",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
)
);
}
tmp<volSymmTensorField> SpalartAllmaras::R() const
{
return tmp<volSymmTensorField>

View File

@ -188,42 +188,10 @@ public:
}
//- Return the turbulence kinetic energy
virtual tmp<volScalarField> k() const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"k",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0)
)
);
}
virtual tmp<volScalarField> k() const;
//- Return the turbulence kinetic energy dissipation rate
virtual tmp<volScalarField> epsilon() const
{
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"epslion",
runTime_.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0)
)
);
}
virtual tmp<volScalarField> epsilon() const;
//- Return the Reynolds stress tensor
virtual tmp<volSymmTensorField> R() const;

View File

@ -233,6 +233,10 @@ tmp<volScalarField> SpalartAllmaras::DnuTildaEff() const
tmp<volScalarField> SpalartAllmaras::k() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::k() const")
<< "Turbulence kinetic energy not defined for Spalart-Allmaras model. "
<< "Returning zero field" << endl;
return tmp<volScalarField>
(
new volScalarField
@ -252,6 +256,11 @@ tmp<volScalarField> SpalartAllmaras::k() const
tmp<volScalarField> SpalartAllmaras::epsilon() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const")
<< "Turbulence kinetic energy dissipation rate not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;
return tmp<volScalarField>
(
new volScalarField