diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 2f35a8bfd230b2d6de3dae2ba0d195c8a11c92b9..7301318b160fa59f9107660b2d1964e21fed38f4 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<Switch>("printCoeffs", false)), coeffDict_(subDictPtr(type + "Coeffs")), @@ -181,56 +180,6 @@ autoPtr<LESModel> LESModel::New // * * * * * * * * * * * * * * * 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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<volTensorField>&) { delta_().correct(); diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 8808c1e41a0ad0843061be678fb67057adae66ce..3012b4124ac1bdb5b3138af153f4debdd600e6c2 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<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> thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp<volTensorField>& 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 9ce1db5ef9609fa8171150f77f09c577f6258447..5d46b78788d576a907edea39f713cc43abdb88f2 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -191,56 +191,6 @@ autoPtr<RASModel> RASModel::New // * * * * * * * * * * * * * * * 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 0e27f72924a552bad2c3b27b7f352e74f112ab9c..7c787d8ceb6406a3cc67b6eb112830f97d423077 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<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> thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp<scalarField> yPlus(const label patchI) const; diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index a2ec1a7f3be9c0e6c62d3f166e537acd0692de34..415dedee72b21dfb14b39157875dbb71ba9cc983 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -177,50 +177,6 @@ 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 f58db6c9e4a13634fe883ba53016ce6273987ef7..227bddf11a5c15b0e639c759c6155c36f99da8e8 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<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> 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 d1059074405c215a56ec3fce2e69bf50caf365c8..3f01b203540f2e54e5d05e0ab46f66cd5284405a 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 c15dc89b15276712bfe7b16c13ff9199fdd35b73..0000000000000000000000000000000000000000 --- 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<dissipationSelector::treatment, 3>::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum<dissipationSelector::treatment, 3> - 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<word>("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp<volScalarField> -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<volScalarField> 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 c1b440e4b6e327a234a5a8c4b00cb8e3b836062c..0000000000000000000000000000000000000000 --- 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<treatment, 3> 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<volScalarField> 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 74b6b5fb06c4f2705692d595a956ccce3286e483..4a391c3db5b1d2f4d509a898ab4308e5d2a6cc31 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -195,50 +195,6 @@ 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 6bd3c5bdfaf1e31f78acf758cbe839229a49581f..5bdfa3dac714d7c2dd09130e75a9859600e2bdf2 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<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> 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 8c80b4ab5740ba848e24570022a53435783547e0..97638e5e49cfb054a21812fd7fa94ef06c96ccb9 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<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> 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 fd755e8ea03a94026754b41fe449da392395795e..3e3c952ffcde089bfb8292a04ac2938373afe52d 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -139,56 +139,6 @@ autoPtr<LESModel> LESModel::New // * * * * * * * * * * * * * * * 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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<volTensorField>&) { turbulenceModel::correct(); diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 620d4f0f556dc9b53df3c65cf4d55f75e4cd0793..49fe52c4541d1ee46d56953f33a732c1869a0911 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<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> thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp<volTensorField>& 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 4d1d58db705e3c131c892e50747ceb45b4e054a1..620a3fe2af4c23f87b6a24cecc244bfb469f396f 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -176,55 +176,6 @@ autoPtr<RASModel> RASModel::New // * * * * * * * * * * * * * * * 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 4d895ea53f5aa22cf6cc0747f0f8adab4ddcd391..fdc2b2e3b7e17f001ed0365088ce373dc663bc5f 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<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> thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp<scalarField> yPlus(const label patchI) const; diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index a58d9441961697af06e577e593a869fe40e55746..6f400a1c9a7ffd9eb2f3b9e33e7b37f8fe76ec24 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -176,50 +176,6 @@ 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 7bb4ba1b7b8d143265fd21a76a0ed9f3b1ce4745..0169127eebeb2dc113e742308d25dae796501360 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<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> 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 1133b2aaabcee9c65996c1e0e640b89d89421aa6..a77efed2ab7137c56185f25d100b11c48ab9cc6d 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 d9318d2a8294cc2f4f44e6481c810d1d9f4de6a4..0000000000000000000000000000000000000000 --- 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<dissipationSelector::treatment, 3>::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum<dissipationSelector::treatment, 3> - 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<word>("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp<volScalarField> -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<volScalarField> 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 9f2426c51837f7082a155e064c7c6a1a4fbda65a..0000000000000000000000000000000000000000 --- 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<treatment, 3> 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<volScalarField> 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 93fdbc813d2f1a96fdf3e108547e68f8a8bedfc1..f1dca5b4add73c2b9d1ad04f49966ac1c6f9e178 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -199,50 +199,6 @@ 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::thermalDissipationEquilibrium() const -{ - tmp<volTensorField> tgradU = fvc::grad(this->U()); - - return tmp<volScalarField> - ( - 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 ba0c59201c21ce6f2cfa8ac0e4dfb6f3e30ff050..51eef7c436f120e158ff9b50de654d62c993c5b0 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<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> 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 d6fa7f2ca2c8ead201d88c3b407235ff8a9d4f9a..1474e5dfa340d81dded04e06344410e9c7482e82 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<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> thermalDissipationEquilibrium() const = 0; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0;