1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 Templated base class for thermodynamic cloud
30 - Adds to kinematic cloud
37 \*---------------------------------------------------------------------------*/
43 #include "hCombustionThermo.H"
45 #include "KinematicCloud.H"
46 #include "thermoCloud.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 // Forward declaration of classes
56 template<class CloudType>
57 class HeatTransferModel;
59 /*---------------------------------------------------------------------------*\
60 Class ThermoCloud Declaration
61 \*---------------------------------------------------------------------------*/
63 template<class ParcelType>
66 public KinematicCloud<ParcelType>,
72 //- Thermo parcel constant properties
73 typename ParcelType::constantProperties constProps_;
76 // References to the carrier gas fields
78 //- Thermodynamics package (basic)
79 basicThermo& carrierThermo_;
82 // References to the cloud sub-models
84 //- Heat transfer model
85 autoPtr<HeatTransferModel<ThermoCloud<ParcelType> > >
89 // Reference to the particle integration schemes
91 //- Temperature integration
92 autoPtr<scalarIntegrationScheme> TIntegrator_;
103 //- Enthalpy transfer
104 DimensionedField<scalar, volMesh> hTrans_;
106 //- Coefficient for carrier phase h equation
107 DimensionedField<scalar, volMesh> hCoeff_;
110 // Private Member Functions
112 //- Disallow default bitwise copy construct
113 ThermoCloud(const ThermoCloud&);
115 //- Disallow default bitwise assignment
116 void operator=(const ThermoCloud&);
121 //- Inject more parcels
122 template<class TrackingData>
123 void inject(TrackingData& td);
128 //- Runtime type information
129 // TypeName("ThermoCloud");
134 //- Construct given carrier gas fields
137 const word& cloudType,
138 const volPointInterpolation& vpi,
139 const volScalarField& rho,
140 const volVectorField& U,
141 const dimensionedVector& g,
148 virtual ~ThermoCloud();
155 //- Return const access to thermo package
156 inline const basicThermo& carrierThermo() const;
158 //- Return access to thermo package
159 inline basicThermo& carrierThermo();
164 //- Return reference to heat transfer model
165 inline const HeatTransferModel<ThermoCloud<ParcelType> >&
166 heatTransfer() const;
169 // Integration schemes
171 //-Return reference to velocity integration
172 inline const scalarIntegrationScheme& TIntegrator() const;
178 inline bool radiation() const;
185 //- Return reference to enthalpy source
186 inline DimensionedField<scalar, volMesh>& hTrans();
188 //- Coefficient for carrier phase h equation
189 inline DimensionedField<scalar, volMesh>& hCoeff();
191 //- return tmp enthalpy source term - fully explicit
192 inline tmp<DimensionedField<scalar, volMesh> > Sh1() const;
194 //- Return tmp enthalpy source term - semi-implicit
195 inline tmp<fvScalarMatrix> Sh2(volScalarField& h) const;
198 // Radiation - overrides thermoCloud virtual abstract members
200 //- Return tmp equivalent particulate emission
201 inline tmp<volScalarField> Ep() const;
203 //- Return tmp equivalent particulate absorption
204 inline tmp<volScalarField> ap() const;
206 //- Return tmp equivalent particulate scattering factor
207 inline tmp<volScalarField> sigmap() const;
210 // Cloud evolution functions
212 //- Reset the spray source terms
213 void resetSourceTerms();
215 //- Evolve the spray (inject, move)
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 } // End namespace Foam
224 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 #include "ThermoCloudI.H"
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
231 # include "ThermoCloud.C"
234 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
238 // ************************************************************************* //