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) 2011-2015 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
63 
64  //- Solid
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 // ************************************************************************* //
Foam::SinglePhaseMixture::TypeName
TypeName("singlePhaseMixture")
Runtime type information.
Foam::SinglePhaseMixture::~SinglePhaseMixture
virtual ~SinglePhaseMixture()
Destructor.
Definition: SinglePhaseMixture.C:104
Foam::SinglePhaseMixture::idSolid_
label idSolid_
Solid.
Definition: SinglePhaseMixture.H:64
Foam::SinglePhaseMixture::constructIds
void constructIds()
Construct the indices and check correct specification of.
Definition: SinglePhaseMixture.C:31
Foam::SinglePhaseMixture::SinglePhaseMixture
SinglePhaseMixture(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: SinglePhaseMixture.C:74
Foam::SinglePhaseMixture
Templated parcel single phase, multi-component class.
Definition: SinglePhaseMixture.H:49
Foam::CompositionModel
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
Definition: ReactingCloud.H:52
Foam::label
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
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::SinglePhaseMixture::idLiquid_
label idLiquid_
Liquid.
Definition: SinglePhaseMixture.H:61
Foam::SinglePhaseMixture::idGas
virtual label idGas() const
Gas id.
Definition: SinglePhaseMixture.C:119
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::SinglePhaseMixture::idLiquid
virtual label idLiquid() const
Liquid id.
Definition: SinglePhaseMixture.C:126
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::SinglePhaseMixture::clone
virtual autoPtr< CompositionModel< CloudType > > clone() const
Construct and return a clone.
Definition: SinglePhaseMixture.H:89
Foam::SinglePhaseMixture::YMixture0
virtual const scalarField & YMixture0() const
Return the list of mixture mass fractions.
Definition: SinglePhaseMixture.C:112
Foam::SinglePhaseMixture::idSolid
virtual label idSolid() const
Solid id.
Definition: SinglePhaseMixture.C:133
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
SinglePhaseMixture.C
CompositionModel.H
Foam::SinglePhaseMixture::idGas_
label idGas_
Gas.
Definition: SinglePhaseMixture.H:58