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-2026 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& typeDict() const;
61 
62  //- Const access to the coefficients dictionary
63  const dictionary& typeDict(const word&) const;
64 
65 
66 public:
67 
68  typedef typename BasicThermophysicalTransportModel::alphaField
69  alphaField;
70 
73 
74  typedef typename BasicThermophysicalTransportModel::thermoModel
76 
77 
78  //- Runtime type information
79  TypeName("RAS");
80 
81 
82  // Declare run-time constructor selection table
83 
85  (
86  autoPtr,
88  dictionary,
89  (
90  const momentumTransportModel& momentumTransport,
91  const thermoModel& thermo
92  ),
93  (momentumTransport, thermo)
94  );
95 
96 
97  // Constructors
98 
99  //- Construct from components
101  (
102  const word& type,
103  const momentumTransportModel& momentumTransport,
104  const thermoModel& thermo
105  );
106 
107  //- Disallow default bitwise copy construction
109  (
111  ) = delete;
112 
113 
114  // Selectors
115 
116  //- Return a reference to the selected RAS model
118  (
119  const momentumTransportModel& momentumTransport,
120  const thermoModel& thermo
121  );
122 
123 
124  //- Destructor
126  {}
127 
128 
129  // Member Functions
130 
131  //- Read model coefficients if they have changed
132  virtual bool read();
133 
134  //- Effective thermal turbulent conductivity
135  // of mixture [W/m/K]
136  virtual tmp<volScalarField> kappaEff() const = 0;
137 
138  //- Effective thermal turbulent conductivity
139  // of mixture for patch [W/m/K]
140  virtual tmp<scalarField> kappaEff(const label patchi) const = 0;
141 
142  //- Predict the RAS transport coefficients if possible
143  // without solving thermophysical transport model equations
144  virtual void predict();
145 
146  //- Solve the thermophysical transport model equations
147  // and correct the RAS transport coefficients
148  virtual void correct();
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const RASThermophysicalTransportModel&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace Foam
161 
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 
164 #ifdef NoRepository
166 #endif
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
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 & typeDict() 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:63
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:15