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-------------------------------------------------------------------------------
10License
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
67inline Foam::label Foam::injectedParticle::tag() const
68{
69 return tag_;
70}
71
72
73inline Foam::scalar Foam::injectedParticle::soi() const
74{
75 return soi_;
76}
77
78
79inline Foam::scalar Foam::injectedParticle::d() const
80{
81 return d_;
82}
83
84
86{
87 return U_;
88}
89
90
91inline Foam::label& Foam::injectedParticle::tag()
92{
93 return tag_;
94}
95
96
97inline Foam::scalar& Foam::injectedParticle::soi()
98{
99 return soi_;
100}
101
102
103inline Foam::scalar& Foam::injectedParticle::d()
104{
105 return d_;
106}
107
108
110{
111 return U_;
112}
113
114
115// ************************************************************************* //
Primarily stores particle properties so that it can be injected at a later time. Note that this store...
const vector & U() const
Return const access to velocity.
scalar d() const
Return const access to diameter.
scalar soi() const
Return const access to the start of injection.
label tag() const
Return const access to the tag.
Base particle class.
Definition: particle.H:79
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
U
Definition: pEqn.H:72
dynamicFvMesh & mesh