FreeFOAM The Cross-Platform CFD Toolkit
ReactingMultiphaseParcelI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
27 
28 template<class ParcelType>
31 (
32  const dictionary& parentDict
33 )
34 :
36  LDevol_(dimensionedScalar(this->dict().lookup("LDevol")).value()),
37  hRetentionCoeff_
38  (
39  dimensionedScalar(this->dict().lookup("hRetentionCoeff")).value()
40  )
41 {
42  if ((hRetentionCoeff_ < 0) || (hRetentionCoeff_ > 1))
43  {
45  (
46  "ReactingMultiphaseParcel<ParcelType>::constantProperties::"
47  "constantProperties"
48  ) << "hRetentionCoeff must be in the range 0 to 1" << nl
49  << exit(FatalError) << endl;
50  }
51 
52  hRetentionCoeff_ = max(1e-06, hRetentionCoeff_);
53 }
54 
55 
56 template<class ParcelType>
58 (
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
68 )
69 :
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)
84 {}
85 
86 
87 template <class ParcelType>
89 (
91  const vector& position,
92  const label cellI
93 )
94 :
95  ReactingParcel<ParcelType>(owner, position, cellI),
96  YGas_(0),
97  YLiquid_(0),
98  YSolid_(0),
99  canCombust_(false)
100 {}
101 
102 
103 template<class ParcelType>
105 (
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
118 )
119 :
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)
136 {}
137 
138 
139 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
140 
141 template<class ParcelType>
142 inline Foam::scalar
144 {
145  return LDevol_;
146 }
147 
148 
149 template<class ParcelType>
150 inline Foam::scalar
153 {
154  return hRetentionCoeff_;
155 }
156 
157 
158 // * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
159 
160 template<class ParcelType>
163 {
164  return cloud_;
165 }
166 
167 
168 template<class ParcelType>
172 {
173  return constProps_;
174 }
175 
176 
177 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
178 
179 template<class ParcelType>
181 YGas() const
182 {
183  return YGas_;
184 }
185 
186 
187 template<class ParcelType>
189 YLiquid() const
190 {
191  return YLiquid_;
192 }
193 
194 
195 template<class ParcelType>
197 YSolid() const
198 {
199  return YSolid_;
200 }
201 
202 
203 template<class ParcelType>
205 {
206  return canCombust_;
207 }
208 
209 
210 template<class ParcelType>
212 {
213  return YGas_;
214 }
215 
216 
217 template<class ParcelType>
219 {
220  return YLiquid_;
221 }
222 
223 
224 template<class ParcelType>
226 {
227  return YSolid_;
228 }
229 
230 
231 template<class ParcelType>
233 {
234  return canCombust_;
235 }
236 
237 // ************************ vim: set sw=4 sts=4 et: ************************ //