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 
107 
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 // ************************************************************************* //
Foam::SinglePhaseMixture::TypeName
TypeName("singlePhaseMixture")
Runtime type information.
Foam::SinglePhaseMixture::~SinglePhaseMixture
virtual ~SinglePhaseMixture()
Destructor.
Definition: SinglePhaseMixture.C:106
Foam::SinglePhaseMixture::SinglePhaseMixture
SinglePhaseMixture(const dictionary &dict, CloudType &owner)
Construct from dictionary.
Definition: SinglePhaseMixture.C:76
Foam::SinglePhaseMixture
Templated parcel single phase, multi-component class.
Definition: SinglePhaseMixture.H:54
Foam::CompositionModel
Templated reacting parcel composition model class Consists of carrier species (via thermo package),...
Definition: ReactingCloud.H:58
Foam::Field< scalar >
Foam::SinglePhaseMixture::idGas
virtual label idGas() const
Gas id.
Definition: SinglePhaseMixture.C:121
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
Foam::SinglePhaseMixture::idLiquid
virtual label idLiquid() const
Liquid id.
Definition: SinglePhaseMixture.C:128
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::SinglePhaseMixture::clone
virtual autoPtr< CompositionModel< CloudType > > clone() const
Construct and return a clone.
Definition: SinglePhaseMixture.H:94
Foam::SinglePhaseMixture::YMixture0
virtual const scalarField & YMixture0() const
Return the list of mixture mass fractions.
Definition: SinglePhaseMixture.C:114
Foam::SinglePhaseMixture::idSolid
virtual label idSolid() const
Solid id.
Definition: SinglePhaseMixture.C:135
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
SinglePhaseMixture.C
CompositionModel.H