1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
33 - Parcel positions in file @c positionsFile
34 - Initial parcel velocity
35 - Parcel diameters obtained by PDF model
36 - All parcels introduced at SOI
41 \*---------------------------------------------------------------------------*/
43 #ifndef ManualInjection_H
44 #define ManualInjection_H
46 #include "InjectionModel.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
55 Class ManualInjection Declaration
56 \*---------------------------------------------------------------------------*/
58 template<class CloudType>
61 public InjectionModel<CloudType>
65 //- Name of file containing positions data
66 const word positionsFile_;
68 //- Field of parcel positions
69 vectorIOField positions_;
71 //- Field of parcel diameters
72 scalarList diameters_;
74 //- Initial parcel velocity
77 //- Parcel size PDF model
78 const autoPtr<pdf> parcelPDF_;
80 //- Number of particles represented by each parcel
81 scalar nParticlesPerParcel_;
86 // Protected member functions
88 //- Number of parcels to introduce over the time step relative to SOI
95 //- Volume of parcels to introduce over the time step relative to SOI
105 //- Runtime type information
106 TypeName("ManualInjection");
111 //- Construct from dictionary
114 const dictionary& dict,
120 virtual ~ManualInjection();
125 //- Flag to indicate whether model activates injection model
128 //- Return the end-of-injection time
129 scalar timeEnd() const;
132 // Injection geometry
134 //- Set the injection position and owner cell
135 virtual void setPositionAndCell
138 const label nParcels,
144 //- Set the parcel properties
145 virtual void setProperties
148 const label nParcels,
150 typename CloudType::parcelType& parcel
153 //- Flag to identify whether model fully describes the parcel
154 virtual bool fullyDescribed() const;
156 //- Return flag to identify whether or not injection of parcelI is
158 virtual bool validInjection(const label parcelI);
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 # include "ManualInjection.C"
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //