injectedParticleI.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2019 OpenCFD Ltd.
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 
29 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 
32 (
33  const polyMesh& mesh,
34  const vector& position,
35  const label celli
36 )
37 :
38  particle(mesh, position, celli),
39  position_(position),
40  tag_(0),
41  soi_(0),
42  d_(0),
43  U_(Zero)
44 {}
45 
46 
48 (
49  const polyMesh& mesh,
50  const vector& position,
51  const label tag,
52  const scalar soi,
53  const scalar d,
54  const vector& U,
55  const bool doLocate
56 )
57 :
58  particle(mesh, position, -1, -1, -1, doLocate),
59  position_(position),
60  tag_(tag),
61  soi_(soi),
62  d_(d),
63  U_(U)
64 {}
65 
66 
67 inline Foam::label Foam::injectedParticle::tag() const
68 {
69  return tag_;
70 }
71 
72 
73 inline Foam::scalar Foam::injectedParticle::soi() const
74 {
75  return soi_;
76 }
77 
78 
79 inline Foam::scalar Foam::injectedParticle::d() const
80 {
81  return d_;
82 }
83 
84 
86 {
87  return U_;
88 }
89 
90 
91 inline Foam::label& Foam::injectedParticle::tag()
92 {
93  return tag_;
94 }
95 
96 
97 inline Foam::scalar& Foam::injectedParticle::soi()
98 {
99  return soi_;
100 }
101 
102 
103 inline Foam::scalar& Foam::injectedParticle::d()
104 {
105  return d_;
106 }
107 
108 
110 {
111  return U_;
112 }
113 
114 
115 // ************************************************************************* //
Foam::injectedParticle::d
scalar d() const
Return const access to diameter.
Definition: injectedParticleI.H:79
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::injectedParticle::U
const vector & U() const
Return const access to velocity.
Definition: injectedParticleI.H:85
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::injectedParticle::tag
label tag() const
Return const access to the tag.
Definition: injectedParticleI.H:67
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::injectedParticle::injectedParticle
injectedParticle(const polyMesh &mesh, const vector &position, const label celli=-1)
Construct from a position and a cell.
Definition: injectedParticleI.H:32
Foam::injectedParticle::tag_
label tag_
Tag.
Definition: injectedParticle.H:77
U
U
Definition: pEqn.H:72
Foam::injectedParticle::soi
scalar soi() const
Return const access to the start of injection.
Definition: injectedParticleI.H:73
Foam::Vector< scalar >
Foam::particle
Base particle class.
Definition: particle.H:76