Skip to content

Commit

Permalink
Merge pull request #8565 from NREL/8564_GetLowTempRadiantSystem
Browse files Browse the repository at this point in the history
#8564 #8563 - GetLowTempRadiantSystem fails when you have more a LowTempRadVarFlow AND at least one other type + Idd issue
  • Loading branch information
Myoldmopar authored Feb 26, 2021
2 parents e003a91 + a87a7d0 commit ad0249b
Show file tree
Hide file tree
Showing 3 changed files with 232 additions and 24 deletions.
34 changes: 16 additions & 18 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ SurfaceConvectionAlgorithm:Inside,
\note for ceiling diffuser configuration with simple natural convection limit
\note AdaptiveConvectionAlgorithm = dynamic selection of convection models based on conditions
\note ASTMC1340 = mixed convection correlations based on heat flow direction,
\note surface tilt angle, surface characteristic length, and air speed past the surface.
\note surface tilt angle, surface characteristic length, and air speed past the surface.

SurfaceConvectionAlgorithm:Outside,
\memo Default outside surface heat transfer convection algorithm to be used for all zones
Expand Down Expand Up @@ -791,29 +791,29 @@ ZoneAirContaminantBalance,
\object-list ScheduleNames

ZoneAirMassFlowConservation,
\memo Enforces the zone air mass flow balance by either adjusting zone mixing object flow only,
\memo adjusting zone total return flow only, zone mixing and the zone total return flows,
\memo or adjusting the zone total return and zone mixing object flows. Zone infiltration flow air
\memo Enforces the zone air mass flow balance by either adjusting zone mixing object flow only,
\memo adjusting zone total return flow only, zone mixing and the zone total return flows,
\memo or adjusting the zone total return and zone mixing object flows. Zone infiltration flow air
\memo flow is increased or decreased depending user selection in the infiltration treatment method.
\memo If either of zone mixing or zone return flow adjusting methods or infiltration is active,
\memo then the zone air mass flow balance calculation will attempt to enforce conservation of
\memo If either of zone mixing or zone return flow adjusting methods or infiltration is active,
\memo then the zone air mass flow balance calculation will attempt to enforce conservation of
\memo mass for each zone. If flow balancing method is "None" and infiltration is "None", then the
\memo zone air mass flow calculation defaults to assume self-balanced simple flow mixing and
\memo zone air mass flow calculation defaults to assume self-balanced simple flow mixing and
\memo infiltration objects.
\unique-object
\min-fields 3
A1, \field Adjust Zone Mixing and Return For Air Mass Flow Balance
\note If "AdjustMixingOnly", zone mixing object flow rates are adjusted to balance the zone air mass
\note flow and zone infiltration air flow may be increased or decreased if required in order to balance
\note the zone air mass flow. If "AdjustReturnOnly", zone total return flow rate is adjusted to balance
\note the zone air mass flow and zone infiltration air flow may be increased or decreased if required
\note in order to balance the zone air mass flow. If "AdjustMixingThenReturn", first the zone mixing
\note objects flow rates are adjusted to balance the zone air flow, second zone total return flow rate
\note the zone air mass flow. If "AdjustReturnOnly", zone total return flow rate is adjusted to balance
\note the zone air mass flow and zone infiltration air flow may be increased or decreased if required
\note in order to balance the zone air mass flow. If "AdjustMixingThenReturn", first the zone mixing
\note objects flow rates are adjusted to balance the zone air flow, second zone total return flow rate
\note is adjusted and zone infiltration air flow may be increased or decreased if required in order to
\note balance the zone air mass flow. If "AdjustReturnThenMixing", first zone total return flow rate is
\note adjusted to balance the zone air flow, second the zone mixing object flow rates are adjusted and
\note infiltration air flow may be increased or decreased if required in order to balance the zone
\note air mass flow.
\note balance the zone air mass flow. If "AdjustReturnThenMixing", first zone total return flow rate is
\note adjusted to balance the zone air flow, second the zone mixing object flow rates are adjusted and
\note infiltration air flow may be increased or decreased if required in order to balance the zone
\note air mass flow.
\type choice
\key AdjustMixingOnly
\key AdjustReturnOnly
Expand Down Expand Up @@ -44351,9 +44351,7 @@ ZoneHVAC:LowTemperatureRadiant:ConstantFlow:Design,
\min-fields 11
A1 , \field Name
\required-field
\reference-class-name validBranchEquipmentTypes
\reference validBranchEquipmentNames
\reference ZoneEquipmentNames
\reference RadiantDesignObject
A2 , \field Fluid to Radiant Surface Heat Transfer Model
\note This parameter identifies how the heat transfer between
\note fluid being circulated through the radiant system and
Expand Down
9 changes: 3 additions & 6 deletions src/EnergyPlus/LowTempRadiantSystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,17 +491,18 @@ namespace LowTempRadiantSystem {

ElecRadSys.allocate(NumOfElecLowTempRadSys);
ElecRadSysNumericFields.allocate(NumOfElecLowTempRadSys);

HydronicRadiantSysNumericFields.allocate(NumOfHydrLowTempRadSys);
HydronicRadiantSysDesign.allocate(NumOfHydrLowTempRadSysDes);
CflowRadiantSysDesign.allocate(NumOfCFloLowTempRadSysDes);
VarFlowRadDesignNames.allocate(NumOfHydrLowTempRadSysDes);

CflowRadiantSysDesign.allocate(NumOfCFloLowTempRadSysDes);
CFlowRadDesignNames.allocate(NumOfCFloLowTempRadSysDes);

// make sure data is gotten for surface lists
GetNumberOfSurfaceLists(state);

// Obtain all of the design data related to hydronic low temperature radiant systems...
BaseNum = 0;
CurrentModuleObject = "ZoneHVAC:LowTemperatureRadiant:VariableFlow:Design";
for (Item = 1; Item <= NumOfHydrLowTempRadSysDes; ++Item) {

Expand All @@ -525,7 +526,6 @@ namespace LowTempRadiantSystem {
HydronicRadiantSysDesign(Item).FieldNames = cNumericFields;
GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound);

++BaseNum;
auto &thisRadSysDesign(HydronicRadiantSysDesign(Item));

// General user input data
Expand Down Expand Up @@ -896,7 +896,6 @@ namespace LowTempRadiantSystem {
}

// Obtain all of the design data related to Constant flow low temperature radiant systems...
BaseNum = 0;
CurrentModuleObject = "ZoneHVAC:LowTemperatureRadiant:ConstantFlow:Design";
for (Item = 1; Item <= NumOfCFloLowTempRadSysDes; ++Item) {

Expand All @@ -920,7 +919,6 @@ namespace LowTempRadiantSystem {
CflowRadiantSysDesign(Item).FieldNames = cNumericFields;
GlobalNames::VerifyUniqueInterObjectName(state, LowTempRadUniqueNames, Alphas(1), CurrentModuleObject, cAlphaFields(1), ErrorsFound);

++BaseNum;
auto &thisRadSysDesign(CflowRadiantSysDesign(Item));

// General user input data
Expand Down Expand Up @@ -966,7 +964,6 @@ namespace LowTempRadiantSystem {
}

// Obtain all of the user data related to constant flow (hydronic) low temperature radiant systems...
BaseNum = 0;
CurrentModuleObject = "ZoneHVAC:LowTemperatureRadiant:ConstantFlow";
for (Item = 1; Item <= NumOfCFloLowTempRadSys; ++Item) {

Expand Down
213 changes: 213 additions & 0 deletions tst/EnergyPlus/unit/LowTempRadiantSystem.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3563,3 +3563,216 @@ TEST_F(LowTempRadiantSystemTest, calculateUFromISOStandardTest)
EXPECT_NEAR(expectedResult, actualResult, allowedDifference);

}



TEST_F(LowTempRadiantSystemTest, GetLowTempRadiantSystem_MultipleTypes)
{
// #8564 - GetLowTempRadiantSystem fails when you have more a LowTempRadVarFlow AND at least one other type
std::string const idf_objects = delimited_string({

"ZoneHVAC:LowTemperatureRadiant:VariableFlow,",
" West Zone Radiant Floor, !- Name",
" West Zone Radiant Floor Design, !- Design Object",
" RadiantSysAvailSched, !- Availability Schedule Name",
" West Zone, !- Zone Name",
" West Zone Surface Group, !- Surface Name or Radiant Surface Group Name",
" Autosize, !- Hydronic Tubing Length {m}",
" Autosize, !- Heating Design Capacity {W}",
" Autosize, !- Maximum Hot Water Flow {m3/s}",
" Node 276, !- Heating Water Inlet Node Name",
" Node 277, !- Heating Water Outlet Node Name",
" Autosize, !- Cooling Design Capacity {W}",
" Autosize, !- Maximum Cold Water Flow {m3/s}",
" Node 278, !- Cooling Water Inlet Node Name",
" Node 279, !- Cooling Water Outlet Node Name",
" OnePerSurface, !- Number of Circuits",
" 106.7; !- Circuit Length {m}",

"ZoneHVAC:LowTemperatureRadiant:VariableFlow:Design,",
" West Zone Radiant Floor Design, !- Name",
" ConvectionOnly, !- Fluid to Radiant Surface Heat Transfer Model",
" 0.013, !- Hydronic Tubing Inside Diameter {m}",
" 0.016, !- Hydronic Tubing Outside Diameter {m}",
" 0.35, !- Hydronic Tubing Conductivity {W/m-K}",
" MeanAirTemperature, !- Temperature Control Type",
" HalfFlowPower, !- Setpoint Control Type",
" HeatingDesignCapacity, !- Heating Design Capacity Method",
" 0, !- Heating Design Capacity Per Floor Area {W/m2}",
" 1, !- Fraction of Autosized Heating Design Capacity",
" 0.5, !- Heating Control Throttling Range {deltaC}",
" Radiant Heating Setpoints, !- Heating Control Temperature Schedule Name",
" CoolingDesignCapacity, !- Cooling Design Capacity Method",
" 0, !- Cooling Design Capacity Per Floor Area {W/m2}",
" 1, !- Fraction of Autosized Cooling Design Capacity",
" 0.5, !- Cooling Control Throttling Range {deltaC}",
" Radiant Cooling Setpoints, !- Cooling Control Temperature Schedule Name",
" SimpleOff, !- Condensation Control Type",
" 1; !- Condensation Control Dewpoint Offset {C}",


"ZoneHVAC:LowTemperatureRadiant:ConstantFlow,",
" South Zone LowTempRad, !- Name",
" South Zone LowTempRad Design, !- Design Object",
" RadiantSysAvailSched, !- Availability Schedule Name",
" South Zone, !- Zone Name",
" South Zone Surface Group, !- Surface Name or Radiant Surface Group Name",
" Autosize, !- Hydronic Tubing Length {m}",
" Autosize, !- Rated Flow Rate {m3/s}",
" , !- Pump Flow Rate Schedule Name",
" 179352, !- Rated Pump Head {Pa}",
" , !- Rated Power Consumption {W}",
" , !- Heating Water Inlet Node Name",
" , !- Heating Water Outlet Node Name",
" Radiant Heating Setpoints, !- Heating High Water Temperature Schedule Name", // I'm not testing schedules...
" Radiant Heating Setpoints, !- Heating Low Water Temperature Schedule Name",
" Radiant Heating Setpoints, !- Heating High Control Temperature Schedule Name",
" Radiant Heating Setpoints, !- Heating Low Control Temperature Schedule Name",
" , !- Cooling Water Inlet Node Name",
" , !- Cooling Water Outlet Node Name",
" Radiant Cooling Setpoints, !- Cooling High Water Temperature Schedule Name",
" Radiant Cooling Setpoints, !- Cooling Low Water Temperature Schedule Name",
" Radiant Cooling Setpoints, !- Cooling High Control Temperature Schedule Name",
" Radiant Cooling Setpoints, !- Cooling Low Control Temperature Schedule Name",
" OnePerSurface, !- Number of Circuits",
" 106.7; !- Circuit Length {m}",

"ZoneHVAC:LowTemperatureRadiant:ConstantFlow:Design,",
" South Zone LowTempRad Design, !- Name",
" ConvectionOnly, !- Fluid to Radiant Surface Heat Transfer Model",
" 0.013, !- Hydronic Tubing Inside Diameter {m}",
" 0.016, !- Hydronic Tubing Outside Diameter {m}",
" 0.35, !- Hydronic Tubing Conductivity {W/m-K}",
" MeanAirTemperature, !- Temperature Control Type",
" 0.8, !- Running Mean Outdoor Dry-Bulb Temperature Weighting Factor",
" 0.9, !- Motor Efficiency",
" 0, !- Fraction of Motor Inefficiencies to Fluid Stream",
" SimpleOff, !- Condensation Control Type",
" 1; !- Condensation Control Dewpoint Offset {C}",


" ZoneHVAC:LowTemperatureRadiant:Electric,",
" East Zone Radiant Floor, !- Name",
" RadiantSysAvailSched, !- Availability Schedule Name",
" East Zone, !- Zone Name",
" East Zone Surface Group, !- Surface Name or Radiant Surface Group Name",
" heatingdesigncapacity, !- Heating Design Capacity Method",
" 100, !- Heating Design Capacity{ W }",
" , !- Heating Design Capacity Per Floor Area{ W/m2 }",
" 1.0, !- Fraction of Autosized Heating Design Capacity",
" MeanAirTemperature, !- Temperature Control Type",
" HalfFlowPower, !- Setpoint Type",
" 2.0, !- Heating Throttling Range {deltaC}",
" Radiant Heating Setpoints; !- Heating Control Temperature Schedule Name",

" ZoneHVAC:LowTemperatureRadiant:SurfaceGroup,",
" East Zone Surface Group, !- Name",
" Zn002:Flr001, !- Surface 1 Name",
" 0.5, !- Flow Fraction for Surface 1",
" Zn002:Flr002, !- Surface 2 Name",
" 0.5; !- Flow Fraction for Surface 2",

" ZoneHVAC:LowTemperatureRadiant:SurfaceGroup,",
" West Zone Surface Group, !- Name",
" Zn001:Flr001, !- Surface 1 Name",
" 0.5, !- Flow Fraction for Surface 1",
" Zn001:Flr002, !- Surface 2 Name",
" 0.5; !- Flow Fraction for Surface 2",

" ZoneHVAC:LowTemperatureRadiant:SurfaceGroup,",
" South Zone Surface Group, !- Name",
" Zn003:Flr001, !- Surface 1 Name",
" 0.5, !- Flow Fraction for Surface 1",
" Zn003:Flr002, !- Surface 2 Name",
" 0.5; !- Flow Fraction for Surface 2",

" Schedule:Compact,",
" RADIANTSYSAVAILSCHED, !- Name",
" FRACTION, !- Schedule Type Limits Name",
" Through: 12/31, !- Field 1",
" For: Alldays, !- Field 2",
" Until: 24:00,1.00; !- Field 3",

" Schedule:Compact,",
" Radiant Heating Setpoints, !- Name",
" TEMPERATURE, !- Schedule Type Limits Name",
" Through: 12/31, !- Field 1",
" For: Alldays, !- Field 2",
" Until: 24:00,20.0; !- Field 3",

" Schedule:Compact,",
" Radiant Cooling Setpoints, !- Name",
" TEMPERATURE, !- Schedule Type Limits Name",
" Through: 12/31, !- Field 1",
" For: Alldays, !- Field 2",
" Until: 24:00,15.0; !- Field 3",

});
ASSERT_TRUE(process_idf(idf_objects));

Zone.allocate(3);
Zone(1).Name = "WEST ZONE";
Zone(2).Name = "EAST ZONE";
Zone(3).Name = "SOUTH ZONE";

DataSurfaces::TotSurfaces = 6;
Surface.allocate(DataSurfaces::TotSurfaces);
Surface(1).Name = "ZN001:FLR001";
Surface(1).ZoneName = "WEST ZONE";
Surface(1).Zone = 1;
Surface(1).Construction = 1;
Surface(2).Name = "ZN001:FLR002";
Surface(2).ZoneName = "WEST ZONE";
Surface(2).Zone = 1;
Surface(2).Construction = 1;
Surface(3).Name = "ZN002:FLR001";
Surface(3).ZoneName = "EAST ZONE";
Surface(3).Zone = 2;
Surface(3).Construction = 1;
Surface(4).Name = "ZN002:FLR002";
Surface(4).ZoneName = "EAST ZONE";
Surface(4).Zone = 2;
Surface(4).Construction = 1;
Surface(5).Name = "ZN003:FLR001";
Surface(5).ZoneName = "SOUTH ZONE";
Surface(5).Zone = 3;
Surface(5).Construction = 1;
Surface(6).Name = "ZN003:FLR002";
Surface(6).ZoneName = "SOUTH ZONE";
Surface(6).Zone = 3;
Surface(6).Construction = 1;
state->dataConstruction->Construct.allocate(1);
state->dataConstruction->Construct(1).SourceSinkPresent = true;

GetLowTempRadiantSystem(*state);

EXPECT_EQ(3, LowTempRadiantSystem::TotalNumOfRadSystems);

EXPECT_EQ(1, LowTempRadiantSystem::NumOfHydrLowTempRadSys);
EXPECT_EQ(1, LowTempRadiantSystem::NumOfHydrLowTempRadSysDes);

EXPECT_EQ(1, LowTempRadiantSystem::NumOfCFloLowTempRadSys);
EXPECT_EQ(1, LowTempRadiantSystem::NumOfCFloLowTempRadSysDes);

EXPECT_EQ(1, LowTempRadiantSystem::NumOfElecLowTempRadSys);

EXPECT_EQ("WEST ZONE RADIANT FLOOR", RadSysTypes(1).Name);
EXPECT_EQ(LowTempRadiantSystem::SystemType::HydronicSystem, RadSysTypes(1).SystemType);
EXPECT_EQ(LowTempRadiantSystem::HydrRadSys(1).ZoneName, "WEST ZONE");
EXPECT_EQ(LowTempRadiantSystem::HydrRadSys(1).SurfListName, "WEST ZONE SURFACE GROUP");
EXPECT_EQ("WEST ZONE RADIANT FLOOR DESIGN", LowTempRadiantSystem::HydrRadSys(1).designObjectName);
EXPECT_EQ(1, LowTempRadiantSystem::HydrRadSys(1).DesignObjectPtr);

EXPECT_EQ("SOUTH ZONE LOWTEMPRAD", RadSysTypes(2).Name);
EXPECT_EQ(LowTempRadiantSystem::SystemType::ConstantFlowSystem, RadSysTypes(2).SystemType);
EXPECT_EQ(LowTempRadiantSystem::CFloRadSys(1).ZoneName, "SOUTH ZONE");
EXPECT_EQ(LowTempRadiantSystem::CFloRadSys(1).SurfListName, "SOUTH ZONE SURFACE GROUP");
EXPECT_EQ("SOUTH ZONE LOWTEMPRAD DESIGN", LowTempRadiantSystem::CFloRadSys(1).designObjectName);
EXPECT_EQ(1, LowTempRadiantSystem::CFloRadSys(1).DesignObjectPtr);

EXPECT_EQ("EAST ZONE RADIANT FLOOR", RadSysTypes(3).Name);
EXPECT_EQ(LowTempRadiantSystem::SystemType::ElectricSystem, RadSysTypes(3).SystemType);
EXPECT_EQ(LowTempRadiantSystem::ElecRadSys(1).ZoneName, "EAST ZONE");
EXPECT_EQ(LowTempRadiantSystem::ElecRadSys(1).SurfListName, "EAST ZONE SURFACE GROUP");

}

10 comments on commit ad0249b

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

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

Build Badge Test Badge

@nrel-bot-3
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-MacOS-10.15-clang-11.0.0: OK (2332 of 2332 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 (1608 of 1608 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.

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

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

Build Badge Test Badge Coverage Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

177124326_Issue8567 (Myoldmopar) - x86_64-MacOS-10.15-clang-11.0.0: OK (3054 of 3054 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.

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

177124326_Issue8567 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3093 of 3094 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 741
  • Failed: 1

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.

177124326_Issue8567 (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1608 of 1608 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.

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

Build Badge Test Badge Coverage Badge

Please sign in to comment.