Loading...
Searching...
No Matches
SLGThermo.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) 2011-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::SLGThermo
28
29Description
30 Thermo package for (S)olids (L)iquids and (G)ases
31 Takes reference to thermo package, and provides:
32 - carrier : components of thermo - access to elemental properties
33 - liquids : liquid components - access to elemental properties
34 - solids : solid components - access to elemental properties
35
36 If thermo is not a multi-component thermo package, carrier is nullptr.
37 Similarly, if no liquids or solids are specified, their respective
38 pointers will also be nullptr.
39
40 Registered to the mesh so that it can be looked-up
41
42SourceFiles
43 SLGThermo.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef SLGThermo_H
48#define SLGThermo_H
49
50#include "regIOobject.H"
51#include "fluidThermo.H"
52#include "basicSpecieMixture.H"
55
56// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57
58namespace Foam
59{
61/*---------------------------------------------------------------------------*\
62 Class SLGThermo Declaration
63\*---------------------------------------------------------------------------*/
64
65class SLGThermo
66:
67 public regIOobject
68{
69 // Private data
70
71 //- Thermo package
72 fluidThermo& thermo_;
73
74 //- Reference to the multi-component carrier phase thermo
75 basicSpecieMixture* carrier_;
76
77 //- Additional liquid properties data
79
80 //- Additional solid properties data
82
83
84public:
85
86 //- Runtime type information
87 TypeName("SLGThermo");
88
89 // Constructors
90
91 //- Construct from mesh
93
94
95 //- Destructor
96 virtual ~SLGThermo();
97
98
99 // Member Functions
100
101 // Access
102
103 //- Return reference to the thermo database
104 const fluidThermo& thermo() const;
105
106 //- Return reference to the gaseous components
107 const basicSpecieMixture& carrier() const;
108
109 //- Return reference to the global (additional) liquids
110 const liquidMixtureProperties& liquids() const;
111
112 //- Return reference to the global (additional) solids
113 const solidMixtureProperties& solids() const;
114
115
116 // Index retrieval
117
118 //- Index of carrier component
119 label carrierId
120 (
121 const word& cmptName,
122 bool allowNotFound = false
123 ) const;
124
125 //- Index of liquid component
126 label liquidId
127 (
128 const word& cmptName,
129 bool allowNotFound = false
130 ) const;
131
132 //- Index of solid component
133 label solidId
134 (
135 const word& cmptName,
136 bool allowNotFound = false
137 ) const;
138
139
140 // Checks
141
142 //- Thermo database has multi-component carrier flag
143 bool hasMultiComponentCarrier() const;
144
145 //- Thermo database has liquid components flag
146 bool hasLiquids() const;
147
148 //- Thermo database has solid components flag
149 bool hasSolids() const;
150
151
152 // IO
153
154 bool writeData(Foam::Ostream&) const
155 {
156 return true;
157 }
158};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163} // End namespace Foam
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167#endif
168
169// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
const liquidMixtureProperties & liquids() const
Return reference to the global (additional) liquids.
Definition SLGThermo.C:117
SLGThermo(const fvMesh &mesh, fluidThermo &thermo)
Construct from mesh.
Definition SLGThermo.C:34
label solidId(const word &cmptName, bool allowNotFound=false) const
Index of solid component.
Definition SLGThermo.C:195
label liquidId(const word &cmptName, bool allowNotFound=false) const
Index of liquid component.
Definition SLGThermo.C:170
const fluidThermo & thermo() const
Return reference to the thermo database.
Definition SLGThermo.C:98
label carrierId(const word &cmptName, bool allowNotFound=false) const
Index of carrier component.
Definition SLGThermo.C:144
const basicSpecieMixture & carrier() const
Return reference to the gaseous components.
Definition SLGThermo.C:104
virtual ~SLGThermo()
Destructor.
Definition SLGThermo.C:92
bool hasLiquids() const
Thermo database has liquid components flag.
Definition SLGThermo.C:225
bool hasMultiComponentCarrier() const
Thermo database has multi-component carrier flag.
Definition SLGThermo.C:219
const solidMixtureProperties & solids() const
Return reference to the global (additional) solids.
Definition SLGThermo.C:130
bool writeData(Foam::Ostream &) const
Pure virtual writeData function.
Definition SLGThermo.H:183
bool hasSolids() const
Thermo database has solid components flag.
Definition SLGThermo.C:231
TypeName("SLGThermo")
Runtime type information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Fundamental fluid thermodynamic properties.
Definition fluidThermo.H:52
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
Definition regIOobject.C:43
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68