Loading...
Searching...
No Matches
ReactingMultiphaseCloud.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-2016 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::ReactingMultiphaseCloud
28
29Group
30 grpLagrangianIntermediateClouds
31
32Description
33 Templated base class for multiphase reacting cloud
34
35 - Adds to reacting cloud
36 - multiphase composition
37 - devolatilisatsion
38 - surface reactions
39
40SourceFiles
41 ReactingMultiphaseCloudI.H
42 ReactingMultiphaseCloud.C
43
44\*---------------------------------------------------------------------------*/
45
46#ifndef ReactingMultiphaseCloud_H
47#define ReactingMultiphaseCloud_H
48
50
51// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52
53namespace Foam
54{
55
56// Forward declaration of classes
57
58template<class CloudType>
60
61template<class CloudType>
63
64/*---------------------------------------------------------------------------*\
65 Class ReactingMultiphaseCloud Declaration
66\*---------------------------------------------------------------------------*/
67
68template<class CloudType>
69class ReactingMultiphaseCloud
70:
71 public CloudType,
73{
74public:
75
76 // Public typedefs
77
78 //- Type of cloud this cloud was instantiated for
79 typedef CloudType cloudType;
80
81 //- Type of parcel the cloud was instantiated for
82 typedef typename CloudType::particleType parcelType;
83
84 //- Convenience typedef for this cloud type
85 typedef ReactingMultiphaseCloud<CloudType> reactingMultiphaseCloudType;
87
88private:
89
90 // Private data
91
92 //- Cloud copy pointer
94
95
96 // Private member functions
97
98 //- No copy construct
99 ReactingMultiphaseCloud(const ReactingMultiphaseCloud&) = delete;
100
101 //- No copy assignment
102 void operator=(const ReactingMultiphaseCloud&) = delete;
103
104
105protected:
106
107 // Protected data
108
109 //- Parcel constant properties
110 typename parcelType::constantProperties constProps_;
111
112
113 // References to the cloud sub-models
114
115 //- Devolatilisation model
116 autoPtr
117 <
121
122 //- Surface reaction model
123 autoPtr
124 <
126 >
128
129
130 // Check
132 //- Total mass transferred to continuous phase via devolatilisation
134
135 //- Total mass transferred to continuous phase via surface
136 // reactions
138
139
140 // Protected Member Functions
141
142 // Initialisation
143
144 //- Set cloud sub-models
145 void setModels();
146
147
148 // Cloud evolution functions
149
150 //- Reset state of cloud
151 void cloudReset(ReactingMultiphaseCloud<CloudType>& c);
152
153
154public:
156 // Constructors
157
158 //- Construct given carrier gas fields
159 ReactingMultiphaseCloud
160 (
161 const word& cloudName,
162 const volScalarField& rho,
163 const volVectorField& U,
164 const dimensionedVector& g,
166 bool readFields = true
167 );
168
169
170 //- Copy constructor with new name
171 ReactingMultiphaseCloud
172 (
173 ReactingMultiphaseCloud<CloudType>& c,
174 const word& name
175 );
176
177 //- Copy constructor with new name - creates bare cloud
178 ReactingMultiphaseCloud
179 (
180 const fvMesh& mesh,
181 const word& name,
182 const ReactingMultiphaseCloud<CloudType>& c
183 );
184
185 //- Construct and return clone based on (this) with new name
187 {
189 (
190 new ReactingMultiphaseCloud(*this, name)
191 );
192 }
193
194 //- Construct and return bare clone based on (this) with new name
195 virtual autoPtr<Cloud<parcelType>> cloneBare(const word& name) const
196 {
198 (
199 new ReactingMultiphaseCloud(this->mesh(), name, *this)
200 );
201 }
202
203
204 //- Destructor
205 virtual ~ReactingMultiphaseCloud();
207
208 // Member Functions
209
210 // Access
211
212 //- Return a reference to the cloud copy
213 inline const ReactingMultiphaseCloud& cloudCopy() const;
214
215 //- Return the constant properties
216 inline const typename parcelType::constantProperties&
217 constProps() const;
218
219 //- Return access to the constant properties
220 inline typename parcelType::constantProperties& constProps();
221
222
223 // Sub-models
224
225 //- Return const access to devolatilisation model
226 inline const DevolatilisationModel
228 ReactingMultiphaseCloud<CloudType>
229 >&
230 devolatilisation() const;
231
232 //- Return reference to devolatilisation model
234 <
235 ReactingMultiphaseCloud<CloudType>
236 >&
238
239 //- Return const access to reacting surface reaction model
240 inline const SurfaceReactionModel
241 <
242 ReactingMultiphaseCloud<CloudType>
243 >&
244 surfaceReaction() const;
245
246 //- Return reference to reacting surface reaction model
248 <
249 ReactingMultiphaseCloud<CloudType>
250 >&
252
253
254 // Sources
256 //- Transfer the effect of parcel to the carrier phase
257 inline void transferToCarrier
258 (
259 const parcelType& p,
260 const typename parcelType::trackingData& td
261 );
262
263
264 // Cloud evolution functions
265
266 //- Set parcel thermo properties
268 (
269 parcelType& parcel,
270 const scalar lagrangianDt
271 );
273 //- Check parcel properties
275 (
276 parcelType& parcel,
277 const scalar lagrangianDt,
278 const bool fullyDescribed
279 );
280
281 //- Store the current cloud state
282 void storeState();
283
284 //- Reset the current cloud to the previously stored state
285 void restoreState();
286
287 //- Reset the cloud source terms
288 void resetSourceTerms();
289
290 //- Evolve the cloud
291 void evolve();
292
293
294 // Mapping
295
296 //- Remap the cells of particles corresponding to the
297 // mesh topology change with a default tracking data object
298 virtual void autoMap(const mapPolyMesh&);
300
301 // I-O
302
303 //- Print cloud information
304 void info();
305
306 //- Write the field data for the cloud
307 virtual void writeFields() const;
308};
309
310
311// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
312
313} // End namespace Foam
314
315// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
316
318
319// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
320
321#ifdef NoRepository
323#endif
324
325// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
326
327#endif
329// ************************************************************************* //
const uniformDimensionedVectorField & g
ParticleType particleType
Definition Cloud.H:130
const word & cloudName() const
const fvMesh & mesh() const
Templated devolatilisation model class.
autoPtr< IOobject > clone() const
Clone.
Definition IOobject.H:641
const DevolatilisationModel< ReactingMultiphaseCloud< CloudType > > & devolatilisation() const
Return const access to devolatilisation model.
const parcelType::constantProperties & constProps() const
Return the constant properties.
autoPtr< SurfaceReactionModel< ReactingMultiphaseCloud< ReactingCloud< ThermoCloud< KinematicCloud< Cloud< coalParcel > > > > > > > surfaceReactionModel_
void setModels()
Set cloud sub-models.
void storeState()
Store the current cloud state.
const ReactingMultiphaseCloud & cloudCopy() const
Return a reference to the cloud copy.
void setParcelThermoProperties(parcelType &parcel, const scalar lagrangianDt)
Set parcel thermo properties.
void checkParcelProperties(parcelType &parcel, const scalar lagrangianDt, const bool fullyDescribed)
Check parcel properties.
autoPtr< DevolatilisationModel< ReactingMultiphaseCloud< ReactingCloud< ThermoCloud< KinematicCloud< Cloud< coalParcel > > > > > > > devolatilisationModel_
ReactingMultiphaseCloud(const fvMesh &mesh, const word &name, const ReactingMultiphaseCloud< CloudType > &c)
Copy constructor with new name - creates bare cloud.
ReactingCloud< ThermoCloud< KinematicCloud< Cloud< coalParcel > > > >::particleType parcelType
DevolatilisationModel< ReactingMultiphaseCloud< CloudType > > & devolatilisation()
Return reference to devolatilisation model.
virtual void writeFields() const
Write the field data for the cloud.
ReactingMultiphaseCloud< ReactingCloud< ThermoCloud< KinematicCloud< Cloud< coalParcel > > > > > reactingMultiphaseCloudType
virtual void autoMap(const mapPolyMesh &)
Remap the cells of particles corresponding to the.
virtual autoPtr< Cloud< parcelType > > clone(const word &name)
Construct and return clone based on (this) with new name.
virtual autoPtr< Cloud< parcelType > > cloneBare(const word &name) const
Construct and return bare clone based on (this) with new name.
SurfaceReactionModel< ReactingMultiphaseCloud< CloudType > > & surfaceReaction()
Return reference to reacting surface reaction model.
ReactingMultiphaseCloud(ReactingMultiphaseCloud< CloudType > &c, const word &name)
Copy constructor with new name.
ReactingMultiphaseCloud(const word &cloudName, const volScalarField &rho, const volVectorField &U, const dimensionedVector &g, const SLGThermo &thermo, bool readFields=true)
Construct given carrier gas fields.
parcelType::constantProperties & constProps()
Return access to the constant properties.
void info()
Print cloud information.
void restoreState()
Reset the current cloud to the previously stored state.
void transferToCarrier(const parcelType &p, const typename parcelType::trackingData &td)
Transfer the effect of parcel to the carrier phase.
void cloudReset(ReactingMultiphaseCloud< CloudType > &c)
Reset state of cloud.
void resetSourceTerms()
Reset the cloud source terms.
const SurfaceReactionModel< ReactingMultiphaseCloud< CloudType > > & surfaceReaction() const
Return const access to reacting surface reaction model.
virtual ~ReactingMultiphaseCloud()
Destructor.
Thermo package for (S)olids (L)iquids and (G)ases Takes reference to thermo package,...
Definition SLGThermo.H:63
Templated surface reaction model class.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
reactingMultiphaseCloud()=default
Null constructor.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
Definition word.H:66
U
Definition pEqn.H:72
volScalarField & p
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
GeometricField< vector, fvPatchField, volMesh > volVectorField
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.