1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
27 #include "atomizationModel.H"
28 #include "breakupModel.H"
29 #include "collisionModel.H"
30 #include "dispersionModel.H"
31 #include "interpolation.H"
32 #include "processorPolyPatch.H"
34 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 void Foam::spray::evolve()
38 sms_.setSize(rho_.size());
39 shs_.setSize(rho_.size());
42 srhos_[i].setSize(rho_.size());
45 UInterpolator_ = interpolation<vector>::New(interpolationSchemes_, U_);
47 rhoInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, rho_);
49 pInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, p_);
51 TInterpolator_ = interpolation<scalar>::New(interpolationSchemes_, T_);
53 calculateAmbientPressure();
54 calculateAmbientTemperature();
55 collisions().collideParcels(runTime_.deltaTValue());
57 dispersion().disperseParcels();
62 UInterpolator_.clear();
63 rhoInterpolator_.clear();
64 pInterpolator_.clear();
65 TInterpolator_.clear();
69 void Foam::spray::move()
71 // Reset Spray Source Terms
79 parcel::trackingData td(*this);
80 Cloud<parcel>::move(td, runTime_.deltaTValue());
84 void Foam::spray::breakupLoop()
86 forAllIter(spray, *this, elmnt)
89 vector velocity = UInterpolator().interpolate
92 elmnt().currentTetIndices()
95 // liquidCore < 0.5 indicates discrete drops
96 if (elmnt().liquidCore() <= 0.5)
98 breakup().updateParcelProperties
101 runTime_.deltaTValue(),
106 breakup().breakupParcel
109 runTime_.deltaTValue(),
118 void Foam::spray::atomizationLoop()
120 forAllIter(spray, *this, elmnt)
123 vector velocity = UInterpolator().interpolate
126 elmnt().currentTetIndices()
129 // liquidCore > 0.5 indicates a liquid core
130 if (elmnt().liquidCore() > 0.5)
132 atomization().atomizeParcel
135 runTime_.deltaTValue(),
144 // ************************************************************************* //