00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "ThermoCloud.H"
00028 #include "interpolationCellPoint.H"
00029 #include "ThermoParcel.H"
00030
00031 #include "HeatTransferModel.H"
00032
00033
00034
00035 template<class ParcelType>
00036 Foam::ThermoCloud<ParcelType>::ThermoCloud
00037 (
00038 const word& cloudName,
00039 const volScalarField& rho,
00040 const volVectorField& U,
00041 const dimensionedVector& g,
00042 basicThermo& thermo
00043 )
00044 :
00045 KinematicCloud<ParcelType>
00046 (
00047 cloudName,
00048 rho,
00049 U,
00050 thermo.mu(),
00051 g
00052 ),
00053 thermoCloud(),
00054 constProps_(this->particleProperties()),
00055 carrierThermo_(thermo),
00056 heatTransferModel_
00057 (
00058 HeatTransferModel<ThermoCloud<ParcelType> >::New
00059 (
00060 this->particleProperties(),
00061 *this
00062 )
00063 ),
00064 TIntegrator_
00065 (
00066 scalarIntegrationScheme::New
00067 (
00068 "T",
00069 this->particleProperties().subDict("integrationSchemes")
00070 )
00071 ),
00072 radiation_(this->particleProperties().lookup("radiation")),
00073 hsTrans_
00074 (
00075 IOobject
00076 (
00077 this->name() + "hsTrans",
00078 this->db().time().timeName(),
00079 this->db(),
00080 IOobject::NO_READ,
00081 IOobject::NO_WRITE,
00082 false
00083 ),
00084 this->mesh(),
00085 dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
00086 ),
00087 hcTrans_
00088 (
00089 IOobject
00090 (
00091 this->name() + "hcTrans",
00092 this->db().time().timeName(),
00093 this->db(),
00094 IOobject::NO_READ,
00095 IOobject::NO_WRITE,
00096 false
00097 ),
00098 this->mesh(),
00099 dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0)
00100 )
00101 {}
00102
00103
00104
00105
00106 template<class ParcelType>
00107 Foam::ThermoCloud<ParcelType>::~ThermoCloud()
00108 {}
00109
00110
00111
00112
00113 template<class ParcelType>
00114 void Foam::ThermoCloud<ParcelType>::checkParcelProperties
00115 (
00116 ParcelType& parcel,
00117 const scalar lagrangianDt,
00118 const bool fullyDescribed
00119 )
00120 {
00121 KinematicCloud<ParcelType>::checkParcelProperties
00122 (
00123 parcel,
00124 lagrangianDt,
00125 fullyDescribed
00126 );
00127
00128 if (!fullyDescribed)
00129 {
00130 parcel.T() = constProps_.T0();
00131 parcel.cp() = constProps_.cp0();
00132 }
00133 }
00134
00135
00136 template<class ParcelType>
00137 void Foam::ThermoCloud<ParcelType>::resetSourceTerms()
00138 {
00139 KinematicCloud<ParcelType>::resetSourceTerms();
00140 hsTrans_.field() = 0.0;
00141 hcTrans_.field() = 0.0;
00142 }
00143
00144
00145 template<class ParcelType>
00146 void Foam::ThermoCloud<ParcelType>::preEvolve()
00147 {
00148 KinematicCloud<ParcelType>::preEvolve();
00149 }
00150
00151
00152 template<class ParcelType>
00153 void Foam::ThermoCloud<ParcelType>::postEvolve()
00154 {
00155 KinematicCloud<ParcelType>::postEvolve();
00156 }
00157
00158
00159 template<class ParcelType>
00160 void Foam::ThermoCloud<ParcelType>::evolve()
00161 {
00162 preEvolve();
00163
00164 const volScalarField& T = carrierThermo_.T();
00165 const volScalarField cp = carrierThermo_.Cp();
00166
00167 autoPtr<interpolation<scalar> > rhoInterp = interpolation<scalar>::New
00168 (
00169 this->interpolationSchemes(),
00170 this->rho()
00171 );
00172
00173 autoPtr<interpolation<vector> > UInterp = interpolation<vector>::New
00174 (
00175 this->interpolationSchemes(),
00176 this->U()
00177 );
00178
00179 autoPtr<interpolation<scalar> > muInterp = interpolation<scalar>::New
00180 (
00181 this->interpolationSchemes(),
00182 this->mu()
00183 );
00184
00185 autoPtr<interpolation<scalar> > TInterp = interpolation<scalar>::New
00186 (
00187 this->interpolationSchemes(),
00188 T
00189 );
00190
00191 autoPtr<interpolation<scalar> > cpInterp = interpolation<scalar>::New
00192 (
00193 this->interpolationSchemes(),
00194 cp
00195 );
00196
00197 typename ParcelType::trackData td
00198 (
00199 *this,
00200 constProps_,
00201 rhoInterp(),
00202 UInterp(),
00203 muInterp(),
00204 TInterp(),
00205 cpInterp(),
00206 this->g().value()
00207 );
00208
00209 this->injection().inject(td);
00210
00211 if (this->coupled())
00212 {
00213 resetSourceTerms();
00214 }
00215
00216 Cloud<ParcelType>::move(td);
00217
00218 postEvolve();
00219 }
00220
00221
00222 template<class ParcelType>
00223 void Foam::ThermoCloud<ParcelType>::info() const
00224 {
00225 KinematicCloud<ParcelType>::info();
00226 }
00227
00228
00229