Skip to content

Commit bb326d3

Browse files
committed
unused, constexpr and scope
1 parent 7fe4edc commit bb326d3

File tree

1 file changed

+9
-17
lines changed

1 file changed

+9
-17
lines changed

src/EnergyPlus/StandardRatings.cc

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,8 +1631,7 @@ namespace StandardRatings {
16311631
Real64 IEER_2022(0.0); // Integerated Energy Efficiency Ratio in SI [W/W]
16321632
Real64 NetCoolingCapRated2022(0.0);
16331633

1634-
int ns = 2;
1635-
Array1D<Real64> NetCoolingCapRated_2023(ns); // Net Cooling Coil capacity at Rated conditions, accounting for supply fan heat [W]
1634+
int constexpr ns = 2;
16361635
Array1D<Real64> NetTotCoolingCapRated_2023(16); // net total cooling capacity of DX Coils for the sixteen ASHRAE Std 127 Test conditions
16371636
Array1D<Real64> TotElectricPowerRated_2023(16); // total electric power of DX Coils for the sixteen ASHRAE Std 127 Test conditions
16381637

@@ -1716,8 +1715,6 @@ namespace StandardRatings {
17161715
TSEIRFTemp,
17171716
TSRatedCOP,
17181717
EIRFFlowCurveIndex);
1719-
NetCoolingCapRated_2023(ns) = NetCoolingCapRated2022;
1720-
17211718
} else {
17221719
ShowSevereError(state,
17231720
"Standard Ratings: Coil:Cooling:DX:TwoSpeed either has a zero rated total cooling capacity or zero air flow rate. "
@@ -1894,7 +1891,6 @@ namespace StandardRatings {
18941891
ObjexxFCL::Optional<const HPdefrostControl> DefrostControl)
18951892
{
18961893
Real64 DesignHeatingRequirement2023(0.0); // HSPF2 minimum design heating requirement [W]
1897-
int BinNum2023; // HSPF2 bin number counter
18981894
Real64 FractionalBinHours2023(0.0); // HSPF2 Fractional bin hours for the heating season [-]
18991895
Real64 BuildingLoad2023(0.0); // HSPF2 Building space conditioning load corresponding to an outdoor bin temperature [W]
19001896
Real64 NetHeatingCapReduced2023(0.0); // HSPF2 Net Heating Coil capacity corresponding to an outdoor bin temperature [W]
@@ -1920,7 +1916,7 @@ namespace StandardRatings {
19201916
DesignHeatingRequirement2023 = NetHeatingCapRated_2023;
19211917
Int64 RN = static_cast<int64_t>(RegionNum);
19221918

1923-
for (BinNum2023 = 0; BinNum2023 < TotalNumOfTemperatureBinsHSPF2[RN - 1]; ++BinNum2023) {
1919+
for (int BinNum2023 = 0; BinNum2023 < TotalNumOfTemperatureBinsHSPF2[RN - 1]; ++BinNum2023) {
19241920

19251921
FractionalBinHours2023 = FracBinHoursAtOutdoorBinTempHSPF2[RN - 1][BinNum2023];
19261922

@@ -2462,7 +2458,7 @@ namespace StandardRatings {
24622458
Array1D<int> MSEIRAirFFlow;
24632459
Array1D<int> MSPLRFPLF;
24642460

2465-
int nsp = operatingMode.speeds.size();
2461+
int const nsp = operatingMode.speeds.size();
24662462

24672463
for (int i = 0; i < nsp; ++i) {
24682464
CoilCoolingDXCurveFitSpeed speed = operatingMode.speeds[i];
@@ -2515,7 +2511,7 @@ namespace StandardRatings {
25152511
Array1D<Real64> MSRatedCOP;
25162512
Array1D<int> MSEIRAirFFlow;
25172513

2518-
int nsp = operatingMode.speeds.size();
2514+
int const nsp = operatingMode.speeds.size();
25192515

25202516
for (int i = 0; i < nsp; ++i) {
25212517
CoilCoolingDXCurveFitSpeed speed = operatingMode.speeds[i];
@@ -5699,10 +5695,6 @@ namespace StandardRatings {
56995695
Real64 NetHeatingCapRatedHighTemp(0.0);
57005696
Real64 NetHeatingCapRatedLowTemp(0.0);
57015697

5702-
int BinNum; // bin number counter
5703-
int spnum; // compressor speed number
5704-
int StandardDHRNum; // Integer counter for standardized DHRs
5705-
57065698
Array1D<Real64> FanPowerPerEvapAirFlowRate(nsp); // Fan power per air volume flow rate through the evaporator coil [W/(m3/s)]
57075699
Array1D<Real64> TotHeatCapTestH0(nsp); // Total cooling capacity at A2 test condition (High speed)
57085700
Array1D<Real64> TotHeatCapTestH1(nsp); // Total cooling capacity at B2 test condition (High speed)
@@ -5758,7 +5750,7 @@ namespace StandardRatings {
57585750
NetHeatingCapWeighted = 0.0;
57595751
TotHeatingElecPowerWeighted = 0.0;
57605752

5761-
for (spnum = 1; spnum <= nsp; ++spnum) {
5753+
for (int spnum = 1; spnum <= nsp; ++spnum) {
57625754
FanPowerPerEvapAirFlowRate(spnum) = 0.0;
57635755
if (MSFanPowerPerEvapAirFlowRateInput(spnum) <= 0.0) {
57645756
FanPowerPerEvapAirFlowRate(spnum) = DefaultFanPowerPerEvapAirFlowRate;
@@ -5768,7 +5760,7 @@ namespace StandardRatings {
57685760
}
57695761

57705762
// Proceed withe HSPF value calculation
5771-
for (spnum = 1; spnum <= nsp; ++spnum) {
5763+
for (int spnum = 1; spnum <= nsp; ++spnum) {
57725764
TotCapFlowModFac(spnum) = Curve::CurveValue(state, CapFFlowCurveIndex(spnum), AirMassFlowRatioRated);
57735765
{
57745766
if (state.dataCurveManager->PerfCurve(CapFTempCurveIndex(spnum))->numDims == 1) {
@@ -5841,7 +5833,7 @@ namespace StandardRatings {
58415833
DesignHeatingRequirementMax = 2.20 * DesignHeatingRequirementMin;
58425834
}
58435835
// Set the Design Heating Requirement to nearest standard value (From Table 18, AHRI/ANSI Std 210/240)
5844-
for (StandardDHRNum = 0; StandardDHRNum < TotalNumOfStandardDHRs - 1; ++StandardDHRNum) {
5836+
for (int StandardDHRNum = 0; StandardDHRNum < TotalNumOfStandardDHRs - 1; ++StandardDHRNum) {
58455837
if (DesignHeatingRequirementMin < StandardDesignHeatingRequirement[0]) {
58465838

58475839
DesignHeatingRequirement = min(StandardDesignHeatingRequirement[0], DesignHeatingRequirementMax);
@@ -5862,7 +5854,7 @@ namespace StandardRatings {
58625854
// The minimum temperature below which the compressor is turned off
58635855
OATempCompressorOff = MinOATCompressor;
58645856

5865-
for (BinNum = 0; BinNum < TotalNumOfTemperatureBins[RegionNum - 1]; ++BinNum) { // NumOfOATempBins
5857+
for (int BinNum = 0; BinNum < TotalNumOfTemperatureBins[RegionNum - 1]; ++BinNum) { // NumOfOATempBins
58665858

58675859
FractionalBinHours = FracBinHoursAtOutdoorBinTemp[RegionNum - 1][BinNum];
58685860

@@ -5889,7 +5881,7 @@ namespace StandardRatings {
58895881
}
58905882

58915883
// determine the speed number
5892-
for (spnum = 1; spnum <= nsp - 1; ++spnum) {
5884+
for (int spnum = 1; spnum <= nsp - 1; ++spnum) {
58935885
// Low Speed
58945886
if (OutdoorBinTemperature[BinNum] < -8.33) {
58955887
HeatingCapacityLS = TotHeatCapTestH3(spnum) + ((TotHeatCapTestH1(spnum) - TotHeatCapTestH3(spnum)) *

0 commit comments

Comments
 (0)