Skip to content

Commit c6497e7

Browse files
committed
Reduce scope
1 parent def3f7a commit c6497e7

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

src/EnergyPlus/HVACVariableRefrigerantFlow.cc

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7684,7 +7684,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum)
76847684
state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxCoolAirVolFlow = sizingCoolingAirFlow.size(state, TempSize, errorsFound);
76857685

76867686
} else if (SAFMethod == FlowPerCoolingCapacity) {
7687-
SizingMethod = CoolingCapacitySizing;
7687+
SizingMethod = CoolingCapacitySizing; // either this isn't needed or needs to be assigned to EqSizing
76887688
TempSize = AutoSize;
76897689
PrintFlag = false;
76907690
state.dataSize->DataScalableSizingON = true;
@@ -7769,7 +7769,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum)
77697769
sizingHeatingAirFlow.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName);
77707770
state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow = sizingHeatingAirFlow.size(state, TempSize, errorsFound);
77717771
} else if (SAFMethod == FlowPerHeatingCapacity) {
7772-
SizingMethod = HeatingCapacitySizing;
7772+
SizingMethod = HeatingCapacitySizing; // either this isn't needed or needs to be assigned to EqSizing
77737773
TempSize = AutoSize;
77747774
PrintFlag = false;
77757775
state.dataSize->DataScalableSizingON = true;
@@ -7783,7 +7783,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum)
77837783
sizerHeatingCapacity.initializeWithinEP(state, CompType, CompName, PrintFlag, RoutineName);
77847784
state.dataSize->DataAutosizedHeatingCapacity = sizerHeatingCapacity.size(state, TempSize, errorsFound);
77857785
state.dataSize->DataFlowPerHeatingCapacity = state.dataSize->ZoneHVACSizing(zoneHVACIndex).MaxHeatAirVolFlow;
7786-
SizingMethod = HeatingAirflowSizing;
7786+
SizingMethod = HeatingAirflowSizing; // either this isn't needed or needs to be assigned to EqSizing
77877787
PrintFlag = true;
77887788
TempSize = AutoSize;
77897789
errorsFound = false;
@@ -8011,7 +8011,7 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum)
80118011

80128012
FieldNum = 3; // N3, \field Supply Air Flow Rate During Heating Operation
80138013
SizingString = state.dataHVACVarRefFlow->VRFTUNumericFields(VRFTUNum).FieldNames(FieldNum) + " [m3/s]";
8014-
int SizingMethod = HeatingAirflowSizing;
8014+
int SizingMethod = HeatingAirflowSizing; // either this isn't needed or needs to be assigned to EqSizing
80158015
TempSize = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).MaxHeatAirVolFlow;
80168016
errorsFound = false;
80178017
HeatingAirFlowSizer sizingHeatingAirFlow;
@@ -8366,7 +8366,6 @@ void SizeVRF(EnergyPlusData &state, int const VRFTUNum)
83668366
} else {
83678367
SizingString = "Supplemental Heating Coil Nominal Capacity [W]";
83688368
if (TempSize == DataSizing::AutoSize) {
8369-
IsAutoSize = true;
83708369
bool errorsFound = false;
83718370
HeatingCapacitySizer sizerHeatingCapacity;
83728371
sizerHeatingCapacity.overrideSizingString(SizingString);
@@ -8882,9 +8881,8 @@ void VRFCondenserEquipment::SizeVRFCondenser(EnergyPlusData &state)
88828881
if (this->CondenserType == DataHeatBalance::RefrigCondenserType::Water) {
88838882

88848883
bool ErrorsFound = false;
8885-
int PltSizCondNum = 0;
8886-
88878884
if (this->WaterCondVolFlowRate == DataSizing::AutoSize) {
8885+
int PltSizCondNum = 0;
88888886
if (this->SourcePlantLoc.loopNum > 0) PltSizCondNum = state.dataPlnt->PlantLoop(this->SourcePlantLoc.loopNum).PlantSizNum;
88898887
if (PltSizCondNum > 0) {
88908888
rho = FluidProperties::GetDensityGlycol(state,
@@ -9613,8 +9611,6 @@ void ReportVRFTerminalUnit(EnergyPlusData &state, int const VRFTUNum) // index t
96139611

96149612
using namespace DataSizing;
96159613

9616-
int DXCoolingCoilIndex; // - index to DX cooling coil
9617-
int DXHeatingCoilIndex; // - index to DX heating coil
96189614
Real64 TotalConditioning; // - sum of sensible and latent rates
96199615
Real64 SensibleConditioning; // - sensible rate
96209616
Real64 LatentConditioning; // - latent rate
@@ -9625,8 +9621,6 @@ void ReportVRFTerminalUnit(EnergyPlusData &state, int const VRFTUNum) // index t
96259621
bool HRHeatRequestFlag; // - indicates TU could be in heat mode
96269622
bool HRCoolRequestFlag; // - indicates TU could be in cool mode
96279623

9628-
DXCoolingCoilIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).CoolCoilIndex;
9629-
DXHeatingCoilIndex = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatCoilIndex;
96309624
VRFCond = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum;
96319625
TUListIndex = state.dataHVACVarRefFlow->VRF(VRFCond).ZoneTUListPtr;
96329626
IndexToTUInTUList = state.dataHVACVarRefFlow->VRFTU(VRFTUNum).IndexToTUInTUList;
@@ -10010,7 +10004,6 @@ void InitializeOperatingMode(EnergyPlusData &state,
1001010004
Real64 SPTempHi; // thermostat setpoint high
1001110005
Real64 SPTempLo; // thermostat setpoint low
1001210006
int NumTU; // loop counter, number of TU's in list
10013-
int TUIndex; // index to TU
1001410007
Real64 ZoneLoad; // current zone load (W)
1001510008
Real64 LoadToCoolingSP; // thermostat load to cooling setpoint (W)
1001610009
Real64 LoadToHeatingSP; // thermostat load to heating setpoint (W)
@@ -10040,7 +10033,7 @@ void InitializeOperatingMode(EnergyPlusData &state,
1004010033
for (NumTU = 1; NumTU <= state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).NumTUInList; ++NumTU) {
1004110034
// make sure TU's have been sized before looping through each one of them to determine operating mode
1004210035
if (any(state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).TerminalUnitNotSizedYet)) break;
10043-
TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU);
10036+
int TUIndex = state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).ZoneTUPtr(NumTU);
1004410037

1004510038
// check to see if coil is present
1004610039
if (state.dataHVACVarRefFlow->TerminalUnitList(TUListNum).CoolingCoilPresent(NumTU)) {
@@ -13990,10 +13983,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state,
1399013983
Real64 CondHeat = Q_evap_req * C_cap_operation0 / this->RatedEvapCapacity; // 150130 To be confirmed
1399113984
int CAPFT = this->OUCoolingCAPFT(CounterCompSpdTemp);
1399213985

13993-
// Update Te' (SmallLoadTe) to meet the required evaporator capacity
13994-
MinOutdoorUnitTe = 6;
1399513986
P_discharge = this->refrig->getSatPressure(state, T_discharge, RoutineName);
13996-
1399713987
MinRefriPe = this->refrig->getSatPressure(state, -15, RoutineName);
1399813988
MinOutdoorUnitPe = max(P_discharge - this->CompMaxDeltaP, MinRefriPe);
1399913989
MinOutdoorUnitTe = this->refrig->getSatTemperature(state, max(min(MinOutdoorUnitPe, RefPHigh), RefPLow), RoutineName);

0 commit comments

Comments
 (0)