zonalThermo.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) 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::zonalThermo
26 
27 Description
28  Base-class for zonal thermodynamic properties.
29 
30 See also
31  Foam::basicThermo
32 
33 SourceFiles
34  zonalThermo.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef zonalThermo_H
39 #define zonalThermo_H
40 
41 #include "basicThermo.H"
42 #include "zonalThermoZones.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class zonalThermo Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class zonalThermo
54 :
55  virtual public basicThermo
56 {
57 public:
58 
59  //- Runtime type information
60  TypeName("zonalThermo");
61 
62 
63  // Public Classes
64 
65  //- Forward declare the implementation class
66  class implementation;
67 
68 
69  //- Destructor
70  virtual ~zonalThermo();
71 };
72 
73 
74 /*---------------------------------------------------------------------------*\
75  Class zonalThermo::implementation Declaration
76 \*---------------------------------------------------------------------------*/
77 
79 :
80  virtual public zonalThermo
81 {
82 protected:
83 
84  // Protected data
85 
86  //- Addressing
87  const zonalThermoZones& ztzs_;
88 
89 
90 public:
91 
92  // Constructors
93 
94  //- Construct from dictionary, zone names, mesh and phase name
96  (
97  const dictionary&,
98  const hashedWordList&,
99  const fvMesh&,
100  const word&
101  );
102 
103 
104  //- Destructor
105  virtual ~implementation();
106 
107 
108  // Member Functions
109 
110  //- Get the slicer
111  inline nil Yslicer() const;
112 
113  //- Get the composition of an internal cell
114  inline label cellComposition
115  (
116  const nil,
117  const label celli
118  ) const;
119 
120  //- Get the composition of a boundary face
122  (
123  const nil,
124  const label patchi,
125  const label patchFacei
126  ) const;
127 
128  //- Get the slicer for the given source
129  inline nil Yslicer
130  (
131  const fvSource& model,
132  const volScalarField::Internal& source
133  ) const;
134 
135  //- Get the composition of a source cell
137  (
138  const nil,
139  const label i
140  ) const;
141 
142  //- Get the slicer for the given source
143  inline const labelUList& Yslicer
144  (
145  const fvSource& model,
146  const scalarField& source,
147  const labelUList& cells
148  ) const;
149 
150  //- Get the composition of a source cell
152  (
153  const labelUList& cells,
154  const label i
155  ) const;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #include "zonalThermoI.H"
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Base-class for fluid and solid thermodynamic properties.
Definition: basicThermo.H:78
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Base class for finite volume sources.
Definition: fvSource.H:53
A wordList with hashed indices for faster lookup by name.
A zero-sized class without any storage. Used, for example, in HashSet.
Definition: nil.H:59
A class for handling words, derived from string.
Definition: word.H:63
Mesh object to store cell-zone correspondence for zonal thermo.
label cellComposition(const nil, const label celli) const
Get the composition of an internal cell.
Definition: zonalThermoI.H:38
label patchFaceComposition(const nil, const label patchi, const label patchFacei) const
Get the composition of a boundary face.
Definition: zonalThermoI.H:48
nil Yslicer() const
Get the slicer.
Definition: zonalThermoI.H:31
virtual ~implementation()
Destructor.
Definition: zonalThermo.C:64
const zonalThermoZones & ztzs_
Addressing.
Definition: zonalThermo.H:86
label sourceCellComposition(const nil, const label i) const
Get the composition of a source cell.
Definition: zonalThermoI.H:71
implementation(const dictionary &, const hashedWordList &, const fvMesh &, const word &)
Construct from dictionary, zone names, mesh and phase name.
Definition: zonalThermo.C:39
Base-class for zonal thermodynamic properties.
Definition: zonalThermo.H:55
TypeName("zonalThermo")
Runtime type information.
virtual ~zonalThermo()
Destructor.
Definition: zonalThermo.C:60
label patchi
const cellShapeList & cells
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