-
Notifications
You must be signed in to change notification settings - Fork 222
Support CoilSystem:Cooling:Water #5350
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
Conversation
… and coil system.
|
@joseph-robertson this is still marked as draft, no review asked, what is the status of this? and is there a corresponding OS-resources test? |
… and coil system.
jmarrec
left a comment
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.
Reviewed IDD and Ctors, good!
…companion to CoilCoolingWater per IDD/IO ref CoilSystem:Cooling:Water:HeatExchangerAssisted isn't WaterToAirComponent
…t ctor to remove() and LOG_AND_THROW
|
|
||
| boost::optional<HVACComponent> CoilSystemCoolingWater_Impl::containingHVACComponent() const { | ||
| // AirLoopHVACUnitarySystem | ||
| std::vector<AirLoopHVACUnitarySystem> airLoopHVACUnitarySystems = this->model().getConcreteModelObjects<AirLoopHVACUnitarySystem>(); | ||
|
|
||
| for (const auto& airLoopHVACUnitarySystem : airLoopHVACUnitarySystems) { | ||
| if (boost::optional<HVACComponent> coolingCoil = airLoopHVACUnitarySystem.coolingCoil()) { | ||
| if (coolingCoil->handle() == this->handle()) { | ||
| return airLoopHVACUnitarySystem; | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return boost::none; | ||
| } |
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.
- Can this really be added to a AirLoopHVACUnitarySystem?
- Our model API is ridden with this weird stuff, but
AirLoopHVACUnitarySystemIS aZoneHVACComponent
| class MODEL_API AirLoopHVACUnitarySystem : public ZoneHVACComponent |
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.
AFAIK, this cannot be added to any HVAC/ZoneHVACComponent. The E+ IDD shows no possible references. I'm going to remove this.
| // Cooling Coil: Required Object | ||
| CoilCoolingWater coolingCoil(m); |
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.
Nowhere I'm seeing a test with the other coil type: CoilSystem:Cooling:Water:HeatExchangerAssisted
And I'm realizing that this object isn't a WaterToAirComponent, so your implementation is likely broken.
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.
Done in #5404
| // Shouldn't happen, accepts only Coil:Cooling:Water or Coil:Cooling:Water:DetailedGeometry | ||
| // Shouldn't happen, accepts only Coil:Cooling:DX:SingleSpeed or Coil:Cooling:DX:VariableSpeed |
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.
first line is wrong, second is a copy paste
| idfObject.setString(CoilSystem_Cooling_WaterFields::CompanionCoilUsedForHeatRecovery, wo_->nameString()); | ||
| if (wo_->iddObject().type() == IddObjectType::Coil_Cooling_Water) { | ||
| wo_->setString(Coil_Cooling_WaterFields::AirInletNodeName, modelObject.airLoopHVACOutdoorAirSystem()->reliefAirModelObject()->nameString()); | ||
| wo_->setString(Coil_Cooling_WaterFields::AirOutletNodeName, wo_->nameString() + " Exhaust Outlet Node"); // FIXME |
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.
FIXME?
src/model/CoilSystemCoolingWater.cpp
Outdated
| ok = setCoolingCoil(coolingCoil); | ||
| OS_ASSERT(ok); |
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.
- TODO: Need to gracefully handle this instead of hitting a boost assert!
Unlike the rest of the setXXX calls, this is likely to fail, in case the user passed a wrong HVACComponent type, so we need to remove() and LOG_AND_THROW
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.
Done in #5404
|
|
||
| EXPECT_EQ(2u, a.supplyComponents().size()); | ||
|
|
||
| EXPECT_TRUE(cc.addToNode(n)); |
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.
I misread since it's truncated. cc is not the CoilSystemCoolingater but the child CoilCoolingWater here. No, this should not be allowed.
…lSystemCoolingWater
…nnect the water side for the children coils
… of the primary cooling cooling of a CoilSystemCoolingWater to an AirLoopHVAC Ensures coils that are part of a cooling system are not directly connected to an air loop, preventing potential errors. Also manages the creation and removal of ControllerWaterCoil objects based on the coil's parent system and presence within a ZoneHVACComponent.
…wed anywhere in a ZoneHVAC/HVACComponent
…t (not supported AFAIK)
| // CoilSystemCoolingWater | ||
| { | ||
| auto coilSystems = model().getConcreteModelObjects<CoilSystemCoolingWater>(); | ||
| for (const auto& coilSystem : coilSystems) { | ||
| if (coilSystem.coolingCoil().handle() == handle()) { | ||
| return coilSystem; | ||
| } | ||
| if (boost::optional<WaterToAirComponent> companionCoilUsedForHeatRecovery = coilSystem.companionCoilUsedForHeatRecovery()) { | ||
| if (companionCoilUsedForHeatRecovery->handle() == this->handle()) { | ||
| return coilSystem; | ||
| } | ||
| } | ||
| } | ||
| } |
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.
Need the same for CoilSystemCoolingWaterHeatExchangerAssisted
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.
Done in #5404
| // Special case for CoilSystemCoolingWater (Wrap Around Water Coil Heat Recovery Mode) | ||
| for (const auto& comp : subsetCastVector<HVACComponent>(plantLoop.demandComponents())) { | ||
| if (comp.iddObject().type().value() == openstudio::IddObjectType::OS_Coil_Cooling_Water) { | ||
| auto coil = comp.cast<CoilCoolingWater>(); | ||
| if (auto containingHVACComponent = coil.containingHVACComponent()) { | ||
| if (auto coilSystemCoolingWater = containingHVACComponent->optionalCast<CoilSystemCoolingWater>()) { | ||
| result.push_back(operationSchemeComponent(*coilSystemCoolingWater)); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
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.
Hummmm. I am NOT following this one... @joseph-robertson
…ode (and getting them out of sync) in both ctors
…has a FIXME (it fails)
/home/julien/Software/Others/OpenStudio/src/energyplus/Test/CoilSystemCoolingWater_GTest.cpp:297: Failure
Expected equality of these values:
"Relief Node"
idf_companionCoil.getString(Coil_Cooling_WaterFields::AirOutletNodeName).get()
Which is: "CompanionCoilUsedForHeatRecovery Exhaust Outlet Node"
#5350 - Changes to Support CoilSystem:Cooling:Water
…ded (and OS-resources test show E+ issuing a warning)
|
CI Results for be13f9f:
|
Pull request overview
Wrap
CoilSystem:Cooling:Water, and support:Related OpenStudio-resources tests:
Perhaps we don't need to create a
Controller:WaterCoilincoil.addToNode.Pull Request Author
src/model/test)src/energyplus/Test)src/osversion/VersionTranslator.cpp)Labels:
IDDChangeAPIChangePull Request - Ready for CIso that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.