FreeFOAM The Cross-Platform CFD Toolkit
SinglePhaseMixture.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 | Copyright (C) 2008-2010 OpenCFD Ltd.
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::SinglePhaseMixture
26 
27 Description
28  Templated parcel single phase, multi-component class
29 
30 SourceFiles
31  SinglePhaseMixture.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef SinglePhaseMixture_H
36 #define SinglePhaseMixture_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class SinglePhaseMixture Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class CloudType>
51 :
52  public CompositionModel<CloudType>
53 {
54  // Private data
55 
56  // Indices of the phases - only 1 will be set
57 
58  //- Gas
59  label idGas_;
60 
61  //- Liquid
62  label idLiquid_;
63 
64  //- Solid
65  label idSolid_;
66 
67 
68  // Private member functions
69 
70  //- Construct the indices and check correct specification of
71  // 1 gas or 1 liquid or 1 solid
72  void constructIds();
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("SinglePhaseMixture");
79 
80 
81  // Constructors
82 
83  //- Construct from dictionary
84  SinglePhaseMixture(const dictionary& dict, CloudType& owner);
85 
86 
87  //- Destructor
88  virtual ~SinglePhaseMixture();
89 
90 
91  // Member Functions
92 
93  // Access
94 
95  // Gas properties
96 
97  //- Return the list of gas mass fractions
98  const scalarField& YGas0() const;
99 
100  //- Return the total gas mass fraction
101  scalar YGasTot0() const;
102 
103 
104  // Liquid properties
105 
106  //- Return the list of liquid mass fractions
107  const scalarField& YLiquid0() const;
108 
109  //- Return the total liquid mass fraction
110  scalar YLiquidTot0() const;
111 
112 
113  // Solid properties
114 
115  //- Return the list of solid mass fractions
116  const scalarField& YSolid0() const;
117 
118  //- Return the total solid mass fraction
119  scalar YSolidTot0() const;
120 
121 
122  // Mixture properties
123 
124  //- Return the list of mixture mass fractions
125  virtual const scalarField& YMixture0() const;
126 
127  // Indices of gas, liquid and solid phases in phase properties
128  // list
129 
130  //- Gas id
131  virtual label idGas() const;
132 
133  //- Liquid id
134  virtual label idLiquid() const;
135 
136  //- Solid id
137  virtual label idSolid() const;
138 };
139 
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 } // End namespace Foam
144 
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 
147 #ifdef NoRepository
148 # include "SinglePhaseMixture.C"
149 #endif
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************ vim: set sw=4 sts=4 et: ************************ //