RASThermophysicalTransportModel.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) 2020-2024 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::RASThermophysicalTransportModel
26 
27 Description
28  Templated abstract base class for RAS thermophysical transport models
29 
30 SourceFiles
31  RASThermophysicalTransportModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef RASThermophysicalTransportModel_H
36 #define RASThermophysicalTransportModel_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class RASThermophysicalTransportModel Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class BasicThermophysicalTransportModel>
51 :
52  public BasicThermophysicalTransportModel
53 {
54 
55 protected:
56 
57  // Protected member functions
58 
59  //- Const access to the coefficients dictionary
60  const dictionary& coeffDict() const;
61 
62 
63 public:
64 
65  typedef typename BasicThermophysicalTransportModel::alphaField
66  alphaField;
67 
70 
71  typedef typename BasicThermophysicalTransportModel::thermoModel
73 
74 
75  //- Runtime type information
76  TypeName("RAS");
77 
78 
79  // Declare run-time constructor selection table
80 
82  (
83  autoPtr,
85  dictionary,
86  (
87  const momentumTransportModel& momentumTransport,
88  const thermoModel& thermo
89  ),
90  (momentumTransport, thermo)
91  );
92 
93 
94  // Constructors
95 
96  //- Construct from components
98  (
99  const word& type,
100  const momentumTransportModel& momentumTransport,
101  const thermoModel& thermo
102  );
103 
104  //- Disallow default bitwise copy construction
106  (
108  ) = delete;
109 
110 
111  // Selectors
112 
113  //- Return a reference to the selected RAS model
115  (
116  const momentumTransportModel& momentumTransport,
117  const thermoModel& thermo
118  );
119 
120 
121  //- Destructor
123  {}
124 
125 
126  // Member Functions
127 
128  //- Read model coefficients if they have changed
129  virtual bool read();
130 
131  //- Effective thermal turbulent conductivity
132  // of mixture [W/m/K]
133  virtual tmp<volScalarField> kappaEff() const = 0;
134 
135  //- Effective thermal turbulent conductivity
136  // of mixture for patch [W/m/K]
137  virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
138 
139  //- Predict the RAS transport coefficients if possible
140  // without solving thermophysical transport model equations
141  virtual void predict();
142 
143  //- Solve the thermophysical transport model equations
144  // and correct the RAS transport coefficients
145  virtual void correct();
146 
147 
148  // Member Operators
149 
150  //- Disallow default bitwise assignment
151  void operator=(const RASThermophysicalTransportModel&) = delete;
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #ifdef NoRepository
163 #endif
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 #endif
168 
169 // ************************************************************************* //
Templated abstract base class for RAS thermophysical transport models.
BasicThermophysicalTransportModel::alphaField alphaField
virtual void correct()
Solve the thermophysical transport model equations.
static autoPtr< RASThermophysicalTransportModel > New(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Return a reference to the selected RAS model.
declareRunTimeSelectionTable(autoPtr, RASThermophysicalTransportModel, dictionary,(const momentumTransportModel &momentumTransport, const thermoModel &thermo),(momentumTransport, thermo))
virtual tmp< volScalarField > kappaEff() const =0
Effective thermal turbulent conductivity.
virtual void predict()
Predict the RAS transport coefficients if possible.
RASThermophysicalTransportModel(const word &type, const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct from components.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
void operator=(const RASThermophysicalTransportModel &)=delete
Disallow default bitwise assignment.
BasicThermophysicalTransportModel::thermoModel thermoModel
BasicThermophysicalTransportModel::momentumTransportModel momentumTransportModel
TypeName("RAS")
Runtime type information.
virtual bool read()
Read model coefficients if they have changed.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
label patchi
compressibleMomentumTransportModel momentumTransportModel
Namespace for OpenFOAM.
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
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
fluidMulticomponentThermo & thermo
Definition: createFields.H:31