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