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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 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::SinglePhaseMixture
28 
29 Group
30  grpLagrangianIntermediateCompositionSubModels
31 
32 Description
33  Templated parcel single phase, multi-component class
34 
35 SourceFiles
36  SinglePhaseMixture.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef SinglePhaseMixture_H
41 #define SinglePhaseMixture_H
42 
43 #include "CompositionModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class SinglePhaseMixture Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 template<class CloudType>
56 :
57  public CompositionModel<CloudType>
58 {
59  // Private data
60 
61  // Indices of the phases - only 1 will be set
62 
63  //- Gas
64  label idGas_;
65 
66  //- Liquid
67  label idLiquid_;
68 
69  //- Solid
70  label idSolid_;
71 
72 
73  // Private Member Functions
74 
75  //- Construct the indices and check correct specification of
76  // 1 gas or 1 liquid or 1 solid
77  void constructIds();
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("singlePhaseMixture");
84 
85 
86  // Constructors
87 
88  //- Construct from dictionary
90 
91  //- Construct copy
93 
94  //- Construct and return a clone
96  {
98  (
100  );
101  }
102 
103 
104  //- Destructor
105  virtual ~SinglePhaseMixture();
106 
108  // Member Functions
109 
110  // Access
111 
112  // Mixture properties
113 
114  //- Return the list of mixture mass fractions
115  virtual const scalarField& YMixture0() const;
116 
117  // Indices of gas, liquid and solid phases in phase properties
118  // list
119 
120  //- Gas id
121  virtual label idGas() const;
122 
123  //- Liquid id
124  virtual label idLiquid() const;
125 
126  //- Solid id
127  virtual label idSolid() const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #ifdef NoRepository
138  #include "SinglePhaseMixture.C"
139 #endif
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
virtual label idLiquid() const
Liquid id.
virtual const scalarField & YMixture0() const
Return the list of mixture mass fractions.
virtual label idGas() const
Gas id.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual ~SinglePhaseMixture()
Destructor.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
const CloudType & owner() const
Return const access to the owner cloud.
SinglePhaseMixture(const dictionary &dict, CloudType &owner)
Construct from dictionary.
virtual label idSolid() const
Solid id.
Templated parcel single phase, multi-component class.
virtual autoPtr< CompositionModel< CloudType > > clone() const
Construct and return a clone.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
TypeName("singlePhaseMixture")
Runtime type information.
Templated reacting parcel composition model class Consists of carrier species (via thermo package)...
Definition: ReactingCloud.H:54
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67
Namespace for OpenFOAM.