All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ThermoParcelTrackingDataI.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-2020 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  Cp_(cloud.thermo().thermo().Cp()),
35  kappa_(cloud.thermo().thermo().kappa()),
36  TInterp_
37  (
39  (
40  cloud.solution().interpolationSchemes(),
41  cloud.T()
42  )
43  ),
44  CpInterp_
45  (
47  (
48  cloud.solution().interpolationSchemes(),
49  Cp_
50  )
51  ),
52  kappaInterp_
53  (
55  (
56  cloud.solution().interpolationSchemes(),
57  kappa_
58  )
59  ),
60  GInterp_(nullptr),
61  Tc_(Zero),
62  Cpc_(Zero)
63 {
64  if (cloud.radiation())
65  {
66  GInterp_.reset
67  (
69  (
70  cloud.solution().interpolationSchemes(),
71  cloud.mesh().objectRegistry::template
72  lookupObject<volScalarField>("G")
73  ).ptr()
74  );
75  }
76 }
77 
78 
79 template<class ParcelType>
80 inline const Foam::volScalarField&
82 {
83  return Cp_;
84 }
85 
86 
87 template<class ParcelType>
88 inline const Foam::volScalarField&
90 {
91  return kappa_;
92 }
93 
94 
95 template<class ParcelType>
98 {
99  return TInterp_();
100 }
101 
102 
103 template<class ParcelType>
106 {
107  return CpInterp_();
108 }
109 
110 
111 template<class ParcelType>
114 {
115  return kappaInterp_();
116 }
117 
118 
119 template<class ParcelType>
122 {
123  if (!GInterp_.valid())
124  {
126  << "Radiation G interpolation object not set"
127  << abort(FatalError);
128  }
129 
130  return GInterp_();
131 }
132 
133 
134 template<class ParcelType>
136 {
137  return Tc_;
138 }
139 
140 
141 template<class ParcelType>
143 {
144  return Tc_;
145 }
146 
147 
148 template<class ParcelType>
150 {
151  return Cpc_;
152 }
153 
154 
155 template<class ParcelType>
157 {
158  return Cpc_;
159 }
160 
161 
162 // ************************************************************************* //
const interpolation< scalar > & kappaInterp() const
Return const access to the interpolator for continuous.
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
const volScalarField & kappa() const
Return access to the locally stored carrier kappa field.
const interpolation< scalar > & GInterp() const
Return const access to the interpolator for continuous.
const interpolation< scalar > & TInterp() const
Return const access to the interpolator for continuous.
trackingData(const TrackCloudType &cloud)
Construct from components.
static const zero Zero
Definition: zero.H:97
errorManip< error > abort(error &err)
Definition: errorManip.H:131
scalar Tc() const
Return the continuous phase temperature.
const interpolation< scalar > & CpInterp() const
Return const access to the interpolator for continuous.
scalar Cpc() const
Return the continuous phase specific heat capacity.
Abstract base class for interpolation.
const volScalarField & Cp() const
Return access to the locally stored carrier Cp field.