ThermalDiffusivity.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::ThermalDiffusivity
26 
27 Description
28  Templated wrapper class to provide compressible turbulence models
29  thermal diffusivity based thermal transport.
30 
31 SourceFiles
32  ThermalDiffusivity.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef ThermalDiffusivity_H
37 #define ThermalDiffusivity_H
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class ThermalDiffusivity Declaration
46 \*---------------------------------------------------------------------------*/
47 
48 template<class BasicTurbulenceModel>
50 :
51  public BasicTurbulenceModel
52 {
53 
54 public:
55 
56  typedef typename BasicTurbulenceModel::alphaField alphaField;
58  typedef typename BasicTurbulenceModel::transportModel transportModel;
59 
60 
61  // Constructors
62 
63  //- Construct
65  (
66  const word& type,
67  const alphaField& alpha,
68  const volScalarField& rho,
69  const volVectorField& U,
70  const surfaceScalarField& alphaRhoPhi,
71  const surfaceScalarField& phi,
72  const transportModel& trasport,
73  const word& propertiesName
74  );
75 
76 
77  // Selectors
78 
79  //- Return a reference to the selected turbulence model
81  (
82  const alphaField& alpha,
83  const volScalarField& rho,
84  const volVectorField& U,
85  const surfaceScalarField& alphaRhoPhi,
86  const surfaceScalarField& phi,
87  const transportModel& trasportModel,
88  const word& propertiesName = turbulenceModel::propertiesName
89  );
90 
91 
92  //- Return a reference to the selected turbulence model
94  (
95  const volScalarField& rho,
96  const volVectorField& U,
97  const surfaceScalarField& phi,
98  const transportModel& trasportModel,
99  const word& propertiesName = turbulenceModel::propertiesName
100  );
101 
102 
103  //- Destructor
104  virtual ~ThermalDiffusivity()
105  {}
106 
107 
108  // Member Functions
109 
110  //- Thermal diffusivity for enthalpy of mixture [kg/m/s]
111  virtual tmp<volScalarField> alpha() const
112  {
113  return this->transport_.alpha();
114  }
115 
116  //- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s]
117  virtual tmp<scalarField> alpha(const label patchi) const
118  {
119  return this->transport_.alpha(patchi);
120  }
121 
122  //- Thermal diffusivity for temperature of mixture [J/m/s/K]
123  virtual tmp<volScalarField> kappa() const
124  {
125  return this->transport_.kappa();
126  }
127 
128  //- Thermal diffusivity for temperature of mixture
129  // for patch [J/m/s/K]
130  virtual tmp<scalarField> kappa(const label patchi) const
131  {
132  return this->transport_.kappa(patchi);
133  }
134 
135  //- Turbulent thermal diffusivity for enthalpy [kg/m/s]
136  virtual tmp<volScalarField> alphat() const;
137 
138  //- Turbulent thermal diffusivity for enthalpy for a patch [kg/m/s]
139  virtual tmp<scalarField> alphat(const label patchi) const;
140 
141  //- Effective thermal turbulent diffusivity for temperature
142  // of mixture [J/m/s/K]
143  virtual tmp<volScalarField> kappaEff() const
144  {
145  return kappa();
146  }
147 
148  //- Effective thermal turbulent diffusivity for temperature
149  // of mixture for patch [J/m/s/K]
150  virtual tmp<scalarField> kappaEff(const label patchi) const
151  {
152  return kappa(patchi);
153  }
154 
155  //- Effective thermal turbulent diffusivity of mixture [kg/m/s]
156  virtual tmp<volScalarField> alphaEff() const
157  {
158  return this->transport_.alphahe();
159  }
160 
161  //- Effective thermal turbulent diffusivity of mixture
162  // for patch [kg/m/s]
163  virtual tmp<scalarField> alphaEff(const label patchi) const
164  {
165  return this->transport_.alphahe(patchi);
166  }
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace Foam
173 
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 
176 #ifdef NoRepository
177  #include "ThermalDiffusivity.C"
178 #endif
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 #endif
183 
184 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
surfaceScalarField & phi
virtual tmp< volScalarField > kappaEff() const
Effective thermal turbulent diffusivity for temperature.
virtual tmp< volScalarField > kappa() const
Thermal diffusivity for temperature of mixture [J/m/s/K].
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual ~ThermalDiffusivity()
Destructor.
ThermalDiffusivity(const word &type, const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &trasport, const word &propertiesName)
Construct.
BasicTurbulenceModel::alphaField alphaField
virtual tmp< volScalarField > alphaEff() const
Effective thermal turbulent diffusivity of mixture [kg/m/s].
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
Definition: word.H:59
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:481
label patchi
U
Definition: pEqn.H:72
BasicTurbulenceModel::transportModel transportModel
static autoPtr< ThermalDiffusivity > New(const alphaField &alpha, const volScalarField &rho, const volVectorField &U, const surfaceScalarField &alphaRhoPhi, const surfaceScalarField &phi, const transportModel &trasportModel, const word &propertiesName=turbulenceModel::propertiesName)
Return a reference to the selected turbulence model.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
virtual tmp< volScalarField > alphat() const
Turbulent thermal diffusivity for enthalpy [kg/m/s].
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
Namespace for OpenFOAM.