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 | Copyright (C) 2011-2015 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 CloudType>
29 (
30  CloudType& cloud,
31  trackPart part
32 )
33 :
34  ParcelType::template TrackingData<CloudType>(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_(NULL)
62 {
63  if (cloud.radiation())
64  {
65  GInterp_.reset
66  (
68  (
69  cloud.solution().interpolationSchemes(),
70  cloud.mesh().objectRegistry::template
71  lookupObject<volScalarField>("G")
72  ).ptr()
73  );
74  }
75 }
76 
77 
78 template<class ParcelType>
79 template<class CloudType>
80 inline const Foam::volScalarField&
82 {
83  return Cp_;
84 }
85 
86 
87 template<class ParcelType>
88 template<class CloudType>
89 inline const Foam::volScalarField&
91 {
92  return kappa_;
93 }
94 
95 
96 template<class ParcelType>
97 template<class CloudType>
100 {
101  return TInterp_();
102 }
103 
104 
105 template<class ParcelType>
106 template<class CloudType>
109 {
110  return CpInterp_();
111 }
112 
113 
114 template<class ParcelType>
115 template<class CloudType>
118 {
119  return kappaInterp_();
120 }
121 
122 
123 template<class ParcelType>
124 template<class CloudType>
127 {
128  if (!GInterp_.valid())
129  {
131  << "Radiation G interpolation object not set"
132  << abort(FatalError);
133  }
134 
135  return GInterp_();
136 }
137 
138 
139 // ************************************************************************* //
error FatalError
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
ParcelType::template TrackingData< CloudType >::trackPart trackPart
Definition: ThermoParcel.H:184
errorManip< error > abort(error &err)
Definition: errorManip.H:131
Abstract base class for interpolation.
scalar Cp() const
Return const access to specific heat capacity.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic pa...
Definition: ThermoParcel.H:51