turbulence models get thermal dissipation source term(s)

- thermalDissipation()
  corresponds to the energy lost due to viscous efffects and
  what exits the energy cascade via dissipation.

- thermalDissipationEff()
  corresponds to the energy lost due to effective viscous efffects.
  Everything that is lost from momentum. Thus essentially assumes
  turbulent equilibrium, but is what STAR-CD and Fluent seem to be using.
  Thus even if it's wrong, provide it anyhow.

- minor consistency update in comments
This commit is contained in:
Mark Olesen
2009-07-10 21:47:58 +02:00
parent d4d31594b1
commit 7cbcc02d09
31 changed files with 537 additions and 116 deletions

View File

@ -76,6 +76,7 @@ LESModel::LESModel
) )
), ),
turbulence_(true), // TODO: turbulence_(lookup("turbulence")),
printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)), printCoeffs_(lookupOrDefault<Switch>("printCoeffs", false)),
coeffDict_(subDictPtr(type + "Coeffs")), coeffDict_(subDictPtr(type + "Coeffs")),
@ -180,6 +181,55 @@ autoPtr<LESModel> LESModel::New
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> LESModel::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
) + this->rho() * this->epsilon()
)
);
}
tmp<volScalarField> LESModel::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
this->muEff()*dev(twoSymm(tgradU()))
- ((2.0/3.0)*I) * this->rho() * this->k()
) && tgradU()
)
);
}
void LESModel::correct(const tmp<volTensorField>&) void LESModel::correct(const tmp<volTensorField>&)
{ {
delta_().correct(); delta_().correct();

View File

@ -33,13 +33,13 @@ Class
Foam::compressible::LESModel Foam::compressible::LESModel
Description Description
Class for all compressible flow LES SGS models. Base class for all compressible flow LES SGS models.
This class defines the basic interface for a compressible flow SGS model, This class defines the basic interface for a compressible flow SGS
and encapsulates data of value to all possible models. In particular model, and encapsulates data of value to all possible models.
this includes references to all the dependent fields (rho, U, phi), In particular this includes references to all the dependent fields
the physical viscosity mu, and the LESProperties dictionary, (rho, U, phi), the physical viscosity mu, and the LESProperties
which contains the model selection and model coefficients. dictionary, which contains the model selection and model coefficients.
SourceFiles SourceFiles
LESModel.C LESModel.C
@ -80,6 +80,7 @@ protected:
// Protected data // Protected data
Switch turbulence_;
Switch printCoeffs_; Switch printCoeffs_;
dictionary coeffDict_; dictionary coeffDict_;
@ -292,6 +293,15 @@ public:
} }
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct Eddy-Viscosity and related properties. //- Correct Eddy-Viscosity and related properties.
// This calls correct(const tmp<volTensorField>& gradU) by supplying // This calls correct(const tmp<volTensorField>& gradU) by supplying
// gradU calculated locally. // gradU calculated locally.

View File

@ -191,6 +191,55 @@ autoPtr<RASModel> RASModel::New
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> RASModel::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
) + this->rho() * this->epsilon()
)
);
}
tmp<volScalarField> RASModel::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
this->muEff()*dev(twoSymm(tgradU()))
- ((2.0/3.0)*I) * this->rho() * this->k()
) && tgradU()
)
);
}
scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
{ {
scalar ypl = 11.0; scalar ypl = 11.0;

View File

@ -345,6 +345,15 @@ public:
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0; virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Return yPlus for the given patch //- Return yPlus for the given patch
virtual tmp<scalarField> yPlus(const label patchI) const; virtual tmp<scalarField> yPlus(const label patchI) const;

View File

@ -177,6 +177,50 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
} }
tmp<volScalarField> laminar::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
tmp<volScalarField> laminar::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
bool laminar::read() bool laminar::read()
{ {
return RASModel::read(); return RASModel::read();

View File

@ -30,7 +30,6 @@ Description
SourceFiles SourceFiles
laminar.C laminar.C
laminarCorrect.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
@ -82,42 +81,51 @@ public:
// Member Functions // Member Functions
//- Return the turbulence viscosity, i.e. 0 for laminar flow //- Return the turbulence viscosity, i.e. 0 for laminar flow
tmp<volScalarField> mut() const; virtual tmp<volScalarField> mut() const;
//- Return the effective viscosity, i.e. the laminar viscosity //- Return the effective viscosity, i.e. the laminar viscosity
tmp<volScalarField> muEff() const virtual tmp<volScalarField> muEff() const
{ {
return tmp<volScalarField>(new volScalarField("muEff", mu())); return tmp<volScalarField>(new volScalarField("muEff", mu()));
} }
//- Return the effective turbulent thermal diffusivity, //- Return the effective turbulent thermal diffusivity,
// i.e. the laminar thermal diffusivity // i.e. the laminar thermal diffusivity
tmp<volScalarField> alphaEff() const virtual tmp<volScalarField> alphaEff() const
{ {
return tmp<volScalarField>(new volScalarField("alphaEff", alpha())); return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
} }
//- Return the turbulence kinetic energy, i.e. 0 for laminar flow //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
tmp<volScalarField> k() const; virtual tmp<volScalarField> k() const;
//- Return the turbulence kinetic energy dissipation rate, //- Return the turbulence kinetic energy dissipation rate,
// i.e. 0 for laminar flow // i.e. 0 for laminar flow
tmp<volScalarField> epsilon() const; virtual tmp<volScalarField> epsilon() const;
//- Return the Reynolds stress tensor, i.e. 0 for laminar flow //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
tmp<volSymmTensorField> R() const; virtual tmp<volSymmTensorField> R() const;
//- Return the effective stress tensor, i.e. the laminar stress //- Return the effective stress tensor, i.e. the laminar stress
tmp<volSymmTensorField> devRhoReff() const; virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct the laminar viscosity //- Correct the laminar viscosity
void correct(); virtual void correct();
//- Read RASProperties dictionary //- Read RASProperties dictionary
bool read(); virtual bool read();
}; };

View File

@ -52,10 +52,10 @@ laminar::laminar
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermophysicalModel
) )
: :
turbulenceModel(rho, U, phi, thermoPhysicalModel) turbulenceModel(rho, U, phi, thermophysicalModel)
{} {}
@ -66,10 +66,10 @@ autoPtr<laminar> laminar::New
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermophysicalModel
) )
{ {
return autoPtr<laminar>(new laminar(rho, U, phi, thermoPhysicalModel)); return autoPtr<laminar>(new laminar(rho, U, phi, thermophysicalModel));
} }
@ -96,18 +96,6 @@ tmp<volScalarField> laminar::mut() const
} }
tmp<volScalarField> laminar::muEff() const
{
return tmp<volScalarField>(new volScalarField("muEff", mu()));
}
tmp<volScalarField> laminar::alphaEff() const
{
return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
}
tmp<volScalarField> laminar::k() const tmp<volScalarField> laminar::k() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
@ -207,6 +195,50 @@ tmp<fvVectorMatrix> laminar::divDevRhoReff(volVectorField& U) const
} }
tmp<volScalarField> laminar::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
tmp<volScalarField> laminar::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->mu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
bool laminar::read() bool laminar::read()
{ {
return true; return true;

View File

@ -67,7 +67,7 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermophysicalModel
); );
@ -79,7 +79,7 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermoPhysicalModel const basicThermo& thermophysicalModel
); );
@ -94,10 +94,17 @@ public:
virtual tmp<volScalarField> mut() const; virtual tmp<volScalarField> mut() const;
//- Return the effective viscosity, i.e. the laminar viscosity //- Return the effective viscosity, i.e. the laminar viscosity
virtual tmp<volScalarField> muEff() const; virtual tmp<volScalarField> muEff() const
{
return tmp<volScalarField>(new volScalarField("muEff", mu()));
}
//- Return the effective turbulent thermal diffusivity //- Return the effective turbulent thermal diffusivity,
virtual tmp<volScalarField> alphaEff() const; // i.e. the laminar thermal diffusivity
virtual tmp<volScalarField> alphaEff() const
{
return tmp<volScalarField>(new volScalarField("alphaEff", alpha()));
}
//- Return the turbulence kinetic energy, i.e. 0 for laminar flow //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
virtual tmp<volScalarField> k() const; virtual tmp<volScalarField> k() const;
@ -109,12 +116,21 @@ public:
//- Return the Reynolds stress tensor, i.e. 0 for laminar flow //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
virtual tmp<volSymmTensorField> R() const; virtual tmp<volSymmTensorField> R() const;
//- Return the effective stress tensor including the laminar stress //- Return the effective stress tensor, i.e. the laminar stress
virtual tmp<volSymmTensorField> devRhoReff() const; virtual tmp<volSymmTensorField> devRhoReff() const;
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const; virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct the laminar viscosity //- Correct the laminar viscosity
virtual void correct(); virtual void correct();

View File

@ -117,12 +117,6 @@ autoPtr<turbulenceModel> turbulenceModel::New
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
turbulenceModel::~turbulenceModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void turbulenceModel::correct() void turbulenceModel::correct()

View File

@ -65,7 +65,7 @@ namespace compressible
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class turbulenceModel Declaration Class turbulenceModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class turbulenceModel class turbulenceModel
@ -144,7 +144,8 @@ public:
//- Destructor //- Destructor
virtual ~turbulenceModel(); virtual ~turbulenceModel()
{}
// Member Functions // Member Functions
@ -209,6 +210,15 @@ public:
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0; virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const = 0;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const = 0;
//- Solve the turbulence equations and correct the turbulence viscosity //- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct() = 0; virtual void correct() = 0;

View File

@ -125,8 +125,8 @@ autoPtr<LESModel> LESModel::New
{ {
FatalErrorIn FatalErrorIn
( (
"LESModel::select(const volVectorField&, const " "LESModel::New(const volVectorField& U, const "
"surfaceScalarField&, transportModel&)" "surfaceScalarField& phi, transportModel&)"
) << "Unknown LESModel type " << modelName ) << "Unknown LESModel type " << modelName
<< endl << endl << endl << endl
<< "Valid LESModel types are :" << endl << "Valid LESModel types are :" << endl
@ -138,14 +138,57 @@ autoPtr<LESModel> LESModel::New
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
LESModel::~LESModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> LESModel::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
) + this->epsilon()
)
);
}
tmp<volScalarField> LESModel::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
this->nuEff()*dev(twoSymm(tgradU()))
- ((2.0/3.0)*I) * this->k()
) && tgradU()
)
);
}
void LESModel::correct(const tmp<volTensorField>&) void LESModel::correct(const tmp<volTensorField>&)
{ {
turbulenceModel::correct(); turbulenceModel::correct();

View File

@ -35,10 +35,10 @@ Description
Base class for all incompressible flow LES SGS models. Base class for all incompressible flow LES SGS models.
This class defines the basic interface for an incompressible flow SGS This class defines the basic interface for an incompressible flow SGS
model, and encapsulates data of value to all possible models. In model, and encapsulates data of value to all possible models.
particular this includes references to all the dependent fields (U, In particular this includes references to all the dependent fields
phi), the physical viscosity nu, and the LESProperties (U, phi), the physical viscosity nu, and the LESProperties
dictionary which contains the model selection and model coefficients. dictionary, which contains the model selection and model coefficients.
SourceFiles SourceFiles
LESModel.C LESModel.C
@ -152,7 +152,8 @@ public:
//- Destructor //- Destructor
virtual ~LESModel(); virtual ~LESModel()
{}
// Member Functions // Member Functions
@ -241,14 +242,23 @@ public:
} }
//- Correct Eddy-Viscosity and related properties //- The source for the enthalpy equation resulting from
virtual void correct(const tmp<volTensorField>& gradU); // viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct Eddy-Viscosity and related properties. //- Correct Eddy-Viscosity and related properties.
// This calls correct(const tmp<volTensorField>& gradU) by supplying // This calls correct(const tmp<volTensorField>& gradU) by supplying
// gradU calculated locally. // gradU calculated locally.
void correct(); void correct();
//- Correct Eddy-Viscosity and related properties
virtual void correct(const tmp<volTensorField>& gradU);
//- Read LESProperties dictionary //- Read LESProperties dictionary
virtual bool read() = 0; virtual bool read() = 0;
}; };

View File

@ -133,12 +133,6 @@ dynOneEqEddy::dynOneEqEddy
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
dynOneEqEddy::~dynOneEqEddy()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void dynOneEqEddy::correct(const tmp<volTensorField>& gradU) void dynOneEqEddy::correct(const tmp<volTensorField>& gradU)

View File

@ -116,7 +116,8 @@ public:
//- Destructor //- Destructor
virtual ~dynOneEqEddy(); virtual ~dynOneEqEddy()
{}
// Member Functions // Member Functions

View File

@ -124,12 +124,6 @@ dynSmagorinsky::dynSmagorinsky
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
dynSmagorinsky::~dynSmagorinsky()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void dynSmagorinsky::correct(const tmp<volTensorField>& gradU) void dynSmagorinsky::correct(const tmp<volTensorField>& gradU)

View File

@ -125,7 +125,8 @@ public:
//- Destructor //- Destructor
virtual ~dynSmagorinsky(); virtual ~dynSmagorinsky()
{}
// Member Functions // Member Functions

View File

@ -126,12 +126,6 @@ locDynOneEqEddy::locDynOneEqEddy
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
locDynOneEqEddy::~locDynOneEqEddy()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void locDynOneEqEddy::correct(const tmp<volTensorField>& gradU) void locDynOneEqEddy::correct(const tmp<volTensorField>& gradU)

View File

@ -138,7 +138,8 @@ public:
//- Destructor //- Destructor
virtual ~locDynOneEqEddy(); virtual ~locDynOneEqEddy()
{}
// Member Functions // Member Functions

View File

@ -56,12 +56,6 @@ scaleSimilarity::scaleSimilarity
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
scaleSimilarity::~scaleSimilarity()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> scaleSimilarity::k() const tmp<volScalarField> scaleSimilarity::k() const

View File

@ -90,7 +90,8 @@ public:
//- Destructor //- Destructor
virtual ~scaleSimilarity(); virtual ~scaleSimilarity()
{}
// Member Functions // Member Functions

View File

@ -174,14 +174,57 @@ autoPtr<RASModel> RASModel::New
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
RASModel::~RASModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<volScalarField> RASModel::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
) + this->epsilon()
)
);
}
tmp<volScalarField> RASModel::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
(
this->nuEff()*dev(twoSymm(tgradU()))
- ((2.0/3.0)*I) * this->k()
) && tgradU()
)
);
}
scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const
{ {
scalar ypl = 11.0; scalar ypl = 11.0;

View File

@ -182,7 +182,8 @@ public:
//- Destructor //- Destructor
virtual ~RASModel(); virtual ~RASModel()
{}
// Member Functions // Member Functions
@ -310,9 +311,6 @@ public:
); );
} }
//- Return yPlus for the given patch
virtual tmp<scalarField> yPlus(const label patchI) const;
//- Return the turbulence kinetic energy //- Return the turbulence kinetic energy
virtual tmp<volScalarField> k() const = 0; virtual tmp<volScalarField> k() const = 0;
@ -328,6 +326,18 @@ public:
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0; virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Return yPlus for the given patch
virtual tmp<scalarField> yPlus(const label patchI) const;
//- Solve the turbulence equations and correct the turbulence viscosity //- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct() = 0; virtual void correct() = 0;

View File

@ -77,12 +77,6 @@ tmp<volScalarField> laminar::nut() const
} }
tmp<volScalarField> laminar::nuEff() const
{
return tmp<volScalarField>(new volScalarField("nuEff", nu()));
}
tmp<volScalarField> laminar::k() const tmp<volScalarField> laminar::k() const
{ {
return tmp<volScalarField> return tmp<volScalarField>
@ -182,6 +176,50 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
} }
tmp<volScalarField> laminar::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
tmp<volScalarField> laminar::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
bool laminar::read() bool laminar::read()
{ {
return RASModel::read(); return RASModel::read();

View File

@ -83,7 +83,10 @@ public:
virtual tmp<volScalarField> nut() const; virtual tmp<volScalarField> nut() const;
//- Return the effective viscosity, i.e. the laminar viscosity //- Return the effective viscosity, i.e. the laminar viscosity
virtual tmp<volScalarField> nuEff() const; virtual tmp<volScalarField> nuEff() const
{
return tmp<volScalarField>(new volScalarField("nuEff", nu()));
}
//- Return the turbulence kinetic energy, i.e. 0 for laminar flow //- Return the turbulence kinetic energy, i.e. 0 for laminar flow
virtual tmp<volScalarField> k() const; virtual tmp<volScalarField> k() const;
@ -95,12 +98,21 @@ public:
//- Return the Reynolds stress tensor, i.e. 0 for laminar flow //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
virtual tmp<volSymmTensorField> R() const; virtual tmp<volSymmTensorField> R() const;
//- Return the effective stress tensor including the laminar stress //- Return the effective stress tensor, i.e. the laminar stress
virtual tmp<volSymmTensorField> devReff() const; virtual tmp<volSymmTensorField> devReff() const;
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct the laminar viscosity //- Correct the laminar viscosity
virtual void correct(); virtual void correct();

View File

@ -199,6 +199,50 @@ tmp<fvVectorMatrix> laminar::divDevReff(volVectorField& U) const
} }
tmp<volScalarField> laminar::thermalDissipation() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipation",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
tmp<volScalarField> laminar::thermalDissipationEff() const
{
tmp<volTensorField> tgradU = fvc::grad(this->U());
return tmp<volScalarField>
(
new volScalarField
(
IOobject
(
"thermalDissipationEff",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
( this->nu()*dev(twoSymm(tgradU())) ) && tgradU()
)
);
}
bool laminar::read() bool laminar::read()
{ {
return true; return true;

View File

@ -104,12 +104,21 @@ public:
//- Return the Reynolds stress tensor, i.e. 0 for laminar flow //- Return the Reynolds stress tensor, i.e. 0 for laminar flow
virtual tmp<volSymmTensorField> R() const; virtual tmp<volSymmTensorField> R() const;
//- Return the effective stress tensor including the laminar stress //- Return the effective stress tensor, i.e. the laminar stress
virtual tmp<volSymmTensorField> devReff() const; virtual tmp<volSymmTensorField> devReff() const;
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const; virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const;
//- Correct the laminar viscosity //- Correct the laminar viscosity
virtual void correct(); virtual void correct();

View File

@ -110,12 +110,6 @@ autoPtr<turbulenceModel> turbulenceModel::New
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
turbulenceModel::~turbulenceModel()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void turbulenceModel::correct() void turbulenceModel::correct()

View File

@ -139,7 +139,8 @@ public:
//- Destructor //- Destructor
virtual ~turbulenceModel(); virtual ~turbulenceModel()
{}
// Member Functions // Member Functions
@ -189,6 +190,15 @@ public:
//- Return the source term for the momentum equation //- Return the source term for the momentum equation
virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0; virtual tmp<fvVectorMatrix> divDevReff(volVectorField& U) const = 0;
//- The source for the enthalpy equation resulting from
// viscous and turbulent dissipation
virtual tmp<volScalarField> thermalDissipation() const = 0;
//- The source for the enthalpy equation resulting from
// the effective viscous dissipation
// (ie, when turbulent production and dissipation are in equilibrium)
virtual tmp<volScalarField> thermalDissipationEff() const = 0;
//- Solve the turbulence equations and correct the turbulence viscosity //- Solve the turbulence equations and correct the turbulence viscosity
virtual void correct() = 0; virtual void correct() = 0;

View File

@ -19,6 +19,8 @@ LESModel oneEqEddy;
delta cubeRootVol; delta cubeRootVol;
turbulence on;
printCoeffs on; printCoeffs on;
laminarCoeffs laminarCoeffs

View File

@ -19,6 +19,8 @@ LESModel oneEqEddy;
delta cubeRootVol; delta cubeRootVol;
turbulence on;
printCoeffs on; printCoeffs on;
laminarCoeffs laminarCoeffs

View File

@ -17,6 +17,8 @@ FoamFile
LESModel oneEqEddy; LESModel oneEqEddy;
turbulence on;
printCoeffs on; printCoeffs on;
delta cubeRootVol; delta cubeRootVol;