OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

blobsSheetAtomization.C

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-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 \*---------------------------------------------------------------------------*/
00026 
00027 #include "error.H"
00028 
00029 #include "blobsSheetAtomization.H"
00030 #include "addToRunTimeSelectionTable.H"
00031 #include "basicMultiComponentMixture.H"
00032 
00033 #include "RosinRammler.H"
00034 
00035 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00036 
00037 namespace Foam
00038 {
00039 
00040 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
00041 
00042 defineTypeNameAndDebug(blobsSheetAtomization, 0);
00043 
00044 addToRunTimeSelectionTable
00045 (
00046     atomizationModel,
00047     blobsSheetAtomization,
00048     dictionary
00049 );
00050 
00051 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00052 
00053 // Construct from components
00054 blobsSheetAtomization::blobsSheetAtomization
00055 (
00056     const dictionary& dict,
00057     spray& sm
00058 )
00059 :
00060     atomizationModel(dict, sm),
00061     coeffsDict_(dict.subDict(typeName + "Coeffs")),
00062     B_(readScalar(coeffsDict_.lookup("B"))),
00063     angle_(readScalar(coeffsDict_.lookup("angle"))),
00064     rndGen_(sm.rndGen())
00065 {}
00066 
00067 
00068 // * * * * * * * * * * * * * * * * Destructor  * * * * * * * * * * * * * * * //
00069 
00070 blobsSheetAtomization::~blobsSheetAtomization()
00071 {}
00072 
00073 
00074 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00075 
00076 void blobsSheetAtomization::atomizeParcel
00077 (
00078     parcel& p,
00079     const scalar deltaT,
00080     const vector& vel,
00081     const liquidMixture& fuels
00082 ) const
00083 {
00084 
00085     const PtrList<volScalarField>& Y = spray_.composition().Y();
00086 
00087     label Ns = Y.size();
00088     label cellI = p.cell();
00089     scalar pressure = spray_.p()[cellI];
00090     scalar temperature = spray_.T()[cellI];
00091     scalar Taverage = p.T() + (temperature - p.T())/3.0;
00092 
00093     scalar Winv = 0.0;
00094     for(label i=0; i<Ns; i++)
00095     {
00096         Winv += Y[i][cellI]/spray_.gasProperties()[i].W();
00097     }
00098     scalar R = specie::RR*Winv;
00099 
00100     // ideal gas law to evaluate density
00101     scalar rhoAverage = pressure/R/Taverage;
00102     scalar sigma = fuels.sigma(pressure, p.T(), p.X());
00103 
00104     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00105     //     The We and Re numbers are to be evaluated using the 1/3 rule.
00106     // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00107 
00108     scalar rhoFuel = fuels.rho(1.0e+5, p.T(), p.X());
00109 
00110     scalar U = mag(p.Urel(vel));
00111 
00112     const injectorType& it =
00113         spray_.injectors()[label(p.injector())].properties();
00114 
00115     vector itPosition(vector::zero);
00116     label nHoles = it.nHoles();
00117     if (nHoles > 1)
00118     {
00119         for(label i=0; i<nHoles;i++)
00120         {
00121             itPosition += it.position(i);
00122         }
00123         itPosition /= nHoles;
00124     }
00125     else
00126     {
00127         itPosition = it.position(0);
00128     }
00129 //    const vector itPosition = it.position();
00130 
00131 
00132     scalar lBU = B_ * sqrt
00133     (
00134         rhoFuel * sigma * p.d() * cos(angle_*mathematicalConstant::pi/360.0)
00135       / sqr(rhoAverage*U)
00136     );
00137 
00138     scalar pWalk = mag(p.position() - itPosition);
00139 
00140     if(pWalk > lBU && p.liquidCore() == 1.0)
00141     {
00142         p.liquidCore() = 0.0;
00143     }
00144 }
00145 
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 } // End namespace Foam
00150 
00151 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd