phasePropertiesList.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 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
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 
26 Class
27  Foam::phasePropertiesList
28 
29 Description
30  Simple container for a list of phase properties
31 
32 SourceFiles
33  phasePropertiesList.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef phasePropertiesList_H
38 #define phasePropertiesList_H
39 
40 #include "Istream.H"
41 #include "volFields.H"
42 #include "wordList.H"
43 #include "phaseProperties.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class phasePropertiesList Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
58  //- List of phase properties
59  List<phaseProperties> props_;
60 
61  //- List of word representation of phase types
62  wordList phaseTypeNames_;
63 
64  //- List of state labels
65  wordList stateLabels_;
66 
67 
68 public:
69 
70  // Constructors
71 
72  //- Construct null
74 
75  //- Construct from components
77  (
78  Istream& is,
79  const wordList& gasNames,
80  const wordList& liquidNames,
81  const wordList& solidNames
82  );
83 
84 
85  //- Destructor
87 
88 
89  // Public Member Functions
90 
91  //- Return the list of phase properties
92  const List<phaseProperties>& props() const;
93 
94  //- Return the list of word representation of phase types
95  const wordList& phaseTypes() const;
96 
97  //- Return the list of state labels
98  const wordList& stateLabels() const;
99 
100  //- Return the size (number of phases)
101  label size() const;
102 
103 
104  // Member operators
105 
106  const phaseProperties& operator[](const label) const;
107 };
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
volFields.H
Foam::phasePropertiesList::stateLabels
const wordList & stateLabels() const
Return the list of state labels.
Definition: phasePropertiesList.C:88
Foam::phasePropertiesList::~phasePropertiesList
~phasePropertiesList()
Destructor.
Definition: phasePropertiesList.C:69
Foam::phaseProperties
Helper class to manage multi-specie phase properties.
Definition: phaseProperties.H:60
Foam::phasePropertiesList
Simple container for a list of phase properties.
Definition: phasePropertiesList.H:53
wordList.H
Foam::phasePropertiesList::props
const List< phaseProperties > & props() const
Return the list of phase properties.
Definition: phasePropertiesList.C:76
Foam::phasePropertiesList::operator[]
const phaseProperties & operator[](const label) const
Definition: phasePropertiesList.C:101
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Istream.H
Foam::phasePropertiesList::phaseTypes
const wordList & phaseTypes() const
Return the list of word representation of phase types.
Definition: phasePropertiesList.C:82
phaseProperties.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::phasePropertiesList::size
label size() const
Return the size (number of phases)
Definition: phasePropertiesList.C:94
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: BitOps.H:63
solidNames
const wordList solidNames(rp["solid"])
Foam::phasePropertiesList::phasePropertiesList
phasePropertiesList()
Construct null.
Definition: phasePropertiesList.C:32