FreeFOAM The Cross-Platform CFD Toolkit
ThermoParcelI.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  T0_(dimensionedScalar(this->dict().lookup("T0")).value()),
36  TMin_(dimensionedScalar(this->dict().lookup("TMin")).value()),
37  cp0_(dimensionedScalar(this->dict().lookup("cp0")).value()),
38  epsilon0_(dimensionedScalar(this->dict().lookup("epsilon0")).value()),
39  f0_(dimensionedScalar(this->dict().lookup("f0")).value()),
40  Pr_(dimensionedScalar(this->dict().lookup("Pr")).value())
41 {}
42 
43 
44 template<class ParcelType>
46 (
48  const constantProperties& constProps,
49  const interpolation<scalar>& rhoInterp,
50  const interpolation<vector>& UInterp,
51  const interpolation<scalar>& muInterp,
52  const interpolation<scalar>& TInterp,
53  const interpolation<scalar>& cpInterp,
54  const vector& g
55 )
56 :
58  (
59  cloud,
60  constProps,
61  rhoInterp,
62  UInterp,
63  muInterp,
64  g
65  ),
66  cloud_(cloud),
67  constProps_(constProps),
68  TInterp_(TInterp),
69  cpInterp_(cpInterp)
70 {}
71 
72 
73 template<class ParcelType>
75 (
77  const vector& position,
78  const label cellI
79 )
80 :
81  KinematicParcel<ParcelType>(owner, position, cellI),
82  T_(0.0),
83  cp_(0.0),
84  Tc_(0.0),
85  cpc_(0.0)
86 {}
87 
88 
89 template<class ParcelType>
91 (
93  const vector& position,
94  const label cellI,
95  const label typeId,
96  const scalar nParticle0,
97  const scalar d0,
98  const vector& U0,
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  T_(constProps.T0()),
114  cp_(constProps.cp0()),
115  Tc_(0.0),
116  cpc_(0.0)
117 {}
118 
119 
120 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
121 
122 template <class ParcelType>
123 inline Foam::scalar
125 {
126  return T0_;
127 }
128 
129 
130 template <class ParcelType>
131 inline Foam::scalar
133 {
134  return TMin_;
135 }
136 
137 
138 template <class ParcelType>
139 inline Foam::scalar
141 {
142  return cp0_;
143 }
144 
145 
146 template <class ParcelType>
147 inline Foam::scalar
149 {
150  return epsilon0_;
151 }
152 
153 
154 template <class ParcelType>
155 inline Foam::scalar
157 {
158  return f0_;
159 }
160 
161 
162 template <class ParcelType>
163 inline Foam::scalar
165 {
166  return Pr_;
167 }
168 
169 
170 // * * * * * * * * * * * trackData Member Functions * * * * * * * * * * * * //
171 
172 template<class ParcelType>
175 {
176  return cloud_;
177 }
178 
179 
180 template <class ParcelType>
183 {
184  return constProps_;
185 }
186 
187 
188 template<class ParcelType>
191 {
192  return TInterp_;
193 }
194 
195 
196 template<class ParcelType>
199 {
200  return cpInterp_;
201 }
202 
203 
204 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
205 
206 template<class ParcelType>
207 inline Foam::scalar Foam::ThermoParcel<ParcelType>::T() const
208 {
209  return T_;
210 }
211 
212 
213 template<class ParcelType>
214 inline Foam::scalar Foam::ThermoParcel<ParcelType>::cp() const
215 {
216  return cp_;
217 }
218 
219 
220 template<class ParcelType>
221 inline Foam::scalar& Foam::ThermoParcel<ParcelType>::T()
222 {
223  return T_;
224 }
225 
226 
227 template<class ParcelType>
229 {
230  return cp_;
231 }
232 
233 
234 // ************************ vim: set sw=4 sts=4 et: ************************ //