diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 2f35a8bfd2..7301318b16 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -76,7 +76,6 @@ LESModel::LESModel ) ), - turbulence_(true), // TODO: turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDictPtr(type + "Coeffs")), @@ -181,56 +180,6 @@ autoPtr LESModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp LESModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->rho() * this->epsilon() - ) - ); -} - - -tmp LESModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - 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&) { delta_().correct(); diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 8808c1e41a..3012b4124a 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -80,7 +80,6 @@ protected: // Protected data - Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -293,15 +292,6 @@ public: } - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 9ce1db5ef9..5d46b78788 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -191,56 +191,6 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp RASModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->rho() * this->epsilon() - ) - ); -} - - -tmp RASModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - 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 ypl = 11.0; diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 0e27f72924..7c787d8ceb 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -345,15 +345,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index a2ec1a7f3b..415dedee72 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -177,50 +177,6 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index f58db6c9e4..227bddf11a 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -112,15 +112,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files index d105907440..3f01b20354 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/files @@ -1,5 +1,4 @@ turbulenceModel.C laminar/laminar.C -dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C deleted file mode 100644 index c15dc89b15..0000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dissipationSelector.H" -#include "dictionary.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<> -const char* NamedEnum::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum - dissipationSelector::typeNames; - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const treatment treatmentType -) -: - turbModel_(turbModel), - treatment_(treatmentType) -{} - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const dictionary& dict -) -: - turbModel_(turbModel), - treatment_(none) -{ - - word modelType; - - if (dict.readIfPresent("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp -dissipationSelector::dissipation() const -{ - if (treatment_ == cascade) - { - return turbModel_.thermalDissipation(); - } - else if (treatment_ == equilibrium) - { - return turbModel_.thermalDissipationEquilibrium(); - } - else - { - // a bit wasteful, but we'll avoid it with 'enabled' query anyhow - tmp tField = turbModel_.thermalDissipation(); - tField() = 0.0; - - return tField; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H deleted file mode 100644 index c1b440e4b6..0000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::dissipationSelector - -Description - Simplistic runtime selectable handling of thermal dissipation - - Example use: - @code - dissipationSelector thermalDissipation(turbulence, dictionary); - - fvScalarMatrix hEqn ( ... ); - - if (thermalDissipation.enabled()) - { - hEqn += thermalDissipation.dissipation(); - } - @endcode - -SourceFiles - dissipationSelector.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibledissipationSelector_H -#define compressibledissipationSelector_H - -#include "NamedEnum.H" -#include "dictionary.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class dissipationSelector Declaration -\*---------------------------------------------------------------------------*/ - -class dissipationSelector -{ - -public: - - //- Type of treatment - enum treatment - { - none, - cascade, - equilibrium - }; - - static const NamedEnum typeNames; - -protected: - - // Protected data - - const turbulenceModel& turbModel_; - - //- Type of treatment - treatment treatment_; - -public: - - // Declare name of the class and its debug switch - ClassName("dissipationSelector"); - - - // Constructors - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const treatment = none - ); - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const dictionary& - ); - - - // Member functions - - //- Get the treatment type - treatment treatmentType() const - { - return treatment_; - } - - //- Set the treatment type, return old value - treatment treatmentType(const treatment val) - { - treatment old = treatment_; - treatment_ = val; - return old; - } - - - //- Set the treatment type, return old value - const char* name() const - { - return typeNames[treatment_]; - } - - //- Set the treatment type, return old value - bool enabled() const - { - return treatment_ != none; - } - - tmp dissipation() const; - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C index 74b6b5fb06..4a391c3db5 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -195,50 +195,6 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return true; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index 6bd3c5bdfa..5bdfa3dac7 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -122,15 +122,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 8c80b4ab57..97638e5e49 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -210,15 +210,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const = 0; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index fd755e8ea0..3e3c952ffc 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -139,56 +139,6 @@ autoPtr LESModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp LESModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->epsilon() - ) - ); -} - - -tmp LESModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - 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&) { turbulenceModel::correct(); diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 620d4f0f55..49fe52c454 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -241,15 +241,6 @@ public: } - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 4d1d58db70..620a3fe2af 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -176,55 +176,6 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp RASModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->epsilon() - ) - ); -} - - -tmp RASModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - 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 { diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index 4d895ea53f..fdc2b2e3b7 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -326,15 +326,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index a58d944196..6f400a1c9a 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -176,50 +176,6 @@ tmp laminar::divDevReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 7bb4ba1b7b..0169127eeb 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -104,15 +104,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files index 1133b2aaab..a77efed2ab 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files @@ -1,5 +1,4 @@ turbulenceModel.C laminar/laminar.C -dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C deleted file mode 100644 index d9318d2a82..0000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dissipationSelector.H" -#include "dictionary.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<> -const char* NamedEnum::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum - dissipationSelector::typeNames; - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const treatment treatmentType -) -: - turbModel_(turbModel), - treatment_(treatmentType) -{} - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const dictionary& dict -) -: - turbModel_(turbModel), - treatment_(none) -{ - - word modelType; - - if (dict.readIfPresent("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp -dissipationSelector::dissipation() const -{ - if (treatment_ == cascade) - { - return turbModel_.thermalDissipation(); - } - else if (treatment_ == equilibrium) - { - return turbModel_.thermalDissipationEquilibrium(); - } - else - { - // a bit wasteful, but we'll avoid it with 'enabled' query anyhow - tmp tField = turbModel_.thermalDissipation(); - tField() = 0.0; - - return tField; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H deleted file mode 100644 index 9f2426c518..0000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::dissipationSelector - -Description - Simplistic runtime selectable handling of thermal dissipation - - Example use: - @code - dissipationSelector thermalDissipation(turbulence, dictionary); - - fvScalarMatrix hEqn ( ... ); - - if (thermalDissipation.enabled()) - { - hEqn += thermalDissipation.dissipation(); - } - @endcode - -SourceFiles - dissipationSelector.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dissipationSelector_H -#define dissipationSelector_H - -#include "NamedEnum.H" -#include "dictionary.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class dissipationSelector Declaration -\*---------------------------------------------------------------------------*/ - -class dissipationSelector -{ - -public: - - //- Type of treatment - enum treatment - { - none, - cascade, - equilibrium - }; - - static const NamedEnum typeNames; - -protected: - - // Protected data - - const turbulenceModel& turbModel_; - - //- Type of treatment - treatment treatment_; - -public: - - // Declare name of the class and its debug switch - ClassName("dissipationSelector"); - - - // Constructors - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const treatment = none - ); - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const dictionary& - ); - - - // Member functions - - //- Get the treatment type - treatment treatmentType() const - { - return treatment_; - } - - //- Set the treatment type, return old value - treatment treatmentType(const treatment val) - { - treatment old = treatment_; - treatment_ = val; - return old; - } - - - //- Set the treatment type, return old value - const char* name() const - { - return typeNames[treatment_]; - } - - //- Set the treatment type, return old value - bool enabled() const - { - return treatment_ != none; - } - - tmp dissipation() const; - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index 93fdbc813d..f1dca5b4ad 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -199,50 +199,6 @@ tmp laminar::divDevReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return true; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index ba0c59201c..51eef7c436 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -110,15 +110,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index d6fa7f2ca2..1474e5dfa3 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -190,15 +190,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp 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 thermalDissipationEquilibrium() const = 0; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0;