fixed writing out entries in advective bc
[OpenFOAM-1.6-ext.git] / src / lagrangian / intermediate / clouds / Templates / ReactingMultiphaseCloud / ReactingMultiphaseCloud.H
blob132f658122653c49f3a331f254b99fd9223663b9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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
25 Class
26     Foam::ReactingMultiphaseCloud
28 Description
29     Templated base class for multiphase reacting cloud
31     - Adds to reacting cloud
32       - multiphase composition
33       - devolatilisatsion
34       - surface reactions
36 SourceFiles
37     ReactingMultiphaseCloudI.H
38     ReactingMultiphaseCloud.C
40 \*---------------------------------------------------------------------------*/
42 #ifndef ReactingMultiphaseCloud_H
43 #define ReactingMultiphaseCloud_H
45 #include "ReactingCloud.H"
46 #include "reactingMultiphaseCloud.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 namespace Foam
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&);
80 protected:
82     // Protected data
84         //- Parcel constant properties
85         typename ParcelType::constantProperties constProps_;
88         // References to the cloud sub-models
90             //- Devolatilisation model
91             autoPtr
92             <
93                 DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
94             >
95             devolatilisationModel_;
97             //- Surface reaction model
98             autoPtr
99             <
100                 SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >
101             >
102             surfaceReactionModel_;
105         // Check
107             //- Total mass transferred to continuous phase via devolatilisation
108             scalar dMassDevolatilisation_;
110             //- Total mass transferred to continuous phase via surface
111             //  reactions
112             scalar dMassSurfaceReaction_;
115     // Protected member functions
117         // Cloud evolution functions
119             //- Pre-evolve
120             void preEvolve();
122             //- Evolve the cloud
123             void evolveCloud();
125             //- Post-evolve
126             void postEvolve();
129 public:
131     // Constructors
133         //- Construct given carrier gas fields
134         ReactingMultiphaseCloud
135         (
136             const word& cloudName,
137             const volScalarField& rho,
138             const volVectorField& U,
139             const dimensionedVector& g,
140             basicThermo& thermo,
141             bool readFields = true
142         );
145     //- Destructor
146     virtual ~ReactingMultiphaseCloud();
149     //- Type of parcel the cloud was instantiated for
150     typedef ParcelType parcelType;
153     // Member Functions
155         // Access
157             //- Return the constant properties
158             inline const typename ParcelType::constantProperties&
159                 constProps() const;
162             // Sub-models
164                 //- Return reference to devolatilisation model
165                 inline const DevolatilisationModel
166                 <
167                     ReactingMultiphaseCloud<ParcelType>
168                 >&
169                 devolatilisation() const;
171                 //- Return reference to reacting surface reaction model
172                 inline const SurfaceReactionModel
173                 <
174                     ReactingMultiphaseCloud<ParcelType>
175                 >&
176                 surfaceReaction() const;
179         // Check
181             //- Print cloud information
182             void info() const;
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
195             (
196                 ParcelType& parcel,
197                 const scalar lagrangianDt,
198                 const bool fullyDescribed
199             );
201             //- Reset the spray source terms
202             void resetSourceTerms();
204             //- Evolve the spray (inject, move)
205             void evolve();
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
211 } // End namespace Foam
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
215 #include "ReactingMultiphaseCloudI.H"
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
219 #ifdef NoRepository
220 #   include "ReactingMultiphaseCloud.C"
221 #endif
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
225 #endif
227 // ************************************************************************* //