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

Fix VRF_FluidTCtrl cooling supply fan power calculation when cycling #10341

Merged
merged 59 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
89671cc
consider cycling in VRF fan power calculation
Dec 22, 2023
5a00a65
multiply by coil runtime fraction not VRF RTF
Jan 3, 2024
9a0cc0b
add fan heat gain adjustment
Jan 24, 2024
a033890
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jan 31, 2024
8901906
Consider run time fraction in OU fan power
Feb 2, 2024
7c1a008
clang-format
Feb 2, 2024
aef23cb
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Feb 2, 2024
5fcc817
Add check of fan index before accessing dataFans->Fan(.)
Feb 3, 2024
026be04
fix unit test uninitialized cycling ratio
Feb 3, 2024
b9c6bff
clang-format
Feb 3, 2024
7d79eac
Move cycling ratio to inside compressor spd calc for heating
Feb 26, 2024
aee8c4a
Revert "Move cycling ratio to inside compressor spd calc for heating"
Feb 28, 2024
ce65545
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Feb 28, 2024
9734922
move fan mult RTF to after OU update, as other branch updates RTF
Feb 29, 2024
e00e86a
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Mar 6, 2024
740bd92
add test for OU fan power change
Mar 6, 2024
902baea
clang-format
Mar 8, 2024
c4c3067
Use OnOffFanPartLoadFraction to control fan power
May 11, 2024
49b10f0
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
May 13, 2024
154343d
resolve merge conflict
May 13, 2024
21afabe
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
May 22, 2024
cf886aa
move fan power mod out of SimulateVAV
May 22, 2024
aef9b67
resolve unit test by init compressor cycling ratio
May 22, 2024
d2183c3
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
May 29, 2024
26414a6
resolve build error from merge
May 30, 2024
9de83a1
use optional arg in SimulateVAV to control for cycling
Jun 12, 2024
5bb21f0
fix unit and integration tests from optional arg addition
Jun 13, 2024
50e57b7
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jun 13, 2024
d21a85c
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jun 17, 2024
1a07c51
change varname to fanRunTimeFraction, add comments to this arg
Jul 8, 2024
f7942a0
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jul 8, 2024
733ec7e
use SystemModel for fan object in VRFFluidTCtrl TU
Jul 16, 2024
6319656
relax curve output range and fix min x Fan:SystemModel
Jul 16, 2024
8ec965f
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jul 16, 2024
79a0810
transition code Fan:VariableVolume to Fan:SystemModel
Jul 17, 2024
289d5cc
update idd and doc to remove vav fan
Jul 17, 2024
6e79143
add transition to delete old VAV fan objects
Jul 18, 2024
f0a18f4
Revert "change varname to fanRunTimeFraction, add comments to this arg"
Jul 18, 2024
b5fa9ea
Revert "fix unit and integration tests from optional arg addition"
Jul 18, 2024
4c834c7
Revert "use optional arg in SimulateVAV to control for cycling"
Jul 18, 2024
49e82a0
use old fan name in transition after VAV fans are deleted
Jul 18, 2024
6e5166a
remove unused inititialization
Jul 18, 2024
cf3b3c5
transition testfiles to use Fan:SystemModel
Jul 22, 2024
7dd6720
change all-upper case to pascal-case
Jul 23, 2024
19c4aae
fix unit test Fan:VariableVolume to Fan:SystemModel transition
Jul 24, 2024
ba1f3cf
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Jul 25, 2024
a19c990
change ElecPowerMinFlowRateFrac calc, autosize DesignElecPower
Jul 31, 2024
dc5c342
change READ to ProcessNumber
Aug 2, 2024
d1c3cd7
update err message and call ShowWarningError
Aug 2, 2024
3c6c581
use 0.0 as min x value of fan performance curve
Aug 2, 2024
698ddbf
min value of system fan curve in idf change to 0
Aug 5, 2024
4417664
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Aug 5, 2024
261699a
remove OU fan adjustment and put it in a different PR
Aug 7, 2024
de9baf3
change OnOffFanPartLoadFraction back to use PLF
Aug 12, 2024
e03dea0
fix unit test related to OU fan, as it's not fixed here
Aug 13, 2024
37471e1
pass in OnOffFanPartLoadFraction of constant 1
Aug 13, 2024
bcf4118
fix err message blow->draw through
Aug 14, 2024
fabbc97
Merge remote-tracking branch 'origin/develop' into vrfCoolingFan
Aug 16, 2024
49fd825
clang-format
Aug 16, 2024
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
31 changes: 27 additions & 4 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,29 @@ void SimulateVRF(EnergyPlusData &state,
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).CondenserType == DataHeatBalance::RefrigCondenserType::Water)
UpdateVRFCondenser(state, VRFCondenser);
}
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFAlgorithmType == AlgorithmType::FluidTCtrl) {
// consider cycling in fan calculation
for (int TUListNum = 1; TUListNum <= state.dataHVACVarRefFlow->NumVRFTULists; ++TUListNum) {
auto &thisTUList = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum);
for (int TUNum = 1; TUNum <= thisTUList.NumTUInList; ++TUNum) {
int heatingCoilNum = state.dataHVACVarRefFlow->VRFTU(TUNum).HeatCoilIndex;
int coolingCoilNum = state.dataHVACVarRefFlow->VRFTU(TUNum).CoolCoilIndex;
auto &heatingCoil = state.dataDXCoils->DXCoil(heatingCoilNum);
auto &coolingCoil = state.dataDXCoils->DXCoil(coolingCoilNum);
int fanIndex = state.dataHVACVarRefFlow->VRFTU(TUNum).FanIndex;
// only deal with cooling for now. heating RTF might have some issue
// does Fan:SystemModel need adjustment as well? if so consider 0-indexing and it's in state.dataHVACFan->fanObjs vector
if (fanIndex > 0 && heatingCoil.HeatingCoilRuntimeFraction == 0.0) { // in cooling mode
// here coolingCoil.CoolingCoilRuntimeFraction equals state.dataHVACVarRefFlow->VRF(VRFCond).VRFCondCyclingRatio
// this is not the case for heating
auto &fan = state.dataFans->Fan(fanIndex);
fan.FanPower *= coolingCoil.CoolingCoilRuntimeFraction;
fan.FanEnergy = fan.FanPower * state.dataHVACGlobal->TimeStepSysSec;
fan.PowerLossToAir *= coolingCoil.CoolingCoilRuntimeFraction;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I like this since here again one model is changing the result of another. The only fan models that change the "fans" result based on cycling is Fan:OnOff and Fan:SystemModel. Should this apply to a fan that operates the entire time step? The fan does not necessarily cycle with the compressor. The way this is done in other models is to set the state.dataHVACGlobal->OnOffFanPartLoadFraction variable and let the fan model decide what to do with power/energy.

ZoneHVAC:TerminalUnit:VariableRefrigerantFlow,
  A7 ,  \field Supply Air Fan Object Type
        \type choice
        \key Fan:SystemModel
        \key Fan:OnOff
        \key Fan:ConstantVolume
        \key Fan:VariableVolume

Copy link
Collaborator Author

@yujiex yujiex May 11, 2024

Choose a reason for hiding this comment

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

The VRF Fluid control model terminal unit only accepts a Fan:VariableVolume object (otherwise there will be an error message

Fan Object Type must be Fan:VariableVolume if VRF AirConditioner:VariableRefrigerantFlow:FluidTemperatureControl 

The Fan:VariableVolume object is simulated in the SimVariableVolumeFan function. But in this function, the state.dataHVACGlobal->OnOffFanPartLoadFraction was not used anywhere. So I modified the function to access this global variable which holds the coil runtime fraction.

Although this affects other non-VRF-FluidCtrl models as well, as the SimVariableVolumeFan is not specific to the VRF model.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with the idea of not applying a fan that operates for the entire time step and instead letting the fan model decide how to manage the power. Even though state.dataHVACGlobal->OnOffFanPartLoadFraction isn't used anywhere for now, it could be used elsewhere in the future . Any insights regarding this issue would be appreciated. @rraustad @mjwitte @EnergyArchmage @Myoldmopar

Copy link
Contributor

Choose a reason for hiding this comment

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

I would agree. The cooling coil should set state.dataHVACGlobal->OnOffFanPartLoadFraction. And this should probably be done in a separate branch?

Copy link
Collaborator Author

@yujiex yujiex Jun 10, 2024

Choose a reason for hiding this comment

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

@rraustad Do you mean adding state.dataHVACGlobal->OnOffFanPartLoadFraction access in SimVariableVolumeFan function should be done in another separate branch and using cooling coil RTF to set state.dataHVACGlobal->OnOffFanPartLoadFraction should be on this branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The coil object Coil:Cooling:DX:VariableRefrigerantFlow:FluidTemperatureControl doesn't have the Part Load Fraction Correlation Curve Name field, the PLF value is always 1. This is the Fluid cooling model indeed. I'll look at the airflow as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For the OnOff fan, the fan RTF and air mass flow both resemble the fan power shape.

The following is the fan air mass flow plotted against the cooling coil runtime fraction.

image

The following is the fan runtime fraction plotted against cooling coil runtime fraction
image
eplusout_onOffFan_fanAirFlow_vs_coilRTF.xlsx

US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF_onOffFan.idf.zip
@rraustad

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the Fan:OnOff results and must be using a unity PLF curve? Is this the fluid cooler model? I see coil RTF basically equal to HP cycling ratio which means no impact for startup losses. The only way I know that fan power can vary like this is if air flow is not proportional to coil PLR. I'm not saying that's bad, I just don't completely understand how air flow is controlled. If I assume air flow is independent of coil PLR, for example air flow is controlled to maintain a certain suction temperature, then I would think PLF should be passed to the fan and the fan calculate RTF = fan PLR/PLF.

image

Since this PR is more about the variable volume fan (the only non-system-model one accepted by the FluidTCtrl model, maybe we can first try to figure this part out in the current PR and discuss whether to allow for OnOff fans in another separate PR? (or do you feel using OnOff fan instead of variable volume fan should be part of the fix?) Do you feel the current fix in this commit is okay or still not general enough? @rraustad

Copy link
Contributor

Choose a reason for hiding this comment

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

This branch is fine for the fans allowed for this model. Fan:SystemModel or Fan:VariableVolume. I was just trying to figure out what the fan power and air flow should look like.

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 see

}
}
}
}
}

PlantComponent *VRFCondenserEquipment::factory(EnergyPlusData &state, std::string const &objectName)
Expand Down Expand Up @@ -11720,9 +11743,9 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)

// Key outputs of this subroutine
this->CompActSpeed = max(CompSpdActual, 0.0);
this->Ncomp = max(Ncomp, 0.0) / this->EffCompInverter; // 0.95 is the efficiency of the compressor inverter, can come from IDF //@minor
this->OUFanPower = this->RatedOUFanPower; //@ * pow_3( CondFlowRatio )
this->VRFCondCyclingRatio = CyclingRatio; // report variable for cycling rate
this->Ncomp = max(Ncomp, 0.0) / this->EffCompInverter; // 0.95 is the efficiency of the compressor inverter, can come from IDF //@minor
this->OUFanPower = this->RatedOUFanPower * CyclingRatio; //@ * pow_3( CondFlowRatio )
this->VRFCondCyclingRatio = CyclingRatio; // report variable for cycling rate

Tdischarge = this->CondensingTemp; // outdoor unit condensing temperature
this->CoolingCapacity =
Expand Down Expand Up @@ -11934,7 +11957,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)
// Key outputs of this subroutine
this->CompActSpeed = max(CompSpdActual, 0.0);
this->Ncomp = max(Ncomp, 0.0) / this->EffCompInverter;
this->OUFanPower = this->RatedOUFanPower;
this->OUFanPower = this->RatedOUFanPower * CyclingRatio;
this->VRFCondCyclingRatio = CyclingRatio;

Tsuction = this->EvaporatingTemp; // Outdoor unit evaporating temperature
Expand Down
8 changes: 7 additions & 1 deletion tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13192,6 +13192,8 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest)
Real64 OAUCoilOutTemp = 0.0;
bool ZoneEquipment = true;

// add VRF cycling ratio initialization. Since TU's are simulated first, if there's no initialization, the coil runtime fraction will be zero
state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio = 1.0;
SimulateVRF(*state,
state->dataHVACVarRefFlow->VRFTU(VRFTUNum).Name,
FirstHVACIteration,
Expand Down Expand Up @@ -13219,8 +13221,12 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest)
EXPECT_EQ(0.0, thisVRFTU.NoCoolHeatOutAirMassFlow);
EXPECT_NEAR(5125.0840, thisDXCoolingCoil.TotalCoolingEnergyRate, 0.0001);
EXPECT_NEAR(4999.8265, thisVRFTU.TotalCoolingRate, 0.0001);
EXPECT_NEAR(125.2573, thisFan.FanPower, 0.0001);
EXPECT_NEAR(125.2573 * thisDXCoolingCoil.CoolingCoilRuntimeFraction, thisFan.FanPower, 0.0001);
EXPECT_NEAR(thisDXCoolingCoil.TotalCoolingEnergyRate, (thisVRFTU.TotalCoolingRate + thisFan.FanPower), 0.0001);
EXPECT_NEAR(0.8930, state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio, 0.0001);
EXPECT_NEAR(state->dataHVACVarRefFlow->VRF(1).OUFanPower,
state->dataHVACVarRefFlow->VRF(1).RatedOUFanPower * state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio,
0.0001);
}

// Test for #7648: HREIRFTHeat wrongly used HRCAPFTHeatConst. Occurs only if you have Heat Recovery
Expand Down
Loading