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