Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
e1e512c
Naive add HeatPump:AirToWater IDDs
jmarrec Oct 6, 2025
10bb8c4
Make required-field + break speed data into subobjects
jmarrec Oct 6, 2025
68e51d1
WIP wrapping HeatPumpAirToWaterHeatingSpeedData
jmarrec Oct 6, 2025
029bcc3
GenerateClass: allow generating stubs even if didn't build openstudio…
jmarrec Oct 6, 2025
d22527a
register ctor and swig
jmarrec Oct 6, 2025
59ccbce
Tweak for clone/remove etc
jmarrec Oct 7, 2025
5d3fdbd
Fixup nasty side effect of removing passed curves in ctor
jmarrec Oct 7, 2025
9941697
Implement HeatPumpAirToWaterCoolingSpeedData the same way
jmarrec Oct 7, 2025
65aa931
Move Min PLR field outside of heating input
jmarrec Oct 7, 2025
dfa12e3
Prototype subobjects: OS:HeatPump:AirToWater:Heating/Cooling
jmarrec Oct 7, 2025
a477ed9
Remove the " in Heating Mode" (/Cooling) suffix from the objects, it'…
jmarrec Oct 7, 2025
6643ef2
GenerateClass: improve to add the virtual overrides needed for HVACCo…
jmarrec Oct 7, 2025
92164d1
Initial implementation for HeatPumpAirToWaterHeating
jmarrec Oct 7, 2025
71873fd
Start testing
jmarrec Oct 7, 2025
3b25f89
Correct casing of UnivariateFunctions
jmarrec Oct 9, 2025
3eb7cb0
Wrap HeatPump:AirToWater, add missing ConnectionObject reference for …
jmarrec Oct 9, 2025
aef90f0
Make SpeedData be ResourceObject
jmarrec Oct 9, 2025
303af7c
Implement containingHVACComponent + convenience methods to go from ch…
jmarrec Oct 9, 2025
6df9e34
Forgot to swig HeatPumpAirToWaterCooling
jmarrec Oct 9, 2025
98a8c95
More cloning tweaks: when cloning the top level AWHP, we clone the He…
jmarrec Oct 9, 2025
c925793
Handle cloning HeatPumpAirToWaterHeating/Cooling to another model: we…
jmarrec Oct 9, 2025
334073c
Wrong min fields
jmarrec Oct 9, 2025
eb781ff
Enforce unicity: A HeatPumpAirToWaterCooling/Heating is unique to a H…
jmarrec Oct 9, 2025
c177de5
Initial implementation of forward translator for HeatPumpAirToWater
jmarrec Oct 9, 2025
188c4ed
Add function that will translate the wrapper object instead of the child
jmarrec Oct 9, 2025
dec4fb7
An E+ PR that's open right now is removing the Resistive Defrost Capa…
jmarrec Oct 9, 2025
d52f0ca
Add FT test (WIP)
jmarrec Oct 9, 2025
0e15323
Tweak PlantEquopmentOpSchemes + add missing references to E+ IDD object
jmarrec Oct 9, 2025
8a7d1b1
tweak generateclass
jmarrec Oct 9, 2025
f37bfcb
Finish testing and fix a small bug in FT for cooling side (lambda par…
jmarrec Oct 9, 2025
01b8f3b
remove save of workspace/model
jmarrec Oct 9, 2025
dddd080
Implement autosizedRated Air/Water FlowRate in Cooling/Heating Mode b…
jmarrec Oct 9, 2025
e95636a
Enforce link between OperatingModeControlMethod (ScheduleModes) and O…
jmarrec Oct 9, 2025
6a2062e
Implement emsActuatorNames for the Top level wrapper
jmarrec Oct 9, 2025
e607ce8
Write a reverse translator and quick RT roundtrip test. I did manual …
jmarrec Oct 9, 2025
220de74
Merge branch 'develop' into v25.2.0-IOFreeze-5490_HeatPumpAirToWater
joseph-robertson Oct 24, 2025
35b9eb8
Merge branch 'develop' into v25.2.0-IOFreeze-5490_HeatPumpAirToWater
joseph-robertson Nov 5, 2025
c864d8d
Merge branch 'develop' into v25.2.0-IOFreeze-5490_HeatPumpAirToWater
jmarrec Nov 13, 2025
177fab2
Update SQL queries
jmarrec Nov 13, 2025
e09420b
Implement top-level autosizedRatedHeating/CoolingCapacity
jmarrec Nov 13, 2025
82c8631
Implement HeatPumpAirToWaterCooling/Heating convenience method for Im…
jmarrec Nov 13, 2025
606fb81
HeatPumpAirToWaterCooling(/Heating)-SpeedData: autosizedRatedCoolingC…
jmarrec Nov 13, 2025
ba72104
HeatPumpAirToWaterHeating/cooling: autosize / applySizingValues affec…
jmarrec Nov 13, 2025
421296e
Avoid "Unknown IddObjectType" warning
jmarrec Nov 13, 2025
71a7c62
Temporary (?): Fill PlantLoop's Water Loop Type: hoping this field wi…
jmarrec Nov 13, 2025
e1e03e8
Merge remote-tracking branch 'origin/develop' into v25.2.0-IOFreeze-5…
jmarrec Nov 14, 2025
bd4f9de
Merge remote-tracking branch 'origin/develop' into v25.2.0-IOFreeze-5…
jmarrec Nov 14, 2025
a31240e
Revert "Temporary (?): Fill PlantLoop's Water Loop Type: hoping this …
jmarrec Nov 14, 2025
fb97ea3
Remove "Water Loop Type" from ProposedE+.idd
jmarrec Nov 14, 2025
595d469
size_t to unsigned conversion error on MSVC
jmarrec Nov 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/energyplus/ForwardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,16 @@ namespace energyplus {
retVal = translateHeatPumpAirToWater(mo);
break;
}
case openstudio::IddObjectType::OS_HeatPump_AirToWater_Cooling: {
// no-op, just Log a Trace message
LOG(Trace, "HeatPumpAirToWaterCooling is not translated by itself but in the parent HeatPumpAirToWater");
break;
}
case openstudio::IddObjectType::OS_HeatPump_AirToWater_Heating: {
// no-op, just Log a Trace message
LOG(Trace, "HeatPumpAirToWaterHeating is not translated by itself but in the parent HeatPumpAirToWater");
break;
}
Comment on lines +1961 to +1970

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Avoid "Unknown IddObjectType" warning

case openstudio::IddObjectType::OS_HeatPump_AirToWater_FuelFired_Heating: {
auto mo = modelObject.cast<HeatPumpAirToWaterFuelFiredHeating>();
retVal = translateHeatPumpAirToWaterFuelFiredHeating(mo);
Expand Down
24 changes: 20 additions & 4 deletions src/model/HeatPumpAirToWater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,19 +470,27 @@ namespace model {
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Source Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Heating");
return getAutosizedValue("Design Size Rated Air Volume Flow Rate in Heating Mode", "m3/s");
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Heating");
return getAutosizedValue("Design Size Rated Water Volume Flow Rate in Heating Mode", "m3/s");
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Source Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Cooling");
return getAutosizedValue("Design Size Rated Air Volume Flow Rate in Cooling Mode", "m3/s");
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Cooling");
return getAutosizedValue("Design Size Rated Water Volume Flow Rate in Cooling Mode", "m3/s");
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedHeatingCapacity() const {
return getAutosizedValue("Design Size Rated Heating Capacity", "W");
}

boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedCoolingCapacity() const {
return getAutosizedValue("Design Size Rated Cooling Capacity", "W");
Comment on lines +473 to +493

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Update SQL queries

}
Comment on lines +472 to +494

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is correct per IOFreeze, but the override of compType will not be needed once this PR is approved and dropped:

@jmarrec jmarrec Oct 22, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

And the strings will need adjustments too.

Suggested change
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Source Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Heating");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Heating");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Source Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Cooling");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s", "HeatPump:AirToWater:Cooling");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Rated Air Volume Flow Rate in Heating Mode", "m3/s");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinHeatingMode() const {
return getAutosizedValue("Design Size Rated Water Volume Flow Rate in Heating Mode", "m3/s");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedAirFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Rated Air Volume Flow Rate in Cooling Mode", "m3/s");
}
boost::optional<double> HeatPumpAirToWater_Impl::autosizedRatedWaterFlowRateinCoolingMode() const {
return getAutosizedValue("Design Size Rated Water Volume Flow Rate in Cooling Mode", "m3/s");
}


void HeatPumpAirToWater_Impl::autosize() {}
Expand Down Expand Up @@ -760,6 +768,14 @@ namespace model {
return getImpl<detail::HeatPumpAirToWater_Impl>()->autosizedRatedWaterFlowRateinHeatingMode();
}

boost::optional<double> HeatPumpAirToWater::autosizedRatedHeatingCapacity() const {
return getImpl<detail::HeatPumpAirToWater_Impl>()->autosizedRatedHeatingCapacity();
}

boost::optional<double> HeatPumpAirToWater::autosizedRatedCoolingCapacity() const {
return getImpl<detail::HeatPumpAirToWater_Impl>()->autosizedRatedCoolingCapacity();
}

/// @cond
HeatPumpAirToWater::HeatPumpAirToWater(std::shared_ptr<detail::HeatPumpAirToWater_Impl> impl) : StraightComponent(std::move(impl)) {}
/// @endcond
Expand Down
2 changes: 2 additions & 0 deletions src/model/HeatPumpAirToWater.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ namespace model {
boost::optional<double> autosizedRatedWaterFlowRateinHeatingMode() const;
boost::optional<double> autosizedRatedAirFlowRateinCoolingMode() const;
boost::optional<double> autosizedRatedWaterFlowRateinCoolingMode() const;
boost::optional<double> autosizedRatedHeatingCapacity() const;
boost::optional<double> autosizedRatedCoolingCapacity() const;

//@}
protected:
Expand Down
23 changes: 23 additions & 0 deletions src/model/HeatPumpAirToWaterCooling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,21 @@ namespace model {
return result;
}

boost::optional<double> HeatPumpAirToWaterCooling_Impl::autosizedRatedCoolingCapacity() const {
boost::optional<double> result;
if (auto awhp_ = heatPumpAirToWater()) {
result = awhp_->autosizedRatedCoolingCapacity();
}
return result;
}
Comment on lines +351 to +357

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The Cooling (/Heating) component queries the AWHP to get the SQL value


void HeatPumpAirToWaterCooling_Impl::autosize() {
autosizeRatedAirFlowRate();
autosizeRatedWaterFlowRate();
auto speeds = this->speeds();
if (!speeds.empty()) {
speeds.back().autosize(); // Only need/can autosize the last (highest) speed
}
Comment on lines +362 to +365

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

in autosize, this is weird, but I autosize the last speed.

The way Model::autosize/applySizingValues works is that it does it for HVACComponent, and the speed data is not one and we do not want to add an explicit case because none of the speeds should be autosized except the last (highest) one

}

void HeatPumpAirToWaterCooling_Impl::applySizingValues() {
Expand All @@ -361,6 +373,13 @@ namespace model {
if (boost::optional<double> val_ = autosizedRatedWaterFlowRate()) {
setRatedWaterFlowRate(*val_);
}

if (boost::optional<double> val_ = autosizedRatedCoolingCapacity()) {
auto speeds = this->speeds();
if (!speeds.empty()) {
speeds.back().setRatedCoolingCapacity(*val_); // Only need/can autosize the last (highest) speed
}
}
Comment on lines +377 to +382

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same in applySizingValue

}

ComponentType HeatPumpAirToWaterCooling_Impl::componentType() const {
Expand Down Expand Up @@ -714,6 +733,10 @@ namespace model {
return getImpl<detail::HeatPumpAirToWaterCooling_Impl>()->heatPumpAirToWater();
}

boost::optional<double> HeatPumpAirToWaterCooling::autosizedRatedCoolingCapacity() const {
return getImpl<detail::HeatPumpAirToWaterCooling_Impl>()->autosizedRatedCoolingCapacity();
}

/// @cond
HeatPumpAirToWaterCooling::HeatPumpAirToWaterCooling(std::shared_ptr<detail::HeatPumpAirToWaterCooling_Impl> impl)
: StraightComponent(std::move(impl)) {}
Expand Down
1 change: 1 addition & 0 deletions src/model/HeatPumpAirToWaterCooling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ namespace model {
// Autosize methods
boost::optional<double> autosizedRatedAirFlowRate() const;
boost::optional<double> autosizedRatedWaterFlowRate() const;
boost::optional<double> autosizedRatedCoolingCapacity() const; // Convenience method

//@}
protected:
Expand Down
28 changes: 27 additions & 1 deletion src/model/HeatPumpAirToWaterCoolingSpeedData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,33 @@ namespace model {
}

boost::optional<double> HeatPumpAirToWaterCoolingSpeedData_Impl::autosizedRatedCoolingCapacity() {
return getAutosizedValue("TODO_CHECK_SQL Rated Cooling Capacity", "W");
boost::optional<double> result;
auto awhp_ccs = heatPumpAirToWaterCoolings();
if (awhp_ccs.empty()) {
return result;
}
size_t n_found = 0;
for (const auto& awhp_cc : awhp_ccs) {
// Check needed because could be the booster speed
if (awhp_cc.speeds().empty()) {
continue;
}
// It has to be the last speed
if (awhp_cc.speeds().back().handle() != this->handle()) {
continue;
}
if (n_found == 0) {
// Setting the first one only
result = awhp_cc.autosizedRatedCoolingCapacity();
}
++n_found;
}
if (n_found > 1) {
LOG(Warn, briefDescription() << " is used as the highest speed in multiple HeatPumpAirToWaterCooling objects, "
"returning the autosized value from the first one only.");
}

return result;
Comment on lines +91 to +117

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

HeatPumpAirToWaterCoolingSpeedData_Impl::autosizedRatedCoolingCapacity

We only grab it from sql if it's the LAST speed

}

double HeatPumpAirToWaterCoolingSpeedData_Impl::ratedCOPforCooling() const {
Expand Down
2 changes: 2 additions & 0 deletions src/model/HeatPumpAirToWaterCooling_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ namespace model {

boost::optional<double> autosizedRatedAirFlowRate() const;
boost::optional<double> autosizedRatedWaterFlowRate() const;
boost::optional<double> autosizedRatedCoolingCapacity() const; // Convenience method

//@}
protected:
private:
Expand Down
23 changes: 23 additions & 0 deletions src/model/HeatPumpAirToWaterHeating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,21 @@ namespace model {
return result;
}

boost::optional<double> HeatPumpAirToWaterHeating_Impl::autosizedRatedHeatingCapacity() const {
boost::optional<double> result;
if (auto awhp_ = heatPumpAirToWater()) {
result = awhp_->autosizedRatedHeatingCapacity();
}
return result;
}

void HeatPumpAirToWaterHeating_Impl::autosize() {
autosizeRatedAirFlowRate();
autosizeRatedWaterFlowRate();
auto speeds = this->speeds();
if (!speeds.empty()) {
speeds.back().autosize(); // Only need/can autosize the last (highest) speed
}
}

void HeatPumpAirToWaterHeating_Impl::applySizingValues() {
Expand All @@ -361,6 +373,13 @@ namespace model {
if (boost::optional<double> val_ = autosizedRatedWaterFlowRate()) {
setRatedWaterFlowRate(*val_);
}

if (boost::optional<double> val_ = autosizedRatedHeatingCapacity()) {
auto speeds = this->speeds();
if (!speeds.empty()) {
speeds.back().setRatedHeatingCapacity(*val_); // Only need/can autosize the last (highest) speed
}
}
}

ComponentType HeatPumpAirToWaterHeating_Impl::componentType() const {
Expand Down Expand Up @@ -715,6 +734,10 @@ namespace model {
return getImpl<detail::HeatPumpAirToWaterHeating_Impl>()->heatPumpAirToWater();
}

boost::optional<double> HeatPumpAirToWaterHeating::autosizedRatedHeatingCapacity() const {
return getImpl<detail::HeatPumpAirToWaterHeating_Impl>()->autosizedRatedHeatingCapacity();
}

/// @cond
HeatPumpAirToWaterHeating::HeatPumpAirToWaterHeating(std::shared_ptr<detail::HeatPumpAirToWaterHeating_Impl> impl)
: StraightComponent(std::move(impl)) {}
Expand Down
1 change: 1 addition & 0 deletions src/model/HeatPumpAirToWaterHeating.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ namespace model {
// Autosize methods
boost::optional<double> autosizedRatedAirFlowRate() const;
boost::optional<double> autosizedRatedWaterFlowRate() const;
boost::optional<double> autosizedRatedHeatingCapacity() const; // Convenience method

//@}
protected:
Expand Down
28 changes: 27 additions & 1 deletion src/model/HeatPumpAirToWaterHeatingSpeedData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,33 @@ namespace model {
}

boost::optional<double> HeatPumpAirToWaterHeatingSpeedData_Impl::autosizedRatedHeatingCapacity() {
return getAutosizedValue("TODO_CHECK_SQL Rated Heating Capacity", "W");
boost::optional<double> result;
auto awhp_hcs = heatPumpAirToWaterHeatings();
if (awhp_hcs.empty()) {
return result;
}
size_t n_found = 0;
for (const auto& awhp_hc : awhp_hcs) {
// Check needed because could be the booster speed
if (awhp_hc.speeds().empty()) {
continue;
}
// It has to be the last speed
if (awhp_hc.speeds().back().handle() != this->handle()) {
continue;
}
if (n_found == 0) {
// Setting the first one only
result = awhp_hc.autosizedRatedHeatingCapacity();
}
++n_found;
}
if (n_found > 1) {
LOG(Warn, briefDescription() << " is used as the highest speed in multiple HeatPumpAirToWaterHeating objects, "
"returning the autosized value from the first one only.");
}

return result;
}

double HeatPumpAirToWaterHeatingSpeedData_Impl::ratedCOPforHeating() const {
Expand Down
2 changes: 2 additions & 0 deletions src/model/HeatPumpAirToWaterHeating_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ namespace model {

boost::optional<double> autosizedRatedAirFlowRate() const;
boost::optional<double> autosizedRatedWaterFlowRate() const;
boost::optional<double> autosizedRatedHeatingCapacity() const; // Convenience method

//@}
protected:
private:
Expand Down
2 changes: 2 additions & 0 deletions src/model/HeatPumpAirToWater_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ namespace model {
boost::optional<double> autosizedRatedWaterFlowRateinHeatingMode() const;
boost::optional<double> autosizedRatedAirFlowRateinCoolingMode() const;
boost::optional<double> autosizedRatedWaterFlowRateinCoolingMode() const;
boost::optional<double> autosizedRatedHeatingCapacity() const;
boost::optional<double> autosizedRatedCoolingCapacity() const;

//@}
protected:
Expand Down