|
|
|
ThermoCloud.HGo 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-2009 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 the 00013 Free Software Foundation; either version 2 of the License, or (at your 00014 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, write to the Free Software Foundation, 00023 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00024 00025 Class 00026 Foam::ThermoCloud 00027 00028 Description 00029 Templated base class for thermodynamic cloud 00030 00031 - Adds to kinematic cloud 00032 - Heat transfer 00033 00034 SourceFiles 00035 ThermoCloudI.H 00036 ThermoCloud.C 00037 00038 \*---------------------------------------------------------------------------*/ 00039 00040 #ifndef ThermoCloud_H 00041 #define ThermoCloud_H 00042 00043 #include "KinematicCloud.H" 00044 #include "thermoCloud.H" 00045 #include "basicThermo.H" 00046 00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00048 00049 namespace Foam 00050 { 00051 00052 // Forward declaration of classes 00053 00054 template<class CloudType> 00055 class HeatTransferModel; 00056 00057 /*---------------------------------------------------------------------------*\ 00058 Class ThermoCloud Declaration 00059 \*---------------------------------------------------------------------------*/ 00060 00061 template<class ParcelType> 00062 class ThermoCloud 00063 : 00064 public KinematicCloud<ParcelType>, 00065 public thermoCloud 00066 { 00067 // Private Member Functions 00068 00069 //- Disallow default bitwise copy construct 00070 ThermoCloud(const ThermoCloud&); 00071 00072 //- Disallow default bitwise assignment 00073 void operator=(const ThermoCloud&); 00074 00075 00076 protected: 00077 00078 // Protected data 00079 00080 //- Thermo parcel constant properties 00081 typename ParcelType::constantProperties constProps_; 00082 00083 00084 // References to the carrier gas fields 00085 00086 //- Thermodynamics package (basic) 00087 basicThermo& carrierThermo_; 00088 00089 00090 // References to the cloud sub-models 00091 00092 //- Heat transfer model 00093 autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > > 00094 heatTransferModel_; 00095 00096 00097 // Reference to the particle integration schemes 00098 00099 //- Temperature integration 00100 autoPtr<scalarIntegrationScheme> TIntegrator_; 00101 00102 00103 // Modelling options 00104 00105 //- Include radiation 00106 Switch radiation_; 00107 00108 00109 // Sources 00110 00111 //- Sensible enthalpy transfer 00112 DimensionedField<scalar, volMesh> hsTrans_; 00113 00114 //- Chemical enthalpy transfer 00115 // - If solving for total enthalpy, the carrier phase enthalpy will 00116 // receive the full enthalpy of reaction via creation of reaction 00117 // products 00118 DimensionedField<scalar, volMesh> hcTrans_; 00119 00120 00121 // Protected member functions 00122 00123 // Cloud evolution functions 00124 00125 //- Pre-evolve 00126 void preEvolve(); 00127 00128 //- Post-evolve 00129 void postEvolve(); 00130 00131 00132 public: 00133 00134 // Constructors 00135 00136 //- Construct given carrier gas fields 00137 ThermoCloud 00138 ( 00139 const word& cloudName, 00140 const volScalarField& rho, 00141 const volVectorField& U, 00142 const dimensionedVector& g, 00143 basicThermo& thermo 00144 ); 00145 00146 00147 //- Destructor 00148 virtual ~ThermoCloud(); 00149 00150 00151 //- Type of parcel the cloud was instantiated for 00152 typedef ParcelType parcelType; 00153 00154 00155 // Member Functions 00156 00157 // Access 00158 00159 //- Return the constant properties 00160 inline const typename ParcelType::constantProperties& 00161 constProps() const; 00162 00163 //- Return const access to thermo package 00164 inline const basicThermo& carrierThermo() const; 00165 00166 //- Return access to thermo package 00167 inline basicThermo& carrierThermo(); 00168 00169 00170 // Sub-models 00171 00172 //- Return reference to heat transfer model 00173 inline const HeatTransferModel<ThermoCloud<ParcelType> >& 00174 heatTransfer() const; 00175 00176 00177 // Integration schemes 00178 00179 //-Return reference to velocity integration 00180 inline const scalarIntegrationScheme& TIntegrator() const; 00181 00182 00183 // Modelling options 00184 00185 //- Radiation flag 00186 inline bool radiation() const; 00187 00188 00189 // Sources 00190 00191 // Enthalpy 00192 00193 //- Return reference to sensible enthalpy source 00194 inline DimensionedField<scalar, volMesh>& hsTrans(); 00195 00196 //- Return tmp total sensible enthalpy source term 00197 inline tmp<DimensionedField<scalar, volMesh> > Shs() const; 00198 00199 //- Return reference to chemical enthalpy source 00200 inline DimensionedField<scalar, volMesh>& hcTrans(); 00201 00202 //- Return tmp chemical enthalpy source term 00203 inline tmp<DimensionedField<scalar, volMesh> > Shc() const; 00204 00205 //- Return tmp total enthalpy source term 00206 inline tmp<DimensionedField<scalar, volMesh> > Sh() const; 00207 00208 00209 // Radiation - overrides thermoCloud virtual abstract members 00210 00211 //- Return tmp equivalent particulate emission 00212 inline tmp<volScalarField> Ep() const; 00213 00214 //- Return tmp equivalent particulate absorption 00215 inline tmp<volScalarField> ap() const; 00216 00217 //- Return tmp equivalent particulate scattering factor 00218 inline tmp<volScalarField> sigmap() const; 00219 00220 00221 // Check 00222 00223 //- Print cloud information 00224 void info() const; 00225 00226 00227 // Cloud evolution functions 00228 00229 //- Check parcel properties 00230 void checkParcelProperties 00231 ( 00232 ParcelType& parcel, 00233 const scalar lagrangianDt, 00234 const bool fullyDescribed 00235 ); 00236 00237 //- Reset the spray source terms 00238 void resetSourceTerms(); 00239 00240 //- Evolve the spray (inject, move) 00241 void evolve(); 00242 }; 00243 00244 00245 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00246 00247 } // End namespace Foam 00248 00249 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00250 00251 #include "ThermoCloudI.H" 00252 00253 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00254 00255 #ifdef NoRepository 00256 # include "ThermoCloud.C" 00257 #endif 00258 00259 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00260 00261 #endif 00262 00263 // ************************************************************************* // |