-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3905 - Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC #4253
Conversation
…ld for supply fan (if on OASys or AIrLoopHVAC -> not required)
…oopHVAC, take first zone.
…opHVACOUtdoorAirSystem
…onents (this was affecting AirLoopHVACUnitarySystem too... but wasn't caught
…(not breaking public API yet)
… AirLoopHVACOutdoorAIrSystem
…oorAirSystem() getters
… in a smart way (not sure if I succeeded... I find it readable but maybe it's just me)
…ystem including testing the SPM Mixed air (failling for now)
…e that has the fan.
@@ -26392,7 +26392,7 @@ OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, | |||
\object-list ScheduleNames | |||
\note Required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList. | |||
\note Also leave blank if terminal unit is used on main AirloopHVAC branch and terminal unit has no fan. | |||
A7 , \field Supply Air Fan placement | |||
A7 , \field Supply Air Fan Placement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did not have any getter/setter until now. I renamed to match other model API objects, and E+
A15; \field Controlling Zone or Thermostat Location | ||
\type object-list | ||
\object-list ThermalZoneNames | ||
\note Used only for AirloopHVAC equipment on a main branch and defines zone name where thermostat is located. | ||
\note Not required for zone equipment. Leave blank if terminal unit is used in AirLoopHVAC:OutdoorAirSystem:EquipmentList. | ||
\note Required when terminal unit is used on main AirloopHVAC branch and coils are not set point controlled. | ||
\note When terminal unit is used in air loop and is load controlled, this zone's thermostat will control operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New field
@@ -26403,7 +26403,6 @@ OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, | |||
\note This field is also ignored if VRF terminal unit is used on main AirloopHVAC branch | |||
\note and terminal unit has no fan. | |||
A8 , \field Supply Air Fan | |||
\required-field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this is not required anymore... I have not changed the public model API for now because I would had to break backward compatibility. @kbenne
} else if (auto comp = modelObject->optionalCast<ZoneHVACComponent>()) { | ||
modelObjects.insert(modelObjects.begin(), *comp); | ||
modelObject = comp->outletNode(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AirLoopHVACUnitarySystem also suffered from the same problem... It was not returned as part of AirLoopHVACOutdoorAirSystem_Impl::reliefComponents
/ AirLoopHVACOutdoorAirSystem_Impl::oaComponents
@@ -83,6 +84,8 @@ namespace model { | |||
|
|||
virtual unsigned outletPort() const override; | |||
|
|||
virtual bool addToNode(Node& node) override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Override to allow connecting to AirLoopHVAC/AirLoopHVACOutdoorAirSystem
if (boost::optional<Node> OANode = outdoorAirSystem.outboardOANode()) { | ||
ZoneHVACTerminalUnitVariableRefrigerantFlow testObject(m); | ||
|
||
EXPECT_TRUE(testObject.addToNode(OANode.get())); | ||
EXPECT_EQ(3, airLoop.supplyComponents().size()); | ||
EXPECT_EQ(3, outdoorAirSystem.oaComponents().size()); | ||
EXPECT_TRUE(testObject.airLoopHVACOutdoorAirSystem()); | ||
} | ||
|
||
if (boost::optional<Node> reliefNode = outdoorAirSystem.outboardReliefNode()) { | ||
ZoneHVACTerminalUnitVariableRefrigerantFlow testObject(m); | ||
EXPECT_TRUE(testObject.addToNode(reliefNode.get())); | ||
EXPECT_EQ(3, airLoop.supplyComponents().size()); | ||
EXPECT_EQ(3, outdoorAirSystem.reliefComponents().size()); | ||
EXPECT_TRUE(testObject.airLoopHVACOutdoorAirSystem()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test on AirLoopHVACOutdoorAirSystem: both OA intake and relief
} | ||
} | ||
|
||
TEST_F(ModelFixture, ZoneHVACTerminalUnitVariableRefrigerantFlow_controllingZoneorThermostatLocation) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test this field
EXPECT_FALSE(testObject.controllingZoneorThermostatLocation()); | ||
} | ||
|
||
TEST_F(ModelFixture, ZoneHVACTerminalUnitVariableRefrigerantFlow_SupplyAirFanPlacement) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the other new one, including checking that it's correctly defaulted in both Ctors to "DrawThrough" (got bit by it in Reg test originally)
@@ -235,6 +256,58 @@ TEST_F(EnergyPlusFixture, ForwardTranslatorZoneHVACTerminalUnitVariableRefrigera | |||
|
|||
EXPECT_EQ(idf_fan.getString(Fan_OnOffFields::AirOutletNodeName).get(), idf_supHC.getString(Coil_Heating_WaterFields::AirInletNodeName).get()); | |||
} | |||
|
|||
// Supplemental HC = CoilHeatingWater, BlowThrough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New FT test case to check that in BlowThrough, the nodes are also connected properly.
WorkspaceObjectVector spm_mixedairs(w.getObjectsByType(IddObjectType::SetpointManager_MixedAir)); | ||
EXPECT_EQ(2u, spm_mixedairs.size()); | ||
for (const auto& spm_mixedair : spm_mixedairs) { | ||
EXPECT_EQ("Temperature", spm_mixedair.getString(SetpointManager_MixedAirFields::ControlVariable).get()); | ||
EXPECT_EQ("Supply Outlet Node", spm_mixedair.getString(SetpointManager_MixedAirFields::ReferenceSetpointNodeName).get()); | ||
EXPECT_EQ(vrf.nameString() + " Heating Coil Outlet Node", spm_mixedair.getString(SetpointManager_MixedAirFields::FanInletNodeName).get()); | ||
EXPECT_EQ("Supply Outlet Node", spm_mixedair.getString(SetpointManager_MixedAirFields::FanOutletNodeName).get()); | ||
EXPECT_TRUE(spm_mixedair.nameString().find("OS Default SPM") != std::string::npos); | ||
if (spm_mixedair.nameString().find("Mixed Air") != std::string::npos) { | ||
EXPECT_EQ("Mixed Air Node", spm_mixedair.getString(SetpointManager_MixedAirFields::SetpointNodeorNodeListName).get()); | ||
} else { | ||
EXPECT_EQ("VRF TU on Outdoor Air Outlet Node", spm_mixedair.getString(SetpointManager_MixedAirFields::SetpointNodeorNodeListName).get()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that SPM:MixedAir correctly picked up the fan that is inside the VRF TU on the main branch
…rSystem, or placed on AirLoopHVAC main branch that has its own supply fan
Windows CI is reporting the usual RUby test failure: |
...energyplus/ForwardTranslator/ForwardTranslateZoneHVACTerminalUnitVariableRefrigerantFlow.cpp
Outdated
Show resolved
Hide resolved
…nalUnitVariableRefrigerantFlow.cpp
CI Results for 5415cc9:
|
Pull request overview
Fix E+ 9.3.0: Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC #3905
Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC
New regression test was added in #3905 - Allow ZoneHVAC:TerminalUnit:VariableRefrigerantFlow to connect to AirLoopHVAC OpenStudio-resources#137
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)src/openstudio_lib/library/OpenStudioPolicy.xml
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.