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

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