Repository navigation
Conversation
Rename the "Heat Pumps" Library/My Model category to "Plant Loop Heat Pumps" and list the plant heat pump types the app was missing: HeatPump:PlantLoop:EIR Heating/Cooling, HeatPump:AirToWater:FuelFired Heating/Cooling, and HeatPump:AirToWater (wrapper plus its Heating and Cooling operation modes in My Model). Dropping a HeatPump:AirToWater wrapper on a plant loop asks whether to place its heating or cooling mode (preselected from the loop's sizing type) and places that mode, since the wrapper itself cannot go on a node. Placement logic lives in utilities/HeatPumpAirToWaterPlacement with unit tests. Add default instances of the new types to hvac_library.osm (EIR air source, fuel-fired, and an air-to-water wrapper with one speed per mode); verified to forward translate cleanly. Add icons for the new types and redraw the water-to-water icons so heating and cooling differ. The air-to-water wrapper and its modes share one icon. Icon tests check distinctness and no Catchall fallback. Translations: new strings hand-inserted into all .ts files. Note: the SVG sources for the new icons are held outside the repo for now, pending a decision on whether they should be published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
My Model now lists only the HeatPump:AirToWater wrapper, not its heating and cooling operation modes. Selecting a mode on a loop opens an Edit tab that shows the owning HeatPump:AirToWater first, then the selected mode with its speed data, on one scrolling page (new HeatPumpAirToWaterModeInspectorView). A mode owned by a wrapper is not removable on its own in the SDK, so the loop diagram showed no delete button for it. It now gets one: clicking it takes the mode off that loop, and when neither mode is left on a loop the wrapper is removed along with both modes, their speed data, curves and lists, since the GUI has no other way to delete it. Translations: drop the two mode strings that are no longer listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macumber
left a comment
There was a problem hiding this comment.
Looks good, I left a few comments. I think it would be good to have the svgs so I would add them if you can.
There was a problem hiding this comment.
Do you think adding something like f(x) or something would be good to indicate the equation fit? I'll leave it up to you, just wanted to suggest it.
There was a problem hiding this comment.
Good idea. The water-to-water heating and cooling icons now show f(x) next to the heat waves or snowflake, and the mini icons have a smaller f(x) above the colour band.
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater_FuelFired_Heating, tr("Heat Pump - Air to Water Fuel Fired - Heating")); | ||
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater_FuelFired_Cooling, tr("Heat Pump - Air to Water Fuel Fired - Cooling")); | ||
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater, tr("Heat Pump - Air to Water")); | ||
| libraryWidget->addModelObjectCategoryPlaceholder(tr("Plant Loop Heat Pumps")); |
There was a problem hiding this comment.
Maybe it doesn't matter but shouldn't all the "Plant Loop Heat Pumps" be together?
There was a problem hiding this comment.
Agreed. Central Heat Pump System is now in Plant Loop Heat Pumps in the Library as well, matching My Model, and the separate "Central Heat Pump Systems" category is gone.
| m_gadgetsLayout->insertWidget(insertIndex++, gadget); | ||
| }; | ||
|
|
||
| // The wrapper's own children are both operation modes, so hide them and show only the selected mode |
There was a problem hiding this comment.
I'm not sure I like this, wouldn't it be useful to see both children without having to switch views? Maybe you could order them so the current one is first?
There was a problem hiding this comment.
Done. The Edit tab now shows the HeatPump:AirToWater first, then the mode you selected, then the other mode, all on one page.
| return modeComponent->addToNode(node.get()); | ||
| } | ||
|
|
||
| if (auto splitter = target.optionalCast<model::Splitter>()) { |
There was a problem hiding this comment.
I can't get this option to work?
There was a problem hiding this comment.
Could you share the steps you used? We tested these drops on the "Drag From Library" box on a plant loop's supply side:
- from the Library and from My Model, each time asking for Heating or Cooling;
- placing heating and cooling on separate loops;
- moving a mode that's already placed to another loop, which removes it from the first loop.
All of these worked, and the unit tests cover the splitter case. Dropping on the demand side or on an air loop shows the usual "not allowed" message.
| } | ||
|
|
||
| bool removeHeatPumpAirToWaterModeFromLoop(const model::ModelObject& modelObject) { | ||
| boost::optional<model::HeatPumpAirToWater> heatPump = heatPumpAirToWaterForMode(modelObject); |
There was a problem hiding this comment.
If there is any way to optimize this it would benefit HVACLayoutController::removeModelObject, I think comparisons based on IddObjectType would be faster.
There was a problem hiding this comment.
Maybe replacing HeatPumpAirToWaterMode with an enum that includes the wrapper and doing a lookup based on IddObjectType would give a better option than calling heatPumpAirToWaterForMode when you just want to know if you are dealing with one of the three types?
There was a problem hiding this comment.
I replaced HeatPumpAirToWaterMode with HeatPumpAirToWaterType { Wrapper, Heating, Cooling } and added heatPumpAirToWaterType(), which switches on the IddObjectType. heatPumpAirToWaterForMode() and removeHeatPumpAirToWaterModeFromLoop() check it first. So deleting from a loop, the loop drawing and the inspector only look up the wrapper for the two mode types. I added two tests for it.
|
|
||
| ! Plant Loop Heat Pumps | ||
|
|
||
| OS:Curve:Biquadratic, |
There was a problem hiding this comment.
Would any of the curves in https://github.com/NatLabRockies/EnergyPlus/blob/develop/testfiles/PlantLoopHeatPump_EIR_AirSource_and_AWHP.idf be better than these for defaults?
There was a problem hiding this comment.
That file only contains HeatPump:AirToWater objects, so I used its CapCurveFuncTempHT/CL and EIRCurveFuncTempHT/CL for the library's air-to-water unit. Before, the SDK's defaults gave the cooling mode the heating curves and heating rating conditions (8 °C inlet air, 40 °C leaving water); it now uses the EnergyPlus defaults of 30 °C and 8 °C. The curve you commented on belongs to the HeatPump:PlantLoop:EIR air-source units, which had the SDK's flat curves. They now use the heating and cooling capacity and EIR curves from PlantLoopHeatPump_EIR_AirSource_Hospital_wSixPipeHeatRecovery.idf, the EnergyPlus example with fitted curves for air-source EIR heat pumps. I've also opened an SDK issue for the cooling defaults: NatLabRockies/OpenStudio#5675
- Move Central Heat Pump System into the Plant Loop Heat Pumps library
category and drop the separate category (and its translations)
- Replace HeatPumpAirToWaterMode with HeatPumpAirToWaterType
{ Wrapper, Heating, Cooling } and look it up by IddObjectType, so
non air-to-water objects skip the wrapper lookup
- Inspector for an air-to-water mode shows the wrapper, the selected
mode, then the other mode
- Library HeatPump:AirToWater uses the speed 1 heating and cooling
curves from EnergyPlus PlantLoopHeatPump_EIR_AirSource_and_AWHP.idf
and the EnergyPlus cooling rating defaults (30 C air, 8 C water);
the SDK defaults gave the cooling mode heating values
(NatLabRockies/OpenStudio#5675)
- Library air-source HeatPump:PlantLoop:EIR units use the capacity and
EIR curves from PlantLoopHeatPump_EIR_AirSource_Hospital_wSixPipeHeatRecovery.idf
instead of flat curves
- Add f(x) to the water-to-water equation fit icons
- Add the SVG sources for the Plant Loop Heat Pump icons
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for the review! Added the SVG sources in |
Plant Loop Heat Pumps: missing types, library defaults, and icons
Problem
Several plant-side heat pump types supported by the SDK could not be dragged from a library or from My Model, because the HVAC Library and My Model lists didn't include them. For example, an
OS:HeatPump:PlantLoop:EIR:Heatingin a custom library OSM did not appear anywhere. The existing "Heat Pumps" category name was also vague, since the app has many non-plant heat pumps.Changes
Library / My Model lists (
MainRightColumnController.cpp)HeatPump:PlantLoop:EIR:Heating/:CoolingHeatPump:AirToWater:FuelFired:Heating/:CoolingHeatPump:AirToWater. Both lists show only the wrapper; its operation modes are not listed separately.Placing
HeatPump:AirToWater(HVACSystemsController.cpp, newutilities/HeatPumpAirToWaterPlacement)HeatPumpAirToWaterType { Wrapper, Heating, Cooling }is looked up by IddObjectType. Deleting from a loop, the loop drawing and the inspector check it first, so other objects skip the wrapper lookup.utilities, separate from the UI, so it can be unit tested.Editing
HeatPump:AirToWater(InspectorView.cpp)HeatPump:AirToWater, then the selected mode, then the other mode, each with its speed data. Selecting a mode that has no wrapper keeps the standard view.Default library instances (
hvac_library.osm)HeatPump:AirToWaterwrapper with Heating and Cooling modes (one speed each), plus their curves.HeatPump:AirToWater: the speed 1 heating and cooling curves fromPlantLoopHeatPump_EIR_AirSource_and_AWHP.idf. The cooling mode is rated at the EnergyPlus defaults of 30 °C inlet air and 8 °C leaving water.HeatPump:PlantLoop:EIR: the heating and cooling capacity and EIR curves fromPlantLoopHeatPump_EIR_AirSource_Hospital_wSixPipeHeatRecovery.idf, instead of the SDK's flat curves.HeatPump:AirToWateris emitted.Icons (
IconLibrary.cpp,openstudio.qrc,images/,images/mini_icons/,images/svg/)src/openstudio_lib/images/svg/, with a README on exporting them to PNG. The app doesn't load them.Translations
OpenStudioApp_*.tsfiles, and the removed "Central Heat Pump Systems" string was deleted from them. I edited them by hand rather than running a full lupdate pass, because develop's.tsfiles are out of sync with the sources and lupdate would add about 26k lines of unrelated location changes. A check run of lupdate found no missing strings, and lrelease reports 0 unfinished.Before:


After:
Tests
HeatPumpAirToWaterPlacement_GTest(new):Wrapperas the mode to place, is rejected;IconLibrary_GTest(2 new tests):openstudioapp_utilities_tests: 14/14 passed.openstudio_lib_tests: everything passed except the known baselineAnalyticsHelperSecrets, which needs CI secrets.Notes for reviewers
HeatPumpAirToWaterCoolingthe heating rating conditions and its speed data the heating curves. The library works around this; reported upstream as HeatPumpAirToWaterCooling and HeatPumpAirToWaterCoolingSpeedData constructors use heating-mode ratings and curves NatLabRockies/OpenStudio#5675.🤖 Generated with Claude Code