Skip to content

Commit

Permalink
Space IV.5 - Extend zone equip enums
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Aug 30, 2024
1 parent d6f0d27 commit e87c81e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 32 deletions.
4 changes: 3 additions & 1 deletion src/EnergyPlus/ConvectionCoefficients.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4054,7 +4054,9 @@ void DynamicIntConvSurfaceClassification(EnergyPlusData &state, int const SurfNu
}
} break;
case DataZoneEquipment::ZoneEquipType::VentilatedSlab:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiant: {
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantConstFlow:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantVarFlow:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantElectric: {
if (zoneEquipConfig.InFloorActiveElement) {
for (int spaceNumLoop : zone.spaceIndexes) {
auto const &thisSpace = state.dataHeatBal->space(spaceNumLoop);
Expand Down
33 changes: 11 additions & 22 deletions src/EnergyPlus/DataZoneEquipment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,13 @@ constexpr std::array<std::string_view, static_cast<int>(ZoneEquipType::Num)> zon
"ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:WATER", // BaseboardWater
"ZONEHVAC:BASEBOARD:RADIANTCONVECTIVE:ELECTRIC", // BaseboardElectric
"ZONEHVAC:HIGHTEMPERATURERADIANT", // HighTempRadiant
"ZONEHVAC:LOWTEMPERATURERADIANT:VARIABLEFLOW", // LowTempRadiant
"ZONEHVAC:LOWTEMPERATURERADIANT:CONSTANTFLOW", // LowTempRadiantConstFlow
"ZONEHVAC:LOWTEMPERATURERADIANT:VARIABLEFLOW", // LowTempRadiantVarFlow
"ZONEHVAC:LOWTEMPERATURERADIANT:ELECTRIC", // LowTempRadiantElectric
"FAN:ZONEEXHAUST", // ExhaustFan
"HEATEXCHANGER:AIRTOAIR:FLATPLATE", // HeatExchanger
"WATERHEATER:HEATPUMP:PUMPEDCONDENSER", // HeatPumpWaterHeater
"WATERHEATER:HEATPUMP:PUMPEDCONDENSER", // HeatPumpWaterHeaterPumpedCondenser
"WATERHEATER:HEATPUMP:WRAPPEDCONDENSER", // HeatPumpWaterHeaterWrappedCondenser
"ZONEHVAC:DEHUMIDIFIER:DX", // DXDehumidifier
"ZONEHVAC:REFRIGERATIONCHILLERSET", // RefrigerationAirChillerSet
"ZONEHVAC:FORCEDAIR:USERDEFINED", // UserDefinedVACForcedAir
Expand Down Expand Up @@ -984,16 +987,9 @@ void processZoneEquipmentInput(EnergyPlusData &state,
}

if (thisZoneEquipList.EquipType(ZoneEquipTypeNum) == ZoneEquipType::Invalid) {
if (thisZoneEquipList.EquipTypeName(ZoneEquipTypeNum) == "ZONEHVAC:LOWTEMPERATURERADIANT:CONSTANTFLOW" ||
thisZoneEquipList.EquipTypeName(ZoneEquipTypeNum) == "ZONEHVAC:LOWTEMPERATURERADIANT:ELECTRIC") {
thisZoneEquipList.EquipType(ZoneEquipTypeNum) = ZoneEquipType::LowTemperatureRadiant;
} else if (thisZoneEquipList.EquipTypeName(ZoneEquipTypeNum) == "WATERHEATER:HEATPUMP:WRAPPEDCONDENSER") {
thisZoneEquipList.EquipType(ZoneEquipTypeNum) = DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeater;
} else {
ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name));
ShowContinueError(state, format("..Invalid Equipment Type = {}", thisZoneEquipList.EquipType(ZoneEquipTypeNum)));
state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true;
}
ShowSevereError(state, format("{}{} = {}", RoutineName, CurrentModuleObject, thisZoneEquipList.Name));
ShowContinueError(state, format("..Invalid Equipment Type = {}", thisZoneEquipList.EquipType(ZoneEquipTypeNum)));
state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true;
}
}
} // End parsing all extensible Zone Equipment info
Expand Down Expand Up @@ -1216,17 +1212,10 @@ void processZoneEquipSplitterInput(EnergyPlusData &state,
auto &ip = state.dataInputProcessing->inputProcessor;
std::string const zeqTypeName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_equipment_object_type");
thisZeqSplitter.zoneEquipType = DataZoneEquipment::ZoneEquipType(getEnumValue(zoneEquipTypeNamesUC, zeqTypeName));
// SpaceHVAC TODO: Copied this block from processZoneEquipmentInput section for ZoneHVAC:EquipmentList - seems this could be simplified
if (thisZeqSplitter.zoneEquipType == ZoneEquipType::Invalid) {
if (zeqTypeName == "ZONEHVAC:LOWTEMPERATURERADIANT:CONSTANTFLOW" || zeqTypeName == "ZONEHVAC:LOWTEMPERATURERADIANT:ELECTRIC") {
thisZeqSplitter.zoneEquipType = ZoneEquipType::LowTemperatureRadiant;
} else if (zeqTypeName == "WATERHEATER:HEATPUMP:WRAPPEDCONDENSER") {
thisZeqSplitter.zoneEquipType = DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeater;
} else {
ShowSevereError(state, format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name));
ShowContinueError(state, format("..Invalid Equipment Type = {}", zeqTypeName));
state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true;
}
ShowSevereError(state, format("{}{} = {}", RoutineName, zeqSplitterModuleObject, thisZeqSplitter.Name));
ShowContinueError(state, format("..Invalid Equipment Type = {}", zeqTypeName));
state.dataZoneEquip->GetZoneEquipmentDataErrorsFound = true;
}

thisZeqSplitter.zoneEquipName = ip->getAlphaFieldValue(objectFields, objectSchemaProps, "zone_equipment_name");
Expand Down
7 changes: 5 additions & 2 deletions src/EnergyPlus/DataZoneEquipment.hh
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,13 @@ namespace DataZoneEquipment {
BaseboardWater,
BaseboardElectric,
HighTemperatureRadiant,
LowTemperatureRadiant,
LowTemperatureRadiantConstFlow,
LowTemperatureRadiantVarFlow,
LowTemperatureRadiantElectric,
ExhaustFan,
HeatExchanger,
HeatPumpWaterHeater,
HeatPumpWaterHeaterPumpedCondenser,
HeatPumpWaterHeaterWrappedCondenser,
DehumidifierDX,
RefrigerationChillerSet,
UserDefinedHVACForcedAir,
Expand Down
3 changes: 2 additions & 1 deletion src/EnergyPlus/RoomAirModelManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2837,7 +2837,8 @@ namespace RoomAir {

// SupplyNodeName = ""; // ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? May not use
} break;
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeater: { // WaterHeater : HeatPump
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeaterPumpedCondenser:
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeaterWrappedCondenser: { // WaterHeater : HeatPump
EquipIndex = WaterThermalTanks::getHeatPumpWaterHeaterIndex(state, EquipName);
if (EquipIndex == 0) return EquipFind;
ReturnNodeNum = state.dataWaterThermalTanks->HPWaterHeater(EquipIndex).HeatPumpAirInletNode;
Expand Down
7 changes: 5 additions & 2 deletions src/EnergyPlus/SystemReports.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4040,11 +4040,14 @@ void ReportVentilationLoads(EnergyPlusData &state)
case DataZoneEquipment::ZoneEquipType::BaseboardConvectiveElectric:
case DataZoneEquipment::ZoneEquipType::HighTemperatureRadiant:
// not sure how HeatExchanger:* could be used as zone equipment ?????
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiant:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantConstFlow:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantVarFlow:
case DataZoneEquipment::ZoneEquipType::LowTemperatureRadiantElectric:
case DataZoneEquipment::ZoneEquipType::ExhaustFan:
case DataZoneEquipment::ZoneEquipType::HeatExchanger:
// HPWaterHeater can be used as zone equipment
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeater:
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeaterPumpedCondenser:
case DataZoneEquipment::ZoneEquipType::HeatPumpWaterHeaterWrappedCondenser:
case DataZoneEquipment::ZoneEquipType::BaseboardWater:
case DataZoneEquipment::ZoneEquipType::DehumidifierDX:
case DataZoneEquipment::ZoneEquipType::BaseboardSteam:
Expand Down
9 changes: 5 additions & 4 deletions src/EnergyPlus/ZoneEquipmentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3787,9 +3787,9 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool
// via SumLatentHTRadSys... so setting LatOutputProvided = 0.0
} break;

case ZoneEquipType::LowTemperatureRadiant: { // 'ZoneHVAC:LowTemperatureRadiant:VariableFlow',
// 'ZoneHVAC:LowTemperatureRadiant:ConstantFlow'
// 'ZoneHVAC:LowTemperatureRadiant:Electric'
case ZoneEquipType::LowTemperatureRadiantConstFlow:
case ZoneEquipType::LowTemperatureRadiantVarFlow:
case ZoneEquipType::LowTemperatureRadiantElectric: {
LowTempRadiantSystem::SimLowTempRadiantSystem(state,
state.dataZoneEquipmentManager->PrioritySimOrder(EquipTypeNum).EquipName,
FirstHVACIteration,
Expand Down Expand Up @@ -3836,7 +3836,8 @@ void SimZoneEquipment(EnergyPlusData &state, bool const FirstHVACIteration, bool
zoneEquipList.EquipIndex(EquipPtr));
} break;

case ZoneEquipType::HeatPumpWaterHeater: { // 'WaterHeater:HeatPump:PumpedCondenser'
case ZoneEquipType::HeatPumpWaterHeaterPumpedCondenser:
case ZoneEquipType::HeatPumpWaterHeaterWrappedCondenser: {
WaterThermalTanks::SimHeatPumpWaterHeater(state,
state.dataZoneEquipmentManager->PrioritySimOrder(EquipTypeNum).EquipName,
FirstHVACIteration,
Expand Down

6 comments on commit e87c81e

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2874 of 2874 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2080 of 2080 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.

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3708 of 3709 tests passed, 1 test warnings)

Messages:\n

  • 2 tests had: EIO diffs.
  • 1 test had: Table big diffs.
  • 1 test had: Table small diffs.

Failures:\n

regression Test Summary

  • Passed: 812
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

SpacePart4Followup (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (797 of 797 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.