Skip to content
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

ZoneHVAC:*: new Design Specification Multispeed Object fields #4964

Draft
wants to merge 26 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5cafd02
Add design spec multispeed fields to idd.
joseph-robertson Sep 11, 2023
aab22b6
Update model files for zone hvac wtahp.
joseph-robertson Sep 11, 2023
3580d6f
Update model files for zone hvac tu vrf.
joseph-robertson Sep 11, 2023
23f16fa
Start to update ft and tests.
joseph-robertson Sep 11, 2023
b0b9add
Formatting.
joseph-robertson Sep 11, 2023
f7db3c1
Typo in ZoneHVACWaterToAirHeatPump
jmarrec Sep 12, 2023
4cf55c5
Typo in idds and fix a clone method.
joseph-robertson Sep 12, 2023
f754205
Merge branch 'v23.2.0-IOFreeze' into design-spec-multispeed
joseph-robertson Sep 13, 2023
d79407a
Add model tests for both zone hvac.
joseph-robertson Sep 13, 2023
bb209bb
Add ft tests for checking for translated performance objects.
joseph-robertson Sep 13, 2023
2e1fd84
Check count of performance objects.
joseph-robertson Sep 13, 2023
d036c67
Refactor unitarysysperf ft to support new zonehvac types.
joseph-robertson Sep 18, 2023
6f8f111
Formatting.
joseph-robertson Sep 18, 2023
546dd32
Update notes in idd.
joseph-robertson Sep 19, 2023
8a869a1
Support remaining coil types for sysperf ft.
joseph-robertson Sep 19, 2023
0e48fed
Merge branch 'v23.2.0-IOFreeze' into design-spec-multispeed
joseph-robertson Sep 20, 2023
268eb05
Typos in sysperf ft.
joseph-robertson Sep 20, 2023
ff2593b
Merge branch 'v23.2.0-IOFreeze' into design-spec-multispeed
joseph-robertson Sep 26, 2023
2aa530f
FT arbitrary 1 speed if coil object has no speeds.
joseph-robertson Sep 26, 2023
ea58fd9
Update new ft tests to check contents of sysperf.
joseph-robertson Sep 26, 2023
98ccc33
Get all includes for new ft tests.
joseph-robertson Sep 26, 2023
58b3c9b
Update new ft tests for noloadsupply values.
joseph-robertson Sep 26, 2023
c347caf
Fix a few typos in sysperf ft.
joseph-robertson Sep 26, 2023
592f486
Move new ft tests into their own new sysperf ft test file.
joseph-robertson Sep 26, 2023
7cecbc9
Formatting.
joseph-robertson Sep 26, 2023
73f1545
Add more includes.
joseph-robertson Sep 26, 2023
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
12 changes: 10 additions & 2 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -29063,13 +29063,17 @@ OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,
\units C
\required-field
\note Supplemental heater will not operate when outdoor temperature exceeds this value.
A15; \field Controlling Zone or Thermostat Location
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.
A16; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
joseph-robertson marked this conversation as resolved.
Show resolved Hide resolved
\note The name of the performance specification object used to describe the multispeed coil.

OS:ZoneHVAC:WaterToAirHeatPump,
\min-fields 25
Expand Down Expand Up @@ -29236,10 +29240,14 @@ OS:ZoneHVAC:WaterToAirHeatPump,
\note Constant results in 100% water flow regardless of compressor PLR
\note Cycling results in water flow that matches compressor PLR
\note ConstantOnDemand results in 100% water flow whenever the coil is on, but is 0% whenever the coil has no load
A26; \field Design Specification ZoneHVAC Sizing Object Name
A26, \field Design Specification ZoneHVAC Sizing Object Name
\note Enter the name of a DesignSpecificationZoneHVACSizing object.
\type object-list
\object-list DesignSpecificationZoneHVACSizingName
A27; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\note The name of the performance specification object used to describe the multispeed coil.

OS:ZoneHVAC:UnitHeater,
\min-fields 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "../../model/CoilCoolingDXVariableRefrigerantFlow_Impl.hpp"
#include "../../model/CoilHeatingDXVariableRefrigerantFlow.hpp"
#include "../../model/CoilHeatingDXVariableRefrigerantFlow_Impl.hpp"
#include "../../model/UnitarySystemPerformanceMultispeed.hpp"
#include "../../model/UnitarySystemPerformanceMultispeed_Impl.hpp"
#include "../../utilities/core/Logger.hpp"
#include "../../utilities/core/Assert.hpp"
#include "../../utilities/math/FloatCompare.hpp"
Expand Down Expand Up @@ -432,6 +434,18 @@ namespace energyplus {
}
}

// Design Specification Multispeed Object Name
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see any FT testing for this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jmarrec I didn't get too far on this PR yet. I sort of got tripped up on FT. Appears that for AirLoopHVACUnitarySystem, it FTs the UnitarySystemPerformanceMultispeed object, but also creates one if one doesn't exist. Under what conditions should we create one for ZoneHVACWaterToAirHeatPump and ZoneHVACTerminalUnitTVariableRefrigerantFlow?

Copy link
Collaborator

Choose a reason for hiding this comment

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

AirLoopHVACUnitarySystem I believe throws if you use multispeed / variable speed coils without a UnitarySystemPerformanceMultispeed object, hence why the FT creates one if needed.

I'm not 100% sure whether the VRF TU and the ZoneHVAC:WaterToAirHeatPump have the same behavior now. If so, we should create one in FT. In that case, should move the default creation to a helper function so we can reuse in other modules.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh, that's quite confusing, but it seems that this applies not to the coils but to the fans. The original NFP proposed a new object "FanPerformance:Multispeed", but apparently UnistarySystemPerformance:Multispeed was kept.

https://github.com/NREL/EnergyPlus/blob/develop/design/FY2023/NFP_MultispeedFans.md

My understanding is that this is purely optional, regardless of the coils you use for the ZoneHVAC:WAHP or ZoneHVAC:TU:VRF objects. We should probably make some dummy IDF tests to confirm. I'll ask the E+ dev team right now too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jmarrec I stubbed UnitarySystemPerformance FT to handle additional coil types CoilXXXWaterToAirHeatPumpEquationFit, CoilXXXDXVariableRefrigerantFlow, and CoilXXXDXVariableRefrigerantFlowFluidTemperatureControl. But I'm a little unclear on how to determine NumberofSpeedsforXXX. The speeds should not correspond to the coils, but to the supply fan? Are we going to need to create a new setter method for speeds on the UnitarySystemPerformance object?

Copy link
Collaborator

Choose a reason for hiding this comment

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

My earlier post was misleading I think. The object varies the fan airflow in conjunction with the heating/cooling capacity.
So Number of Speeds for Heating should match the heating coil number of speeds, when the coil does have speeds.

I don't think we need to create a UnitarySystemPerformance object for VRF / ZoneHVACWaterToAirHeatPump if they don't throw when one isn't present. In that case, we're just left translating whatever the user chose to specify.

Also, take VRFMultispeedFan.idffor eg. You have one ZoneHVAC:TerminalUnit:VariableRefrigerantFlow (TU1) object with some COIL:Cooling:DX:VariableRefrigerantFlow and COIL:Heating:DX:VariableRefrigerantFlow. These coils do not have speed-related fields. Yet there is a UnitarySystemPerformance assigned to it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm looking at VRFMultispeedFan.idf...

  UnitarySystemPerformance:Multispeed,
    Sys 1 WaterToAirHP System MultiSpeed Performance,  !- Name
    2,                       !- Number of Speeds for Heating
    2,                       !- Number of Speeds for Cooling

Where does the "2" come from? Should this value be hardcoded when coil object types are COIL:*:DX:VariableRefrigerantFlow?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That is arbitrary I believe.

if (boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject = modelObject.designSpecificationMultispeedObject()) {
boost::optional<IdfObject> _unitarySystemPerformance = translateAndMapModelObject(designSpecificationMultispeedObject.get());

if (_unitarySystemPerformance && _unitarySystemPerformance->name()) {
idfObject.setString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectType,
_unitarySystemPerformance->iddObject().name());
idfObject.setString(ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName,
_unitarySystemPerformance->name().get());
}
}
Comment on lines +438 to +447
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is pointless here for the VRF object, because you don't have a way to set the number of Speeds during Heating/Cooling, and the VRF coils do not bear the requested information to autofill them.

Given what we see in VRFMultispeedFan.idf that means:

  • We actually need to expose the number of heating/cooling speeds
  • We also need the extensible portion <Heating|Cooling> Speed <N> Supply Air Flow Ratio
  • We probably need to throw or overwrite when writing for a coil that has an actual number of speeeds
  • We probably need to reach out to the E+ devs responsible for this feature to understand it fully. I'm quite fuzzy on how this is used with coils that don't have an actual number of speeds

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Couple of things:
(1) I had noticed the "gap" on the heating/cooling speeds - that's why I had posed the question "Are we going to need to create a new setter method for speeds on the UnitarySystemPerformance object?" above.
(2) I thought you had said that the unitary system performance speeds in VRFMultispeedFan.idf were arbitrary?

But generally speaking, yes, I agree that we should probably punt on this new feature until later.


return idfObject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "../../model/CoilHeatingGas_Impl.hpp"
#include "../../model/CoilHeatingWater.hpp"
#include "../../model/CoilHeatingWater_Impl.hpp"
#include "../../model/UnitarySystemPerformanceMultispeed.hpp"
#include "../../model/UnitarySystemPerformanceMultispeed_Impl.hpp"
#include <utilities/idd/ZoneHVAC_WaterToAirHeatPump_FieldEnums.hxx>
#include <utilities/idd/OutdoorAir_Mixer_FieldEnums.hxx>
#include <utilities/idd/Fan_OnOff_FieldEnums.hxx>
Expand Down Expand Up @@ -375,6 +377,17 @@ namespace energyplus {

// TODO: field 'Design Specification ZoneHVAC Sizing' isn't implemented since the object isn't wrapped in SDK

// Design Specification Multispeed Object Name
if (boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject = modelObject.designSpecificationMultispeedObject()) {
boost::optional<IdfObject> _unitarySystemPerformance = translateAndMapModelObject(designSpecificationMultispeedObject.get());

if (_unitarySystemPerformance && _unitarySystemPerformance->name()) {
idfObject.setString(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectType,
_unitarySystemPerformance->iddObject().name());
idfObject.setString(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName, _unitarySystemPerformance->name().get());
}
}
Comment on lines +361 to +369
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unlike VRF, there are a varierty of coils when we can autofill the Number of Speeds for <Heating|Cooling> fields nor the <Heating|Cooling> Speed <N> Supply Air Flow Ratio.
One, or maybe the only one, where we cannot is the CoilHeatingWaterToAirHeatPumpEquationFit, and perhaps that's fine. I'm not 100% sure


return idfObject;
}

Expand Down
3 changes: 3 additions & 0 deletions src/energyplus/Test/ZoneHVACWaterToAirHeatPump_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <utilities/idd/Coil_Heating_Electric_FieldEnums.hxx>
#include <utilities/idd/Fan_OnOff_FieldEnums.hxx>
#include <utilities/idd/OutdoorAir_Mixer_FieldEnums.hxx>
#include <utilities/idd/UnitarySystemPerformance_Multispeed_FieldEnums.hxx>

#include <utilities/idd/IddEnums.hxx>
#include "../../utilities/idf/IdfObject.hpp"
Expand Down Expand Up @@ -269,6 +270,8 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ZoneHVACWaterToAirHeatPump) {
EXPECT_TRUE(idf_hp.isEmpty(ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityManagerListName));
EXPECT_EQ("ConstantOnDemand", idf_hp.getString(ZoneHVAC_WaterToAirHeatPumpFields::HeatPumpCoilWaterFlowMode).get());
EXPECT_TRUE(idf_hp.isEmpty(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationZoneHVACSizingObjectName));
EXPECT_TRUE(idf_hp.isEmpty(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectType));
EXPECT_TRUE(idf_hp.isEmpty(ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please actually assign one and check that it's all good.


{
ASSERT_TRUE(idf_hp.getTarget(ZoneHVAC_WaterToAirHeatPumpFields::HeatingCoilName));
Expand Down
47 changes: 47 additions & 0 deletions src/model/ZoneHVACTerminalUnitVariableRefrigerantFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
#include "AirConditionerVariableRefrigerantFlowFluidTemperatureControl_Impl.hpp"
#include "AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR.hpp"
#include "AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR_Impl.hpp"
#include "UnitarySystemPerformanceMultispeed.hpp"
#include "UnitarySystemPerformanceMultispeed_Impl.hpp"

#include <utilities/idd/IddFactory.hxx>

Expand Down Expand Up @@ -581,6 +583,30 @@ namespace model {
OS_ASSERT(result);
}

boost::optional<UnitarySystemPerformanceMultispeed>
ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl::designSpecificationMultispeedObject() const {
return getObject<ModelObject>().getModelObjectTarget<UnitarySystemPerformanceMultispeed>(
OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName);
}

bool ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl::setDesignSpecificationMultispeedObject(
const boost::optional<UnitarySystemPerformanceMultispeed>& unitarySystemPerformace) {
bool result(false);
if (unitarySystemPerformace) {
result = setPointer(OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName,
unitarySystemPerformace.get().handle());
} else {
resetDesignSpecificationMultispeedObject();
result = true;
}
return result;
}

void ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl::resetDesignSpecificationMultispeedObject() {
bool result = setString(OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::DesignSpecificationMultispeedObjectName, "");
OS_ASSERT(result);
}

ModelObject ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl::clone(Model model) const {
ModelObject terminalClone = ZoneHVACComponent_Impl::clone(model);

Expand All @@ -604,6 +630,10 @@ namespace model {
terminalClone.getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setSupplementalHeatingCoil(coilClone);
}

if (auto designSpec = designSpecificationMultispeedObject()) {
terminalClone.setDesignSpecificationMultispeedObject(designSpec->clone(model).cast<UnitarySystemPerformanceMultispeed>());
}

// TODO Move this into base clase
terminalClone.setString(OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::TerminalUnitAirInletNode, "");
terminalClone.setString(OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::TerminalUnitAirOutletNode, "");
Expand All @@ -630,6 +660,10 @@ namespace model {
result.push_back(coil.get());
}

if (auto designSpec = designSpecificationMultispeedObject()) {
result.push_back(*designSpec);
}

return result;
}

Expand Down Expand Up @@ -1334,6 +1368,19 @@ namespace model {
return getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setSupplyAirFanPlacement(supplyAirFanPlacement);
}

boost::optional<UnitarySystemPerformanceMultispeed> ZoneHVACTerminalUnitVariableRefrigerantFlow::designSpecificationMultispeedObject() const {
return getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->designSpecificationMultispeedObject();
}

bool ZoneHVACTerminalUnitVariableRefrigerantFlow::setDesignSpecificationMultispeedObject(
const UnitarySystemPerformanceMultispeed& unitarySystemPerformace) {
return getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setDesignSpecificationMultispeedObject(unitarySystemPerformace);
}

void ZoneHVACTerminalUnitVariableRefrigerantFlow::resetDesignSpecificationMultispeedObject() {
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->resetDesignSpecificationMultispeedObject();
}

/// @cond
ZoneHVACTerminalUnitVariableRefrigerantFlow::ZoneHVACTerminalUnitVariableRefrigerantFlow(
std::shared_ptr<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl> impl)
Expand Down
5 changes: 5 additions & 0 deletions src/model/ZoneHVACTerminalUnitVariableRefrigerantFlow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace model {
class CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl;
class CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl;
class ThermalZone;
class UnitarySystemPerformanceMultispeed;

namespace detail {

Expand Down Expand Up @@ -180,6 +181,10 @@ namespace model {
bool setControllingZoneorThermostatLocation(const ThermalZone& thermalZone);
void resetControllingZoneorThermostatLocation();

boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject() const;
bool setDesignSpecificationMultispeedObject(const UnitarySystemPerformanceMultispeed& unitarySystemPerformace);
void resetDesignSpecificationMultispeedObject();

boost::optional<double> autosizedSupplyAirFlowRateDuringCoolingOperation() const;

boost::optional<double> autosizedSupplyAirFlowRateWhenNoCoolingisNeeded() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace model {
class HVACComponent;
class Schedule;
class ThermalZone;
class UnitarySystemPerformanceMultispeed;

namespace detail {

Expand Down Expand Up @@ -141,6 +142,10 @@ namespace model {
std::string supplyAirFanPlacement() const;
bool setSupplyAirFanPlacement(const std::string& supplyAirFanPlacement);

boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject() const;
bool setDesignSpecificationMultispeedObject(const boost::optional<UnitarySystemPerformanceMultispeed>& unitarySystemPerformace);
void resetDesignSpecificationMultispeedObject();

boost::optional<double> autosizedSupplyAirFlowRateDuringCoolingOperation() const;

boost::optional<double> autosizedSupplyAirFlowRateWhenNoCoolingisNeeded() const;
Expand Down
46 changes: 46 additions & 0 deletions src/model/ZoneHVACWaterToAirHeatPump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "CoilHeatingWater_Impl.hpp"
#include "Model.hpp"
#include "Model_Impl.hpp"
#include "UnitarySystemPerformanceMultispeed.hpp"
#include "UnitarySystemPerformanceMultispeed_Impl.hpp"

#include <utilities/idd/IddFactory.hxx>

Expand Down Expand Up @@ -77,6 +79,10 @@ namespace model {

wahpClone.setSupplementalHeatingCoil(supplementalHeatingCoilClone);

if (auto designSpec = designSpecificationMultispeedObject()) {
wahpClone.setDesignSpecificationMultispeedObject(designSpec->clone(model).cast<UnitarySystemPerformanceMultispeed>());
}
Comment on lines +89 to +91
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, AirLoopHVACUNitarySystem already clones / remove, so let's do the same


if (model == this->model()) {
if (auto waterToAirComponent = t_coolingCoil.optionalCast<WaterToAirComponent>()) {
if (auto plant = waterToAirComponent->plantLoop()) {
Expand Down Expand Up @@ -119,6 +125,9 @@ namespace model {
plantLoop->removeDemandBranchWithComponent(t_supplementalHeatingCoil.get());
}
}
if (auto designSpec = designSpecificationMultispeedObject()) {
designSpec->remove();
}
return ZoneHVACComponent_Impl::remove();
}

Expand Down Expand Up @@ -168,6 +177,9 @@ namespace model {
if (OptionalHVACComponent intermediate = optionalSupplementalHeatingCoil()) {
result.push_back(*intermediate);
}
if (auto designSpec = designSpecificationMultispeedObject()) {
result.push_back(*designSpec);
}
return result;
}

Expand Down Expand Up @@ -384,6 +396,11 @@ namespace model {
return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_WaterToAirHeatPumpFields::SupplyAirFanOperatingModeScheduleName);
}

boost::optional<UnitarySystemPerformanceMultispeed> ZoneHVACWaterToAirHeatPump_Impl::designSpecificationMultispeedObject() const {
return getObject<ModelObject>().getModelObjectTarget<UnitarySystemPerformanceMultispeed>(
OS_ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName);
}

bool ZoneHVACWaterToAirHeatPump_Impl::setAvailabilitySchedule(Schedule& schedule) {
bool result =
setSchedule(OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityScheduleName, "ZoneHVACWaterToAirHeatPump", "Availability", schedule);
Expand Down Expand Up @@ -684,6 +701,23 @@ namespace model {
OS_ASSERT(result);
}

bool ZoneHVACWaterToAirHeatPump_Impl::setDesignSpecificationMultispeedObject(
const boost::optional<UnitarySystemPerformanceMultispeed>& unitarySystemPerformace) {
bool result(false);
if (unitarySystemPerformace) {
result = setPointer(OS_ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName, unitarySystemPerformace.get().handle());
} else {
resetDesignSpecificationMultispeedObject();
result = true;
}
return result;
}

void ZoneHVACWaterToAirHeatPump_Impl::resetDesignSpecificationMultispeedObject() {
bool result = setString(OS_ZoneHVAC_WaterToAirHeatPumpFields::DesignSpecificationMultispeedObjectName, "");
OS_ASSERT(result);
}

boost::optional<Schedule> ZoneHVACWaterToAirHeatPump_Impl::optionalAvailabilitySchedule() const {
return getObject<ModelObject>().getModelObjectTarget<Schedule>(OS_ZoneHVAC_WaterToAirHeatPumpFields::AvailabilityScheduleName);
}
Expand Down Expand Up @@ -1101,6 +1135,10 @@ namespace model {
return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->supplyAirFanOperatingModeSchedule();
}

boost::optional<ZoneHVACWaterToAirHeatPump> AirLoopHVACUnitarySystem::designSpecificationMultispeedObject() const {
jmarrec marked this conversation as resolved.
Show resolved Hide resolved
return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->designSpecificationMultispeedObject();
}

bool ZoneHVACWaterToAirHeatPump::setAvailabilitySchedule(Schedule& schedule) {
return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setAvailabilitySchedule(schedule);
}
Expand Down Expand Up @@ -1318,6 +1356,14 @@ namespace model {
getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetSupplyAirFanOperatingModeSchedule();
}

bool ZoneHVACWaterToAirHeatPump::setDesignSpecificationMultispeedObject(const UnitarySystemPerformanceMultispeed& unitarySystemPerformace) {
return getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->setDesignSpecificationMultispeedObject(unitarySystemPerformace);
}

void ZoneHVACWaterToAirHeatPump::resetDesignSpecificationMultispeedObject() {
getImpl<detail::ZoneHVACWaterToAirHeatPump_Impl>()->resetDesignSpecificationMultispeedObject();
}

/// @cond
ZoneHVACWaterToAirHeatPump::ZoneHVACWaterToAirHeatPump(std::shared_ptr<detail::ZoneHVACWaterToAirHeatPump_Impl> impl)
: ZoneHVACComponent(std::move(impl)) {}
Expand Down
8 changes: 7 additions & 1 deletion src/model/ZoneHVACWaterToAirHeatPump.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ namespace openstudio {
namespace model {

class Schedule;

class HVACComponent;
class UnitarySystemPerformanceMultispeed;

namespace detail {

Expand Down Expand Up @@ -130,6 +130,8 @@ namespace model {

// TODO: field 'Design Specification ZoneHVAC Sizing' isn't implemented since the object isn't wrapped in SDK

boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject() const;

//@}
/** @name Setters */
//@{
Expand Down Expand Up @@ -246,6 +248,10 @@ namespace model {

void resetSupplyAirFanOperatingModeSchedule();

bool setDesignSpecificationMultispeedObject(const UnitarySystemPerformanceMultispeed& unitarySystemPerformace);

void resetDesignSpecificationMultispeedObject();

//@}
/** @name Other */
//@{
Expand Down
8 changes: 7 additions & 1 deletion src/model/ZoneHVACWaterToAirHeatPump_Impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ namespace openstudio {
namespace model {

class Schedule;

class HVACComponent;
class UnitarySystemPerformanceMultispeed;

namespace detail {

Expand Down Expand Up @@ -132,6 +132,8 @@ namespace model {

boost::optional<Schedule> supplyAirFanOperatingModeSchedule() const;

boost::optional<UnitarySystemPerformanceMultispeed> designSpecificationMultispeedObject() const;

boost::optional<double> autosizedSupplyAirFlowRateDuringCoolingOperation() const;

boost::optional<double> autosizedSupplyAirFlowRateDuringHeatingOperation() const;
Expand Down Expand Up @@ -266,6 +268,10 @@ namespace model {

void resetSupplyAirFanOperatingModeSchedule();

bool setDesignSpecificationMultispeedObject(const boost::optional<UnitarySystemPerformanceMultispeed>& unitarySystemPerformace);

void resetDesignSpecificationMultispeedObject();

//@}
/** @name Other */
//@{
Expand Down