Skip to content

Commit

Permalink
update Te and RTF only happens in the FluidTCtrl model
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujie Xu authored and Yujie Xu committed Mar 6, 2024
1 parent 00d8f25 commit 68fb801
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,24 +283,26 @@ void SimulateVRF(EnergyPlusData &state,
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).CondenserType == DataHeatBalance::RefrigCondenserType::Water)
UpdateVRFCondenser(state, VRFCondenser);
}
// yujie: update coil and IU evaporating temperature
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).adjustedTe && (!FirstHVACIteration)) {
state.dataDXCoils->DXCoil(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolCoilIndex).EvaporatingTemp =
state.dataHVACVarRefFlow->VRF(VRFCondenser).EvaporatingTemp;
state.dataHVACVarRefFlow->VRF(VRFCondenser).IUEvaporatingTemp = state.dataHVACVarRefFlow->VRF(VRFCondenser).EvaporatingTemp;
}

auto const &thisTU = state.dataHVACVarRefFlow->VRFTU(VRFTUNum);
auto &coolingCoil = state.dataDXCoils->DXCoil(thisTU.CoolCoilIndex);
int PLF;
if (coolingCoil.PLFFPLR(1) > 0 && state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio < 1.0) {
PLF = Curve::CurveValue(
state, coolingCoil.PLFFPLR(1), state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio); // Calculate part-load factor
} else {
PLF = 1.0;
}
if (coolingCoil.TotalCoolingEnergyRate > 0.0) {
coolingCoil.CoolingCoilRuntimeFraction = state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio / PLF;
// yujie: update coil and IU evaporating temperature, also keep coil RTF updated with the condenser side cycling ratio, for the FluidTCtrl model
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFAlgorithmType == AlgorithmType::FluidTCtrl) {
if (state.dataHVACVarRefFlow->VRF(VRFCondenser).adjustedTe && (!FirstHVACIteration)) {
state.dataDXCoils->DXCoil(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolCoilIndex).EvaporatingTemp =
state.dataHVACVarRefFlow->VRF(VRFCondenser).EvaporatingTemp;
state.dataHVACVarRefFlow->VRF(VRFCondenser).IUEvaporatingTemp = state.dataHVACVarRefFlow->VRF(VRFCondenser).EvaporatingTemp;
}

auto const &thisTU = state.dataHVACVarRefFlow->VRFTU(VRFTUNum);
auto &coolingCoil = state.dataDXCoils->DXCoil(thisTU.CoolCoilIndex);
int PLF;
if (coolingCoil.PLFFPLR(1) > 0 && state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio < 1.0) {
PLF = Curve::CurveValue(
state, coolingCoil.PLFFPLR(1), state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio); // Calculate part-load factor
} else {
PLF = 1.0;
}
if (coolingCoil.TotalCoolingEnergyRate > 0.0) {
coolingCoil.CoolingCoilRuntimeFraction = state.dataHVACVarRefFlow->VRF(VRFCondenser).VRFCondCyclingRatio / PLF;
}
}
}

Expand Down

5 comments on commit 68fb801

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

vrfFluidCtrlFixCoolingCycling (Unknown) - Win64-Windows-10-VisualStudio-16: OK (2766 of 2766 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

vrfFluidCtrlFixCoolingCycling (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3591 of 3595 tests passed, 0 test warnings)

Messages:\n

  • 4 tests had: ESO big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ERR diffs.
  • 2 tests had: MTR big diffs.

Failures:\n

regression Test Summary

  • Passed: 803
  • Failed: 4

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

vrfFluidCtrlFixCoolingCycling (Unknown) - x86_64-MacOS-10.18-clang-15.0.0: OK (3549 of 3554 tests passed, 0 test warnings)

Messages:\n

  • 4 tests had: ESO big diffs.
  • 4 tests had: Table big diffs.
  • 3 tests had: EIO diffs.
  • 3 tests had: ERR diffs.
  • 2 tests had: MTR big diffs.

Failures:\n

regression Test Summary

  • Passed: 783
  • Failed: 4

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

vrfFluidCtrlFixCoolingCycling (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (791 of 791 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

vrfFluidCtrlFixCoolingCycling (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1978 of 1978 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.