1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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.
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
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/>.
25 Foam::SinglePhaseMixture
28 Templated parcel single phase, multi-component class
33 \*---------------------------------------------------------------------------*/
35 #ifndef SinglePhaseMixture_H
36 #define SinglePhaseMixture_H
38 #include "CompositionModel.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 /*---------------------------------------------------------------------------*\
46 Class SinglePhaseMixture Declaration
47 \*---------------------------------------------------------------------------*/
49 template<class CloudType>
50 class SinglePhaseMixture
52 public CompositionModel<CloudType>
56 // Indices of the phases - only 1 will be set
68 // Private Member Functions
70 //- Construct the indices and check correct specification of
71 // 1 gas or 1 liquid or 1 solid
77 //- Runtime type information
78 TypeName("singlePhaseMixture");
83 //- Construct from dictionary
84 SinglePhaseMixture(const dictionary& dict, CloudType& owner);
87 SinglePhaseMixture(const SinglePhaseMixture<CloudType>& cm);
89 //- Construct and return a clone
90 virtual autoPtr<CompositionModel<CloudType> > clone() const
92 return autoPtr<CompositionModel<CloudType> >
94 new SinglePhaseMixture<CloudType>(*this)
100 virtual ~SinglePhaseMixture();
109 //- Return the list of gas mass fractions
110 const scalarField& YGas0() const;
112 //- Return the total gas mass fraction
113 scalar YGasTot0() const;
118 //- Return the list of liquid mass fractions
119 const scalarField& YLiquid0() const;
121 //- Return the total liquid mass fraction
122 scalar YLiquidTot0() const;
127 //- Return the list of solid mass fractions
128 const scalarField& YSolid0() const;
130 //- Return the total solid mass fraction
131 scalar YSolidTot0() const;
134 // Mixture properties
136 //- Return the list of mixture mass fractions
137 virtual const scalarField& YMixture0() const;
139 // Indices of gas, liquid and solid phases in phase properties
143 virtual label idGas() const;
146 virtual label idLiquid() const;
149 virtual label idSolid() const;
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 } // End namespace Foam
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 # include "SinglePhaseMixture.C"
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 // ************************************************************************* //