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

ThermoCloud_.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) 1991-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::ThermoCloud
00026 
00027 Description
00028     Templated base class for thermodynamic cloud
00029 
00030     - Adds to kinematic cloud
00031       - Heat transfer
00032 
00033 SourceFiles
00034     ThermoCloudI.H
00035     ThermoCloud.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef ThermoCloud_H
00040 #define ThermoCloud_H
00041 
00042 #include <lagrangianIntermediate/KinematicCloud_.H>
00043 #include <lagrangianIntermediate/thermoCloud.H>
00044 #include <basicThermophysicalModels/basicThermo.H>
00045 
00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00047 
00048 namespace Foam
00049 {
00050 
00051 // Forward declaration of classes
00052 
00053 template<class CloudType>
00054 class HeatTransferModel;
00055 
00056 /*---------------------------------------------------------------------------*\
00057                         Class ThermoCloud Declaration
00058 \*---------------------------------------------------------------------------*/
00059 
00060 template<class ParcelType>
00061 class ThermoCloud
00062 :
00063     public KinematicCloud<ParcelType>,
00064     public thermoCloud
00065 {
00066     // Private Member Functions
00067 
00068         //- Disallow default bitwise copy construct
00069         ThermoCloud(const ThermoCloud&);
00070 
00071         //- Disallow default bitwise assignment
00072         void operator=(const ThermoCloud&);
00073 
00074 
00075 protected:
00076 
00077     // Protected data
00078 
00079         //- Thermo parcel constant properties
00080         typename ParcelType::constantProperties constProps_;
00081 
00082 
00083         // References to the carrier gas fields
00084 
00085             //- Thermodynamics package (basic)
00086             basicThermo& carrierThermo_;
00087 
00088 
00089         // References to the cloud sub-models
00090 
00091             //- Heat transfer model
00092             autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > >
00093                 heatTransferModel_;
00094 
00095 
00096         // Reference to the particle integration schemes
00097 
00098             //- Temperature integration
00099             autoPtr<scalarIntegrationScheme> TIntegrator_;
00100 
00101 
00102         // Modelling options
00103 
00104             //- Include radiation
00105             Switch radiation_;
00106 
00107 
00108         // Sources
00109 
00110             //- Sensible enthalpy transfer [J/kg]
00111             DimensionedField<scalar, volMesh> hsTrans_;
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         ThermoCloud
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 ~ThermoCloud();
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             //- Return const access to thermo package
00161             inline const basicThermo& carrierThermo() const;
00162 
00163             //- Return access to thermo package
00164             inline basicThermo& carrierThermo();
00165 
00166 
00167             // Sub-models
00168 
00169                 //- Return reference to heat transfer model
00170                 inline const HeatTransferModel<ThermoCloud<ParcelType> >&
00171                     heatTransfer() const;
00172 
00173 
00174             // Integration schemes
00175 
00176                 //-Return reference to velocity integration
00177                 inline const scalarIntegrationScheme& TIntegrator() const;
00178 
00179 
00180             // Modelling options
00181 
00182                  //- Radiation flag
00183                 inline bool radiation() const;
00184 
00185 
00186             // Sources
00187 
00188                 // Enthalpy
00189 
00190                     //- Sensible enthalpy transfer [J/kg]
00191                     inline DimensionedField<scalar, volMesh>& hsTrans();
00192 
00193                     //- Return enthalpy source [J/kg/m3/s]
00194                     inline tmp<DimensionedField<scalar, volMesh> > Sh() const;
00195 
00196 
00197                 // Radiation - overrides thermoCloud virtual abstract members
00198 
00199                     //- Return tmp equivalent particulate emission
00200                     inline tmp<volScalarField> Ep() const;
00201 
00202                     //- Return tmp equivalent particulate absorption
00203                     inline tmp<volScalarField> ap() const;
00204 
00205                     //- Return tmp equivalent particulate scattering factor
00206                     inline tmp<volScalarField> sigmap() const;
00207 
00208 
00209         // Check
00210 
00211             //- Print cloud information
00212             void info() const;
00213 
00214 
00215         // Cloud evolution functions
00216 
00217             //- Check parcel properties
00218             void checkParcelProperties
00219             (
00220                 ParcelType& parcel,
00221                 const scalar lagrangianDt,
00222                 const bool fullyDescribed
00223             );
00224 
00225             //- Reset the spray source terms
00226             void resetSourceTerms();
00227 
00228             //- Evolve the spray (inject, move)
00229             void evolve();
00230 };
00231 
00232 
00233 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00234 
00235 } // End namespace Foam
00236 
00237 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00238 
00239 #include "ThermoCloudI_.H"
00240 
00241 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00242 
00243 #ifdef NoRepository
00244 #   include "ThermoCloud_.C"
00245 #endif
00246 
00247 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00248 
00249 #endif
00250 
00251 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines