ThermoParcelTrackingDataI.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) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 template<class ParcelType>
30 template<class TrackCloudType>
32 (
33  const TrackCloudType& cloud,
34  trackPart part
35 )
36 :
37  ParcelType::trackingData(cloud, part),
38  Cp_(cloud.thermo().thermo().Cp()),
39  kappa_(cloud.thermo().thermo().kappa()),
40  TInterp_
41  (
43  (
44  cloud.solution().interpolationSchemes(),
45  cloud.T()
46  )
47  ),
48  CpInterp_
49  (
51  (
52  cloud.solution().interpolationSchemes(),
53  Cp_
54  )
55  ),
56  kappaInterp_
57  (
59  (
60  cloud.solution().interpolationSchemes(),
61  kappa_
62  )
63  ),
64  GInterp_(nullptr),
65  Tc_(Zero),
66  Cpc_(Zero)
67 {
68  if (cloud.radiation())
69  {
70  GInterp_.reset
71  (
73  (
74  cloud.solution().interpolationSchemes(),
75  cloud.mesh().objectRegistry::template
76  lookupObject<volScalarField>("G")
77  ).ptr()
78  );
79  }
80 }
81 
82 
83 template<class ParcelType>
84 inline const Foam::volScalarField&
86 {
87  return Cp_;
88 }
89 
90 
91 template<class ParcelType>
92 inline const Foam::volScalarField&
94 {
95  return kappa_;
96 }
97 
98 
99 template<class ParcelType>
102 {
103  return *TInterp_;
104 }
105 
106 
107 template<class ParcelType>
110 {
111  return *CpInterp_;
112 }
113 
114 
115 template<class ParcelType>
118 {
119  return *kappaInterp_;
120 }
121 
122 
123 template<class ParcelType>
126 {
127  if (!GInterp_)
128  {
130  << "Radiation G interpolation object not set"
131  << abort(FatalError);
132  }
133 
134  return *GInterp_;
135 }
136 
137 
138 template<class ParcelType>
140 {
141  return Tc_;
142 }
143 
144 
145 template<class ParcelType>
147 {
148  return Tc_;
149 }
150 
151 
152 template<class ParcelType>
154 {
155  return Cpc_;
156 }
157 
158 
159 template<class ParcelType>
161 {
162  return Cpc_;
163 }
164 
165 
166 // ************************************************************************* //
Foam::ThermoParcel::trackingData::kappaInterp
const interpolation< scalar > & kappaInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:117
Foam::ThermoParcel::trackingData::TInterp
const interpolation< scalar > & TInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:101
Foam::ThermoParcel::trackingData::CpInterp
const interpolation< scalar > & CpInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:109
Foam::ThermoParcel::trackingData::GInterp
const interpolation< scalar > & GInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:125
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::ThermoParcel::trackingData::trackingData
trackingData(const TrackCloudType &cloud, trackPart part=ParcelType::trackingData::tpLinearTrack)
Construct from components.
Definition: ThermoParcelTrackingDataI.H:32
Foam::ThermoParcel::trackingData::Cp
const volScalarField & Cp() const
Return access to the locally stored carrier Cp field.
Definition: ThermoParcelTrackingDataI.H:85
Foam::ThermoParcel::trackingData::kappa
const volScalarField & kappa() const
Return access to the locally stored carrier kappa field.
Definition: ThermoParcelTrackingDataI.H:93
Foam::interpolation
Abstract base class for interpolation.
Definition: mappedPatchFieldBase.H:96
Foam::FatalError
error FatalError
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:144
Foam::ThermoParcel::trackingData::trackPart
ParcelType::trackingData::trackPart trackPart
Definition: ThermoParcel.H:195
Foam::cloud
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:57
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::ThermoParcel::trackingData::Cpc
scalar Cpc() const
Return the continuous phase specific heat capacity.
Definition: ThermoParcelTrackingDataI.H:153
Foam::ThermoParcel::trackingData::Tc
scalar Tc() const
Return the continuous phase temperature.
Definition: ThermoParcelTrackingDataI.H:139
Foam::GeometricField< scalar, fvPatchField, volMesh >