FreeFOAM The Cross-Platform CFD Toolkit
ThermoCloud_.C
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 #include "ThermoCloud_.H"
29 
31 
32 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
33 
34 template<class ParcelType>
36 {
38 }
39 
40 
41 template<class ParcelType>
43 {
44  const volScalarField& T = carrierThermo_.T();
45  const volScalarField cp = carrierThermo_.Cp();
46 
48  (
49  this->interpolationSchemes(),
50  this->rho()
51  );
52 
54  (
55  this->interpolationSchemes(),
56  this->U()
57  );
58 
60  (
61  this->interpolationSchemes(),
62  this->mu()
63  );
64 
66  (
67  this->interpolationSchemes(),
68  T
69  );
70 
72  (
73  this->interpolationSchemes(),
74  cp
75  );
76 
77  typename ParcelType::trackData td
78  (
79  *this,
80  constProps_,
81  rhoInterp(),
82  UInterp(),
83  muInterp(),
84  TInterp(),
85  cpInterp(),
86  this->g().value()
87  );
88 
89  this->injection().inject(td);
90 
91  if (this->coupled())
92  {
93  resetSourceTerms();
94  }
95 
97 }
98 
99 
100 template<class ParcelType>
102 {
104 }
105 
106 
107 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
108 
109 template<class ParcelType>
111 (
112  const word& cloudName,
113  const volScalarField& rho,
114  const volVectorField& U,
115  const dimensionedVector& g,
117  bool readFields
118 )
119 :
121  (
122  cloudName,
123  rho,
124  U,
125  thermo.mu(),
126  g,
127  false
128  ),
129  thermoCloud(),
130  constProps_(this->particleProperties()),
131  carrierThermo_(thermo),
132  heatTransferModel_
133  (
135  (
136  this->particleProperties(),
137  *this
138  )
139  ),
140  TIntegrator_
141  (
142  scalarIntegrationScheme::New
143  (
144  "T",
145  this->particleProperties().subDict("integrationSchemes")
146  )
147  ),
148  radiation_(this->particleProperties().lookup("radiation")),
149  hsTrans_
150  (
151  IOobject
152  (
153  this->name() + "hsTrans",
154  this->db().time().timeName(),
155  this->db(),
156  IOobject::NO_READ,
157  IOobject::NO_WRITE,
158  false
159  ),
160  this->mesh(),
161  dimensionedScalar("zero", dimEnergy, 0.0)
162  )
163 {
164  if (readFields)
165  {
166  ParcelType::readFields(*this);
167  }
168 }
169 
170 
171 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
172 
173 template<class ParcelType>
175 {}
176 
177 
178 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
179 
180 template<class ParcelType>
182 (
183  ParcelType& parcel,
184  const scalar lagrangianDt,
185  const bool fullyDescribed
186 )
187 {
189  (
190  parcel,
191  lagrangianDt,
192  fullyDescribed
193  );
194 
195  if (!fullyDescribed)
196  {
197  parcel.T() = constProps_.T0();
198  parcel.cp() = constProps_.cp0();
199  }
200 }
201 
202 
203 template<class ParcelType>
205 {
207  hsTrans_.field() = 0.0;
208 }
209 
210 
211 template<class ParcelType>
213 {
214  if (this->active())
215  {
216  preEvolve();
217 
218  evolveCloud();
219 
220  postEvolve();
221 
222  info();
223  Info<< endl;
224  }
225 }
226 
227 
228 template<class ParcelType>
230 {
232 }
233 
234 
235 // ************************ vim: set sw=4 sts=4 et: ************************ //