ThermophysicalTransportModel.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-2022 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::ThermophysicalTransportModel
26 
27 Description
28  Templated abstract base class for thermophysical transport models
29 
30 SourceFiles
31  ThermophysicalTransportModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ThermophysicalTransportModel_H
36 #define ThermophysicalTransportModel_H
37 
39 #include "runTimeSelectionTables.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class ThermophysicalTransportModel Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class MomentumTransportModel, class ThermoModel>
52 :
54 {
55 
56 public:
57 
58  typedef MomentumTransportModel momentumTransportModel;
59  typedef ThermoModel thermoModel;
60  typedef typename momentumTransportModel::alphaField alphaField;
61 
62 
63 protected:
64 
65  // Protected data
66 
68  const thermoModel& thermo_;
69 
70 
71 public:
72 
73  // Declare run-time constructor selection table
74 
76  (
77  autoPtr,
79  dictionary,
80  (
82  const thermoModel& thermo
83  ),
85  );
86 
87 
88  // Constructors
89 
90  //- Construct
92  (
94  const thermoModel& thermo
95  );
96 
97  //- Disallow default bitwise copy construction
99  (
101  ) = delete;
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected thermophysical transport model
108  (
109  const momentumTransportModel& transport,
110  const thermoModel& thermo
111  );
112 
113 
114  //- Destructor
116  {}
117 
118 
119  // Member Functions
120 
121  //- Access function to momentum transport model
123  {
124  return momentumTransport_;
125  }
126 
127  //- Access function to the fluid thermophysical properties
128  virtual const thermoModel& thermo() const
129  {
130  return thermo_;
131  }
132 
133  //- Access function to phase fraction
134  const alphaField& alpha() const
135  {
136  return momentumTransport_.alpha();
137  }
138 
139 
140  // Member Operators
141 
142  //- Disallow default bitwise assignment
143  void operator=(const ThermophysicalTransportModel&) = delete;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #ifdef NoRepository
155 #endif
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
Templated abstract base class for thermophysical transport models.
const momentumTransportModel & momentumTransport_
const momentumTransportModel & momentumTransport() const
Access function to momentum transport model.
virtual const thermoModel & thermo() const
Access function to the fluid thermophysical properties.
declareRunTimeNewSelectionTable(autoPtr, ThermophysicalTransportModel, dictionary,(const momentumTransportModel &momentumTransport, const thermoModel &thermo),(momentumTransport, thermo))
static autoPtr< ThermophysicalTransportModel > New(const momentumTransportModel &transport, const thermoModel &thermo)
Return a reference to the selected thermophysical transport model.
ThermophysicalTransportModel(const momentumTransportModel &momentumTransport, const thermoModel &thermo)
Construct.
const alphaField & alpha() const
Access function to phase fraction.
momentumTransportModel::alphaField alphaField
void operator=(const ThermophysicalTransportModel &)=delete
Disallow default bitwise assignment.
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 keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
Abstract base class for fluid thermophysical transport models RAS, LES and laminar.
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.