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-------------------------------------------------------------------------------
11License
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
29template<class ParcelType>
30template<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 (
42 interpolation<scalar>::New
43 (
44 cloud.solution().interpolationSchemes(),
45 cloud.T()
46 )
47 ),
48 CpInterp_
49 (
50 interpolation<scalar>::New
51 (
52 cloud.solution().interpolationSchemes(),
53 Cp_
54 )
55 ),
56 kappaInterp_
57 (
58 interpolation<scalar>::New
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
83template<class ParcelType>
84inline const Foam::volScalarField&
86{
87 return Cp_;
88}
89
90
91template<class ParcelType>
92inline const Foam::volScalarField&
94{
95 return kappa_;
96}
97
98
99template<class ParcelType>
102{
103 return *TInterp_;
104}
105
106
107template<class ParcelType>
110{
111 return *CpInterp_;
112}
113
114
115template<class ParcelType>
118{
119 return *kappaInterp_;
120}
121
122
123template<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
138template<class ParcelType>
140{
141 return Tc_;
142}
143
144
145template<class ParcelType>
147{
148 return Tc_;
149}
150
151
152template<class ParcelType>
154{
155 return Cpc_;
156}
157
158
159template<class ParcelType>
161{
162 return Cpc_;
163}
164
165
166// ************************************************************************* //
const interpolation< scalar > & GInterp() const
Return const access to the interpolator for continuous.
const volScalarField & kappa() const
Return access to the locally stored carrier kappa field.
const interpolation< scalar > & CpInterp() const
Return const access to the interpolator for continuous.
scalar Cpc() const
Return the continuous phase specific heat capacity.
const interpolation< scalar > & TInterp() const
Return const access to the interpolator for continuous.
const interpolation< scalar > & kappaInterp() const
Return const access to the interpolator for continuous.
ParcelType::trackingData::trackPart trackPart
Definition: ThermoParcel.H:195
const volScalarField & Cp() const
Return access to the locally stored carrier Cp field.
scalar Tc() const
Return the continuous phase temperature.
scalar Cp_
Specific heat capacity [J/(kg.K)].
Definition: ThermoParcel.H:256
A cloud is a registry collection of lagrangian particles.
Definition: cloud.H:60
Class used to pass data into container.
Abstract base class for volume field interpolation.
Definition: interpolation.H:60
Selector class for relaxation factors, solver type and solution.
Definition: solution.H:66
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
const volScalarField & T
const volScalarField & Cp
Definition: EEqn.H:7
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
errorManip< error > abort(error &err)
Definition: errorManip.H:144
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
error FatalError