diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H index 440ec71c5c9b40bb88176ee3f11aeba2af77a208..7f2d3f1f852a68269ef82f6378039a798457b395 100644 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H @@ -126,15 +126,6 @@ public: return alphaSgs_; } - //- Return thermal diffusivity - virtual tmp<volScalarField> alphaEff() const - { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphaSgs_ + alpha()) - ); - } - //- Return the sub-grid stress tensor. virtual tmp<volSymmTensorField> B() const; diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H index ff71c80b798a20792b90ff3e568197c80e059ce9..e65495225ccf62faa198a1bd17d0dad842e30d03 100644 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H @@ -127,15 +127,6 @@ public: return alphaSgs_; } - //- Return thermal conductivity - virtual tmp<volScalarField> alphaEff() const - { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphaSgs_ + alpha()) - ); - } - //- Return the sub-grid stress tensor virtual tmp<volSymmTensorField> B() const { diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index cf019ea9a8aca9b93a709e94507a74c08a9ef6c1..2cdde6c61eda86c94183ae323944ef04866bdb89 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -189,12 +189,6 @@ public: } - //- Return the SGS turbulent kinetic energy. - virtual tmp<volScalarField> k() const = 0; - - //- Return the SGS turbulent dissipation. - virtual tmp<volScalarField> epsilon() const = 0; - //- Return the SGS turbulent viscosity virtual tmp<volScalarField> muSgs() const = 0; @@ -210,8 +204,22 @@ public: //- Return the SGS turbulent thermal diffusivity virtual tmp<volScalarField> alphaSgs() const = 0; - //- Return the SGS thermal conductivity. - virtual tmp<volScalarField> alphaEff() const = 0; + //- Return the effective thermal diffusivity + virtual tmp<volScalarField> alphaEff() const + { + return tmp<volScalarField> + ( + new volScalarField("alphaEff", alphaSgs() + alpha()) + ); + } + + //- Return the effective turbulence thermal diffusivity for a patch + virtual tmp<scalarField> alphaEff(const label patchI) const + { + return + alphaSgs()().boundaryField()[patchI] + + alpha().boundaryField()[patchI]; + } //- Return the sub-grid stress tensor. virtual tmp<volSymmTensorField> B() const = 0; @@ -261,13 +269,13 @@ public: //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp<volTensorField>& gradU) by supplying // gradU calculated locally. - void correct(); + virtual void correct(); //- Correct Eddy-Viscosity and related properties virtual void correct(const tmp<volTensorField>& gradU); //- Read LESProperties dictionary - virtual bool read() = 0; + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H index e6239ec91bc623240c124f128a8697110a4b6a8c..29d53267a2e41150562bc20a6e0af6817ad900d7 100644 --- a/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/LES/SpalartAllmaras/SpalartAllmaras.H @@ -149,15 +149,6 @@ public: return alphaSgs_; } - //- Return thermal conductivity - virtual tmp<volScalarField> alphaEff() const - { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphaSgs_ + alpha()) - ); - } - //- Return the sub-grid stress tensor. virtual tmp<volSymmTensorField> B() const; diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.H b/src/turbulenceModels/compressible/RAS/LRR/LRR.H index 445faebd39e2534e5c6dec9a2123382120f548bc..9ce0eef7bbecc5b164eb64c0f25ace8c95d29324 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.H +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.H @@ -153,13 +153,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H index 00db2c304f9d9338575f2de850098349a894ce02..e8c5a331b26a41735e8b8afc19e447d9e6d1a773 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.H @@ -162,13 +162,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H index b7c972a662c05b473d8b8eb2f80b4e7125593e4f..f9c878607d04a2796e899720bd2946422828f277 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H +++ b/src/turbulenceModels/compressible/RAS/LaunderSharmaKE/LaunderSharmaKE.H @@ -146,13 +146,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index cc189f24c80275ba3e7159dde0416339ee1e7ee1..883fa0825a32e106dadd870c853f38ec3319a061 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -265,9 +265,6 @@ public: } - //- Return the turbulence viscosity - virtual tmp<volScalarField> mut() const = 0; - //- Return the effective viscosity virtual tmp<volScalarField> muEff() const { @@ -278,22 +275,21 @@ public: } //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const = 0; - - //- Return the turbulence kinetic energy - virtual tmp<volScalarField> k() const = 0; - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp<volScalarField> epsilon() const = 0; - - //- Return the Reynolds stress tensor - virtual tmp<volSymmTensorField> R() const = 0; - - //- Return the effective stress tensor including the laminar stress - virtual tmp<volSymmTensorField> devRhoReff() const = 0; + virtual tmp<volScalarField> alphaEff() const + { + return tmp<volScalarField> + ( + new volScalarField("alphaEff", alphat() + alpha()) + ); + } - //- Return the source term for the momentum equation - virtual tmp<fvVectorMatrix> divDevRhoReff(volVectorField& U) const = 0; + //- Return the effective turbulent thermal diffusivity for a patch + virtual tmp<scalarField> alphaEff(const label patchI) const + { + return + alphat()().boundaryField()[patchI] + + alpha().boundaryField()[patchI]; + } //- Return yPlus for the given patch virtual tmp<scalarField> yPlus @@ -303,10 +299,10 @@ public: ) const; //- Solve the turbulence equations and correct the turbulence viscosity - virtual void correct() = 0; + virtual void correct(); //- Read RASProperties dictionary - virtual bool read() = 0; + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H index 1e4301adcd222a32d1dabb714db0e7ece32c8bc6..9d9601eee78caed08225e4dfc9e01b884da6c3e6 100644 --- a/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H +++ b/src/turbulenceModels/compressible/RAS/RNGkEpsilon/RNGkEpsilon.H @@ -142,13 +142,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H index 94e736b9f8a13812727cdf9b974dcf205b6c9697..fdb0c675ee09002db9ada976c9c4b51938612aa4 100644 --- a/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H +++ b/src/turbulenceModels/compressible/RAS/SpalartAllmaras/SpalartAllmaras.H @@ -178,13 +178,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H index 865120d8c6c9c320351bcda9b80c655755d48884..11d8f75a058c20bdb21fefec6dbb48cceea45e8f 100644 --- a/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H +++ b/src/turbulenceModels/compressible/RAS/kEpsilon/kEpsilon.H @@ -138,13 +138,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H index a563557f764cb24dfdba768fe6afe2061f8e1cc4..9806d32493b7ccdf91270fcdd0498aac74a69dc4 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST/kOmegaSST.H @@ -222,13 +222,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index 415dedee72b21dfb14b39157875dbb71ba9cc983..cc5666eb6cbc0cbe54051a9f4996bf0354bd8d3b 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -78,6 +78,27 @@ tmp<volScalarField> laminar::mut() const } +tmp<volScalarField> laminar::alphat() const +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "alphat", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("alphat", alpha().dimensions(), 0.0) + ) + ); +} + + tmp<volScalarField> laminar::k() const { return tmp<volScalarField> diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index af1f5e2bb2c379c3ef7936b6033cb23a17893e2b..506799ec983c01e9ba45a4de8d1687cd1ed6e3f0 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -89,6 +89,9 @@ public: return tmp<volScalarField>(new volScalarField("muEff", mu())); } + //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow + virtual tmp<volScalarField> alphat() const; + //- Return the effective turbulent thermal diffusivity, // i.e. the laminar thermal diffusivity virtual tmp<volScalarField> alphaEff() const diff --git a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H index 222ee733a3210374de39e8145036981fe9213c86..1b7d51a9a97a2ea4e0d32a4fb76516fa632536a1 100644 --- a/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H +++ b/src/turbulenceModels/compressible/RAS/realizableKE/realizableKE.H @@ -159,13 +159,10 @@ public: return mut_; } - //- Return the effective turbulent thermal diffusivity - virtual tmp<volScalarField> alphaEff() const + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const { - return tmp<volScalarField> - ( - new volScalarField("alphaEff", alphat_ + alpha()) - ); + return alphat_; } //- Return the turbulence kinetic energy diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index d4379bfb2e28ca939e7f5df7ee9229990ae5c5ee..7645e67379417f3cc0efc1b8a8c3bee1a86fa9b2 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -99,6 +99,9 @@ public: return tmp<volScalarField>(new volScalarField("muEff", mu())); } + //- Return the turbulence thermal diffusivity, i.e. 0 for laminar flow + virtual tmp<volScalarField> alphat() const; + //- Return the effective turbulent thermal diffusivity, // i.e. the laminar thermal diffusivity virtual tmp<volScalarField> alphaEff() const @@ -106,6 +109,13 @@ public: return tmp<volScalarField>(new volScalarField("alphaEff", alpha())); } + //- Return the effective turbulent thermal diffusivity for a patch, + // i.e. the laminar thermal diffusivity + virtual tmp<scalarField> alphaEff(const label patchI) const + { + return alpha().boundaryField()[patchI]; + } + //- Return the turbulence kinetic energy, i.e. 0 for laminar flow virtual tmp<volScalarField> k() const; diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 97638e5e49cfb054a21812fd7fa94ef06c96ccb9..9a84c01bb832ee9fb6d873dd0ee0be835ed7e5e3 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -192,9 +192,15 @@ public: //- Return the effective viscosity virtual tmp<volScalarField> muEff() const = 0; - //- Return the effective turbulent thermal diffusivity + //- Return the turbulence thermal diffusivity + virtual tmp<volScalarField> alphat() const = 0; + + //- Return the effective turbulence thermal diffusivity virtual tmp<volScalarField> alphaEff() const = 0; + //- Return the effective turbulence thermal diffusivity for a patch + virtual tmp<scalarField> alphaEff(const label patchI) const = 0; + //- Return the turbulence kinetic energy virtual tmp<volScalarField> k() const = 0;