Commit 0d96d6e0 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Updated parcel heat transfer radiation coupling

parent 6c7a9365
......@@ -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();
......
......@@ -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;
};
......
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment