Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/EnergyPlus/Autosizing/All_Simple_Sizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ Real64 HeatingCoilDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _orig
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(
state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
ReportCoilSelection::setCoilEntAirTemp(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically the only type of change in the entire PR. A lot of search-replace and letting the compiler flag the remaining changes that need to be performed by hand.

state, this->coilReportNum, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
}
return this->autoSizedValue;
}
Expand Down Expand Up @@ -355,7 +355,7 @@ Real64 HeatingCoilDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _ori
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilLvgAirTemp(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down Expand Up @@ -392,7 +392,7 @@ Real64 HeatingCoilDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _or
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilEntAirHumRat(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Autosizing/Base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ void BaseSizer::initializeWithinEP(EnergyPlusData &state,
this->airloopDOAS = state.dataAirLoopHVACDOAS->airloopDOAS;
if (EnergyPlus::BaseSizer::isValidCoilType(this->compType)) { // coil reports fail if compType is not one of HVAC::cAllCoilTypes
this->isCoilReportObject = true;
this->coilReportNum = ReportCoilSelection::getReportIndex(state, this->compName, this->coilType);
}
if (EnergyPlus::BaseSizer::isValidFanType(this->compType)) { // fan reports fail if compType is not a valid fan type
this->isFanReportObject = true;
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/Autosizing/Base.hh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ struct BaseSizer
bool dataScalableSizingON = false;
bool dataScalableCapSizingON = false;
bool isCoilReportObject = false; // provides access to coil reporting
int coilReportNum = -1; // Coil report number for direct access
bool isFanReportObject = false; // provides access to fan reporting
bool initialized = false; // indicates initializeWithinEP was called
AutoSizingResultType errorType = AutoSizingResultType::NoError;
Expand Down
5 changes: 2 additions & 3 deletions src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ void BaseSizerWithScalableInputs::initializeWithinEP(EnergyPlusData &state,

// This should work for both fan types
if (this->primaryAirSystem(this->curSysNum).supFanNum > 0) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilSupplyFanInfo(
ReportCoilSelection::setCoilSupplyFanInfo(
state,
this->compName,
this->compType,
this->coilReportNum,
state.dataFans->fans(this->primaryAirSystem(this->curSysNum).supFanNum)->Name,
state.dataFans->fans(this->primaryAirSystem(this->curSysNum).supFanNum)->type,
this->primaryAirSystem(this->curSysNum).supFanNum);
Expand Down
8 changes: 3 additions & 5 deletions src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b

if (this->isCoilReportObject) {
// SizingResult is airflow in m3/s
state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(
state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized);
ReportCoilSelection::setCoilAirFlow(state, this->coilReportNum, this->autoSizedValue, this->wasAutoSized);
}
if (this->isFanReportObject) {
// fill fan peak day and time here
Expand All @@ -397,8 +396,7 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b
EnergyPlus::format("{}/{} {}",
state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).Month,
state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).CoolDDNum).DayOfMonth,
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax));
ReportCoilSelection::getTimeText(state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtCoolMax));
}
} else if (heatingFlow) {
if (this->finalZoneSizing(this->curZoneEqNum).HeatDDNum > 0 &&
Expand All @@ -408,7 +406,7 @@ Real64 CoolingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b
EnergyPlus::format("{}/{} {}",
state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).Month,
state.dataWeather->DesDayInput(this->finalZoneSizing(this->curZoneEqNum).HeatDDNum).DayOfMonth,
state.dataRptCoilSelection->coilSelectionReportObj->getTimeText(
ReportCoilSelection::getTimeText(
state, this->finalZoneSizing(this->curZoneEqNum).TimeStepNumAtHeatMax));
}
}
Expand Down
43 changes: 20 additions & 23 deletions src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,11 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,
CoilOutHumRat = state.dataSize->DataCoilSizingAirOutHumRat;
FanCoolLoad = state.dataSize->DataCoilSizingFanCoolLoad;
TotCapTempModFac = state.dataSize->DataCoilSizingCapFT;
if (state.dataRptCoilSelection->coilSelectionReportObj->isCompTypeCoil(this->compType)) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(
state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
if (ReportCoilSelection::isCompTypeCoil(this->compType)) {
ReportCoilSelection::setCoilEntAirHumRat(state, this->coilReportNum, CoilInHumRat);
ReportCoilSelection::setCoilEntAirTemp(state, this->coilReportNum, CoilInTemp, this->curSysNum, this->curZoneEqNum);
ReportCoilSelection::setCoilLvgAirTemp(state, this->coilReportNum, CoilOutTemp);
ReportCoilSelection::setCoilLvgAirHumRat(state, this->coilReportNum, CoilOutHumRat);
}
} else if (this->curOASysNum > 0 && this->outsideAirSys(this->curOASysNum).AirLoopDOASNum > -1) {
auto &thisAirloopDOAS = this->airloopDOAS[this->outsideAirSys(this->curOASysNum).AirLoopDOASNum];
Expand Down Expand Up @@ -569,26 +568,24 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,

if (this->isCoilReportObject && this->curSysNum <= state.dataHVACGlobal->NumPrimaryAirSys) {
if (CoilInTemp > -999.0) { // set inlet air properties used during capacity sizing if available, allow for negative winter temps
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(
state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
ReportCoilSelection::setCoilEntAirTemp(state, this->coilReportNum, CoilInTemp, this->curSysNum, this->curZoneEqNum);
ReportCoilSelection::setCoilEntAirHumRat(state, this->coilReportNum, CoilInHumRat);
}
if (CoilOutTemp > -999.0) { // set outlet air properties used during capacity sizing if available
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
ReportCoilSelection::setCoilLvgAirTemp(state, this->coilReportNum, CoilOutTemp);
ReportCoilSelection::setCoilLvgAirHumRat(state, this->coilReportNum, CoilOutHumRat);
}
state.dataRptCoilSelection->coilSelectionReportObj->setCoilCoolingCapacity(state,
this->compName,
this->compType,
this->autoSizedValue,
this->wasAutoSized,
this->curSysNum,
this->curZoneEqNum,
this->curOASysNum,
FanCoolLoad,
TotCapTempModFac,
DXFlowPerCapMinRatio,
DXFlowPerCapMaxRatio);
ReportCoilSelection::setCoilCoolingCapacity(state,
this->coilReportNum,
this->autoSizedValue,
this->wasAutoSized,
this->curSysNum,
this->curZoneEqNum,
this->curOASysNum,
FanCoolLoad,
TotCapTempModFac,
DXFlowPerCapMinRatio,
DXFlowPerCapMaxRatio);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Real64 CoolingWaterDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _o
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilEntAirHumRat(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ Real64 CoolingWaterDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _ori
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
if (this->curSysNum <= this->numPrimaryAirSys) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(
state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
ReportCoilSelection::setCoilEntAirTemp(state, this->coilReportNum, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
}
}
return this->autoSizedValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilLvgAirHumRat(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilLvgAirTemp(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Real64 CoolingWaterDesWaterInletTempSizer::size(EnergyPlusData &state, Real64 _o
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, this->autoSizedValue);
ReportCoilSelection::setCoilEntWaterTemp(state, this->coilReportNum, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
17 changes: 7 additions & 10 deletions src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,15 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilWaterFlowPltSizNum(
state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized, this->dataPltSizCoolNum, this->dataWaterLoopNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilWaterDeltaT(state, this->compName, this->compType, CoilDesWaterDeltaT);
ReportCoilSelection::setCoilWaterFlowPltSizNum(
state, this->coilReportNum, this->autoSizedValue, this->wasAutoSized, this->dataPltSizCoolNum, this->dataWaterLoopNum);
ReportCoilSelection::setCoilWaterDeltaT(state, this->coilReportNum, CoilDesWaterDeltaT);
if (this->dataDesInletWaterTemp > 0.0) {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(
state, this->compName, this->compType, this->dataDesInletWaterTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgWaterTemp(
state, this->compName, this->compType, this->dataDesInletWaterTemp + CoilDesWaterDeltaT);
ReportCoilSelection::setCoilEntWaterTemp(state, this->coilReportNum, this->dataDesInletWaterTemp);
ReportCoilSelection::setCoilLvgWaterTemp(state, this->coilReportNum, this->dataDesInletWaterTemp + CoilDesWaterDeltaT);
} else {
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, Constant::CWInitConvTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgWaterTemp(
state, this->compName, this->compType, Constant::CWInitConvTemp + CoilDesWaterDeltaT);
ReportCoilSelection::setCoilEntWaterTemp(state, this->coilReportNum, Constant::CWInitConvTemp);
ReportCoilSelection::setCoilLvgWaterTemp(state, this->coilReportNum, Constant::CWInitConvTemp + CoilDesWaterDeltaT);
}
this->calcCoilWaterFlowRates(state,
this->compName,
Expand Down
3 changes: 1 addition & 2 deletions src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@ Real64 HeatingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b

if (this->isCoilReportObject) {
// SizingResult is airflow in m3/s
state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(
state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized);
ReportCoilSelection::setCoilAirFlow(state, this->coilReportNum, this->autoSizedValue, this->wasAutoSized);
}
if (this->isFanReportObject) {
// fill fan peak day and time here
Expand Down
34 changes: 16 additions & 18 deletions src/EnergyPlus/Autosizing/HeatingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,29 +463,27 @@ Real64 HeatingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,

if (this->isCoilReportObject) {
if (CoilInTemp > -999.0) { // set inlet air properties used during capacity sizing if available, allow for negative winter temps
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(
state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
ReportCoilSelection::setCoilEntAirTemp(state, this->coilReportNum, CoilInTemp, this->curSysNum, this->curZoneEqNum);
ReportCoilSelection::setCoilEntAirHumRat(state, this->coilReportNum, CoilInHumRat);
}
if (CoilOutTemp > -999.0) { // set outlet air properties used during capacity sizing if available
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
ReportCoilSelection::setCoilLvgAirTemp(state, this->coilReportNum, CoilOutTemp);
ReportCoilSelection::setCoilLvgAirHumRat(state, this->coilReportNum, CoilOutHumRat);
}
state.dataRptCoilSelection->coilSelectionReportObj->setCoilAirFlow(state, this->compName, this->compType, DesVolFlow, this->wasAutoSized);
ReportCoilSelection::setCoilAirFlow(state, this->coilReportNum, DesVolFlow, this->wasAutoSized);
Real64 constexpr FanCoolLoad = 0.0;
Real64 constexpr TotCapTempModFac = 1.0;
state.dataRptCoilSelection->coilSelectionReportObj->setCoilHeatingCapacity(state,
this->compName,
this->compType,
this->autoSizedValue,
this->wasAutoSized,
this->curSysNum,
this->curZoneEqNum,
this->curOASysNum,
FanCoolLoad,
TotCapTempModFac,
DXFlowPerCapMinRatio,
DXFlowPerCapMaxRatio);
ReportCoilSelection::setCoilHeatingCapacity(state,
this->coilReportNum,
this->autoSizedValue,
this->wasAutoSized,
this->curSysNum,
this->curZoneEqNum,
this->curOASysNum,
FanCoolLoad,
TotCapTempModFac,
DXFlowPerCapMinRatio,
DXFlowPerCapMaxRatio);
}
return this->autoSizedValue;
}
Expand Down
Loading
Loading