1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
35 template<class ParcelType>
36 void Foam::ThermoCloud<ParcelType>::preEvolve()
38 KinematicCloud<ParcelType>::preEvolve();
42 template<class ParcelType>
43 void Foam::ThermoCloud<ParcelType>::evolveCloud()
45 const volScalarField& T = carrierThermo_.T();
46 const volScalarField cp = carrierThermo_.Cp();
48 autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
50 this->interpolationSchemes(),
54 autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
56 this->interpolationSchemes(),
60 autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
62 this->interpolationSchemes(),
66 autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
68 this->interpolationSchemes(),
72 autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
74 this->interpolationSchemes(),
78 typename ParcelType::trackData td
90 this->injection().inject(td);
97 Cloud<ParcelType>::move(td);
101 template<class ParcelType>
102 void Foam::ThermoCloud<ParcelType>::postEvolve()
104 KinematicCloud<ParcelType>::postEvolve();
108 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
110 template<class ParcelType>
111 Foam::ThermoCloud<ParcelType>::ThermoCloud
113 const word& cloudName,
114 const volScalarField& rho,
115 const volVectorField& U,
116 const dimensionedVector& g,
121 KinematicCloud<ParcelType>
131 constProps_(this->particleProperties()),
132 carrierThermo_(thermo),
135 HeatTransferModel<ThermoCloud<ParcelType> >::New
137 this->particleProperties(),
143 scalarIntegrationScheme::New
146 this->particleProperties().subDict("integrationSchemes")
149 radiation_(this->particleProperties().lookup("radiation")),
154 this->name() + "hsTrans",
155 this->db().time().timeName(),
162 dimensionedScalar("zero", dimEnergy, 0.0)
167 ParcelType::readFields(*this);
172 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
174 template<class ParcelType>
175 Foam::ThermoCloud<ParcelType>::~ThermoCloud()
179 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
181 template<class ParcelType>
182 void Foam::ThermoCloud<ParcelType>::checkParcelProperties
185 const scalar lagrangianDt,
186 const bool fullyDescribed
189 KinematicCloud<ParcelType>::checkParcelProperties
198 parcel.T() = constProps_.T0();
199 parcel.cp() = constProps_.cp0();
204 template<class ParcelType>
205 void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
207 KinematicCloud<ParcelType>::resetSourceTerms();
208 hsTrans_.field() = 0.0;
212 template<class ParcelType>
213 void Foam::ThermoCloud<ParcelType>::evolve()
229 template<class ParcelType>
230 void Foam::ThermoCloud<ParcelType>::info() const
232 KinematicCloud<ParcelType>::info();
236 // ************************************************************************* //