Skip to content

Commit

Permalink
Merge pull request #8623 from energy-plus/GlobalCleanup2
Browse files Browse the repository at this point in the history
Global DataShadowCombinations, ElectricPowerServiceManager, ReportCoilSelections
  • Loading branch information
Myoldmopar authored Mar 16, 2021
2 parents 3a5929c + 74c6610 commit 23ee3fd
Show file tree
Hide file tree
Showing 94 changed files with 1,024 additions and 1,276 deletions.
6 changes: 3 additions & 3 deletions src/EnergyPlus/Autosizing/All_Simple_Sizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ Real64 HeatingCoilDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _orig
}
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
return this->autoSizedValue;
}

Expand Down Expand Up @@ -347,7 +347,7 @@ Real64 HeatingCoilDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _ori
}
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down Expand Up @@ -383,7 +383,7 @@ Real64 HeatingCoilDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _or
}
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/Autosizing/BaseSizerWithScalableInputs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void BaseSizerWithScalableInputs::initializeWithinEP(EnergyPlusData &state,
switch (this->primaryAirSystem(this->curSysNum).supFanModelTypeEnum) {
case DataAirSystems::structArrayLegacyFanModels: {
if (SupFanNum > 0) {
coilSelectionReportObj->setCoilSupplyFanInfo(state,
state.dataRptCoilSelection->coilSelectionReportObj->setCoilSupplyFanInfo(state,
this->compName,
this->compType,
state.dataFans->Fan(SupFanNum).FanName,
Expand All @@ -111,7 +111,7 @@ void BaseSizerWithScalableInputs::initializeWithinEP(EnergyPlusData &state,
}
case DataAirSystems::objectVectorOOFanSystemModel: {
if (this->primaryAirSystem(this->curSysNum).supFanVecIndex >= 0) {
coilSelectionReportObj->setCoilSupplyFanInfo(state,
state.dataRptCoilSelection->coilSelectionReportObj->setCoilSupplyFanInfo(state,
this->compName,
this->compType,
HVACFan::fanObjs[this->primaryAirSystem(this->curSysNum).supFanVecIndex]->name,
Expand Down
84 changes: 42 additions & 42 deletions src/EnergyPlus/Autosizing/CoolingAirFlowSizing.cc

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions src/EnergyPlus/Autosizing/CoolingCapacitySizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,
CoilOutHumRat = state.dataSize->DataCoilSizingAirOutHumRat;
FanCoolLoad = state.dataSize->DataCoilSizingFanCoolLoad;
TotCapTempModFac = state.dataSize->DataCoilSizingCapFT;
if (coilSelectionReportObj->isCompTypeCoil(this->compType)) {
coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
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);
}
} else if (this->curOASysNum > 0 && this->outsideAirSys(this->curOASysNum).AirLoopDOASNum > -1) {
DesVolFlow =
Expand Down Expand Up @@ -547,14 +547,14 @@ Real64 CoolingCapacitySizer::size(EnergyPlusData &state, Real64 _originalValue,

if (this->isCoilReportObject && this->curSysNum <= DataHVACGlobals::NumPrimaryAirSys) {
if (CoilInTemp > -999.0) { // set inlet air properties used during capacity sizing if available, allow for negative winter temps
coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
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->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
}
if (CoilOutTemp > -999.0) { // set outlet air properties used during capacity sizing if available
coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
}
coilSelectionReportObj->setCoilCoolingCapacity(state,
state.dataRptCoilSelection->coilSelectionReportObj->setCoilCoolingCapacity(state,
this->compName,
this->compType,
this->autoSizedValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
// POSSIBILITY OF SUCH DAMAGE.

#include <EnergyPlus/Autosizing/CoolingWaterDesAirInletHumRatSizing.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>

namespace EnergyPlus {

Expand Down Expand Up @@ -107,7 +108,7 @@ Real64 CoolingWaterDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _o
if (this->isEpJSON) this->sizingString = "design_inlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Real64 CoolingWaterDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _ori
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
if (this->curSysNum <= this->numPrimaryAirSys) {
coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
}
}
return this->autoSizedValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Real64 CoolingWaterDesAirOutletHumRatSizer::size(EnergyPlusData &state, Real64 _
if (this->isEpJSON) this->sizingString = "design_outlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Real64 CoolingWaterDesAirOutletTempSizer::size(EnergyPlusData &state, Real64 _or
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, this->autoSizedValue);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
// POSSIBILITY OF SUCH DAMAGE.

#include <EnergyPlus/Autosizing/CoolingWaterDesWaterInletTempSizing.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>

namespace EnergyPlus {

Expand All @@ -68,7 +69,7 @@ Real64 CoolingWaterDesWaterInletTempSizer::size(EnergyPlusData &state, Real64 _o
if (this->isEpJSON) this->sizingString = "design_inlet_water_temperature [C]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down
12 changes: 6 additions & 6 deletions src/EnergyPlus/Autosizing/CoolingWaterflowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ Real64 CoolingWaterflowSizer::size(EnergyPlusData &state, Real64 _originalValue,
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
coilSelectionReportObj->setCoilWaterFlowPltSizNum(
state.dataRptCoilSelection->coilSelectionReportObj->setCoilWaterFlowPltSizNum(
state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized, this->dataPltSizCoolNum, this->dataWaterLoopNum);
coilSelectionReportObj->setCoilWaterDeltaT(state, this->compName, this->compType, CoilDesWaterDeltaT);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilWaterDeltaT(state, this->compName, this->compType, CoilDesWaterDeltaT);
if (this->dataDesInletWaterTemp > 0.0) {
coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, this->dataDesInletWaterTemp);
coilSelectionReportObj->setCoilLvgWaterTemp(state, this->compName, this->compType, this->dataDesInletWaterTemp + CoilDesWaterDeltaT);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, this->dataDesInletWaterTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgWaterTemp(state, this->compName, this->compType, this->dataDesInletWaterTemp + CoilDesWaterDeltaT);
} else {
coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, DataGlobalConstants::CWInitConvTemp);
coilSelectionReportObj->setCoilLvgWaterTemp(state, this->compName, this->compType, DataGlobalConstants::CWInitConvTemp + CoilDesWaterDeltaT);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntWaterTemp(state, this->compName, this->compType, DataGlobalConstants::CWInitConvTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgWaterTemp(state, this->compName, this->compType, DataGlobalConstants::CWInitConvTemp + CoilDesWaterDeltaT);
}
}
return this->autoSizedValue;
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/Autosizing/HeatingAirFlowSizing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Real64 HeatingAirFlowSizer::size(EnergyPlusData &state, Real64 _originalValue, b

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

if (this->isCoilReportObject && this->curSysNum <= DataHVACGlobals::NumPrimaryAirSys) {
if (CoilInTemp > -999.0) { // set inlet air properties used during capacity sizing if available, allow for negative winter temps
coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, CoilInTemp, this->curSysNum, this->curZoneEqNum);
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->setCoilEntAirHumRat(state, this->compName, this->compType, CoilInHumRat);
}
if (CoilOutTemp > -999.0) { // set outlet air properties used during capacity sizing if available
coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirTemp(state, this->compName, this->compType, CoilOutTemp);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilLvgAirHumRat(state, this->compName, this->compType, CoilOutHumRat);
}
coilSelectionReportObj->setCoilHeatingCapacity(state,
state.dataRptCoilSelection->coilSelectionReportObj->setCoilHeatingCapacity(state,
this->compName,
this->compType,
this->autoSizedValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Real64 HeatingWaterDesAirInletHumRatSizer::size(EnergyPlusData &state, Real64 _o
if (this->isEpJSON) this->sizingString = "design_inlet_air_humidity_ratio [kgWater/kgDryAir]";
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
if (this->isCoilReportObject) state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirHumRat(state, this->compName, this->compType, this->autoSizedValue);
return this->autoSizedValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ Real64 HeatingWaterDesAirInletTempSizer::size(EnergyPlusData &state, Real64 _ori
// report not written for OA coils and needs to be corrected
if (this->curSysNum <= this->numPrimaryAirSys) {
if (this->isCoilReportObject)
coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilEntAirTemp(state, this->compName, this->compType, this->autoSizedValue, this->curSysNum, this->curZoneEqNum);
}
return this->autoSizedValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho;
coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
} else if ((this->termUnitPIU || this->termUnitIU) && (this->curTermUnitSizingNum > 0)) {
Real64 Cp = FluidProperties::GetSpecificHeatGlycol(state,
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidName,
Expand All @@ -107,7 +107,7 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64
state.dataPlnt->PlantLoop(this->dataWaterLoopNum).FluidIndex,
this->callingRoutine);
this->autoSizedValue = this->dataWaterFlowUsedForSizing * this->dataWaterCoilSizHeatDeltaT * Cp * rho;
coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
} else {
if (this->zoneEqSizing(this->curZoneEqNum).SystemAirFlow) {
DesMassFlow = this->zoneEqSizing(this->curZoneEqNum).AirVolFlow * state.dataEnvrn->StdRhoAir;
Expand Down Expand Up @@ -187,7 +187,7 @@ Real64 HeatingWaterDesCoilLoadUsedForUASizer::size(EnergyPlusData &state, Real64
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject && this->curSysNum <= this->numPrimaryAirSys) {
coilSelectionReportObj->setCoilHeatingCapacity(state,
state.dataRptCoilSelection->coilSelectionReportObj->setCoilHeatingCapacity(state,
this->compName,
this->compType,
this->autoSizedValue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
// POSSIBILITY OF SUCH DAMAGE.

#include <EnergyPlus/Autosizing/HeatingWaterDesCoilWaterVolFlowUsedForUASizing.hh>
#include <EnergyPlus/Data/EnergyPlusData.hh>

namespace EnergyPlus {

Expand Down Expand Up @@ -80,10 +81,10 @@ Real64 HeatingWaterDesCoilWaterVolFlowUsedForUASizer::size(EnergyPlusData &state
}
this->selectSizerOutput(state, errorsFound);
if (this->isCoilReportObject) {
coilSelectionReportObj->setCoilWaterFlowPltSizNum(
state.dataRptCoilSelection->coilSelectionReportObj->setCoilWaterFlowPltSizNum(
state, this->compName, this->compType, this->autoSizedValue, this->wasAutoSized, this->dataPltSizHeatNum, this->dataWaterLoopNum);
if (this->termUnitSingDuct || this->zoneEqFanCoil || ((this->termUnitPIU || this->termUnitIU) && this->curTermUnitSizingNum > 0)) {
coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
state.dataRptCoilSelection->coilSelectionReportObj->setCoilReheatMultiplier(state, this->compName, this->compType, 1.0);
}
}
return this->autoSizedValue;
Expand Down
Loading

3 comments on commit 23ee3fd

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2362 of 2362 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1618 of 1618 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (726 of 727 tests passed, 0 test warnings)

Failures:\n

integration Test Summary

  • Passed: 726
  • Timeout: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.