updates
[OpenFOAM-1.5.x.git] / src / lagrangian / intermediate / clouds / Templates / ThermoCloud / ThermoCloud.H
blob072c86165bb558e864e40fc782333f3635acfc0e
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
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::ThermoCloud
28 Description
29     Templated base class for thermodynamic cloud
30     - Adds to kinematic cloud
31       - Heat transfer
33 SourceFiles
34     ThermoCloudI.H
35     ThermoCloud.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef ThermoCloud_H
40 #define ThermoCloud_H
42 #include "autoPtr.H"
43 #include "hCombustionThermo.H"
45 #include "KinematicCloud.H"
46 #include "thermoCloud.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 namespace Foam
54 // Forward declaration of classes
56 template<class CloudType>
57 class HeatTransferModel;
59 /*---------------------------------------------------------------------------*\
60                         Class ThermoCloud Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class ParcelType>
64 class ThermoCloud
66     public KinematicCloud<ParcelType>,
67     public thermoCloud
70     // Private data
72         //- Thermo parcel constant properties
73         typename ParcelType::constantProperties constProps_;
76         // References to the carrier gas fields
78             //- Thermodynamics package (basic)
79             basicThermo& carrierThermo_;
82         // References to the cloud sub-models
84             //- Heat transfer model
85             autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > >
86                 heatTransferModel_;
89         // Reference to the particle integration schemes
91             //- Temperature integration
92             autoPtr<scalarIntegrationScheme> TIntegrator_;
95         // Modelling options
97             //- Include radiation
98             Switch radiation_;
101         // Sources
103             //- Enthalpy transfer
104             DimensionedField<scalar, volMesh> hTrans_;
106             //- Coefficient for carrier phase h equation
107             DimensionedField<scalar, volMesh> hCoeff_;
110     // Private Member Functions
112         //- Disallow default bitwise copy construct
113         ThermoCloud(const ThermoCloud&);
115         //- Disallow default bitwise assignment
116         void operator=(const ThermoCloud&);
119 protected:
121     //- Inject more parcels
122     template<class TrackingData>
123     void inject(TrackingData& td);
126 public:
128     //- Runtime type information
129 //    TypeName("ThermoCloud");
132     // Constructors
134         //- Construct given carrier gas fields
135         ThermoCloud
136         (
137             const word& cloudType,
138             const volPointInterpolation& vpi,
139             const volScalarField& rho,
140             const volVectorField& U,
141             const dimensionedVector& g,
142             basicThermo& thermo
143         );
146     // Destructor
148         virtual ~ThermoCloud();
151     // Member Functions
153         // Access
155             //- Return const access to thermo package
156             inline const basicThermo& carrierThermo() const;
158             //- Return access to thermo package
159             inline basicThermo& carrierThermo();
162             // Sub-models
164                 //- Return reference to heat transfer model
165                 inline const HeatTransferModel<ThermoCloud<ParcelType> >&
166                     heatTransfer() const;
169             // Integration schemes
171                 //-Return reference to velocity integration
172                 inline const scalarIntegrationScheme& TIntegrator() const;
175             // Modelling options
177                 //- Radiation flag
178                 inline bool radiation() const;
181             // Sources
183                 // Enthalpy
185                     //- Return reference to enthalpy source
186                     inline DimensionedField<scalar, volMesh>& hTrans();
188                     //- Coefficient for carrier phase h equation
189                     inline DimensionedField<scalar, volMesh>& hCoeff();
191                     //- return tmp enthalpy source term - fully explicit
192                     inline tmp<DimensionedField<scalar, volMesh> > Sh1() const;
194                     //- Return tmp enthalpy source term - semi-implicit
195                     inline tmp<fvScalarMatrix> Sh2(volScalarField& h) const;
198                 // Radiation - overrides thermoCloud virtual abstract members
200                     //- Return tmp equivalent particulate emission
201                     inline tmp<volScalarField> Ep() const;
203                     //- Return tmp equivalent particulate absorption
204                     inline tmp<volScalarField> ap() const;
206                     //- Return tmp equivalent particulate scattering factor
207                     inline tmp<volScalarField> sigmap() const;
210         // Cloud evolution functions
212             //- Reset the spray source terms
213             void resetSourceTerms();
215             //- Evolve the spray (inject, move)
216             void evolve();
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 } // End namespace Foam
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 #include "ThermoCloudI.H"
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
230 #ifdef NoRepository
231 #   include "ThermoCloud.C"
232 #endif
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
236 #endif
238 // ************************************************************************* //