ENH: Updated parcel heat transfer radiation coupling

This commit is contained in:
andy
2010-10-27 11:51:34 +01:00
parent 6c7a93651d
commit 0d96d6e0d9
3 changed files with 42 additions and 5 deletions

View File

@ -312,9 +312,8 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
scalar bp = 6.0*(Sh/As + htc*(Tc_ - T));
if (td.cloud().radiation())
{
const scalarField& G =
td.cloud().mesh().objectRegistry::lookupObject<volScalarField>("G");
const scalar Gc = G[cellI];
tetIndices tetIs = this->currentTetIndices();
const scalar Gc = td.GInterp().interpolate(this->position(), tetIs);
const scalar sigma = physicoChemical::sigma.value();
const scalar epsilon = td.cloud().constProps().epsilon0();

View File

@ -151,6 +151,9 @@ public:
//- Specific heat capacity field interpolator
autoPtr<interpolation<scalar> > CpInterp_;
//- Radiation field interpolator
autoPtr<interpolation<scalar> > GInterp_;
public:
@ -180,6 +183,10 @@ public:
//- Return const access to the interpolator for continuous
// phase specific heat capacity field
inline const interpolation<scalar>& CpInterp() const;
//- Return const access to the interpolator for continuous
// radiation field
inline const interpolation<scalar>& GInterp() const;
};

View File

@ -77,8 +77,21 @@ inline Foam::ThermoParcel<ParcelType>::trackData::trackData
cloud.solution().interpolationSchemes(),
Cp_
)
)
{}
),
GInterp_(NULL)
{
if (cloud.radiation())
{
GInterp_.reset
(
interpolation<scalar>::New
(
cloud.solution().interpolationSchemes(),
cloud.mesh().objectRegistry::lookupObject<volScalarField>("G")
).ptr()
);
}
}
template<class ParcelType>
@ -226,6 +239,24 @@ Foam::ThermoParcel<ParcelType>::trackData::CpInterp() const
}
template<class ParcelType>
inline const Foam::interpolation<Foam::scalar>&
Foam::ThermoParcel<ParcelType>::trackData::GInterp() const
{
if (!GInterp_.valid())
{
FatalErrorIn
(
"inline const Foam::interpolation<Foam::scalar>&"
"Foam::ThermoParcel<ParcelType>::trackData::GInterp() const"
) << "Radiation G interpolation object not set"
<< abort(FatalError);
}
return GInterp_();
}
// * * * * * * * * * * ThermoParcel Member Functions * * * * * * * * * * * * //
template<class ParcelType>