1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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/>.
24 \*---------------------------------------------------------------------------*/
26 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
28 template<class ParcelType>
29 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
32 ParcelType::constantProperties(),
38 template<class ParcelType>
39 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
42 const constantProperties& cp
45 ParcelType::constantProperties(cp),
47 hRetentionCoeff_(cp.hRetentionCoeff_)
51 template<class ParcelType>
52 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
55 const dictionary& parentDict,
59 ParcelType::constantProperties(parentDict, readFields),
65 this->dict().lookup("LDevol") >> LDevol_;
66 this->dict().lookup("hRetentionCoeff") >> hRetentionCoeff_;
68 if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
72 "ReactingMultiphaseParcel<ParcelType>::constantProperties::"
74 ) << "hRetentionCoeff must be in the range 0 to 1" << nl
75 << exit(FatalError) << endl;
78 hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
83 template<class ParcelType>
84 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
87 const vector& position,
93 ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
101 template<class ParcelType>
102 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
104 const polyMesh& mesh,
105 const vector& position,
107 const label tetFaceI,
110 const scalar nParticle0,
112 const scalar dTarget0,
115 const vector& angularMomentum0,
116 const vector& torque0,
117 const scalarField& Y0,
118 const scalarField& YGas0,
119 const scalarField& YLiquid0,
120 const scalarField& YSolid0,
121 const constantProperties& constProps
149 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
151 template<class ParcelType>
153 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::LDevol() const
159 template<class ParcelType>
161 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
162 hRetentionCoeff() const
164 return hRetentionCoeff_;
168 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
170 template<class ParcelType>
171 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
178 template<class ParcelType>
179 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
186 template<class ParcelType>
187 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
194 template<class ParcelType>
195 inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const
201 template<class ParcelType>
202 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas()
208 template<class ParcelType>
209 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid()
215 template<class ParcelType>
216 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid()
222 template<class ParcelType>
223 inline bool& Foam::ReactingMultiphaseParcel<ParcelType>::canCombust()
229 // ************************************************************************* //