FreeFOAM The Cross-Platform CFD Toolkit
ThermoCloud_.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 Class
25  Foam::ThermoCloud
26 
27 Description
28  Templated base class for thermodynamic cloud
29 
30  - Adds to kinematic cloud
31  - Heat transfer
32 
33 SourceFiles
34  ThermoCloudI.H
35  ThermoCloud.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef ThermoCloud_H
40 #define ThermoCloud_H
41 
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward declaration of classes
52 
53 template<class CloudType>
54 class HeatTransferModel;
55 
56 /*---------------------------------------------------------------------------*\
57  Class ThermoCloud Declaration
58 \*---------------------------------------------------------------------------*/
59 
60 template<class ParcelType>
62 :
63  public KinematicCloud<ParcelType>,
64  public thermoCloud
65 {
66  // Private Member Functions
67 
68  //- Disallow default bitwise copy construct
69  ThermoCloud(const ThermoCloud&);
70 
71  //- Disallow default bitwise assignment
72  void operator=(const ThermoCloud&);
73 
74 
75 protected:
76 
77  // Protected data
78 
79  //- Thermo parcel constant properties
80  typename ParcelType::constantProperties constProps_;
81 
82 
83  // References to the carrier gas fields
84 
85  //- Thermodynamics package (basic)
87 
88 
89  // References to the cloud sub-models
90 
91  //- Heat transfer model
94 
95 
96  // Reference to the particle integration schemes
97 
98  //- Temperature integration
100 
101 
102  // Modelling options
103 
104  //- Include radiation
106 
107 
108  // Sources
109 
110  //- Sensible enthalpy transfer [J/kg]
112 
113 
114  // Protected member functions
115 
116  // Cloud evolution functions
117 
118  //- Pre-evolve
119  void preEvolve();
120 
121  //- Evolve the cloud
122  void evolveCloud();
123 
124  //- Post-evolve
125  void postEvolve();
126 
127 
128 public:
129 
130  // Constructors
131 
132  //- Construct given carrier gas fields
134  (
135  const word& cloudName,
136  const volScalarField& rho,
137  const volVectorField& U,
138  const dimensionedVector& g,
140  bool readFields = true
141  );
142 
143 
144  //- Destructor
145  virtual ~ThermoCloud();
146 
147 
148  //- Type of parcel the cloud was instantiated for
149  typedef ParcelType parcelType;
150 
151 
152  // Member Functions
153 
154  // Access
155 
156  //- Return the constant properties
157  inline const typename ParcelType::constantProperties&
158  constProps() const;
159 
160  //- Return const access to thermo package
161  inline const basicThermo& carrierThermo() const;
162 
163  //- Return access to thermo package
164  inline basicThermo& carrierThermo();
165 
166 
167  // Sub-models
168 
169  //- Return reference to heat transfer model
171  heatTransfer() const;
172 
173 
174  // Integration schemes
175 
176  //-Return reference to velocity integration
177  inline const scalarIntegrationScheme& TIntegrator() const;
178 
179 
180  // Modelling options
181 
182  //- Radiation flag
183  inline bool radiation() const;
184 
185 
186  // Sources
187 
188  // Enthalpy
189 
190  //- Sensible enthalpy transfer [J/kg]
192 
193  //- Return enthalpy source [J/kg/m3/s]
194  inline tmp<DimensionedField<scalar, volMesh> > Sh() const;
195 
196 
197  // Radiation - overrides thermoCloud virtual abstract members
198 
199  //- Return tmp equivalent particulate emission
200  inline tmp<volScalarField> Ep() const;
201 
202  //- Return tmp equivalent particulate absorption
203  inline tmp<volScalarField> ap() const;
204 
205  //- Return tmp equivalent particulate scattering factor
206  inline tmp<volScalarField> sigmap() const;
207 
208 
209  // Check
210 
211  //- Print cloud information
212  void info() const;
213 
214 
215  // Cloud evolution functions
216 
217  //- Check parcel properties
219  (
220  ParcelType& parcel,
221  const scalar lagrangianDt,
222  const bool fullyDescribed
223  );
224 
225  //- Reset the spray source terms
226  void resetSourceTerms();
227 
228  //- Evolve the spray (inject, move)
229  void evolve();
230 };
231 
232 
233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
234 
235 } // End namespace Foam
236 
237 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238 
239 #include "ThermoCloudI_.H"
240 
241 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
242 
243 #ifdef NoRepository
244 # include "ThermoCloud_.C"
245 #endif
246 
247 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
248 
249 #endif
250 
251 // ************************ vim: set sw=4 sts=4 et: ************************ //