SingleMixtureFraction.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-2018 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::SingleMixtureFraction
26 
27 Description
28  Templated parcel multi-phase, multi-component class
29 
30 SourceFiles
31  SingleMixtureFraction.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef SingleMixtureFraction_H
36 #define SingleMixtureFraction_H
37 
38 #include "CompositionModel.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class SingleMixtureFraction Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class CloudType>
51 :
52  public CompositionModel<CloudType>
53 {
54  // Private data
55 
56  // Indices of the phases
57 
58  //- Gas
59  label idGas_;
60 
61  //- Liquid
62  label idLiquid_;
63 
64  //- Solid
65  label idSolid_;
66 
67 
68  // Mixture properties
69 
70  //- Phase component total fractions
71  scalarField YMixture0_;
72 
73 
74  // Private Member Functions
75 
76  //- Construct the indices and check correct specification of
77  // 1 gas, 1 liquid and 1 solid
78  void constructIds();
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("singleMixtureFraction");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary
91 
92  //- Construct copy
94 
95  //- Construct and return a clone
97  {
99  (
101  );
102  }
103 
104 
105  //- Destructor
106  virtual ~SingleMixtureFraction();
107 
108 
109  // Member Functions
110 
111  // Access
112 
113  // Mixture properties
114 
115  //- Return the list of mixture mass fractions
116  virtual const scalarField& YMixture0() const;
117 
118  // Indices of gas, liquid and solid phases in phase properties
119  // list
120 
121  //- Gas id
122  virtual label idGas() const;
123 
124  //- Liquid id
125  virtual label idLiquid() const;
126 
127  //- Solid id
128  virtual label idSolid() const;
129 };
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #ifdef NoRepository
135  #include "SingleMixtureFraction.C"
136 #endif
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual const scalarField & YMixture0() const
Return the list of mixture mass fractions.
virtual label idLiquid() const
Liquid id.
SingleMixtureFraction(const dictionary &dict, CloudType &owner)
Construct from dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const CloudType & owner() const
Return const access to the owner cloud.
virtual autoPtr< CompositionModel< CloudType > > clone() const
Construct and return a clone.
virtual label idGas() const
Gas id.
Templated parcel multi-phase, multi-component class.
virtual label idSolid() const
Solid id.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
Definition: ReactingCloud.H:52
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
virtual ~SingleMixtureFraction()
Destructor.
TypeName("singleMixtureFraction")
Runtime type information.
Namespace for OpenFOAM.