1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 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, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32 - Total mass to inject
35 - Initial parcel velocity
36 - Injection volume flow rate
37 - Parcel diameters obtained by PDF model
38 - Parcels injected at cell centres adjacent to patch
43 \*---------------------------------------------------------------------------*/
45 #ifndef PatchInjection_H
46 #define PatchInjection_H
48 #include <lagrangianIntermediate/InjectionModel.H>
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 /*---------------------------------------------------------------------------*\
61 Class PatchInjection Declaration
62 \*---------------------------------------------------------------------------*/
64 template<class CloudType>
67 public InjectionModel<CloudType>
72 const word patchName_;
74 //- Injection duration [s]
75 const scalar duration_;
77 //- Number of parcels to introduce per second []
78 const label parcelsPerSecond_;
80 //- Initial parcel velocity [m/s]
83 //- Volume flow rate of parcels to introduce relative to SOI [m^3/s]
84 const autoPtr<DataEntry<scalar> > volumeFlowRate_;
86 //- Parcel size PDF model
87 const autoPtr<pdf> parcelPDF_;
90 labelList cellOwners_;
92 //- Fraction of injection controlled by this processor
98 // Protected member functions
100 //- Number of parcels to introduce over the time step relative to SOI
101 label parcelsToInject
107 //- Volume of parcels to introduce over the time step relative to SOI
108 scalar volumeToInject
117 //- Runtime type information
118 TypeName("PatchInjection");
123 //- Construct from dictionary
126 const dictionary& dict,
132 virtual ~PatchInjection();
137 //- Flag to indicate whether model activates injection model
140 //- Return the end-of-injection time
141 scalar timeEnd() const;
144 // Injection geometry
146 //- Set the injection position and owner cell
147 virtual void setPositionAndCell
150 const label nParcels,
156 virtual void setProperties
159 const label nParcels,
161 typename CloudType::parcelType& parcel
164 //- Flag to identify whether model fully describes the parcel
165 virtual bool fullyDescribed() const;
167 //- Return flag to identify whether or not injection of parcelI is
169 virtual bool validInjection(const label parcelI);
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
175 } // End namespace Foam
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 # include "PatchInjection.C"
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 // ************************ vim: set sw=4 sts=4 et: ************************ //