FreeFOAM The Cross-Platform CFD Toolkit
ReactingMultiphaseCloud_.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 Class
25  Foam::ReactingMultiphaseCloud
26 
27 Description
28  Templated base class for multiphase reacting cloud
29 
30  - Adds to reacting cloud
31  - multiphase composition
32  - devolatilisatsion
33  - surface reactions
34 
35 SourceFiles
36  ReactingMultiphaseCloudI.H
37  ReactingMultiphaseCloud.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef ReactingMultiphaseCloud_H
42 #define ReactingMultiphaseCloud_H
43 
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Forward declaration of classes
53 
54 template<class CloudType>
55 class DevolatilisationModel;
56 
57 template<class CloudType>
58 class SurfaceReactionModel;
59 
60 /*---------------------------------------------------------------------------*\
61  Class ReactingMultiphaseCloud Declaration
62 \*---------------------------------------------------------------------------*/
63 
64 template<class ParcelType>
66 :
67  public ReactingCloud<ParcelType>,
69 {
70  // Private member functions
71 
72  //- Disallow default bitwise copy construct
74 
75  //- Disallow default bitwise assignment
76  void operator=(const ReactingMultiphaseCloud&);
77 
78 
79 protected:
80 
81  // Protected data
82 
83  //- Parcel constant properties
84  typename ParcelType::constantProperties constProps_;
85 
86 
87  // References to the cloud sub-models
88 
89  //- Devolatilisation model
90  autoPtr
91  <
93  >
95 
96  //- Surface reaction model
97  autoPtr
98  <
100  >
102 
103 
104  // Check
105 
106  //- Total mass transferred to continuous phase via devolatilisation
108 
109  //- Total mass transferred to continuous phase via surface
110  // reactions
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 ~ReactingMultiphaseCloud();
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 
161  // Sub-models
162 
163  //- Return reference to devolatilisation model
164  inline const DevolatilisationModel
165  <
167  >&
168  devolatilisation() const;
169 
170  //- Return reference to reacting surface reaction model
171  inline const SurfaceReactionModel
172  <
174  >&
175  surfaceReaction() const;
176 
177 
178  // Check
179 
180  //- Print cloud information
181  void info() const;
182 
183  //- Add to cumulative volatilisation mass transfer
184  void addToMassDevolatilisation(const scalar dMass);
185 
186  //- Add to cumulative surface reaction transfer
187  void addToMassSurfaceReaction(const scalar dMass);
188 
189 
190  // Cloud evolution functions
191 
192  //- Check parcel properties
194  (
195  ParcelType& parcel,
196  const scalar lagrangianDt,
197  const bool fullyDescribed
198  );
199 
200  //- Reset the spray source terms
201  void resetSourceTerms();
202 
203  //- Evolve the spray (inject, move)
204  void evolve();
205 };
206 
207 
208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
209 
210 } // End namespace Foam
211 
212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
213 
215 
216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 
218 #ifdef NoRepository
219 # include "ReactingMultiphaseCloud_.C"
220 #endif
221 
222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
223 
224 #endif
225 
226 // ************************ vim: set sw=4 sts=4 et: ************************ //