33 template<
class ParcelType>
34 template<
class TrackCloudType>
37 TrackCloudType& cloud,
41 ParcelType::setCellValues(cloud, td);
49 if (td.
Tc() < cloud.constProps().TMin())
54 <<
"Limiting observed temperature in cell " << this->
cell()
55 <<
" to " << cloud.constProps().TMin() <<
nl <<
endl;
58 td.
Tc() = cloud.constProps().TMin();
63 template<
class ParcelType>
64 template<
class TrackCloudType>
67 TrackCloudType& cloud,
72 td.Uc() += cloud.UTrans()[this->
cell()]/this->massCell(td);
75 td.
Tc() += cloud.hsTrans()[this->
cell()]/(CpMean*this->massCell(td));
77 if (td.
Tc() < cloud.constProps().TMin())
82 <<
"Limiting observed temperature in cell " << this->
cell()
83 <<
" to " << cloud.constProps().TMin() <<
nl <<
endl;
86 td.
Tc() = cloud.constProps().TMin();
91 template<
class ParcelType>
92 template<
class TrackCloudType>
95 TrackCloudType& cloud,
106 Ts = (2.0*T + td.
Tc())/3.0;
108 if (Ts < cloud.constProps().TMin())
113 <<
"Limiting parcel surface temperature to " 114 << cloud.constProps().TMin() <<
nl <<
endl;
117 Ts = cloud.constProps().TMin();
121 const scalar TRatio = td.
Tc()/Ts;
123 rhos = td.rhoc()*TRatio;
126 mus = td.muInterp().interpolate(this->
coordinates(), tetIs)/TRatio;
129 Pr = td.
Cpc()*mus/kappas;
130 Pr =
max(rootVSmall, Pr);
134 template<
class ParcelType>
135 template<
class TrackCloudType>
138 TrackCloudType& cloud,
145 const scalar np0 = this->nParticle_;
146 const scalar mass0 = this->mass();
149 const scalar T0 = this->T_;
154 scalar Ts, rhos, mus, Pr, kappas;
155 calcSurfaceValues(cloud, td, this->T_, Ts, rhos, mus, Pr, kappas);
158 scalar Re = this->
Re(rhos, this->U_, td.Uc(), this->d_, mus);
180 scalar dhsTrans = 0.0;
191 this->calcHeatTransfer
211 this->calcVelocity(cloud, td, dt, Re, mus, mass0, Su, dUTrans, Spu);
216 if (cloud.solution().coupled())
219 cloud.UTrans()[this->
cell()] += np0*dUTrans;
222 cloud.UCoeff()[this->
cell()] += np0*Spu;
225 cloud.hsTrans()[this->
cell()] += np0*dhsTrans;
228 cloud.hsCoeff()[this->
cell()] += np0*Sph;
231 if (cloud.radiation())
233 const scalar ap = this->areaP();
234 const scalar T4 =
pow4(T0);
235 cloud.radAreaP()[this->
cell()] += dt*np0*ap;
236 cloud.radT4()[this->
cell()] += dt*np0*T4;
237 cloud.radAreaPT4()[this->
cell()] += dt*np0*ap*T4;
243 template<
class ParcelType>
244 template<
class TrackCloudType>
247 TrackCloudType& cloud,
259 if (!cloud.heatTransfer().active())
264 const scalar d = this->d();
265 const scalar
rho = this->
rho();
266 const scalar As = this->areaS(d);
267 const scalar V = this->volume(d);
268 const scalar m = rho*V;
271 scalar htc = cloud.heatTransfer().htc(d, Re, Pr, kappa, NCpW);
274 const scalar bcp = htc*As/(m*Cp_);
275 const scalar acp = bcp*td.
Tc();
277 if (cloud.radiation())
279 const tetIndices tetIs = this->currentTetIndices();
282 const scalar
epsilon = cloud.constProps().epsilon0();
284 ancp += As*epsilon*(Gc/4.0 - sigma*
pow4(T_));
289 const scalar deltaT = cloud.TIntegrator().delta(T_, dt, acp + ancp, bcp);
290 const scalar deltaTncp = ancp*dt;
291 const scalar deltaTcp = deltaT - deltaTncp;
294 scalar Tnew = T_ + deltaT;
295 Tnew =
min(
max(Tnew, cloud.constProps().TMin()), cloud.constProps().TMax());
297 dhsTrans -= m*Cp_*deltaTcp;
307 template<
class ParcelType>
319 template<
class ParcelType>
const interpolation< scalar > & kappaInterp() const
Return const access to the interpolator for continuous.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
scalar Cp_
Specific heat capacity [J/kg/K].
void calc(TrackCloudType &cloud, trackingData &td, const scalar dt)
Update parcel properties over the time interval.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
ThermoParcel(const polyMesh &mesh, const barycentric &coordinates, const label celli, const label tetFacei, const label tetPti)
Construct from mesh, coordinates and topology.
const interpolation< scalar > & GInterp() const
Return const access to the interpolator for continuous.
const interpolation< scalar > & TInterp() const
Return const access to the interpolator for continuous.
virtual Type interpolate(const vector &position, const label celli, const label facei=-1) const =0
Interpolate field to the given point in the given cell.
const GeometricField< Type, fvPatchField, volMesh > & psi() const
Return the field to be interpolated.
scalar T_
Temperature [K].
void calcSurfaceValues(TrackCloudType &cloud, trackingData &td, const scalar T, scalar &Ts, scalar &rhos, scalar &mus, scalar &Pr, scalar &kappas) const
Calculate surface thermo properties.
void cellValueSourceCorrection(TrackCloudType &cloud, trackingData &td, const scalar dt)
Correct cell values using latest transfer information.
const Type & value() const
Return const reference to value.
Storage and named access for the indices of a tet which is part of the decomposition of a cell...
scalar Tc() const
Return the continuous phase temperature.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const interpolation< scalar > & CpInterp() const
Return const access to the interpolator for continuous.
PtrList< coordinateSystem > coordinates(solidRegions.size())
scalar calcHeatTransfer(TrackCloudType &cloud, trackingData &td, const scalar dt, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW, const scalar Sh, scalar &dhsTrans, scalar &Sph)
Calculate new particle temperature.
#define WarningInFunction
Report a warning using Foam::Warning.
scalar Cpc() const
Return the continuous phase specific heat capacity.
A cell is defined as a list of faces with extra functionality.
dimensionedScalar pow4(const dimensionedScalar &ds)
void setCellValues(TrackCloudType &cloud, trackingData &td)
Set cell values.
Mesh consisting of general polyhedral cells.
scalarField Re(const UList< complex > &cf)
Thermodynamic parcel class with one/two-way coupling with the continuous phase. Includes Kinematic pa...