parcelThermo.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) 2011-2021 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::parcelThermo
26 
27 Description
28  Thermo package for (S)olids (L)iquids and (G)ases
29  Takes reference to thermo package, and provides:
30  - liquids : liquid components - access to elemental properties
31  - solids : solid components - access to elemental properties
32 
33  If no liquids or solids are specified, their respective pointers will also
34  be nullptr.
35 
36  Registered to the mesh so that it can be looked-up
37 
38 SourceFiles
39  parcelThermo.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef parcelThermo_H
44 #define parcelThermo_H
45 
46 #include "fluidThermo.H"
48 #include "solidMixtureProperties.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 /*---------------------------------------------------------------------------*\
56  Class parcelThermo Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class parcelThermo
60 {
61  // Private Data
62 
63  //- Additional liquid properties data
65 
66  //- Additional solid properties data
68 
69 
70 public:
71 
72  // Constructors
73 
74  //- Construct from carrier thermo
75  parcelThermo(const fluidThermo& carrierThermo);
76 
77  //- Copy constructor
78  parcelThermo(const parcelThermo&);
79 
80 
81  //- Destructor
82  virtual ~parcelThermo();
83 
84 
85  // Member Functions
86 
87  //- Return reference to the global (additional) liquids
88  const liquidMixtureProperties& liquids() const;
89 
90  //- Return reference to the global (additional) solids
91  const solidMixtureProperties& solids() const;
92 
93  //- Index of liquid component
95  (
96  const word& cmptName,
97  bool allowNotFound = false
98  ) const;
99 
100  //- Index of solid component
101  label solidId
102  (
103  const word& cmptName,
104  bool allowNotFound = false
105  ) const;
106 };
107 
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:57
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition: parcelThermo.H:59
const liquidMixtureProperties & liquids() const
Return reference to the global (additional) liquids.
Definition: parcelThermo.C:82
virtual ~parcelThermo()
Destructor.
Definition: parcelThermo.C:76
parcelThermo(const fluidThermo &carrierThermo)
Construct from carrier thermo.
Definition: parcelThermo.C:30
label solidId(const word &cmptName, bool allowNotFound=false) const
Index of solid component.
Definition: parcelThermo.C:134
label liquidId(const word &cmptName, bool allowNotFound=false) const
Index of liquid component.
Definition: parcelThermo.C:109
const solidMixtureProperties & solids() const
Return reference to the global (additional) solids.
Definition: parcelThermo.C:95
A class for handling words, derived from string.
Definition: word.H:62
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