Loading...
Searching...
No Matches
wallHeatFluxModel.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) 2016-2017 OpenFOAM Foundation
9 Copyright (C) 2025 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
27Namespace
28 Foam::wallHeatFluxModels
29
30Description
31 A namespace for various heat-flux model implementations.
32
33Class
34 Foam::wallHeatFluxModel
35
36Description
37 A base class for heat-flux models.
38
39SourceFiles
40 wallHeatFluxModel.cxx
41 wallHeatFluxModelNew.cxx
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef Foam_wallHeatFluxModel_H
46#define Foam_wallHeatFluxModel_H
47
48#include "writeFile.H"
49#include "volFieldsFwd.H"
50#include "stateFunctionObject.H"
51
52// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53
54namespace Foam
55{
56
57// Forward Declarations
58class fvMesh;
59
60/*---------------------------------------------------------------------------*\
61 Class wallHeatFluxModel Declaration
62\*---------------------------------------------------------------------------*/
63
65:
67{
68 // Private Data
69
70 //- Const reference to the mesh
71 const fvMesh& mesh_;
72
73 //- Reference to the state function object
75
76 //- Name of the function object
77 const word objName_;
78
79
80public:
81
82 //- Runtime type information
83 TypeName("wallHeatFluxModel");
84
85
86 // Declare runtime constructor selection table
89 (
90 autoPtr,
93 (
94 const dictionary& dict,
95 const fvMesh& mesh,
96 const word& name,
97 const word objName,
99 ),
101 );
102
103
104 // Selectors
105
106 //- Return a reference to the selected heat-flux model
108 (
109 const dictionary& dict,
110 const fvMesh& mesh,
111 const word& name,
112 const word objName,
114 );
115
116
117 // Generated Methods
118
119 //- No copy construct
120 wallHeatFluxModel(const wallHeatFluxModel&) = delete;
121
122 //- No copy assignment
123 void operator=(const wallHeatFluxModel&) = delete;
124
125
126 // Constructors
127
128 //- Construct from components
130 (
131 const dictionary& dict,
132 const fvMesh& mesh,
133 const word& name,
134 const word objName,
136 );
137
138
139 //- Destructor
140 virtual ~wallHeatFluxModel();
142
143 // Member Functions
144
145 // Access
146
147 //- Return const reference to the mesh
148 const fvMesh& mesh() const noexcept { return mesh_; }
149
150 //- Return const reference to the state function object
152 {
153 return state_;
155
156 //- Return const reference to the function-object name
157 const word& objName() const noexcept { return objName_; }
158
159
160 // Evaluation
161
162 //- Read the settings
163 virtual bool read(const dictionary& dict) = 0;
165 //- Calculate the heat-flux data
166 virtual bool execute() = 0;
167
168 //- Write the heat-flux data
169 virtual bool write() = 0;
170};
171
172
173// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174
175} // End namespace Foam
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179#endif
180
181// ************************************************************************* //
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Base class for function objects, adding functionality to read/write state information (data required ...
Base class for writing single files from the function objects.
Definition writeFile.H:113
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
static autoPtr< wallHeatFluxModel > New(const dictionary &dict, const fvMesh &mesh, const word &name, const word objName, functionObjects::stateFunctionObject &state)
Return a reference to the selected heat-flux model.
wallHeatFluxModel(const dictionary &dict, const fvMesh &mesh, const word &name, const word objName, functionObjects::stateFunctionObject &state)
Construct from components.
virtual ~wallHeatFluxModel()
Destructor.
const word & objName() const noexcept
Return const reference to the function-object name.
TypeName("wallHeatFluxModel")
Runtime type information.
virtual bool execute()=0
Calculate the heat-flux data.
functionObjects::stateFunctionObject & state() const noexcept
Return const reference to the state function object.
declareRunTimeSelectionTable(autoPtr, wallHeatFluxModel, dictionary,(const dictionary &dict, const fvMesh &mesh, const word &name, const word objName, functionObjects::stateFunctionObject &state),(dict, mesh, name, objName, state))
void operator=(const wallHeatFluxModel &)=delete
No copy assignment.
wallHeatFluxModel(const wallHeatFluxModel &)=delete
No copy construct.
virtual bool read(const dictionary &dict)=0
Read the settings.
virtual bool write()=0
Write the heat-flux data.
A class for handling words, derived from Foam::string.
Definition word.H:66
Namespace for OpenFOAM.
const direction noexcept
Definition scalarImpl.H:265
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes).
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68
Forwards and collection of common volume field types.