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 -------------------------------------------------------------------------------
10 License
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 template<class ParcelType>
29 template<class TrackCloudType>
31 (
32  const TrackCloudType& cloud,
33  trackPart part
34 )
35 :
36  ParcelType::trackingData(cloud, part),
37  Cp_(cloud.thermo().thermo().Cp()),
38  kappa_(cloud.thermo().thermo().kappa()),
39  TInterp_
40  (
42  (
43  cloud.solution().interpolationSchemes(),
44  cloud.T()
45  )
46  ),
47  CpInterp_
48  (
50  (
51  cloud.solution().interpolationSchemes(),
52  Cp_
53  )
54  ),
55  kappaInterp_
56  (
58  (
59  cloud.solution().interpolationSchemes(),
60  kappa_
61  )
62  ),
63  GInterp_(nullptr),
64  Tc_(Zero),
65  Cpc_(Zero)
66 {
67  if (cloud.radiation())
68  {
69  GInterp_.reset
70  (
72  (
73  cloud.solution().interpolationSchemes(),
74  cloud.mesh().objectRegistry::template
75  lookupObject<volScalarField>("G")
76  ).ptr()
77  );
78  }
79 }
80 
81 
82 template<class ParcelType>
83 inline const Foam::volScalarField&
85 {
86  return Cp_;
87 }
88 
89 
90 template<class ParcelType>
91 inline const Foam::volScalarField&
93 {
94  return kappa_;
95 }
96 
97 
98 template<class ParcelType>
101 {
102  return *TInterp_;
103 }
104 
105 
106 template<class ParcelType>
109 {
110  return *CpInterp_;
111 }
112 
113 
114 template<class ParcelType>
117 {
118  return *kappaInterp_;
119 }
120 
121 
122 template<class ParcelType>
125 {
126  if (!GInterp_.valid())
127  {
129  << "Radiation G interpolation object not set"
130  << abort(FatalError);
131  }
132 
133  return *GInterp_;
134 }
135 
136 
137 template<class ParcelType>
139 {
140  return Tc_;
141 }
142 
143 
144 template<class ParcelType>
146 {
147  return Tc_;
148 }
149 
150 
151 template<class ParcelType>
153 {
154  return Cpc_;
155 }
156 
157 
158 template<class ParcelType>
160 {
161  return Cpc_;
162 }
163 
164 
165 // ************************************************************************* //
Foam::ThermoParcel::trackingData::kappaInterp
const interpolation< scalar > & kappaInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:116
Foam::ThermoParcel::trackingData::TInterp
const interpolation< scalar > & TInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:100
Foam::ThermoParcel::trackingData::CpInterp
const interpolation< scalar > & CpInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:108
Foam::ThermoParcel::trackingData::GInterp
const interpolation< scalar > & GInterp() const
Return const access to the interpolator for continuous.
Definition: ThermoParcelTrackingDataI.H:124
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
Foam::ThermoParcel::trackingData::trackingData
trackingData(const TrackCloudType &cloud, trackPart part=ParcelType::trackingData::tpLinearTrack)
Construct from components.
Definition: ThermoParcelTrackingDataI.H:31
Foam::ThermoParcel::trackingData::Cp
const volScalarField & Cp() const
Return access to the locally stored carrier Cp field.
Definition: ThermoParcelTrackingDataI.H:84
Foam::ThermoParcel::trackingData::kappa
const volScalarField & kappa() const
Return access to the locally stored carrier kappa field.
Definition: ThermoParcelTrackingDataI.H:92
Foam::interpolation
Abstract base class for interpolation.
Definition: mappedPatchFieldBase.H:95
Foam::FatalError
error FatalError
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
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:355
Foam::ThermoParcel::trackingData::Cpc
scalar Cpc() const
Return the continuous phase specific heat capacity.
Definition: ThermoParcelTrackingDataI.H:152
Foam::ThermoParcel::trackingData::Tc
scalar Tc() const
Return the continuous phase temperature.
Definition: ThermoParcelTrackingDataI.H:138
Foam::GeometricField< scalar, fvPatchField, volMesh >