1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::ReactingMultiphaseCloud
29 Templated base class for multiphase reacting cloud
31 - Adds to reacting cloud
32 - multiphase composition
37 ReactingMultiphaseCloudI.H
38 ReactingMultiphaseCloud.C
40 \*---------------------------------------------------------------------------*/
42 #ifndef ReactingMultiphaseCloud_H
43 #define ReactingMultiphaseCloud_H
45 #include "ReactingCloud.H"
46 #include "reactingMultiphaseCloud.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // Forward declaration of classes
55 template<class CloudType>
56 class DevolatilisationModel;
58 template<class CloudType>
59 class SurfaceReactionModel;
61 /*---------------------------------------------------------------------------*\
62 Class ReactingMultiphaseCloud Declaration
63 \*---------------------------------------------------------------------------*/
65 template<class ParcelType>
66 class ReactingMultiphaseCloud
68 public ReactingCloud<ParcelType>,
69 public reactingMultiphaseCloud
71 // Private member functions
73 //- Disallow default bitwise copy construct
74 ReactingMultiphaseCloud(const ReactingMultiphaseCloud&);
76 //- Disallow default bitwise assignment
77 void operator=(const ReactingMultiphaseCloud&);
84 //- Parcel constant properties
85 typename ParcelType::constantProperties constProps_;
88 // References to the cloud sub-models
90 //- Devolatilisation model
93 DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
95 devolatilisationModel_;
97 //- Surface reaction model
100 SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >
102 surfaceReactionModel_;
107 //- Total mass transferred to continuous phase via devolatilisation
108 scalar dMassDevolatilisation_;
110 //- Total mass transferred to continuous phase via surface
112 scalar dMassSurfaceReaction_;
115 // Protected member functions
117 // Cloud evolution functions
133 //- Construct given carrier gas fields
134 ReactingMultiphaseCloud
136 const word& cloudName,
137 const volScalarField& rho,
138 const volVectorField& U,
139 const dimensionedVector& g,
141 bool readFields = true
146 virtual ~ReactingMultiphaseCloud();
149 //- Type of parcel the cloud was instantiated for
150 typedef ParcelType parcelType;
157 //- Return the constant properties
158 inline const typename ParcelType::constantProperties&
164 //- Return reference to devolatilisation model
165 inline const DevolatilisationModel
167 ReactingMultiphaseCloud<ParcelType>
169 devolatilisation() const;
171 //- Return reference to reacting surface reaction model
172 inline const SurfaceReactionModel
174 ReactingMultiphaseCloud<ParcelType>
176 surfaceReaction() const;
181 //- Print cloud information
184 //- Add to cumulative volatilisation mass transfer
185 void addToMassDevolatilisation(const scalar dMass);
187 //- Add to cumulative surface reaction transfer
188 void addToMassSurfaceReaction(const scalar dMass);
191 // Cloud evolution functions
193 //- Check parcel properties
194 void checkParcelProperties
197 const scalar lagrangianDt,
198 const bool fullyDescribed
201 //- Reset the spray source terms
202 void resetSourceTerms();
204 //- Evolve the spray (inject, move)
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace Foam
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 #include "ReactingMultiphaseCloudI.H"
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220 # include "ReactingMultiphaseCloud.C"
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 // ************************************************************************* //