FreeFOAM The Cross-Platform CFD Toolkit
NoInjection.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::NoInjection
26 
27 Description
28  Place holder for 'none' option
29 
30 SourceFiles
31  NoInjection.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef NoInjection_H
36 #define NoInjection_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class NoInjection Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class CloudType>
51 :
52  public InjectionModel<CloudType>
53 {
54 protected:
55 
56  // Protected member functions
57 
58  //- Number of parcels to introduce over the time step relative to SOI
59  label parcelsToInject
60  (
61  const scalar,
62  const scalar
63  ) const;
64 
65  //- Volume of parcels to introduce over the time step relative to SOI
66  scalar volumeToInject
67  (
68  const scalar,
69  const scalar
70  ) const;
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("none");
77 
78 
79  // Constructors
80 
81  //- Construct from components
83  (
84  const dictionary&,
85  CloudType&
86  );
87 
88 
89  //- Destructor
90  virtual ~NoInjection();
91 
92 
93  // Member Functions
94 
95  //- Flag to indicate whether model activates injection model
96  bool active() const;
97 
98  //- Return the end-of-injection time
99  scalar timeEnd() const;
100 
101 
102  // Injection geometry
103 
104  //- Set the injection position and owner cell
105  virtual void setPositionAndCell
106  (
107  const label parcelI,
108  const label nParcels,
109  const scalar time,
110  vector& position,
111  label& cellOwner
112  );
113 
114  virtual void setProperties
115  (
116  const label parcelI,
117  const label nParcels,
118  const scalar time,
119  typename CloudType::parcelType& parcel
120  );
121 
122  //- Flag to identify whether model fully describes the parcel
123  virtual bool fullyDescribed() const;
124 
125  //- Return flag to identify whether or not injection of parcelI is
126  // permitted
127  virtual bool validInjection(const label parcelI);
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #ifdef NoRepository
139 #endif
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************ vim: set sw=4 sts=4 et: ************************ //