-
Notifications
You must be signed in to change notification settings - Fork 231
Fix #4219 - Fix #4628 - DesignSpecificationOutdoorAir (use a DSOA:SpaceList if appropriate insead of using first dsoa found) and ControllerMechanicalVentilation upgrades #5384
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
Changes from all commits
9e1f16c
230d852
83e1d2c
582b9ee
641d4a7
d1e7ad6
4efef57
57209cf
e14c42d
2d3290f
91f30c4
9c1ee66
6c84355
06601f6
533a61b
5cc3cad
f1f36e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1502,9 +1502,8 @@ namespace energyplus { | |
| return retVal; | ||
| } | ||
| case openstudio::IddObjectType::OS_DesignSpecification_OutdoorAir: { | ||
| auto designSpecificationOutdoorAir = modelObject.cast<DesignSpecificationOutdoorAir>(); | ||
| retVal = translateDesignSpecificationOutdoorAir(designSpecificationOutdoorAir); | ||
| break; | ||
| LOG_AND_THROW("Shouldn't get there"); | ||
| return retVal; | ||
|
Comment on lines
1504
to
+1506
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, I put that here too just to make sure |
||
| } | ||
| case openstudio::IddObjectType::OS_DesignSpecification_ZoneAirDistribution: { | ||
| // DLM: appears to be translated in SizingZone | ||
|
|
@@ -4034,6 +4033,8 @@ namespace energyplus { | |
|
|
||
| m_map.clear(); | ||
|
|
||
| m_zoneDSOAsMap.clear(); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And I clear the new map when we start FTing again, of course |
||
|
|
||
| m_anyNumberScheduleTypeLimits.reset(); | ||
|
|
||
| m_interiorPartitionSurfaceConstruction.reset(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -508,7 +508,11 @@ namespace energyplus { | |
|
|
||
| namespace detail { | ||
| struct ForwardTranslatorInitializer; | ||
| }; | ||
|
|
||
| // TODO: I have to put this back because of AirTerminalDualDuctVAV which should be using Control for Outdoor Air | ||
| // I'm setting it up as a free function in detail:: though, so you know you shouldn't call it! | ||
| boost::optional<IdfObject> translateDesignSpecificationOutdoorAir(model::DesignSpecificationOutdoorAir& modelObject); | ||
|
Comment on lines
+512
to
+514
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. An unfortunate thing, I was aiming to completely hide it from the API, but I can't. Fair enough... |
||
| }; // namespace detail | ||
|
|
||
| #define ENERGYPLUS_VERSION "25.1" | ||
|
|
||
|
|
@@ -938,7 +942,14 @@ namespace energyplus { | |
|
|
||
| boost::optional<IdfObject> translateDesignDay(model::DesignDay& modelObject); | ||
|
|
||
| boost::optional<IdfObject> translateDesignSpecificationOutdoorAir(model::DesignSpecificationOutdoorAir& modelObject); | ||
| // Construct (or fetch if already created) a DesignSpecificationOutdoorAir (DSOA) or DSOA:SpaceList | ||
| // * if there are no spaces with a DSOA assigned: return empty | ||
| // * otherwise: | ||
| // * otherwise: | ||
| // * if we translated to E+ with spaces: | ||
| // * If a single one: DSOA, otherwise create a DSOA:SpaceList | ||
| // * if we do not use E+ spaces: create DSOA | ||
| boost::optional<IdfObject> getOrCreateThermalZoneDSOA(const model::ThermalZone& z); | ||
|
Comment on lines
+945
to
+952
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, now that we've got helpers in places, this is main function I'll be using going forward. (Similar to getSpaceLoadParent) |
||
|
|
||
| boost::optional<IdfObject> translateDistrictCooling(model::DistrictCooling& modelObject); | ||
|
|
||
|
|
@@ -1507,6 +1518,9 @@ namespace energyplus { | |
| boost::optional<IdfObject> translateThermalZone(model::ThermalZone& modelObject); | ||
| void translateThermalZoneSpacesWhenCombinedSpaces(model::ThermalZone& modelObject, IdfObject& idfObject); | ||
| void translateThermalZoneSpacesToEnergyPlusSpaces(model::ThermalZone& modelObject, IdfObject& idfObject); | ||
| // Helper for the DesignSpecification:ZoneAirDistribution, returns empty when the DSZAD is not needed, | ||
| // which is when fields on Sizing:Zone related to it are all defaulted (Implemeted in ForwardTranslateSizingZone) | ||
| boost::optional<std::string> zoneDSZADName(const model::ThermalZone& zone); | ||
|
Comment on lines
+1521
to
+1523
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New helper. |
||
|
|
||
| boost::optional<IdfObject> translateThermostatSetpointDualSetpoint(model::ThermostatSetpointDualSetpoint& tsds); | ||
|
|
||
|
|
@@ -1698,6 +1712,9 @@ namespace energyplus { | |
|
|
||
| ModelObjectMap m_map; | ||
|
|
||
| using ZoneToMaybeDSOA = std::map<const openstudio::Handle, boost::optional<IdfObject>>; | ||
| ZoneToMaybeDSOA m_zoneDSOAsMap; | ||
|
|
||
| std::vector<IdfObject> m_idfObjects; | ||
|
|
||
| boost::optional<IdfObject> m_anyNumberScheduleTypeLimits; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,7 +98,21 @@ namespace energyplus { | |
| } | ||
| } | ||
|
|
||
| // Extensible Groups for DSOAs are pushed in translateSizingZone to retain order of the file | ||
| // Extensible Groups for DSOAs are no longer pushed in translateSizingZone to retain order of the file, because: | ||
| // 1) Thermal Zones are translated before AirLoopHVACs, so we guarantee proper order (unless we mess something up, like adding a new always | ||
| // translated object early on that will call it) | ||
| // 2) Doing it in translateSizingZone means that it will NOT be written if the Sizing:Zone isn't, for eg when you have no design days | ||
| // but that is a valid use case | ||
| auto oa_controller = modelObject.controllerOutdoorAir(); | ||
| if (auto oa_sys_ = oa_controller.airLoopHVACOutdoorAirSystem()) { | ||
| if (auto a_ = oa_sys_->airLoopHVAC()) { | ||
| for (const auto& z : a_->thermalZones()) { | ||
| if (auto dsoaOrList_ = getOrCreateThermalZoneDSOA(z)) { | ||
| IdfExtensibleGroup eg = idfObject.pushExtensibleGroup({z.nameString(), dsoaOrList_->nameString(), zoneDSZADName(z).value_or("")}); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
Comment on lines
+101
to
+115
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ControllerMV now fills its own extensible groups. as you can see, ThermalZone is translated before AirLoopHVAC, and I have no reasons to believe any other object will trigger a weird order where Controller:MechanicalVentilation will end up being translated before the ThermalZone, thus produces a DSOA:SpaceList that is placed BEFORE the thermal zone. The test I added in /src/energyplus/Test/ControllerOutdoorAir_GTest.cpp at least has no IDF change |
||
|
|
||
| m_idfObjects.push_back(idfObject); | ||
| return boost::optional<IdfObject>(idfObject); | ||
|
|
||
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.
Use a custom E+ build from my fork
https://github.com/jmarrec/EnergyPlus/releases/tag/v25.1.0-WithDSOASpaceListFixes
This is 25.1.0 with two extra PRs: