|
|
|
spray.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-2007 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 spray 00027 00028 Description 00029 00030 \*---------------------------------------------------------------------------*/ 00031 00032 #ifndef spray_H 00033 #define spray_H 00034 00035 #include "parcel.H" 00036 #include "injector.H" 00037 #include "IOPtrList.H" 00038 #include "volPointInterpolation.H" 00039 #include "interpolation.H" 00040 #include "liquid.H" 00041 #include "sprayThermoTypes.H" 00042 #include "autoPtr.H" 00043 #include "liquidMixture.H" 00044 #include "Random.H" 00045 00046 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00047 00048 namespace Foam 00049 { 00050 00051 class atomizationModel; 00052 class breakupModel; 00053 class collisionModel; 00054 class dispersionModel; 00055 class dragModel; 00056 class evaporationModel; 00057 class injectorModel; 00058 class heatTransferModel; 00059 class wallModel; 00060 00061 class combustionMixture; 00062 00063 /*---------------------------------------------------------------------------*\ 00064 Class spray Declaration 00065 \*---------------------------------------------------------------------------*/ 00066 00067 class spray 00068 : 00069 public Cloud<parcel> 00070 { 00071 // Private data 00072 00073 // References to the database and meshes 00074 00075 const Time& runTime_; 00076 scalar time0_; 00077 const fvMesh& mesh_; 00078 const volPointInterpolation& volPointInterpolation_; 00079 00080 //- Random number generator 00081 Random rndGen_; 00082 00083 00084 // References to the physical fields 00085 00086 const volVectorField& U_; 00087 const volScalarField& rho_; 00088 const volScalarField& p_; 00089 const volScalarField& T_; 00090 00091 00092 //- The spray properties 00093 IOdictionary sprayProperties_; 00094 00095 00096 //- The injectors 00097 IOPtrList<injector> injectors_; 00098 00099 00100 // References to the spray sub-models 00101 00102 autoPtr<atomizationModel> atomization_; 00103 autoPtr<dragModel> drag_; 00104 autoPtr<evaporationModel> evaporation_; 00105 autoPtr<heatTransferModel> heatTransfer_; 00106 autoPtr<wallModel> wall_; 00107 autoPtr<breakupModel> breakupModel_; 00108 autoPtr<collisionModel> collisionModel_; 00109 autoPtr<dispersionModel> dispersionModel_; 00110 autoPtr<liquidMixture> fuels_; 00111 autoPtr<injectorModel> injectorModel_; 00112 00113 00114 //- Minimum number of lagrangian subcycles 00115 const label subCycles_; 00116 00117 00118 //- Acceleration due to gravity 00119 vector g_; 00120 00121 00122 // Composition properties 00123 00124 const PtrList<specieProperties>& gasProperties_; 00125 const combustionMixture& composition_; 00126 00127 List<label> liquidToGasIndex_; 00128 List<label> gasToLiquidIndex_; 00129 List<bool> isLiquidFuel_; 00130 00131 00132 // Necessary 2D-information 00133 00134 bool twoD_; 00135 vector axisOfSymmetry_; 00136 vector axisOfWedge_; 00137 vector axisOfWedgeNormal_; 00138 scalar angleOfWedge_; 00139 00140 00141 // Interpolation 00142 00143 dictionary interpolationSchemes_; 00144 00145 autoPtr<interpolation<vector> > UInterpolator_; 00146 autoPtr<interpolation<scalar> > rhoInterpolator_; 00147 autoPtr<interpolation<scalar> > pInterpolator_; 00148 autoPtr<interpolation<scalar> > TInterpolator_; 00149 00150 00151 // Spray Source Terms 00152 00153 //- Momentum 00154 vectorField sms_; 00155 00156 //- Enthalpy 00157 scalarField shs_; 00158 00159 //- Mass 00160 PtrList<scalarField> srhos_; 00161 00162 //- The total mass of the injected liquid 00163 scalar totalInjectedLiquidMass_; 00164 00165 //- The (total added) injected kinetic energy of the liquid 00166 scalar injectedLiquidKE_; 00167 00168 //- Ambient Pressure 00169 scalar ambientPressure_; 00170 00171 //- Ambient Temperature 00172 scalar ambientTemperature_; 00173 00174 00175 00176 // Private Member Functions 00177 00178 //- Disallow default bitwise copy construct 00179 spray(const spray&); 00180 00181 //- Disallow default bitwise assignment 00182 void operator=(const spray&); 00183 00184 00185 public: 00186 00187 // Constructors 00188 00189 //- Construct from components 00190 spray 00191 ( 00192 const volPointInterpolation& vpi, 00193 const volVectorField& U, 00194 const volScalarField& rho, 00195 const volScalarField& p, 00196 const volScalarField& T, 00197 const combustionMixture& composition, 00198 const PtrList<specieProperties>& gasProperties, 00199 const dictionary& thermophysicalProperties, 00200 const dictionary& environmentalProperties 00201 ); 00202 00203 00204 // Destructor 00205 00206 ~spray(); 00207 00208 00209 // Member Functions 00210 00211 // Spray tracking and evolution functions 00212 00213 //- Evolve the spray (move, inject and breakup) 00214 void evolve(); 00215 00216 //- Move the spray parcels 00217 void move(); 00218 00219 //- Inject more parcels 00220 void inject(); 00221 00222 //- Primary breakup droplets 00223 void atomizationLoop(); 00224 00225 00226 //- Secondary breakup droplets 00227 void breakupLoop(); 00228 00229 00230 // Access 00231 00232 inline const Time& runTime() const; 00233 inline const fvMesh& mesh() const; 00234 00235 inline const volVectorField& U() const; 00236 inline const volScalarField& rho() const; 00237 inline const volScalarField& p() const; 00238 inline const volScalarField& T() const; 00239 00240 inline PtrList<injector>& injectors(); 00241 inline const PtrList<injector>& injectors() const; 00242 00243 inline const atomizationModel& atomization() const; 00244 inline const breakupModel& breakup() const; 00245 inline const collisionModel& collisions() const; 00246 inline const dispersionModel& dispersion() const; 00247 inline const dragModel& drag() const; 00248 inline const evaporationModel& evaporation() const; 00249 inline const heatTransferModel& heatTransfer() const; 00250 inline const injectorModel& injection() const; 00251 inline const wallModel& wall() const; 00252 00253 inline tmp<volVectorField> momentumSource() const; 00254 inline tmp<volScalarField> evaporationSource(const label i) const; 00255 inline tmp<volScalarField> heatTransferSource() const; 00256 00257 inline Random& rndGen(); 00258 inline label subCycles() const; 00259 inline const vector& g() const; 00260 00261 inline const liquidMixture& fuels() const; 00262 inline const PtrList<specieProperties>& gasProperties() const; 00263 inline const combustionMixture& composition() const; 00264 00265 inline const List<label>& liquidToGasIndex() const; 00266 inline const List<label>& gasToLiquidIndex() const; 00267 inline const List<bool>& isLiquidFuel() const; 00268 00269 inline const bool& twoD() const; 00270 inline const vector& axisOfSymmetry() const; 00271 inline const vector& axisOfWedge() const; 00272 inline const vector& axisOfWedgeNormal() const; 00273 inline const scalar& angleOfWedge() const; 00274 00275 inline const interpolation<vector>& UInterpolator() const; 00276 inline const interpolation<scalar>& rhoInterpolator() const; 00277 inline const interpolation<scalar>& pInterpolator() const; 00278 inline const interpolation<scalar>& TInterpolator() const; 00279 00280 inline vectorField& sms(); 00281 inline const vectorField& sms() const; 00282 00283 inline scalarField& shs(); 00284 inline const scalarField& shs() const; 00285 00286 inline PtrList<scalarField>& srhos(); 00287 inline const PtrList<scalarField>& srhos() const; 00288 00289 inline const scalar& ambientPressure() const; 00290 00291 inline const scalar& ambientTemperature() const; 00292 00293 00294 // Check 00295 00296 //- Returns the liquid mass that has been injected 00297 scalar injectedMass(const scalar t) const; 00298 00299 //- Returns the liquid mass that will be injected by the injectors 00300 scalar totalMassToInject() const; 00301 00302 //- Returns the injected enthalpy 00303 scalar injectedEnthalpy(const scalar t) const; 00304 00305 //- Returns current total liquid mass in the domain 00306 scalar liquidMass() const; 00307 00308 //- Returns the enthalpy of all the liquid in the domain 00309 // Hdrop = Hgas - Hlat 00310 scalar liquidEnthalpy() const; 00311 00312 //- Returns the enthalpy (total) of all the liquid in the domain 00313 // Hdrop = Hgas - Hlat + (P-Psat)/rhoDrop; 00314 scalar liquidTotalEnthalpy() const; 00315 00316 //- Returns the kinetic energy of the liquid phase 00317 scalar liquidKineticEnergy() const; 00318 00319 //- Returns the injected kinetic energy of the liquid phase 00320 scalar injectedLiquidKineticEnergy() const; 00321 00322 //- Returns the droplet penetration for 'prc' percent of the 00323 // liquid from nozzle 'nozzlei' 00324 scalar liquidPenetration 00325 ( 00326 const label nozzlei, 00327 const scalar prc 00328 ) const; 00329 00330 //- Returns the droplet penetration for 'prc' percent of the 00331 // liquid from nozzle 0 00332 scalar liquidPenetration(const scalar prc) const; 00333 00334 //- Return Sauter Mean Diameter 00335 scalar smd() const; 00336 00337 //- Return Maximum Diameter 00338 scalar maxD() const; 00339 00340 //- Return Ambient Pressure 00341 void calculateAmbientPressure(); 00342 00343 //- Return Ambient Temperature 00344 void calculateAmbientTemperature(); 00345 }; 00346 00347 00348 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00349 00350 } // End namespace Foam 00351 00352 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00353 00354 #include "sprayI.H" 00355 00356 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00357 00358 #endif 00359 00360 // ************************************************************************* // |