FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

ReactingMultiphaseCloud_.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::ReactingMultiphaseCloud
00026 
00027 Description
00028     Templated base class for multiphase reacting cloud
00029 
00030     - Adds to reacting cloud
00031       - multiphase composition
00032       - devolatilisatsion
00033       - surface reactions
00034 
00035 SourceFiles
00036     ReactingMultiphaseCloudI.H
00037     ReactingMultiphaseCloud.C
00038 
00039 \*---------------------------------------------------------------------------*/
00040 
00041 #ifndef ReactingMultiphaseCloud_H
00042 #define ReactingMultiphaseCloud_H
00043 
00044 #include <lagrangianIntermediate/ReactingCloud_.H>
00045 #include <lagrangianIntermediate/reactingMultiphaseCloud.H>
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 // Forward declaration of classes
00053 
00054 template<class CloudType>
00055 class DevolatilisationModel;
00056 
00057 template<class CloudType>
00058 class SurfaceReactionModel;
00059 
00060 /*---------------------------------------------------------------------------*\
00061                    Class ReactingMultiphaseCloud Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 template<class ParcelType>
00065 class ReactingMultiphaseCloud
00066 :
00067     public ReactingCloud<ParcelType>,
00068     public reactingMultiphaseCloud
00069 {
00070     // Private member functions
00071 
00072         //- Disallow default bitwise copy construct
00073         ReactingMultiphaseCloud(const ReactingMultiphaseCloud&);
00074 
00075         //- Disallow default bitwise assignment
00076         void operator=(const ReactingMultiphaseCloud&);
00077 
00078 
00079 protected:
00080 
00081     // Protected data
00082 
00083         //- Parcel constant properties
00084         typename ParcelType::constantProperties constProps_;
00085 
00086 
00087         // References to the cloud sub-models
00088 
00089             //- Devolatilisation model
00090             autoPtr
00091             <
00092                 DevolatilisationModel<ReactingMultiphaseCloud<ParcelType> >
00093             >
00094             devolatilisationModel_;
00095 
00096             //- Surface reaction model
00097             autoPtr
00098             <
00099                 SurfaceReactionModel<ReactingMultiphaseCloud<ParcelType> >
00100             >
00101             surfaceReactionModel_;
00102 
00103 
00104         // Check
00105 
00106             //- Total mass transferred to continuous phase via devolatilisation
00107             scalar dMassDevolatilisation_;
00108 
00109             //- Total mass transferred to continuous phase via surface
00110             //  reactions
00111             scalar dMassSurfaceReaction_;
00112 
00113 
00114     // Protected member functions
00115 
00116         // Cloud evolution functions
00117 
00118             //- Pre-evolve
00119             void preEvolve();
00120 
00121             //- Evolve the cloud
00122             void evolveCloud();
00123 
00124             //- Post-evolve
00125             void postEvolve();
00126 
00127 
00128 public:
00129 
00130     // Constructors
00131 
00132         //- Construct given carrier gas fields
00133         ReactingMultiphaseCloud
00134         (
00135             const word& cloudName,
00136             const volScalarField& rho,
00137             const volVectorField& U,
00138             const dimensionedVector& g,
00139             basicThermo& thermo,
00140             bool readFields = true
00141         );
00142 
00143 
00144     //- Destructor
00145     virtual ~ReactingMultiphaseCloud();
00146 
00147 
00148     //- Type of parcel the cloud was instantiated for
00149     typedef ParcelType parcelType;
00150 
00151 
00152     // Member Functions
00153 
00154         // Access
00155 
00156             //- Return the constant properties
00157             inline const typename ParcelType::constantProperties&
00158                 constProps() const;
00159 
00160 
00161             // Sub-models
00162 
00163                 //- Return reference to devolatilisation model
00164                 inline const DevolatilisationModel
00165                 <
00166                     ReactingMultiphaseCloud<ParcelType>
00167                 >&
00168                 devolatilisation() const;
00169 
00170                 //- Return reference to reacting surface reaction model
00171                 inline const SurfaceReactionModel
00172                 <
00173                     ReactingMultiphaseCloud<ParcelType>
00174                 >&
00175                 surfaceReaction() const;
00176 
00177 
00178         // Check
00179 
00180             //- Print cloud information
00181             void info() const;
00182 
00183             //- Add to cumulative volatilisation mass transfer
00184             void addToMassDevolatilisation(const scalar dMass);
00185 
00186             //- Add to cumulative surface reaction transfer
00187             void addToMassSurfaceReaction(const scalar dMass);
00188 
00189 
00190         // Cloud evolution functions
00191 
00192             //- Check parcel properties
00193             void checkParcelProperties
00194             (
00195                 ParcelType& parcel,
00196                 const scalar lagrangianDt,
00197                 const bool fullyDescribed
00198             );
00199 
00200             //- Reset the spray source terms
00201             void resetSourceTerms();
00202 
00203             //- Evolve the spray (inject, move)
00204             void evolve();
00205 };
00206 
00207 
00208 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00209 
00210 } // End namespace Foam
00211 
00212 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00213 
00214 #include "ReactingMultiphaseCloudI_.H"
00215 
00216 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00217 
00218 #ifdef NoRepository
00219 #   include "ReactingMultiphaseCloud_.C"
00220 #endif
00221 
00222 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00223 
00224 #endif
00225 
00226 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines