Skip to content

Commit

Permalink
Merge pull request #10721 from NREL/10677ConvectiveBBCrashForNonSizin…
Browse files Browse the repository at this point in the history
…gCase

Convective Baseboard Crashing in Sizing Routine When Autosizing is Not Requested
  • Loading branch information
Myoldmopar authored Sep 12, 2024
2 parents 1b9d24d + bf006c8 commit 22e9501
Show file tree
Hide file tree
Showing 6 changed files with 403 additions and 8 deletions.
22 changes: 17 additions & 5 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 @@ -636,7 +638,6 @@ namespace BaseboardRadiator {
state, cCMO_BBRadiator_Water, this->EquipID, "User-Specified Maximum Water Flow Rate [m3/s]", this->WaterVolFlowRateMax);
}
} else {
CheckZoneSizing(state, cCMO_BBRadiator_Water, this->EquipID);
std::string_view const CompType = cCMO_BBRadiator_Water;
std::string_view const CompName = this->EquipID;
state.dataSize->DataFracOfAutosizedHeatingCapacity = 1.0;
Expand All @@ -651,7 +652,6 @@ namespace BaseboardRadiator {

if (CapSizingMethod == DataSizing::HeatingDesignCapacity) {
if (this->ScaledHeatingCapacity == DataSizing::AutoSize) {
CheckZoneSizing(state, CompType, CompName);
zoneEqSizing.DesHeatingLoad = finalZoneSizing.NonAirSysDesHeatLoad;
} else {
zoneEqSizing.DesHeatingLoad = this->ScaledHeatingCapacity;
Expand All @@ -665,7 +665,6 @@ namespace BaseboardRadiator {
TempSize = zoneEqSizing.DesHeatingLoad;
state.dataSize->DataScalableCapSizingON = true;
} else if (CapSizingMethod == DataSizing::FractionOfAutosizedHeatingCapacity) {
CheckZoneSizing(state, CompType, CompName);
zoneEqSizing.HeatingCapacity = true;
state.dataSize->DataFracOfAutosizedHeatingCapacity = this->ScaledHeatingCapacity;
zoneEqSizing.DesHeatingLoad = finalZoneSizing.NonAirSysDesHeatLoad;
Expand Down Expand Up @@ -772,7 +771,6 @@ namespace BaseboardRadiator {
CapSizingMethod == DataSizing::FractionOfAutosizedHeatingCapacity) {
if (CapSizingMethod == DataSizing::HeatingDesignCapacity) {
if (this->ScaledHeatingCapacity == DataSizing::AutoSize) {
CheckZoneSizing(state, CompType, CompName);
zoneEqSizing.DesHeatingLoad = finalZoneSizing.NonAirSysDesHeatLoad;
} else {
zoneEqSizing.DesHeatingLoad = this->ScaledHeatingCapacity;
Expand All @@ -786,7 +784,6 @@ namespace BaseboardRadiator {
TempSize = zoneEqSizing.DesHeatingLoad;
state.dataSize->DataScalableCapSizingON = true;
} else if (CapSizingMethod == DataSizing::FractionOfAutosizedHeatingCapacity) {
CheckZoneSizing(state, CompType, CompName);
zoneEqSizing.HeatingCapacity = true;
state.dataSize->DataFracOfAutosizedHeatingCapacity = this->ScaledHeatingCapacity;
zoneEqSizing.DesHeatingLoad = finalZoneSizing.NonAirSysDesHeatLoad;
Expand Down Expand Up @@ -941,6 +938,21 @@ 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;
}
if (this->MySizeFlag) CheckZoneSizing(state, cCMO_BBRadiator_Water, this->EquipID);
}

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
112 changes: 111 additions & 1 deletion testfiles/HVACStandAloneERV_Economizer.idf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
!- =========== ALL OBJECTS IN CLASS: SIMULATIONCONTROL ===========

SimulationControl,
No, !- Do Zone Sizing Calculation
Yes, !- Do Zone Sizing Calculation
No, !- Do System Sizing Calculation
No, !- Do Plant Sizing Calculation
Yes, !- Run Simulation for Sizing Periods
Expand Down Expand Up @@ -1373,6 +1373,116 @@
0.0013, !- Maximum Water Flow Rate {m3/s}
0.001; !- Convergence Tolerance

!- =========== ALL OBJECTS IN CLASS: SIZING:ZONE AND DESIGNSPECIFICATION:OUTDOORAIR ===========

Sizing:Zone,
WEST ZONE, !- Zone or ZoneList Name
SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method
14., !- Zone Cooling Design Supply Air Temperature {C}
, !- Zone Cooling Design Supply Air Temperature Difference {deltaC}
SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method
50., !- Zone Heating Design Supply Air Temperature {C}
, !- Zone Heating Design Supply Air Temperature Difference {deltaC}
0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}
SZ DSOA Zone 1, !- Design Specification Outdoor Air Object Name
0.0, !- Zone Heating Sizing Factor
0.0, !- Zone Cooling Sizing Factor
DesignDayWithLimit, !- Cooling Design Air Flow Method
, !- Cooling Design Air Flow Rate {m3/s}
, !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2}
, !- Cooling Minimum Air Flow {m3/s}
, !- Cooling Minimum Air Flow Fraction
DesignDay, !- Heating Design Air Flow Method
, !- Heating Design Air Flow Rate {m3/s}
, !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2}
, !- Heating Maximum Air Flow {m3/s}
, !- Heating Maximum Air Flow Fraction
, !- Design Specification Zone Air Distribution Object Name
No, !- Account for Dedicated Outdoor Air System
NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy
autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C}
autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C}

DesignSpecification:OutdoorAir,
SZ DSOA Zone 1, !- Name
sum, !- Outdoor Air Method
0.00236, !- Outdoor Air Flow per Person {m3/s-person}
0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}
0.0; !- Outdoor Air Flow per Zone {m3/s}

Sizing:Zone,
EAST ZONE, !- Zone or ZoneList Name
SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method
14., !- Zone Cooling Design Supply Air Temperature {C}
, !- Zone Cooling Design Supply Air Temperature Difference {deltaC}
SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method
50., !- Zone Heating Design Supply Air Temperature {C}
, !- Zone Heating Design Supply Air Temperature Difference {deltaC}
0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}
SZ DSOA Zone 2, !- Design Specification Outdoor Air Object Name
0.0, !- Zone Heating Sizing Factor
0.0, !- Zone Cooling Sizing Factor
DesignDayWithLimit, !- Cooling Design Air Flow Method
, !- Cooling Design Air Flow Rate {m3/s}
, !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2}
, !- Cooling Minimum Air Flow {m3/s}
, !- Cooling Minimum Air Flow Fraction
DesignDay, !- Heating Design Air Flow Method
, !- Heating Design Air Flow Rate {m3/s}
, !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2}
, !- Heating Maximum Air Flow {m3/s}
, !- Heating Maximum Air Flow Fraction
, !- Design Specification Zone Air Distribution Object Name
No, !- Account for Dedicated Outdoor Air System
NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy
autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C}
autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C}

DesignSpecification:OutdoorAir,
SZ DSOA Zone 2, !- Name
sum, !- Outdoor Air Method
0.00236, !- Outdoor Air Flow per Person {m3/s-person}
0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}
0.0; !- Outdoor Air Flow per Zone {m3/s}

Sizing:Zone,
NORTH ZONE, !- Zone or ZoneList Name
SupplyAirTemperature, !- Zone Cooling Design Supply Air Temperature Input Method
14., !- Zone Cooling Design Supply Air Temperature {C}
, !- Zone Cooling Design Supply Air Temperature Difference {deltaC}
SupplyAirTemperature, !- Zone Heating Design Supply Air Temperature Input Method
50., !- Zone Heating Design Supply Air Temperature {C}
, !- Zone Heating Design Supply Air Temperature Difference {deltaC}
0.009, !- Zone Cooling Design Supply Air Humidity Ratio {kgWater/kgDryAir}
0.004, !- Zone Heating Design Supply Air Humidity Ratio {kgWater/kgDryAir}
SZ DSOA Zone 3, !- Design Specification Outdoor Air Object Name
0.0, !- Zone Heating Sizing Factor
0.0, !- Zone Cooling Sizing Factor
DesignDayWithLimit, !- Cooling Design Air Flow Method
, !- Cooling Design Air Flow Rate {m3/s}
, !- Cooling Minimum Air Flow per Zone Floor Area {m3/s-m2}
, !- Cooling Minimum Air Flow {m3/s}
, !- Cooling Minimum Air Flow Fraction
DesignDay, !- Heating Design Air Flow Method
, !- Heating Design Air Flow Rate {m3/s}
, !- Heating Maximum Air Flow per Zone Floor Area {m3/s-m2}
, !- Heating Maximum Air Flow {m3/s}
, !- Heating Maximum Air Flow Fraction
, !- Design Specification Zone Air Distribution Object Name
No, !- Account for Dedicated Outdoor Air System
NeutralSupplyAir, !- Dedicated Outdoor Air System Control Strategy
autosize, !- Dedicated Outdoor Air Low Setpoint Temperature for Design {C}
autosize; !- Dedicated Outdoor Air High Setpoint Temperature for Design {C}

DesignSpecification:OutdoorAir,
SZ DSOA Zone 3, !- Name
sum, !- Outdoor Air Method
0.00236, !- Outdoor Air Flow per Person {m3/s-person}
0.000305, !- Outdoor Air Flow per Zone Floor Area {m3/s-m2}
0.0; !- Outdoor Air Flow per Zone {m3/s}

!- =========== ALL OBJECTS IN CLASS: ZONEHVAC:EQUIPMENTLIST ===========

ZoneHVAC:EquipmentList,
Expand Down
Loading

4 comments on commit 22e9501

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2891 of 2891 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2913 of 2913 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-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2097 of 2097 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.