From 937345cd7457bdcb4d1fc58741cb57cfe9f52f12 Mon Sep 17 00:00:00 2001 From: Rick Strand Date: Fri, 30 Aug 2024 14:19:06 -0500 Subject: [PATCH] 10677 Fix of BB Crash This fix avoids the hard crash that is taking place in the defect IDF by not doing sizing when sizing is not required for the convective water baseboard unit. --- src/EnergyPlus/BaseboardRadiator.cc | 16 ++++++++++++++++ src/EnergyPlus/BaseboardRadiator.hh | 2 ++ 2 files changed, 18 insertions(+) diff --git a/src/EnergyPlus/BaseboardRadiator.cc b/src/EnergyPlus/BaseboardRadiator.cc index 62ee9c5446a..ff20a88ebaf 100644 --- a/src/EnergyPlus/BaseboardRadiator.cc +++ b/src/EnergyPlus/BaseboardRadiator.cc @@ -418,6 +418,8 @@ namespace BaseboardRadiator { thisBaseboard.ZonePtr = DataZoneEquipment::GetZoneEquipControlledZoneNum( state, DataZoneEquipment::ZoneEquipType::BaseboardConvectiveWater, thisBaseboard.EquipID); + + thisBaseboard.resetSizingFlagBasedOnInput(state); // set MySizeFlag to false if no autosizing is being done } if (ErrorsFound) { @@ -941,6 +943,20 @@ namespace BaseboardRadiator { } } + void BaseboardParams::resetSizingFlagBasedOnInput(EnergyPlusData &state) + { + // this->MySizeFlag defaults to true. Set to false if no sizing is requested. + // Condition 1: Is UA hardwired (not autosized)? + // Condition 2: Is max flow rate hardwired (not autosized)? + // Condition 3: Is EITHER capacity used and hardwired (not autosized) OR capacity per floor area used? + // If YES to all three, then this unit does not need to be autosized and the sizing flag needs to be set to false. + if ((this->UA != DataSizing::AutoSize) && (this->WaterVolFlowRateMax != DataSizing::AutoSize) && + (((this->HeatingCapMethod == DataSizing::HeatingDesignCapacity) && (this->ScaledHeatingCapacity != DataSizing::AutoSize)) || + (this->HeatingCapMethod == DataSizing::CapacityPerFloorArea))) { + this->MySizeFlag = false; + } + } + void SimHWConvective(EnergyPlusData &state, int &BaseboardNum, Real64 &LoadMet) { // SUBROUTINE INFORMATION: diff --git a/src/EnergyPlus/BaseboardRadiator.hh b/src/EnergyPlus/BaseboardRadiator.hh index a21a326e044..457fbd05687 100644 --- a/src/EnergyPlus/BaseboardRadiator.hh +++ b/src/EnergyPlus/BaseboardRadiator.hh @@ -107,6 +107,8 @@ namespace BaseboardRadiator { void InitBaseboard(EnergyPlusData &state, int baseboardNum); void SizeBaseboard(EnergyPlusData &state, int baseboardNum); + + void resetSizingFlagBasedOnInput(EnergyPlusData &state); }; void SimBaseboard(