ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / parcels / Templates / ReactingMultiphaseParcel / ReactingMultiphaseParcelI.H
blobe610de174e8e23230b9bcb50f4996a6d2a61da42
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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::
30 constantProperties()
32     ParcelType::constantProperties(),
33     LDevol_(0.0),
34     hRetentionCoeff_(0.0)
38 template<class ParcelType>
39 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
40 constantProperties
42     const constantProperties& cp
45     ParcelType::constantProperties(cp),
46     LDevol_(cp.LDevol_),
47     hRetentionCoeff_(cp.hRetentionCoeff_)
51 template<class ParcelType>
52 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
53 constantProperties
55     const dictionary& parentDict,
56     const bool readFields
59     ParcelType::constantProperties(parentDict, readFields),
60     LDevol_(0.0),
61     hRetentionCoeff_(0.0)
63     if (readFields)
64     {
65         this->dict().lookup("LDevol") >> LDevol_;
66         this->dict().lookup("hRetentionCoeff") >> hRetentionCoeff_;
68         if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
69         {
70             FatalErrorIn
71             (
72                 "ReactingMultiphaseParcel<ParcelType>::constantProperties::"
73                 "constantProperties"
74             )   << "hRetentionCoeff must be in the range 0 to 1" << nl
75                 << exit(FatalError) << endl;
76         }
78         hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
79     }
83 template<class ParcelType>
84 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
86     const polyMesh& mesh,
87     const vector& position,
88     const label cellI,
89     const label tetFaceI,
90     const label tetPtI
93     ParcelType(mesh, position, cellI, tetFaceI, tetPtI),
94     YGas_(0),
95     YLiquid_(0),
96     YSolid_(0),
97     canCombust_(false)
101 template<class ParcelType>
102 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
104     const polyMesh& mesh,
105     const vector& position,
106     const label cellI,
107     const label tetFaceI,
108     const label tetPtI,
109     const label typeId,
110     const scalar nParticle0,
111     const scalar d0,
112     const scalar dTarget0,
113     const vector& U0,
114     const vector& f0,
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
124     ParcelType
125     (
126         mesh,
127         position,
128         cellI,
129         tetFaceI,
130         tetPtI,
131         typeId,
132         nParticle0,
133         d0,
134         dTarget0,
135         U0,
136         f0,
137         angularMomentum0,
138         torque0,
139         Y0,
140         constProps
141     ),
142     YGas_(YGas0),
143     YLiquid_(YLiquid0),
144     YSolid_(YSolid0),
145     canCombust_(false)
149 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
151 template<class ParcelType>
152 inline Foam::scalar
153 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::LDevol() const
155     return LDevol_;
159 template<class ParcelType>
160 inline Foam::scalar
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>::
172 YGas() const
174     return YGas_;
178 template<class ParcelType>
179 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
180 YLiquid() const
182     return YLiquid_;
186 template<class ParcelType>
187 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
188 YSolid() const
190     return YSolid_;
194 template<class ParcelType>
195 inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const
197     return canCombust_;
201 template<class ParcelType>
202 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas()
204     return YGas_;
208 template<class ParcelType>
209 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid()
211     return YLiquid_;
215 template<class ParcelType>
216 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid()
218     return YSolid_;
222 template<class ParcelType>
223 inline bool& Foam::ReactingMultiphaseParcel<ParcelType>::canCombust()
225     return canCombust_;
229 // ************************************************************************* //