Skip to content

Commit

Permalink
10677 Fix of BB Crash
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RKStrand committed Aug 30, 2024
1 parent a7fe8f7 commit 937345c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/EnergyPlus/BaseboardRadiator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/BaseboardRadiator.hh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ namespace BaseboardRadiator {
void InitBaseboard(EnergyPlusData &state, int baseboardNum);

void SizeBaseboard(EnergyPlusData &state, int baseboardNum);

void resetSizingFlagBasedOnInput(EnergyPlusData &state);
};

void SimBaseboard(
Expand Down

4 comments on commit 937345c

@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.

10677ConvectiveBBCrashForNonSizingCase (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3706 of 3706 tests passed, 0 test warnings)

Build Badge Test 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.

10677ConvectiveBBCrashForNonSizingCase (RKStrand) - Win64-Windows-10-VisualStudio-16: OK (2871 of 2871 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.

10677ConvectiveBBCrashForNonSizingCase (RKStrand) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2077 of 2077 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

10677ConvectiveBBCrashForNonSizingCase (RKStrand) - 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.