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
25 \*---------------------------------------------------------------------------*/
27 #include "ThermoCloud.H"
28 #include "HeatTransferModel.H"
30 #include "interpolationCellPoint.H"
31 #include "ThermoParcel.H"
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 template<class ParcelType>
36 Foam::ThermoCloud<ParcelType>::ThermoCloud
38 const word& cloudType,
39 const volPointInterpolation& vpi,
40 const volScalarField& rho,
41 const volVectorField& U,
42 const dimensionedVector& g,
46 KinematicCloud<ParcelType>
56 constProps_(this->particleProperties()),
57 carrierThermo_(thermo),
60 HeatTransferModel<ThermoCloud<ParcelType> >::New
62 this->particleProperties(),
68 scalarIntegrationScheme::New
71 this->particleProperties().subDict("integrationSchemes")
74 radiation_(this->particleProperties().lookup("radiation")),
79 this->name() + "hTrans",
80 this->db().time().timeName(),
87 dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
93 this->name() + "hCoeff",
94 this->db().time().timeName(),
101 dimensionedScalar("zero", dimensionSet(1, 2, -3, -1, 0), 0.0)
106 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
108 template<class ParcelType>
109 Foam::ThermoCloud<ParcelType>::~ThermoCloud()
113 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
115 template<class ParcelType>
116 void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
118 KinematicCloud<ParcelType>::resetSourceTerms();
119 hTrans_.field() = 0.0;
120 hCoeff_.field() = 0.0;
124 template<class ParcelType>
125 void Foam::ThermoCloud<ParcelType>::evolve()
127 const volScalarField& T = carrierThermo_.T();
128 const volScalarField cp = carrierThermo_.Cp();
130 autoPtr<interpolation<scalar> > rhoInterpolator = interpolation<scalar>::New
132 this->interpolationSchemes(),
137 autoPtr<interpolation<vector> > UInterpolator = interpolation<vector>::New
139 this->interpolationSchemes(),
144 autoPtr<interpolation<scalar> > muInterpolator = interpolation<scalar>::New
146 this->interpolationSchemes(),
151 autoPtr<interpolation<scalar> > TInterpolator = interpolation<scalar>::New
153 this->interpolationSchemes(),
158 autoPtr<interpolation<scalar> > cpInterpolator = interpolation<scalar>::New
160 this->interpolationSchemes(),
165 typename ParcelType::trackData td
183 template<class ParcelType>
184 template<class TrackingData>
185 void Foam::ThermoCloud<ParcelType>::inject
190 // Injection is same as for KinematicCloud<ParcelType>
191 KinematicCloud<ParcelType>::inject(td);
195 // ************************************************************************* //