ENH: effectivenessHeatExchangerSource: add secondaryOutletT functionality
This commit is contained in:
parent
9118ffb31e
commit
5bcf9b7997
@ -135,6 +135,11 @@ void Foam::fv::effectivenessHeatExchangerSource::writeFileHeader(Ostream& os)
|
|||||||
writeFile::writeTabbed(os, "Tref [K]");
|
writeFile::writeTabbed(os, "Tref [K]");
|
||||||
writeFile::writeTabbed(os, "Effectiveness");
|
writeFile::writeTabbed(os, "Effectiveness");
|
||||||
|
|
||||||
|
if (secondaryCpPtr_)
|
||||||
|
{
|
||||||
|
writeFile::writeTabbed(os, "Secondary outlet T [K]");
|
||||||
|
}
|
||||||
|
|
||||||
os << endl;
|
os << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,6 +158,16 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource
|
|||||||
writeFile(mesh, name, modelType, coeffs_),
|
writeFile(mesh, name, modelType, coeffs_),
|
||||||
secondaryMassFlowRate_(0),
|
secondaryMassFlowRate_(0),
|
||||||
secondaryInletT_(0),
|
secondaryInletT_(0),
|
||||||
|
secondaryCpPtr_
|
||||||
|
(
|
||||||
|
Function1<scalar>::NewIfPresent
|
||||||
|
(
|
||||||
|
"secondaryCp",
|
||||||
|
coeffs_,
|
||||||
|
word::null,
|
||||||
|
&mesh
|
||||||
|
)
|
||||||
|
),
|
||||||
primaryInletT_(0),
|
primaryInletT_(0),
|
||||||
userPrimaryInletT_(false),
|
userPrimaryInletT_(false),
|
||||||
targetQdotActive_(false),
|
targetQdotActive_(false),
|
||||||
@ -317,8 +332,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
|
|||||||
<< indent << "Secondary inlet T [K] : " << secondaryInletT_ << nl
|
<< indent << "Secondary inlet T [K] : " << secondaryInletT_ << nl
|
||||||
<< indent << "Tref [K] : " << Tref << nl
|
<< indent << "Tref [K] : " << Tref << nl
|
||||||
<< indent << "Effectiveness : "
|
<< indent << "Effectiveness : "
|
||||||
<< eTable_()(mag(sumPhi), secondaryMassFlowRate_) << decrIndent
|
<< eTable_()(mag(sumPhi), secondaryMassFlowRate_) << decrIndent;
|
||||||
<< nl << endl;
|
|
||||||
|
|
||||||
if (Pstream::master())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
@ -329,9 +343,25 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
|
|||||||
<< tab << Qt
|
<< tab << Qt
|
||||||
<< tab << secondaryInletT_
|
<< tab << secondaryInletT_
|
||||||
<< tab << Tref
|
<< tab << Tref
|
||||||
<< tab << eTable_()(mag(sumPhi), secondaryMassFlowRate_)
|
<< tab << eTable_()(mag(sumPhi), secondaryMassFlowRate_);
|
||||||
<< endl;
|
|
||||||
|
if (secondaryCpPtr_)
|
||||||
|
{
|
||||||
|
// Secondary Cp as a function of the starting secondary temperature
|
||||||
|
const scalar secondaryCp = secondaryCpPtr_->value(secondaryInletT_);
|
||||||
|
const scalar secondaryOutletT =
|
||||||
|
Qt/(secondaryMassFlowRate_*secondaryCp) + secondaryInletT_;
|
||||||
|
|
||||||
|
Info<< nl << incrIndent << indent
|
||||||
|
<< "Secondary outlet T [K] : " << secondaryOutletT
|
||||||
|
<< decrIndent;
|
||||||
|
|
||||||
|
os << tab << secondaryOutletT;
|
||||||
|
}
|
||||||
|
os << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Info<< nl << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -205,6 +205,7 @@ SourceFiles
|
|||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "interpolation2DTable.H"
|
#include "interpolation2DTable.H"
|
||||||
#include "writeFile.H"
|
#include "writeFile.H"
|
||||||
|
#include "Function1.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -232,6 +233,9 @@ protected:
|
|||||||
//- Inlet secondary temperature [K]
|
//- Inlet secondary temperature [K]
|
||||||
scalar secondaryInletT_;
|
scalar secondaryInletT_;
|
||||||
|
|
||||||
|
//- Secondary specific heat capacity [J/kg/K]
|
||||||
|
autoPtr<Function1<scalar>> secondaryCpPtr_;
|
||||||
|
|
||||||
//- Primary air temperature at the heat exchanger inlet [K]
|
//- Primary air temperature at the heat exchanger inlet [K]
|
||||||
scalar primaryInletT_;
|
scalar primaryInletT_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user