1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "SinglePhaseMixture.H"
28 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
30 template<class CloudType>
31 void Foam::SinglePhaseMixture<CloudType>::constructIds()
33 if (this->phaseProps().size() == 0)
37 "void Foam::SinglePhaseMixture<CloudType>::constructIds()"
38 ) << "Phase list is empty" << nl << exit(FatalError);
40 else if (this->phaseProps().size() > 1)
44 "void Foam::SinglePhaseMixture<CloudType>::constructIds()"
45 ) << "Only one phase permitted" << nl << exit(FatalError);
48 switch (this->phaseProps()[0].phase())
50 case phaseProperties::GAS:
55 case phaseProperties::LIQUID:
60 case phaseProperties::SOLID:
69 "void Foam::SinglePhaseMixture<CloudType>::constructIds()"
70 ) << "Unknown phase enumeration" << nl << abort(FatalError);
76 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
78 template<class CloudType>
79 Foam::SinglePhaseMixture<CloudType>::SinglePhaseMixture
81 const dictionary& dict,
85 CompositionModel<CloudType>(dict, owner, typeName),
94 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
96 template<class CloudType>
97 Foam::SinglePhaseMixture<CloudType>::~SinglePhaseMixture()
101 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
103 template<class CloudType>
104 const Foam::scalarField&
105 Foam::SinglePhaseMixture<CloudType>::YGas0() const
109 "const Foam::scalarField& "
110 "Foam::SinglePhaseMixture<CloudType>::YGas0() const"
112 return this->phaseProps()[0].Y();
116 template<class CloudType>
117 const Foam::scalarField&
118 Foam::SinglePhaseMixture<CloudType>::YLiquid0() const
122 "const Foam::scalarField& "
123 "Foam::SinglePhaseMixture<CloudType>::YLiquid0() const"
125 return this->phaseProps()[0].Y();
129 template<class CloudType>
130 const Foam::scalarField&
131 Foam::SinglePhaseMixture<CloudType>::YSolid0() const
135 "const Foam::scalarField& "
136 "Foam::SinglePhaseMixture<CloudType>::YSolid0() const"
138 return this->phaseProps()[0].Y();
142 template<class CloudType>
143 const Foam::scalarField&
144 Foam::SinglePhaseMixture<CloudType>::YMixture0() const
146 return this->phaseProps()[0].Y();
150 template<class CloudType>
151 Foam::label Foam::SinglePhaseMixture<CloudType>::idGas() const
157 template<class CloudType>
158 Foam::label Foam::SinglePhaseMixture<CloudType>::idLiquid() const
164 template<class CloudType>
165 Foam::label Foam::SinglePhaseMixture<CloudType>::idSolid() const
171 // ************************************************************************* //