1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 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 "interpolationCellPoint.H"
29 #include "ThermoParcel.H"
31 #include "HeatTransferModel.H"
33 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
35 template<class ParcelType>
36 Foam::ThermoCloud<ParcelType>::ThermoCloud
38 const word& cloudName,
39 const volScalarField& rho,
40 const volVectorField& U,
41 const dimensionedVector& g,
45 KinematicCloud<ParcelType>
54 constProps_(this->particleProperties()),
55 carrierThermo_(thermo),
58 HeatTransferModel<ThermoCloud<ParcelType> >::New
60 this->particleProperties(),
66 scalarIntegrationScheme::New
69 this->particleProperties().subDict("integrationSchemes")
72 radiation_(this->particleProperties().lookup("radiation")),
77 this->name() + "hsTrans",
78 this->db().time().timeName(),
85 dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
91 this->name() + "hcTrans",
92 this->db().time().timeName(),
99 dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
104 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
106 template<class ParcelType>
107 Foam::ThermoCloud<ParcelType>::~ThermoCloud()
111 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
113 template<class ParcelType>
114 void Foam::ThermoCloud<ParcelType>::checkParcelProperties
117 const scalar lagrangianDt,
118 const bool fullyDescribed
121 KinematicCloud<ParcelType>::checkParcelProperties
130 parcel.T() = constProps_.T0();
131 parcel.cp() = constProps_.cp0();
136 template<class ParcelType>
137 void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
139 KinematicCloud<ParcelType>::resetSourceTerms();
140 hsTrans_.field() = 0.0;
141 hcTrans_.field() = 0.0;
145 template<class ParcelType>
146 void Foam::ThermoCloud<ParcelType>::preEvolve()
148 KinematicCloud<ParcelType>::preEvolve();
152 template<class ParcelType>
153 void Foam::ThermoCloud<ParcelType>::postEvolve()
155 KinematicCloud<ParcelType>::postEvolve();
159 template<class ParcelType>
160 void Foam::ThermoCloud<ParcelType>::evolve()
164 const volScalarField& T = carrierThermo_.T();
165 const volScalarField cp = carrierThermo_.Cp();
167 autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
169 this->interpolationSchemes(),
173 autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
175 this->interpolationSchemes(),
179 autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
181 this->interpolationSchemes(),
185 autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
187 this->interpolationSchemes(),
191 autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
193 this->interpolationSchemes(),
197 typename ParcelType::trackData td
209 this->injection().inject(td);
216 Cloud<ParcelType>::move(td);
222 template<class ParcelType>
223 void Foam::ThermoCloud<ParcelType>::info() const
225 KinematicCloud<ParcelType>::info();
229 // ************************************************************************* //