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