mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated thermo trackData to better handle Cp
This commit is contained in:
@ -67,15 +67,7 @@ void Foam::ReactingCloud<ParcelType>::preEvolve()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingCloud<ParcelType>::evolveCloud()
|
||||
{
|
||||
const volScalarField Cp = this->thermo().thermo().Cp();
|
||||
|
||||
autoPtr<interpolation<scalar> > CpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->solution().interpolationSchemes(),
|
||||
Cp
|
||||
);
|
||||
|
||||
typename ParcelType::trackData td(*this, CpInterp());
|
||||
typename ParcelType::trackData td(*this);
|
||||
|
||||
label preInjectionSize = this->size();
|
||||
|
||||
|
||||
@ -40,15 +40,7 @@ void Foam::ReactingMultiphaseCloud<ParcelType>::preEvolve()
|
||||
template<class ParcelType>
|
||||
void Foam::ReactingMultiphaseCloud<ParcelType>::evolveCloud()
|
||||
{
|
||||
const volScalarField Cp = this->thermo().thermo().Cp();
|
||||
|
||||
autoPtr<interpolation<scalar> > CpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->solution().interpolationSchemes(),
|
||||
Cp
|
||||
);
|
||||
|
||||
typename ParcelType::trackData td(*this, CpInterp());
|
||||
typename ParcelType::trackData td(*this);
|
||||
|
||||
label preInjectionSize = this->size();
|
||||
|
||||
|
||||
@ -41,15 +41,7 @@ void Foam::ThermoCloud<ParcelType>::preEvolve()
|
||||
template<class ParcelType>
|
||||
void Foam::ThermoCloud<ParcelType>::evolveCloud()
|
||||
{
|
||||
const volScalarField Cp = thermo_.thermo().Cp();
|
||||
|
||||
autoPtr<interpolation<scalar> > CpInterp = interpolation<scalar>::New
|
||||
(
|
||||
this->solution().interpolationSchemes(),
|
||||
Cp
|
||||
);
|
||||
|
||||
typename ParcelType::trackData td(*this, CpInterp());
|
||||
typename ParcelType::trackData td(*this);
|
||||
|
||||
label preInjectionSize = this->size();
|
||||
|
||||
|
||||
@ -127,7 +127,6 @@ public:
|
||||
inline trackData
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename ReactingParcel<ParcelType>::trackData::trackPart
|
||||
part = ReactingParcel<ParcelType>::trackData::tpLinearTrack
|
||||
);
|
||||
|
||||
@ -54,11 +54,10 @@ template<class ParcelType>
|
||||
inline Foam::ReactingMultiphaseParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ReactingMultiphaseCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename ReactingParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
ReactingParcel<ParcelType>::trackData(cloud, CpInterp, part),
|
||||
ReactingParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud),
|
||||
constProps_(cloud.constProps())
|
||||
{}
|
||||
|
||||
@ -139,7 +139,6 @@ public:
|
||||
inline trackData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename ThermoParcel<ParcelType>::trackData::trackPart
|
||||
part = ThermoParcel<ParcelType>::trackData::tpLinearTrack
|
||||
);
|
||||
|
||||
@ -43,11 +43,10 @@ template<class ParcelType>
|
||||
inline Foam::ReactingParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ReactingCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename ThermoParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
ThermoParcel<ParcelType>::trackData(cloud, CpInterp, part),
|
||||
ThermoParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud),
|
||||
constProps_(cloud.constProps()),
|
||||
pInterp_
|
||||
|
||||
@ -141,6 +141,11 @@ public:
|
||||
//- Particle constant properties
|
||||
const constantProperties& constProps_;
|
||||
|
||||
//- Local copy of specific heat field
|
||||
// Cp not stored on acrrier thermo, but returned as tmp<...>
|
||||
const volScalarField Cp_;
|
||||
|
||||
|
||||
// Interpolators for continuous phase fields
|
||||
|
||||
//- Temperature field interpolator
|
||||
@ -158,7 +163,6 @@ public:
|
||||
inline trackData
|
||||
(
|
||||
ThermoCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename KinematicParcel<ParcelType>::trackData::trackPart
|
||||
part = KinematicParcel<ParcelType>::trackData::tpLinearTrack
|
||||
);
|
||||
|
||||
@ -45,13 +45,24 @@ template<class ParcelType>
|
||||
inline Foam::ThermoParcel<ParcelType>::trackData::trackData
|
||||
(
|
||||
ThermoCloud<ParcelType>& cloud,
|
||||
const interpolation<scalar>& CpInterp,
|
||||
typename KinematicParcel<ParcelType>::trackData::trackPart part
|
||||
)
|
||||
:
|
||||
KinematicParcel<ParcelType>::trackData(cloud, part),
|
||||
cloud_(cloud),
|
||||
constProps_(cloud.constProps()),
|
||||
Cp_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cp",
|
||||
cloud.db().time().timeName(),
|
||||
cloud.db(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
cloud.thermo().thermo().Cp()
|
||||
),
|
||||
TInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
@ -60,7 +71,14 @@ inline Foam::ThermoParcel<ParcelType>::trackData::trackData
|
||||
cloud.T()
|
||||
)
|
||||
),
|
||||
CpInterp_(CpInterp)
|
||||
CpInterp_
|
||||
(
|
||||
interpolation<scalar>::New
|
||||
(
|
||||
cloud.solution().interpolationSchemes(),
|
||||
Cp_
|
||||
)
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user