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-2018 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  trackPart part
32 )
33 :
34  ParcelType::trackingData(cloud, part),
35  Cp_(cloud.thermo().thermo().Cp()),
36  kappa_(cloud.thermo().thermo().kappa()),
37  TInterp_
38  (
40  (
41  cloud.solution().interpolationSchemes(),
42  cloud.T()
43  )
44  ),
45  CpInterp_
46  (
48  (
49  cloud.solution().interpolationSchemes(),
50  Cp_
51  )
52  ),
53  kappaInterp_
54  (
56  (
57  cloud.solution().interpolationSchemes(),
58  kappa_
59  )
60  ),
61  GInterp_(nullptr),
62  Tc_(Zero),
63  Cpc_(Zero)
64 {
65  if (cloud.radiation())
66  {
67  GInterp_.reset
68  (
70  (
71  cloud.solution().interpolationSchemes(),
72  cloud.mesh().objectRegistry::template
73  lookupObject<volScalarField>("G")
74  ).ptr()
75  );
76  }
77 }
78 
79 
80 template<class ParcelType>
81 inline const Foam::volScalarField&
83 {
84  return Cp_;
85 }
86 
87 
88 template<class ParcelType>
89 inline const Foam::volScalarField&
91 {
92  return kappa_;
93 }
94 
95 
96 template<class ParcelType>
99 {
100  return TInterp_();
101 }
102 
103 
104 template<class ParcelType>
107 {
108  return CpInterp_();
109 }
110 
111 
112 template<class ParcelType>
115 {
116  return kappaInterp_();
117 }
118 
119 
120 template<class ParcelType>
123 {
124  if (!GInterp_.valid())
125  {
127  << "Radiation G interpolation object not set"
128  << abort(FatalError);
129  }
130 
131  return GInterp_();
132 }
133 
134 
135 template<class ParcelType>
137 {
138  return Tc_;
139 }
140 
141 
142 template<class ParcelType>
144 {
145  return Tc_;
146 }
147 
148 
149 template<class ParcelType>
151 {
152  return Cpc_;
153 }
154 
155 
156 template<class ParcelType>
158 {
159  return Cpc_;
160 }
161 
162 
163 // ************************************************************************* //
ParcelType::trackingData::trackPart trackPart
Definition: ThermoParcel.H:191
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
trackingData(const TrackCloudType &cloud, trackPart part=ParcelType::trackingData::tpLinearTrack)
Construct from components.
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.
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.