1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | foam-extend: Open Source CFD
4 \\ / O peration | Version: 3.2
5 \\ / A nd | Web: http://www.foam-extend.org
6 \\/ M anipulation | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
9 This file is part of foam-extend.
11 foam-extend is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation, either version 3 of the License, or (at your
14 option) any later version.
16 foam-extend is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
28 Templated base class for reacting cloud
30 - Adds to thermodynamic cloud
31 - Variable composition (single phase)
35 ReactingCloudTemplateI.H
36 ReactingCloudTemplate.C
38 \*---------------------------------------------------------------------------*/
40 #ifndef ReactingCloudTemplate_H
41 #define ReactingCloudTemplate_H
43 #include "ThermoCloudTemplate.H"
44 #include "reactingCloud.H"
45 #include "multiComponentMixture.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 // Forward declaration of classes
54 template<class CloudType>
55 class CompositionModel;
57 template<class CloudType>
58 class PhaseChangeModel;
60 /*---------------------------------------------------------------------------*\
61 Class ReactingCloud Declaration
62 \*---------------------------------------------------------------------------*/
64 template<class ParcelType>
67 public ThermoCloud<ParcelType>,
72 //- Type of thermodynamics the cloud was instantiated for
73 typedef typename ParcelType::thermoType thermoType;
78 // Private Member Functions
80 //- Disallow default bitwise copy construct
81 ReactingCloud(const ReactingCloud&);
83 //- Disallow default bitwise assignment
84 void operator=(const ReactingCloud&);
91 //- Parcel constant properties
92 typename ParcelType::constantProperties constProps_;
94 //- Multi-component carrier phase thermo
95 multiComponentMixture<thermoType>& mcCarrierThermo_;
98 // References to the cloud sub-models
100 //- Reacting composition model
101 autoPtr<CompositionModel<ReactingCloud<ParcelType> > >
104 //- Reacting phase change model
105 autoPtr<PhaseChangeModel<ReactingCloud<ParcelType> > >
111 //- Mass transfer fields - one per carrier phase specie
112 PtrList<DimensionedField<scalar, volMesh> > rhoTrans_;
117 //- Total mass transferred to continuous phase via phase change
118 scalar dMassPhaseChange_;
121 // Protected Member Functions
123 // New parcel helper functions
125 //- Check that size of a composition field is valid
126 void checkSuppliedComposition
128 const scalarField& YSupplied,
129 const scalarField& Y,
134 // Cloud evolution functions
150 //- Construct given carrier gas fields
153 const word& cloudName,
154 const volScalarField& rho,
155 const volVectorField& U,
156 const dimensionedVector& g,
158 bool readFields = true
163 virtual ~ReactingCloud();
166 //- Type of parcel the cloud was instantiated for
167 typedef ParcelType parcelType;
174 //- Return the constant properties
175 inline const typename ParcelType::constantProperties&
178 //- Return const access to multi-component carrier phase thermo
179 inline const multiComponentMixture<thermoType>&
180 mcCarrierThermo() const;
182 //- Return access to multi-component carrier phase thermo
183 inline multiComponentMixture<thermoType>& mcCarrierThermo();
188 //- Return reference to reacting composition model
189 inline const CompositionModel<ReactingCloud<ParcelType> >&
192 //- Return reference to reacting phase change model
193 inline const PhaseChangeModel<ReactingCloud<ParcelType> >&
201 //- Return reference to mass source for field i
202 inline DimensionedField<scalar, volMesh>&
203 rhoTrans(const label i);
205 //- Return reference to mass source fields
206 inline PtrList<DimensionedField<scalar, volMesh> >&
209 //- Return tmp mass source for field i - fully explicit
210 inline tmp<DimensionedField<scalar, volMesh> >
211 Srho(const label i) const;
213 //- Return tmp total mass source for carrier phase
215 inline tmp<DimensionedField<scalar, volMesh> > Srho() const;
220 //- Print cloud information
223 //- Add to cumulative phase change mass transfer
224 void addToMassPhaseChange(const scalar dMass);
227 // Cloud evolution functions
229 //- Check parcel properties
230 void checkParcelProperties
233 const scalar lagrangianDt,
234 const bool fullyDescribed
237 //- Reset the spray source terms
238 void resetSourceTerms();
240 //- Evolve the spray (inject, move)
245 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
247 } // End namespace Foam
249 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
251 #include "ReactingCloudTemplateI.H"
253 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
256 # include "ReactingCloudTemplate.C"
259 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
263 // ************************************************************************* //