ReactingParcelI.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 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30 
31 template<class ParcelType>
32 inline
34 :
35  ParcelType::constantProperties(),
36  pMin_(this->dict_, 0.0),
37  constantVolume_(this->dict_, false)
38 {}
39 
40 
41 template<class ParcelType>
43 (
44  const constantProperties& cp
45 )
46 :
47  ParcelType::constantProperties(cp),
48  pMin_(cp.pMin_),
49  constantVolume_(cp.constantVolume_)
50 {}
51 
52 
53 template<class ParcelType>
55 (
56  const dictionary& parentDict
57 )
58 :
59  ParcelType::constantProperties(parentDict),
60  pMin_(this->dict_, "pMin", 1000.0),
61  constantVolume_(this->dict_, word("constantVolume"))
62 {}
63 
64 
65 template<class ParcelType>
67 (
68  const polyMesh& mesh,
69  const barycentric& coordinates,
70  const label celli,
71  const label tetFacei,
72  const label tetPti
73 )
74 :
75  ParcelType(mesh, coordinates, celli, tetFacei, tetPti),
76  mass0_(0.0),
77  Y_(0)
78 {}
79 
80 
81 template<class ParcelType>
83 (
84  const polyMesh& mesh,
85  const vector& position,
86  const label celli
87 )
88 :
89  ParcelType(mesh, position, celli),
90  mass0_(0.0),
91  Y_(0)
92 {}
93 
94 
95 template<class ParcelType>
97 (
98  const polyMesh& mesh,
99  const barycentric& coordinates,
100  const label celli,
101  const label tetFacei,
102  const label tetPti,
103  const label typeId,
104  const scalar nParticle0,
105  const scalar d0,
106  const scalar dTarget0,
107  const vector& U0,
108  const vector& f0,
109  const vector& angularMomentum0,
110  const vector& torque0,
111  const scalarField& Y0,
112  const constantProperties& constProps
113 )
114 :
115  ParcelType
116  (
117  mesh,
118  coordinates,
119  celli,
120  tetFacei,
121  tetPti,
122  typeId,
123  nParticle0,
124  d0,
125  dTarget0,
126  U0,
127  f0,
128  angularMomentum0,
129  torque0,
130  constProps
131  ),
132  mass0_(0.0),
133  Y_(Y0)
134 {
135  // Set initial parcel mass
136  mass0_ = this->mass();
137 }
138 
139 
140 // * * * * * * * * * constantProperties Member Functions * * * * * * * * * * //
141 
142 template<class ParcelType>
143 inline Foam::scalar
145 {
146  return pMin_.value();
147 }
148 
149 
150 template<class ParcelType>
151 inline bool
153 {
154  return constantVolume_.value();
155 }
156 
157 
158 // * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
159 
160 template<class ParcelType>
161 inline Foam::scalar Foam::ReactingParcel<ParcelType>::mass0() const
162 {
163  return mass0_;
164 }
165 
166 
167 template<class ParcelType>
169 {
170  return Y_;
171 }
172 
173 
174 template<class ParcelType>
176 {
177  return Y_;
178 }
179 
180 
181 template<class ParcelType>
182 inline const Foam::scalarField&
184 {
185  return Y_;
186 }
187 
188 
189 template<class ParcelType>
190 inline const Foam::scalarField&
192 {
193  return Y_;
194 }
195 
196 
197 template<class ParcelType>
199 {
200  return mass0_;
201 }
202 
203 
204 template<class ParcelType>
206 {
207  return Y_;
208 }
209 
210 
211 // ************************************************************************* //
Foam::ReactingParcel::mass0
scalar mass0() const
Return const access to initial mass [kg].
Definition: ReactingParcelI.H:161
Foam::ReactingParcel::YSolid
const scalarField & YSolid() const
Return const access to mass fractions of solids.
Definition: ReactingParcelI.H:191
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::ReactingParcel::Y
const scalarField & Y() const
Return const access to mass fractions of mixture [].
Definition: ReactingParcelI.H:168
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::ReactingParcel::YLiquid
const scalarField & YLiquid() const
Return const access to mass fractions of liquids.
Definition: ReactingParcelI.H:183
Foam::Field< scalar >
coordinates
PtrList< coordinateSystem > coordinates(solidRegions.size())
Foam::Barycentric< scalar >
Foam::ReactingParcel::YGas
const scalarField & YGas() const
Return const access to mass fractions of gases.
Definition: ReactingParcelI.H:175
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::ReactingParcel::ReactingParcel
ReactingParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
Definition: ReactingParcelI.H:67
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::ReactingParcel::mass0_
scalar mass0_
Initial mass [kg].
Definition: ReactingParcel.H:175
Foam::ReactingParcel::constantProperties::constantVolume
bool constantVolume() const
Return const access to the constant volume flag.
Definition: ReactingParcelI.H:152
Foam::cp
bool cp(const fileName &src, const fileName &dst, const bool followLink=true)
Copy the source to the destination (recursively if necessary).
Definition: MSwindows.C:802
Foam::Vector< scalar >
Foam::ReactingParcel::constantProperties
Class to hold reacting parcel constant properties.
Definition: ReactingParcel.H:82
Foam::ReactingParcel::constantProperties::constantProperties
constantProperties()
Null constructor.
Definition: ReactingParcelI.H:33
Foam::ReactingParcel::constantProperties::pMin
scalar pMin() const
Return const access to the minimum pressure.
Definition: ReactingParcelI.H:144
Foam::ReactingParcel::Y_
scalarField Y_
Mass fractions of mixture [].
Definition: ReactingParcel.H:178
Y0
scalarList Y0(nSpecie, Zero)