Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / src / lagrangian / intermediate / parcels / Templates / ReactingMultiphaseParcel / ReactingMultiphaseParcelI.H
blobe5ff57177ab3a158c49ef65d63079ea913f42f41
1 /*---------------------------------------------------------------------------*\
2   =========                 |
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 -------------------------------------------------------------------------------
8 License
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 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
28 template<class ParcelType>
29 inline Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
30 constantProperties
32     const dictionary& parentDict
35     ReactingParcel<ParcelType>::constantProperties(parentDict),
36     LDevol_(dimensionedScalar(this->dict().lookup("LDevol")).value()),
37     hRetentionCoeff_
38     (
39         dimensionedScalar(this->dict().lookup("hRetentionCoeff")).value()
40     )
42     if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
43     {
44         FatalErrorIn
45         (
46             "ReactingMultiphaseParcel<ParcelType>::constantProperties::"
47             "constantProperties"
48         )   << "hRetentionCoeff must be in the range 0 to 1" << nl
49             << exit(FatalError) << endl;
50     }
52     hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
56 template<class ParcelType>
57 inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData
59     ReactingMultiphaseCloud<ParcelType>& cloud,
60     const constantProperties& constProps,
61     const interpolation<scalar>& rhoInterp,
62     const interpolation<vector>& UInterp,
63     const interpolation<scalar>& muInterp,
64     const interpolation<scalar>& TInterp,
65     const interpolation<scalar>& CpInterp,
66     const interpolation<scalar>& pInterp,
67     const vector& g
70     ReactingParcel<ParcelType>::trackData
71     (
72         cloud,
73         constProps,
74         rhoInterp,
75         UInterp,
76         muInterp,
77         TInterp,
78         CpInterp,
79         pInterp,
80         g
81     ),
82     cloud_(cloud),
83     constProps_(constProps)
87 template <class ParcelType>
88 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
90     ReactingMultiphaseCloud<ParcelType>& owner,
91     const vector& position,
92     const label cellI
95     ReactingParcel<ParcelType>(owner, position, cellI),
96     YGas_(0),
97     YLiquid_(0),
98     YSolid_(0),
99     canCombust_(false)
103 template<class ParcelType>
104 inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel
106     ReactingMultiphaseCloud<ParcelType>& owner,
107     const vector& position,
108     const label cellI,
109     const label typeId,
110     const scalar nParticle0,
111     const scalar d0,
112     const vector& U0,
113     const scalarField& Y0,
114     const scalarField& YGas0,
115     const scalarField& YLiquid0,
116     const scalarField& YSolid0,
117     const constantProperties& constProps
120     ReactingParcel<ParcelType>
121     (
122         owner,
123         position,
124         cellI,
125         typeId,
126         nParticle0,
127         d0,
128         U0,
129         Y0,
130         constProps
131     ),
132     YGas_(YGas0),
133     YLiquid_(YLiquid0),
134     YSolid_(YSolid0),
135     canCombust_(false)
139 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
141 template<class ParcelType>
142 inline Foam::scalar
143 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::LDevol() const
145     return LDevol_;
149 template<class ParcelType>
150 inline Foam::scalar
151 Foam::ReactingMultiphaseParcel<ParcelType>::constantProperties::
152 hRetentionCoeff() const
154     return hRetentionCoeff_;
158 // * * * * * * * * * * * trackData Member Functions  * * * * * * * * * * * * //
160 template<class ParcelType>
161 inline Foam::ReactingMultiphaseCloud<ParcelType>&
162 Foam::ReactingMultiphaseParcel<ParcelType>::trackData::cloud()
164     return cloud_;
168 template<class ParcelType>
169 inline const typename Foam::ReactingMultiphaseParcel<ParcelType>::
170 constantProperties&
171 Foam::ReactingMultiphaseParcel<ParcelType>::trackData::constProps() const
173     return constProps_;
177 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
179 template<class ParcelType>
180 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
181 YGas() const
183     return YGas_;
187 template<class ParcelType>
188 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
189 YLiquid() const
191     return YLiquid_;
195 template<class ParcelType>
196 inline const Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::
197 YSolid() const
199     return YSolid_;
203 template<class ParcelType>
204 inline bool Foam::ReactingMultiphaseParcel<ParcelType>::canCombust() const
206     return canCombust_;
210 template<class ParcelType>
211 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YGas()
213     return YGas_;
217 template<class ParcelType>
218 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YLiquid()
220     return YLiquid_;
224 template<class ParcelType>
225 inline Foam::scalarField& Foam::ReactingMultiphaseParcel<ParcelType>::YSolid()
227     return YSolid_;
231 template<class ParcelType>
232 inline bool& Foam::ReactingMultiphaseParcel<ParcelType>::canCombust()
234     return canCombust_;
237 // ************************************************************************* //