-
Notifications
You must be signed in to change notification settings - Fork 418
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
Add Supplemental Heating Coil to VRF Air Terminal Unit #7252
Conversation
@Nigusse it has been 7 days since this pull request was last updated. |
@Nigusse it has been 7 days since this pull request was last updated. |
@Nigusse it has been 7 days since this pull request was last updated. |
@Nigusse the warning there on the custom_check build is because this PR doesn't have a NewFeature, etc., label on it. At some point when you add that label and then push new commits up, it will turn green. No rush to rebuild it just for that though. |
This branch is ready for review. @Myoldmopar I have addressed your NFP review comments regarding applicability of the model to all VRF system types, and transition requirements on Pull Request Overview section. |
@@ -3944,6 +3950,174 @@ namespace HVACVariableRefrigerantFlow { | |||
} | |||
} | |||
|
|||
// supplemental heating coil | |||
if (!lAlphaFieldBlanks(17) && !lAlphaFieldBlanks(18)) { |
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.
The protection is good here but what if a users forgets to enter one or the other input? Would we want to warn if one or the other were blank but not both?
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 will look into it if it is better to provide a separate warning.
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.
if only one of the two is blank, then I will provide warning message.
if (VRFTU(VRFTUNum).SuppHeatingCoilPresent) { | ||
CompType = VRFTU(VRFTUNum).SuppHeatCoilType; | ||
CompName = VRFTU(VRFTUNum).SuppHeatCoilName; | ||
SizingMethod = DataHVACGlobals::HeatingCapacitySizing; |
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.
Not saying this is wrong since it uses only 1 sizing method (which I like), but there are 2 heating capacity sizing methods. One for water coils (WaterHeatingCapacitySizing) and the other for all other coil types (HeatingCapacitySizing).
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.
@rraustad I missed the two heating coil capacity sizing method flavors. Addressed. I will run my test files if it makes a difference.
} | ||
|
||
// run supplemental heating coil | ||
Real64 SuppPLR = this->SuppHeatPartLoadRatio; |
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.
Unless SuppPLR is used somewhere else you could have put this inside the IF block and only executed this line if a supplemental coil was present.
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.
@rraustad You are right. Done.
} else { | ||
// Algorithm Type: VRF model based on system curve | ||
CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, ActualOutput, OnOffAirFlowRatio); | ||
VRFTU(VRFTUNum).CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, ActualOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); |
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.
This looks weird. CalcVRF is a function and this makes it look like a member variable. @Myoldmopar is this standard syntax?
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.
@rraustad This is how you call if it is member function. This is not full OO but it is a step in that direction.
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.
Right, CalcVRF is a member variable...that just happens to be a function. So everyone's right. This is good.
@@ -10185,7 +10688,25 @@ namespace HVACVariableRefrigerantFlow { | |||
|
|||
// Otherwise the coil needs to turn on. Get full load result | |||
PartLoadRatio = 1.0; | |||
this->CalcVRF_FluidTCtrl(VRFTUNum, FirstHVACIteration, PartLoadRatio, FullOutput, OnOffAirFlowRatio); | |||
this->CalcVRF_FluidTCtrl(VRFTUNum, FirstHVACIteration, PartLoadRatio, FullOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); |
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.
This call looks correct, using this->Calc. Compare to 8265 above.
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.
The reason he couldn't use this->
above is because he wasn't in a member function there, so there's no this->
reference. this->
is only available when you are already in the context of a single instance.
Local testing showed that supplemental heating coil capacity sizing impacts the the main DX heating coil capacity of the VRF Terminal Unit. But it should not. I will push in revised code. |
OK, yeah, hiccup! All is well now. Carry on... |
Merged in develop and resolved conflict. I expect CI machine to run green. |
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 looked the whole thing over, and there is a lot to take in. I didn't see any red flags, and it seems @rraustad has looked it over at least once as well. From a code perspective I'm OK with things.
@@ -2,7 +2,7 @@ \section{Group -- Variable Refrigerant Flow Equipment}\label{group-variable-refr | |||
|
|||
This group of EnergyPlus input objects describes the configurations of Variable Refrigerant Flow (VRF, or Variable Refrigerant Volume) air-conditioning systems. | |||
|
|||
A VRF system is an air-conditioning system that varies the refrigerant flow rate using variable speed compressor(s) in the outdoor unit, and the electronic expansion valves (EEVs) located in each indoor unit. The system meets the space cooling or heating load requirements by maintaining the zone air temperature at the setpoint. The ability to control the refrigerant mass flow rate according to the cooling and/or heating load enables the use of as many as 60 or more indoor units with differing capacities in conjunction with one single outdoor unit. This unlocks the possibility of having individualized comfort control, simultaneous heating and cooling in different zones, and heat recovery from one zone to another. It may also lead to more efficient operations during part-load conditions. | |||
A VRF system is an air-conditioning system that varies the refrigerant flow rate using variable speed compressor(s) in the outdoor unit, and the electronic expansion valves (EEVs) located in each indoor unit. The system meets the space cooling or heating load requirements by maintaining the zone air temperature at the setpoint. The ability to control the refrigerant mass flow rate according to the cooling and/or heating load enables the use of as many as 20 or more indoor units with differing capacities in conjunction with one single outdoor unit. This unlocks the possibility of having individualized comfort control, simultaneous heating and cooling in different zones, and heat recovery from one zone to another. It may also lead to more efficient operations during part-load conditions. |
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.
Seems like kind of an arbitrary number change, but OK.
src/EnergyPlus/DXCoils.cc
Outdated
@@ -16388,7 +16389,12 @@ namespace DXCoils { | |||
EIR = DXCoil(DXCoilNum).RatedEIR(Mode) * EIRTempModFac * EIRFlowModFac; | |||
|
|||
// Calculate PLRHeating: modified PartLoadRatio due to defrost ( reverse-cycle defrost only ) | |||
PLRHeating = min(1.0, (PartLoadRatio + LoadDueToDefrost / TotCap)); | |||
if (TotCap > 0.0) { |
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 divide by zero catch.
@@ -4923,6 +5134,9 @@ namespace HVACVariableRefrigerantFlow { | |||
MyOneTimeFlag = false; | |||
MyVRFCondFlag = true; | |||
|
|||
MySuppCoilPlantScanFlag.allocate(NumVRFTU); | |||
MySuppCoilPlantScanFlag = true; |
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.
Seems like you'd want to just add a boolean, defaulted to true, to the VRFTU structure, so that you don't have a separate array to manage. If there are any other changes to make here, I'd like to see that streamlined, or maybe you have a specific reason you needed to do it this way.
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.
No, I did not have any specific reason. I am happy to change it along with your next comment about the nested IF structure. Let me know.
if ((VRFTU(VRFTUNum).SuppHeatCoilType_Num == DataHVACGlobals::Coil_HeatingWater) || | ||
(VRFTU(VRFTUNum).SuppHeatCoilType_Num == DataHVACGlobals::Coil_HeatingSteam)) { | ||
|
||
if (VRFTU(VRFTUNum).SuppHeatCoilType_Num == DataHVACGlobals::Coil_HeatingWater) { |
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.
This nested IF structure is kinda hard to read, and it looks like all but the last line or two are in each of the nested sections. I'd suggest just eliminating the first if (Water Or Steam)
block as shown here:
if water or steam
if water
water-stuff
else if steam
steam-stuff
end
a couple common lines
end
to
if water
water-stuff
a couple common lines
else if steam
steam-stuff
a couple common lines
end
I realize this code isn't called frequently, so the performance impact of the nested structure will be minimal, and it's not a functional change, so if no other changes are needed, I'll not worry about it.
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.
@Myoldmopar I am making these changes.
bool const FirstHVACIteration, // flag for 1st HVAC iteration in the time step | ||
Real64 &PartLoadRatio, // unit part load ratio | ||
Real64 &OnOffAirFlowRatio // ratio of compressor ON airflow to AVERAGE airflow over timestep | ||
void VRFTerminalUnitEquipment::ControlVRF(int const VRFTUNum, // Index to VRF terminal unit |
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.
👍 👍 👍
} else { | ||
// Algorithm Type: VRF model based on system curve | ||
CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, ActualOutput, OnOffAirFlowRatio); | ||
VRFTU(VRFTUNum).CalcVRF(VRFTUNum, FirstHVACIteration, PartLoadRatio, ActualOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); |
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.
Right, CalcVRF is a member variable...that just happens to be a function. So everyone's right. This is good.
@@ -10185,7 +10688,25 @@ namespace HVACVariableRefrigerantFlow { | |||
|
|||
// Otherwise the coil needs to turn on. Get full load result | |||
PartLoadRatio = 1.0; | |||
this->CalcVRF_FluidTCtrl(VRFTUNum, FirstHVACIteration, PartLoadRatio, FullOutput, OnOffAirFlowRatio); | |||
this->CalcVRF_FluidTCtrl(VRFTUNum, FirstHVACIteration, PartLoadRatio, FullOutput, OnOffAirFlowRatio, SuppHeatCoilLoad); |
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.
The reason he couldn't use this->
above is because he wasn't in a member function there, so there's no this->
reference. this->
is only available when you are already in the context of a single instance.
CI is happy, and code is generally fine. I ran it locally and I see in the curve-fit VRF file that the supplemental heating coil is coming on for terminal unit 1, but not for the other terminal units. Is that intentional? |
@Myoldmopar I have also seen those instances. When the heating load is relatively small, the DX heating coil provided all heating requirement. Otherwise, all supplemental heating coils types have been tested individually and they work fine. |
@Myoldmopar I just checked my previous run result for example file VRF_5Zone_wSuppHeater.idf, only supplemental heaters of terminal units 2 and 4 were off whereas supplemental heaters of terminal units 1, 3, and 5 do run. Supplemental heaters 2 and 4 were off because, DX heating coil was able to provide the entire heating requirement. For the later two terminal units the DX heating coil run time fraction were less than 1.0. |
Addressed your review comments. @Myoldmopar Thanks. |
idd/Energy+.idd.in
Outdated
@@ -34671,7 +34671,6 @@ ZoneHVAC:WaterToAirHeatPump, | |||
\object-list HeatingCoilName | |||
\note Needs to match in the supplemental heating coil object | |||
N11, \field Maximum Supply Air Temperature from Supplemental Heater | |||
\required-field |
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.
Why is this object being touched here? If you want to make this not required, then it should be \default autosize
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 wanted it to be an optional field, no other reason. OK. will add " \required-field" and default to autosize. @mjwitte Thanks.
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.
@mjwitte never mind, I thought this was the VF terminal unit. It must be accidental change. will fix both.
N11, \field Maximum Supply Air Temperature from Supplemental Heater | ||
\type real | ||
\units C | ||
\autosizable |
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.
This should have \default autosize and that should be mentioned in the I/O Ref (same for the other 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.
Updated the IO reference of the WSHP and VRF terminal units.
@Nigusse thanks for addressing my comments. You've got a couple IDD comments from @mjwitte to address. Also custom_check noted that your new example file is not UTF8 encoded. I have convert it if you need help doing it, but if you open that IDF in Notepad++ or something similar, you should be able to change the encoding and save it as UTF-8. Something similar should be available in Visual Studio (File -> Advanced Save Settings?) Once those are taken care of, I think this will be OK to go in. |
@Nigusse thanks for addressing the IDD comments. @mjwitte please verify they are in good shape. I took the new test file, opened in a text editor, changed encoding to UTF-8, and now custom_check passes locally. I pushed that change along with pulling from develop. If everyone is happy with the next set of results this can be merged. |
No wait, this branch has two integration failures. Rebuilding locally and I'll run them to see what's up with it. I have a suspicion. |
Indeed, it was the missing run period names that were causing the two new test files to fail. (They are now required inputs.) I fixed them, and honestly I may just merge this in. Custom-check has now approved the UTF8 change, and I am getting passing test files. |
Pull request overview
This is a new feature. Modified the VRF terminal units model to support supplemental heating coils. Electric, Fuel, Hot water and Steam coils can be used as supplemental heating coil. The supplemental heating coils are supported in system curve and Fluid_Control VRF systems. Diffs are not expected based on this change. Transition rule has been avoid by making the new input fields optional.
Work Checklist
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Review Checklist
This will not be exhaustively relevant to every PR.