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
Wrap AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl and AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl:HR #4778
Conversation
@joseph-robertson reported the new AirConditionerVRF objects do not have a name()/setName() method, and I realized they also don't serialize in ruby... something's wrong with the SWIG stuff $ Products/openstudio -e 'm = OpenStudio::Model::Model.new; vrf = OpenStudio::Model::AirConditionerVariableRefrigerantFlowFluidTemperatureControl.new(m); puts vrf'
#<OpenStudio::Model::AirConditionerVariableRefrigerantFlowFluidTemperatureControl:0x000056251ac3e8b8> Edit: fixed in ff3124f , the order matters |
…l and FluidCtrlHR, not the original AirCondVRF)
…e works as intended
…ditionerVariableRefrigerantFlow. It clones all curves and one of them is cloned TWICE
…oning the child `Curve` objects (20 of them)
b300444
to
4fea937
Compare
…te if no terminals, for consistency
A few things are missing here I think:
I will make the changes (I have them partially done, but failing tests) |
…ls, and AirCOnd and ZoneHVACTU. + Add a Ctor for convenience for ZOneHVACTU that can create a FluidTempCtrl one
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.
@joseph-robertson can you review my changes quickly please?
A2 , \field Name | ||
\required-field | ||
\type alpha | ||
\reference ConnectionObject |
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.
I don't think it's a ConnectionObject
since it doesn't actually have any nodes. In which case it's actually a ParentObject
and not an HVACComponent
... That feels kinda weird though, I need to think this through a bit more...
@@ -54,11 +56,16 @@ namespace model { | |||
{ | |||
|
|||
public: | |||
explicit ZoneHVACTerminalUnitVariableRefrigerantFlow(const Model& model); | |||
explicit ZoneHVACTerminalUnitVariableRefrigerantFlow(const Model& model, bool isFluidTemperatureControl = false); |
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.
New convenience ctor. When isFLuidTemperature Control, it uses CoilHeating/CoolingDXVariableRefrigerantFluidTemperatureControl coils + a FanSystemModel
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.
Wait, we want this to be "+ a FanVariableVolume", no?
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.
I checked the idd, and you're right. It can be FanSystemModel or FanVariableVolume.
// Returns true if the Cooling and Heating Coils are of the FluidTemperatureControl type | ||
bool isFluidTemperatureControl() const; |
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.
New
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.
Good idea.
auto fanType = component.iddObjectType(); | ||
if (isFluidTemperatureControl()) { | ||
if ((fanType != IddObjectType::OS_Fan_SystemModel) && (fanType != IddObjectType::OS_Fan_VariableVolume)) { | ||
LOG(Warn, "For " << briefDescription() | ||
<< ", since it is a FluidTemperatureControl unit, fan type must be FanSystemModel or FanVariableVolume, not " | ||
<< component.briefDescription()); | ||
return false; | ||
} | ||
} else { | ||
if ((fanType != IddObjectType::OS_Fan_SystemModel) && (fanType != IddObjectType::OS_Fan_OnOff) | ||
&& (fanType != IddObjectType::OS_Fan_ConstantVolume)) { | ||
LOG(Warn, | ||
"For " << briefDescription() | ||
<< ", since it is a non-FluidTemperatureControl unit, fan type must be FanSystemModel, FanOnOff, or FanConstantVolume, not " | ||
<< component.briefDescription()); | ||
return false; | ||
} | ||
} |
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.
supplyAirFan type is also enforced.
if (isFluidTemperatureControl) { | ||
CoilCoolingDXVariableRefrigerantFlowFluidTemperatureControl coolingCoil(model); | ||
coolingCoil.setName(name().get() + " Cooling Coil"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setCoolingCoil(coolingCoil); | ||
|
||
CoilHeatingDXVariableRefrigerantFlowFluidTemperatureControl heatingCoil(model); | ||
heatingCoil.setName(name().get() + " Heating Coil"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setHeatingCoil(heatingCoil); | ||
|
||
CoilHeatingDXVariableRefrigerantFlow heatingCoil(model); | ||
heatingCoil.setName(name().get() + " Heating Coil"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setHeatingCoil(heatingCoil); | ||
FanSystemModel fan(model); | ||
fan.setName(name().get() + " Fan"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setSupplyAirFan(fan); | ||
} else { | ||
CoilCoolingDXVariableRefrigerantFlow coolingCoil(model); | ||
coolingCoil.setName(name().get() + " Cooling Coil"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setCoolingCoil(coolingCoil); | ||
|
||
FanOnOff fan(model, alwaysOnSchedule); | ||
fan.setName(name().get() + " Fan"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setSupplyAirFan(fan); | ||
CoilHeatingDXVariableRefrigerantFlow heatingCoil(model); | ||
heatingCoil.setName(name().get() + " Heating Coil"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setHeatingCoil(heatingCoil); | ||
|
||
FanOnOff fan(model, alwaysOnSchedule); | ||
fan.setName(name().get() + " Fan"); | ||
getImpl<detail::ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl>()->setSupplyAirFan(fan); | ||
} |
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.
Convenience ctor logic.
bool AirConditionerVariableRefrigerantFlow_Impl::addTerminal(ZoneHVACTerminalUnitVariableRefrigerantFlow& vrf) { | ||
if (vrf.isFluidTemperatureControl()) { | ||
LOG(Warn, "For " << briefDescription() << ", cannot add a terminal that uses FluidTemperatureControl coils: " << vrf.briefDescription()); | ||
return false; | ||
} | ||
return vrfModelObjectList().addModelObject(vrf); |
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.
AirConditionerVariableRefrigerantFlow only accepts Non-FluidCtrl terminals
bool AirConditionerVariableRefrigerantFlowFluidTemperatureControl_Impl::addTerminal(ZoneHVACTerminalUnitVariableRefrigerantFlow& vrf) { | ||
if (!vrf.isFluidTemperatureControl()) { | ||
LOG(Warn, "For " << briefDescription() << ", cannot add a terminal that uses non-FluidTemperatureControl coils: " << vrf.briefDescription()); | ||
return false; | ||
} | ||
return vrfModelObjectList().addModelObject(vrf); | ||
} |
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.
AirConditionerVariableRefrigerantFlowFluidTemperatureControl only accepts FluidCtrl terminals
bool AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR_Impl::addTerminal(ZoneHVACTerminalUnitVariableRefrigerantFlow& vrf) { | ||
if (!vrf.isFluidTemperatureControl()) { | ||
LOG(Warn, "For " << briefDescription() << ", cannot add a terminal that uses non-FluidTemperatureControl coils: " << vrf.briefDescription()); | ||
return false; | ||
} | ||
return vrfModelObjectList().addModelObject(vrf); | ||
} |
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.
AirConditionerVariableRefrigerantFlowFluidTemperatureControlHR only accepts FluidCtrl terminals
@@ -477,7 +477,7 @@ namespace model { | |||
|
|||
bool setHeatRecoveryHeatingEnergyTimeConstant(double heatRecoveryHeatingEnergyTimeConstant); | |||
|
|||
void addTerminal(ZoneHVACTerminalUnitVariableRefrigerantFlow& vrf); | |||
bool addTerminal(ZoneHVACTerminalUnitVariableRefrigerantFlow& vrf); |
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.
addTerminal returns a bool now. True for all three types
CI Results for 8411966:
|
Pull request overview
ZoneHVACTerminalUnitVariableRefrigerantFlow
to handle FT of:FanVariableVolume
fanFluidTemperatureControl
cooling/heating dx coilsCoil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl
(break API by changingCoilCoolingDXVRF
toHVACComponent
inZoneHVACTerminalUnitVRF
)Coil:Heating:DX:VariableRefrigerantFlow:FluidTemperatureControl
(break API by changingCoilHeatingDXVRF
toHVACComponent
inZoneHVACTerminalUnitVRF
)Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.