FreeFOAM The Cross-Platform CFD Toolkit
ReactingParcelI_.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) 1991-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>
30 (
31  const dictionary& parentDict
32 )
33 :
35  pMin_(dimensionedScalar(this->dict().lookup("pMin")).value()),
36  constantVolume_(this->dict().lookup("constantVolume")),
37  Tvap_(dimensionedScalar(this->dict().lookup("Tvap")).value()),
38  Tbp_(dimensionedScalar(this->dict().lookup("Tbp")).value())
39 {}
40 
41 
42 template<class ParcelType>
44 (
46  const constantProperties& constProps,
47  const interpolation<scalar>& rhoInterp,
48  const interpolation<vector>& UInterp,
49  const interpolation<scalar>& muInterp,
50  const interpolation<scalar>& TInterp,
51  const interpolation<scalar>& CpInterp,
52  const interpolation<scalar>& pInterp,
53  const vector& g
54 )
55 :
57  (
58  cloud,
59  constProps,
60  rhoInterp,
61  UInterp,
62  muInterp,
63  TInterp,
64  CpInterp,
65  g
66  ),
67  cloud_(cloud),
68  constProps_(constProps),
69  pInterp_(pInterp)
70 {}
71 
72 
73 template<class ParcelType>
75 (
77  const vector& position,
78  const label cellI
79 )
80 :
81  ThermoParcel<ParcelType>(owner, position, cellI),
82  mass0_(0.0),
83  Y_(0),
84  pc_(0.0)
85 {}
86 
87 
88 template<class ParcelType>
90 (
92  const vector& position,
93  const label cellI,
94  const label typeId,
95  const scalar nParticle0,
96  const scalar d0,
97  const vector& U0,
98  const scalarField& Y0,
99  const constantProperties& constProps
100 )
101 :
103  (
104  owner,
105  position,
106  cellI,
107  typeId,
108  nParticle0,
109  d0,
110  U0,
111  constProps
112  ),
113  mass0_(0.0),
114  Y_(Y0),
115  pc_(0.0)
116 {
117  // Set initial parcel mass
118  mass0_ = this->mass();
119 }
120 
121 
122 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
123 
124 template<class ParcelType>
125 inline Foam::scalar
127 {
128  return pMin_;
129 }
130 
131 
132 template<class ParcelType>
133 inline Foam::Switch
135 {
136  return constantVolume_;
137 }
138 
139 
140 template<class ParcelType>
141 inline Foam::scalar
143 {
144  return Tvap_;
145 }
146 
147 
148 template<class ParcelType>
149 inline Foam::scalar
151 {
152  return Tbp_;
153 }
154 
155 
156 // * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
157 
158 template<class ParcelType>
161 {
162  return cloud_;
163 }
164 
165 
166 template<class ParcelType>
169 {
170  return constProps_;
171 }
172 
173 
174 template<class ParcelType>
177 {
178  return pInterp_;
179 }
180 
181 
182 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
183 
184 template<class ParcelType>
185 inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
186 {
187  return mass0_;
188 }
189 
190 
191 template<class ParcelType>
193 {
194  return Y_;
195 }
196 
197 
198 template<class ParcelType>
199 inline Foam::scalar Foam::ReactingParcel<ParcelType>::pc() const
200 {
201  return pc_;
202 }
203 
204 
205 template<class ParcelType>
207 {
208  return mass0_;
209 }
210 
211 
212 template<class ParcelType>
214 {
215  return Y_;
216 }
217 
218 
219 // ************************ vim: set sw=4 sts=4 et: ************************ //