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/>.
24 \*---------------------------------------------------------------------------*/
26 #include "ThermoCloudTemplate.H"
27 #include "interpolationCellPoint.H"
28 #include "ThermoParcel.H"
30 #include "HeatTransferModel.H"
32 // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * //
34 template<class ParcelType>
35 void Foam::ThermoCloud<ParcelType>::preEvolve()
37 KinematicCloud<ParcelType>::preEvolve();
41 template<class ParcelType>
42 void Foam::ThermoCloud<ParcelType>::evolveCloud()
44 const volScalarField& T = carrierThermo_.T();
45 const volScalarField cp = carrierThermo_.Cp();
47 autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
49 this->interpolationSchemes(),
53 autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
55 this->interpolationSchemes(),
59 autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
61 this->interpolationSchemes(),
65 autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
67 this->interpolationSchemes(),
71 autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
73 this->interpolationSchemes(),
77 typename ParcelType::trackData td
89 this->injection().inject(td);
96 Cloud<ParcelType>::move(td);
100 template<class ParcelType>
101 void Foam::ThermoCloud<ParcelType>::postEvolve()
103 KinematicCloud<ParcelType>::postEvolve();
107 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
109 template<class ParcelType>
110 Foam::ThermoCloud<ParcelType>::ThermoCloud
112 const word& cloudName,
113 const volScalarField& rho,
114 const volVectorField& U,
115 const dimensionedVector& g,
120 KinematicCloud<ParcelType>
130 constProps_(this->particleProperties()),
131 carrierThermo_(thermo),
134 HeatTransferModel<ThermoCloud<ParcelType> >::New
136 this->particleProperties(),
142 scalarIntegrationScheme::New
145 this->particleProperties().subDict("integrationSchemes")
148 radiation_(this->particleProperties().lookup("radiation")),
153 this->name() + "hsTrans",
154 this->db().time().timeName(),
161 dimensionedScalar("zero", dimEnergy, 0.0)
166 ParcelType::readFields(*this);
171 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
173 template<class ParcelType>
174 Foam::ThermoCloud<ParcelType>::~ThermoCloud()
178 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
180 template<class ParcelType>
181 void Foam::ThermoCloud<ParcelType>::checkParcelProperties
184 const scalar lagrangianDt,
185 const bool fullyDescribed
188 KinematicCloud<ParcelType>::checkParcelProperties
197 parcel.T() = constProps_.T0();
198 parcel.cp() = constProps_.cp0();
203 template<class ParcelType>
204 void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
206 KinematicCloud<ParcelType>::resetSourceTerms();
207 hsTrans_.field() = 0.0;
211 template<class ParcelType>
212 void Foam::ThermoCloud<ParcelType>::evolve()
228 template<class ParcelType>
229 void Foam::ThermoCloud<ParcelType>::info() const
231 KinematicCloud<ParcelType>::info();
235 // ************************************************************************* //