MomentumParcelTrackingDataI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
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 \*---------------------------------------------------------------------------*/
25 
26 template<class ParcelType>
27 template<class TrackCloudType>
29 (
30  const TrackCloudType& cloud
31 )
32 :
33  ParcelType::trackingData(cloud),
34  rhoInterp_
35  (
36  interpolation<scalar>::New
37  (
38  cloud.solution().interpolationSchemes(),
39  cloud.rho()
40  )
41  ),
42  UInterp_
43  (
45  (
46  cloud.solution().interpolationSchemes(),
47  cloud.U()
48  )
49  ),
50  muInterp_
51  (
52  interpolation<scalar>::New
53  (
54  cloud.solution().interpolationSchemes(),
55  cloud.mu()
56  )
57  ),
58  rhoc_(Zero),
59  Uc_(Zero),
60  muc_(Zero),
61  g_(cloud.g().value()),
62  trackTime_(cloud.solution().trackTime()),
63  stepFractionRange_(0, 1)
64 {}
65 
66 
67 template<class ParcelType>
70 {
71  return rhoInterp_();
72 }
73 
74 
75 template<class ParcelType>
78 {
79  return UInterp_();
80 }
81 
82 
83 template<class ParcelType>
86 {
87  return muInterp_();
88 }
89 
90 
91 template<class ParcelType>
92 inline Foam::scalar
94 {
95  return rhoc_;
96 }
97 
98 
99 template<class ParcelType>
101 {
102  return rhoc_;
103 }
104 
105 
106 template<class ParcelType>
107 inline const Foam::vector&
109 {
110  return Uc_;
111 }
112 
113 
114 template<class ParcelType>
116 {
117  return Uc_;
118 }
119 
120 
121 template<class ParcelType>
123 {
124  return muc_;
125 }
126 
127 
128 template<class ParcelType>
130 {
131  return muc_;
132 }
133 
134 
135 template<class ParcelType>
136 inline const Foam::vector&
138 {
139  return g_;
140 }
141 
142 
143 template<class ParcelType>
144 inline Foam::scalar
146 {
147  return trackTime_;
148 }
149 
150 
151 template<class ParcelType>
152 inline Foam::scalar&
154 {
155  return trackTime_;
156 }
157 
158 
159 template<class ParcelType>
162 {
163  return stepFractionRange_;
164 }
165 
166 
167 template<class ParcelType>
170 {
171  return stepFractionRange_;
172 }
173 
174 
175 // ************************************************************************* //
const vector & Uc() const
Return the continuous phase velocity.
scalar muc() const
Return the continuous phase viscosity.
const interpolation< vector > & UInterp() const
Return const access to the interpolator for continuous.
scalar trackTime() const
Return the tracking time.
trackingData(const TrackCloudType &cloud)
Construct from components.
scalar rhoc() const
Return the continuous phase density.
Pair< scalar > stepFractionRange() const
Return the step fraction range to track between.
const interpolation< scalar > & muInterp() const
Return const access to the interpolator for continuous.
const interpolation< scalar > & rhoInterp() const
Return const access to the interpolator for continuous.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:65
A cloud is a collection of lagrangian particles.
Definition: cloud.H:55
Abstract base class for interpolation.
Definition: interpolation.H:55
Selector class for relaxation factors, solver type and solution.
Definition: solution.H:51
U
Definition: pEqn.H:72
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const dimensionedScalar mu
Atomic mass unit.
static const zero Zero
Definition: zero.H:97