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 all 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
8 changes: 4 additions & 4 deletions resources/energyplus/ProposedEnergy+.idd
Original file line number Diff line number Diff line change
Expand Up @@ -24646,7 +24646,7 @@ ZoneHVAC:WaterToAirHeatPump,
\note Enter the type of performance specification object used to describe the multispeed coil or fan.
A22; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\object-list UnitarySystemPerformanceNames
\note The name of the performance specification object used to describe the multispeed coil or fan.

ZoneHVAC:Dehumidifier:DX,
Expand Down Expand Up @@ -25996,7 +25996,7 @@ ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,
\note Enter the type of performance specification object used to describe the multispeed coil or fan.
A21; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\object-list UnitarySystemPerformanceNames
\note The name of the performance specification object used to describe the multispeed coil or fan.

\group Zone HVAC Radiative/Convective Units
Expand Down Expand Up @@ -37684,7 +37684,7 @@ AirLoopHVAC:UnitarySystem,
\note Enter the type of performance specification object used to describe the multispeed coil.
A27; \field Design Specification Multispeed Object Name
\type object-list
\object-list UnitarySystemPerformaceNames
\object-list UnitarySystemPerformanceNames
\note The name of the performance specification object used to describe the multispeed coil.

UnitarySystemPerformance:Multispeed,
Expand All @@ -37694,7 +37694,7 @@ UnitarySystemPerformance:Multispeed,
\extensible:2 - repeat last two fields, remembering to remove ; from "inner" fields.
A1 , \field Name
\required-field
\reference UnitarySystemPerformaceNames
\reference UnitarySystemPerformanceNames
N1 , \field Number of Speeds for Heating
\required-field
\type integer
Expand Down
12 changes: 10 additions & 2 deletions resources/model/OpenStudio.idd
Original file line number Diff line number Diff line change
Expand Up @@ -29485,13 +29485,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
\note The name of the performance specification object used to describe the multispeed coil or fan.

OS:ZoneHVAC:WaterToAirHeatPump,
\min-fields 22
Expand Down Expand Up @@ -29628,10 +29632,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 or fan.

OS:ZoneHVAC:UnitHeater,
\min-fields 10
Expand Down
1 change: 1 addition & 0 deletions src/energyplus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ set(${target_name}_test_src
Test/ThermalStorageChilledWaterStratified_GTest.cpp
Test/ThermalZone_GTest.cpp
Test/ThermostatSetpointDualSetpoint_GTest.cpp
Test/UnitarySystemPerformanceMultispeed_GTest.cpp
Test/WindowPropertyFrameAndDivider_GTest.cpp
Test/WaterHeaterMixed_GTest.cpp
Test/WaterHeaterSizing_GTest.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include "../../model/UnitarySystemPerformanceMultispeed_Impl.hpp"
#include "../../model/AirLoopHVACUnitarySystem.hpp"
#include "../../model/AirLoopHVACUnitarySystem_Impl.hpp"
#include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow.hpp"
#include "../../model/ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl.hpp"
#include "../../model/ZoneHVACWaterToAirHeatPump.hpp"
#include "../../model/ZoneHVACWaterToAirHeatPump_Impl.hpp"
#include "../../model/CoilHeatingDXMultiSpeed.hpp"
#include "../../model/CoilHeatingDXMultiSpeed_Impl.hpp"
#include "../../model/CoilHeatingDXMultiSpeedStageData.hpp"
Expand All @@ -19,10 +23,26 @@
#include "../../model/CoilHeatingGasMultiStage_Impl.hpp"
#include "../../model/CoilHeatingGasMultiStageStageData.hpp"
#include "../../model/CoilHeatingGasMultiStageStageData_Impl.hpp"
#include "../../model/CoilHeatingDXVariableSpeed.hpp"
#include "../../model/CoilHeatingDXVariableSpeed_Impl.hpp"
#include "../../model/CoilHeatingDXVariableSpeedSpeedData.hpp"
#include "../../model/CoilHeatingDXVariableSpeedSpeedData_Impl.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.hpp"
#include "../../model/CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData_Impl.hpp"
#include "../../model/CoilCoolingDXMultiSpeed.hpp"
#include "../../model/CoilCoolingDXMultiSpeed_Impl.hpp"
#include "../../model/CoilCoolingDXMultiSpeedStageData.hpp"
#include "../../model/CoilCoolingDXMultiSpeedStageData_Impl.hpp"
#include "../../model/CoilCoolingDXVariableSpeed.hpp"
#include "../../model/CoilCoolingDXVariableSpeed_Impl.hpp"
#include "../../model/CoilCoolingDXVariableSpeedSpeedData.hpp"
#include "../../model/CoilCoolingDXVariableSpeedSpeedData_Impl.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit_Impl.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.hpp"
#include "../../model/CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData_Impl.hpp"
#include <utilities/idd/UnitarySystemPerformance_Multispeed_FieldEnums.hxx>
#include "../../utilities/idd/IddEnums.hpp"
#include "../../utilities/idf/IdfExtensibleGroup.hpp"
Expand All @@ -34,44 +54,78 @@ namespace openstudio {
namespace energyplus {

boost::optional<IdfObject> ForwardTranslator::translateUnitarySystemPerformanceMultispeed(UnitarySystemPerformanceMultispeed& modelObject) {
boost::optional<std::string> s;
boost::optional<double> d;

// Name
IdfObject sysPerf = createRegisterAndNameIdfObject(openstudio::IddObjectType::UnitarySystemPerformance_Multispeed, modelObject);

// Find the associated AirLoopHVACUnitarySystem
boost::optional<HVACComponent> heatingCoil;
boost::optional<HVACComponent> coolingCoil;

// Find the associated AirLoopHVACUnitarySystem, ZoneHVACTerminalUnitVariableRefrigerantFlow, or ZoneHVACWaterToAirHeatPump
std::vector<AirLoopHVACUnitarySystem> unitarySystems = modelObject.getModelObjectSources<AirLoopHVACUnitarySystem>();
if (unitarySystems.size() != 1) {
LOG(Error, "OS:UnitarySystemPerformance:Multispeed should be referenced by one and only one OS:AirLoopHVAC:UnitarySystem, "
<< modelObject.nameString() << " is referenced by " << unitarySystems.size() << ".")
std::vector<ZoneHVACTerminalUnitVariableRefrigerantFlow> tuVRFs =
modelObject.getModelObjectSources<ZoneHVACTerminalUnitVariableRefrigerantFlow>();
std::vector<ZoneHVACWaterToAirHeatPump> hps = modelObject.getModelObjectSources<ZoneHVACWaterToAirHeatPump>();

if (((unitarySystems.size() + tuVRFs.size() + hps.size()) != 1)) {
LOG(Error, "OS:UnitarySystemPerformance:Multispeed should be referenced by one and only one OS:AirLoopHVAC:UnitarySystem or "
"OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow or OS:ZoneHVAC:WaterToAirHeatPump, "
<< modelObject.nameString() << " is referenced by " << unitarySystems.size() << " OS:AirLoopHVAC:UnitarySystem, " << tuVRFs.size()
<< " OS:ZoneHVAC:TerminalUnit:VariableRefrigerantFlow, " << hps.size() << " OS:ZoneHVAC:WaterToAirHeatPump.")
return boost::none;
}
AirLoopHVACUnitarySystem& unitarySystem = unitarySystems[0];

if (unitarySystems.size() == 1) {
AirLoopHVACUnitarySystem& unitarySystem = unitarySystems[0];
heatingCoil = unitarySystem.heatingCoil();
coolingCoil = unitarySystem.coolingCoil();
}

if (tuVRFs.size() == 1) {
ZoneHVACTerminalUnitVariableRefrigerantFlow& tuVRF = tuVRFs[0];
heatingCoil = tuVRF.heatingCoil();
coolingCoil = tuVRF.coolingCoil();
}

if (hps.size() == 1) {
ZoneHVACWaterToAirHeatPump& hp = hps[0];
heatingCoil = hp.heatingCoil().optionalCast<HVACComponent>();
coolingCoil = hp.coolingCoil().optionalCast<HVACComponent>();
}
Comment on lines +78 to +94
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (unitarySystems.size() == 1) {
AirLoopHVACUnitarySystem& unitarySystem = unitarySystems[0];
heatingCoil = unitarySystem.heatingCoil();
coolingCoil = unitarySystem.coolingCoil();
}
if (tuVRFs.size() == 1) {
ZoneHVACTerminalUnitVariableRefrigerantFlow& tuVRF = tuVRFs[0];
heatingCoil = tuVRF.heatingCoil();
coolingCoil = tuVRF.coolingCoil();
}
if (hps.size() == 1) {
ZoneHVACWaterToAirHeatPump& hp = hps[0];
heatingCoil = hp.heatingCoil().optionalCast<HVACComponent>();
coolingCoil = hp.coolingCoil().optionalCast<HVACComponent>();
}
if (unitarySystems.size() == 1) {
AirLoopHVACUnitarySystem& unitarySystem = unitarySystems.front();
heatingCoil = unitarySystem.heatingCoil();
coolingCoil = unitarySystem.coolingCoil();
} else if (tuVRFs.size() == 1) {
ZoneHVACTerminalUnitVariableRefrigerantFlow& tuVRF = tuVRFs.front();
heatingCoil = tuVRF.heatingCoil();
coolingCoil = tuVRF.coolingCoil();
} else { // if (hps.size() == 1)
ZoneHVACWaterToAirHeatPump& hp = hps.front();
heatingCoil = hp.heatingCoil().optionalCast<HVACComponent>();
coolingCoil = hp.coolingCoil().optionalCast<HVACComponent>();
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because of the if (((unitarySystems.size() + tuVRFs.size() + hps.size()) != 1)) { line above, yes, I think we'd be able to collapse to your suggestion.


// Number of speeds for heating
boost::optional<HVACComponent> heatingCoil = unitarySystem.heatingCoil();
if (heatingCoil) {
if (heatingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Heating_DX_MultiSpeed) {
auto heatingCoilDXMultispeed = heatingCoil->cast<CoilHeatingDXMultiSpeed>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, heatingCoilDXMultispeed.stages().size());
} else if (heatingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Heating_Gas_MultiStage) {
auto heatingCoilGasMultiStage = heatingCoil->cast<CoilHeatingGasMultiStage>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, heatingCoilGasMultiStage.stages().size());
} else {
} else if (heatingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Heating_DX_VariableSpeed) {
auto heatingCoilDXVarspeed = heatingCoil->cast<CoilHeatingDXVariableSpeed>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, heatingCoilDXVarspeed.speeds().size());
} else if (heatingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit) {
auto heatingCoilWaterToAirHeatingVar = heatingCoil->cast<CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, heatingCoilWaterToAirHeatingVar.speeds().size());
} else { // e.g., CoilHeatingWaterToAirHeatPumpEquationFit, CoilHeatingDXVariableRefrigerantFlow, CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl
Comment on lines +104 to +110
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you run an AirLoopHVACUnitarySystem (or a ZoneHVACWAHP) with these coils and no UnitarySystemPerformance object, does E+ throw?

Just curious if you tested it, and same question for the below cooling coils below

sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, 1);
}
} else {
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforHeating, 0);
}

// Number of speeds for cooling
boost::optional<HVACComponent> coolingCoil = unitarySystem.coolingCoil();
if (coolingCoil) {
if (coolingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Cooling_DX_MultiSpeed) {
auto coolingCoilDXMultispeed = coolingCoil->cast<CoilCoolingDXMultiSpeed>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, coolingCoilDXMultispeed.stages().size());
} else {
} else if (coolingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Cooling_DX_VariableSpeed) {
auto coolingCoilDXVarspeed = coolingCoil->cast<CoilCoolingDXVariableSpeed>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, coolingCoilDXVarspeed.speeds().size());
} else if (coolingCoil->iddObjectType() == openstudio::IddObjectType::OS_Coil_Cooling_WaterToAirHeatPump_VariableSpeedEquationFit) {
auto coolingCoilWaterToAirHeatingVar = coolingCoil->cast<CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit>();
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, coolingCoilWaterToAirHeatingVar.speeds().size());
} else { // e.g., CoilCoolingWaterToAirHeatPumpEquationFit, CoilCoolingDXVariableRefrigerantFlow, CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl
sysPerf.setInt(UnitarySystemPerformance_MultispeedFields::NumberofSpeedsforCooling, 1);
}
} else {
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 @@ -355,6 +357,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
Loading