NoInjection.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "NoInjection.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class CloudType>
35 (
36  const dictionary&,
37  CloudType& owner,
38  const word&
39 )
40 :
42 {}
43 
44 
45 template<class CloudType>
47 :
48  InjectionModel<CloudType>(im.owner_)
49 {}
50 
51 
52 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
53 
54 template<class CloudType>
56 {}
57 
58 
59 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
60 
61 template<class CloudType>
63 {
64  return false;
65 }
66 
67 
68 template<class CloudType>
70 {
71  return 0.0;
72 }
73 
74 
75 template<class CloudType>
77 (
78  const scalar,
79  const scalar
80 )
81 {
82  return 0;
83 }
84 
85 
86 template<class CloudType>
88 (
89  const scalar,
90  const scalar
91 )
92 {
93  return 0.0;
94 }
95 
96 
97 template<class CloudType>
99 (
100  const label,
101  const label,
102  const scalar,
103  vector&,
104  label&,
105  label&,
106  label&
107 )
108 {}
109 
110 
111 template<class CloudType>
113 (
114  const label,
115  const label,
116  const scalar,
117  typename CloudType::parcelType& parcel
118 )
119 {
120  // set particle velocity
121  parcel.U() = Zero;
122 
123  // set particle diameter
124  parcel.d() = 0.0;
125 }
126 
127 
128 template<class CloudType>
130 {
131  return false;
132 }
133 
134 
135 template<class CloudType>
137 {
138  return false;
139 }
140 
141 
142 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::NoInjection::setPositionAndCell
virtual void setPositionAndCell(const label parcelI, const label nParcels, const scalar time, vector &position, label &cellOwner, label &tetFacei, label &tetPti)
Set the injection position and owner cell, tetFace and tetPt.
Definition: NoInjection.C:99
Foam::NoInjection::fullyDescribed
virtual bool fullyDescribed() const
Flag to identify whether model fully describes the parcel.
Definition: NoInjection.C:129
Foam::InjectionModel
Templated injection model class.
Definition: InjectionModel.H:73
Foam::NoInjection::active
bool active() const
Flag to indicate whether model activates injection model.
Definition: NoInjection.C:62
Foam::NoInjection::volumeToInject
virtual scalar volumeToInject(const scalar time0, const scalar time1)
Volume of parcels to introduce relative to SOI.
Definition: NoInjection.C:88
Foam::NoInjection
Place holder for 'none' option.
Definition: NoInjection.H:54
Foam::NoInjection::~NoInjection
virtual ~NoInjection()
Destructor.
Definition: NoInjection.C:55
Foam::NoInjection::validInjection
virtual bool validInjection(const label parcelI)
Return flag to identify whether or not injection of parcelI is.
Definition: NoInjection.C:136
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::NoInjection::setProperties
virtual void setProperties(const label parcelI, const label nParcels, const scalar time, typename CloudType::parcelType &parcel)
Set the parcel properties.
Definition: NoInjection.C:113
Foam::Vector< scalar >
NoInjection.H
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Foam::NoInjection::timeEnd
scalar timeEnd() const
Return the end-of-injection time.
Definition: NoInjection.C:69
Foam::NoInjection::NoInjection
NoInjection(const dictionary &, CloudType &, const word &)
Construct from components.
Definition: NoInjection.C:35
Foam::NoInjection::parcelsToInject
virtual label parcelsToInject(const scalar time0, const scalar time1)
Number of parcels to introduce relative to SOI.
Definition: NoInjection.C:77