SinglePhaseMixture.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-2019 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::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 
38 #include "CompositionModel.H"
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
85 
86  //- Construct copy
88 
89  //- Construct and return a clone
91  {
93  (
95  );
96  }
97 
98 
99  //- Destructor
100  virtual ~SinglePhaseMixture();
101 
102 
103  // Member Functions
104 
105  // Access
106 
107  // Mixture properties
108 
109  //- Return the list of mixture mass fractions
110  virtual const scalarField& YMixture0() const;
111 
112  // Indices of gas, liquid and solid phases in phase properties
113  // list
114 
115  //- Gas id
116  virtual label idGas() const;
117 
118  //- Liquid id
119  virtual label idLiquid() const;
120 
121  //- Solid id
122  virtual label idSolid() const;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133  #include "SinglePhaseMixture.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
virtual label idLiquid() const
Liquid id.
virtual const scalarField & YMixture0() const
Return the list of mixture mass fractions.
virtual label idGas() const
Gas id.
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:158
virtual ~SinglePhaseMixture()
Destructor.
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.
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("singlePhaseMixture")
Runtime type information.
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
Namespace for OpenFOAM.