Skip to content

Commit 842b109

Browse files
committed
FluidProperties through HVACUnitaryBypassVAV
1 parent 2fda843 commit 842b109

File tree

8 files changed

+44
-76
lines changed

8 files changed

+44
-76
lines changed

src/EnergyPlus/FluidProperties.cc

Lines changed: 35 additions & 57 deletions
Large diffs are not rendered by default.

src/EnergyPlus/FluidProperties.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ namespace FluidProperties {
564564
int UpperBound // Valid values upper bound (set by calling program)
565565
);
566566

567-
bool CheckFluidPropertyName(EnergyPlusData &state,
567+
bool CheckFluidPropertyName(EnergyPlusData const &state,
568568
std::string const &NameToCheck); // Name from input(?) to be checked against valid FluidPropertyNames
569569

570570
void ReportOrphanFluids(EnergyPlusData &state);

src/EnergyPlus/Furnaces.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2768,8 +2768,6 @@ namespace Furnaces {
27682768
// Get fan data
27692769
FanName = Alphas(7);
27702770

2771-
errFlag = false;
2772-
27732771
thisFurnace.fanType = static_cast<HVAC::FanType>(getEnumValue(HVAC::fanTypeNamesUC, Alphas(6)));
27742772

27752773
if (thisFurnace.fanType == HVAC::FanType::OnOff || thisFurnace.fanType == HVAC::FanType::Constant) {
@@ -4739,11 +4737,7 @@ namespace Furnaces {
47394737

47404738
if (!state.dataGlobal->DoingSizing && state.dataFurnaces->MySecondOneTimeFlag(FurnaceNum)) {
47414739
// sizing all done. check fan air flow rates
4742-
errFlag = false;
47434740
thisFurnace.ActualFanVolFlowRate = state.dataFans->fans(thisFurnace.FanIndex)->maxAirFlowRate;
4744-
if (errFlag) {
4745-
ShowContinueError(state, format("...occurs in {} ={}", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name));
4746-
}
47474741
if (thisFurnace.ActualFanVolFlowRate != DataSizing::AutoSize) {
47484742
if (thisFurnace.DesignFanVolFlowRate > thisFurnace.ActualFanVolFlowRate) {
47494743
ShowWarningError(state,
@@ -5001,11 +4995,11 @@ namespace Furnaces {
50014995
thisFurnace.CoolingSpeedRatio = thisFurnace.MaxCoolAirVolFlow / thisFurnace.ActualFanVolFlowRate;
50024996
thisFurnace.NoHeatCoolSpeedRatio = thisFurnace.MaxNoCoolHeatAirVolFlow / thisFurnace.ActualFanVolFlowRate;
50034997
}
5004-
std::string FanName; // used in warning messages
50054998
if (dynamic_cast<Fans::FanComponent *>(state.dataFans->fans(thisFurnace.FanIndex))->powerRatioAtSpeedRatioCurveNum > 0) {
50064999
if (thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxHeatAirVolFlow &&
50075000
thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxCoolAirVolFlow &&
50085001
thisFurnace.ActualFanVolFlowRate == thisFurnace.MaxNoCoolHeatAirVolFlow) {
5002+
std::string FanName = state.dataFans->fans(thisFurnace.FanIndex)->Name;
50095003
ShowWarningError(state, format("{} \"{}\"", HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name));
50105004
ShowContinueError(state,
50115005
format("...For fan type and name = {} \"{}\"", HVAC::fanTypeNames[(int)thisFurnace.fanType], FanName));

src/EnergyPlus/HVACInterfaceManager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void UpdateHVACInterface(EnergyPlusData &state,
123123
Real64 totDemandSideMaxAvail = 0.0;
124124
for (int demIn = 1; demIn <= state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).NumSupplyNodes; ++demIn) {
125125
int demInNode = state.dataAirLoop->AirToZoneNodeInfo(AirLoopNum).ZoneEquipSupplyNodeNum(demIn);
126-
auto &node = state.dataLoopNodes->Node(demInNode);
126+
auto const &node = state.dataLoopNodes->Node(demInNode);
127127
totDemandSideMassFlow += node.MassFlowRate;
128128
totDemandSideMinAvail += node.MassFlowRateMinAvail;
129129
totDemandSideMaxAvail += node.MassFlowRateMaxAvail;

src/EnergyPlus/HVACManager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ void ResolveLockoutFlags(EnergyPlusData &state, bool &SimAir) // TRUE means air
20512051
}
20522052
}
20532053

2054-
void ResetHVACControl(EnergyPlusData &state)
2054+
void ResetHVACControl(EnergyPlusData const &state)
20552055
{
20562056

20572057
// SUBROUTINE INFORMATION:

src/EnergyPlus/HVACManager.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace HVACManager {
9797

9898
void ResolveLockoutFlags(EnergyPlusData &state, bool &SimAir); // TRUE means air loops must be (re)simulated
9999

100-
void ResetHVACControl(EnergyPlusData &state);
100+
void ResetHVACControl(EnergyPlusData const &state);
101101

102102
void ResetNodeData(EnergyPlusData &state);
103103

src/EnergyPlus/HVACStandAloneERV.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,14 +275,13 @@ void GetStandAloneERV(EnergyPlusData &state)
275275
ShowContinueError(state, format("... occurs in {} \"{}\"", CurrentModuleObject, standAloneERV.Name));
276276
ErrorsFound = true;
277277
}
278+
278279
standAloneERV.DesignHXVolFlowRate = HXSupAirFlowRate;
279280

280281
standAloneERV.SupplyAirFanName = Alphas(4);
281282
GlobalNames::IntraObjUniquenessCheck(
282283
state, Alphas(4), CurrentModuleObject, cAlphaFields(4), state.dataHVACStandAloneERV->SupplyAirFanUniqueNames, ErrorsFound);
283284

284-
errFlag = false;
285-
286285
if ((standAloneERV.SupplyAirFanIndex = Fans::GetFanIndex(state, standAloneERV.SupplyAirFanName)) == 0) {
287286
ShowSevereItemNotFound(state, eoh, cAlphaFields(4), standAloneERV.SupplyAirFanName);
288287
ErrorsFound = true;
@@ -297,7 +296,6 @@ void GetStandAloneERV(EnergyPlusData &state)
297296
standAloneERV.ExhaustAirFanName = Alphas(5);
298297
GlobalNames::IntraObjUniquenessCheck(
299298
state, Alphas(5), CurrentModuleObject, cAlphaFields(5), state.dataHVACStandAloneERV->ExhaustAirFanUniqueNames, ErrorsFound);
300-
errFlag = false;
301299

302300
if ((standAloneERV.ExhaustAirFanIndex = Fans::GetFanIndex(state, standAloneERV.ExhaustAirFanName)) == 0) {
303301
ShowSevereItemNotFound(state, eoh, cAlphaFields(5), standAloneERV.ExhaustAirFanName);
@@ -1695,7 +1693,6 @@ int getEqIndex(EnergyPlusData &state, std::string_view CompName)
16951693
for (int StandAloneERVNum = 1; StandAloneERVNum <= state.dataHVACStandAloneERV->NumStandAloneERVs; StandAloneERVNum++) {
16961694
if (Util::SameString(CompName, state.dataHVACStandAloneERV->StandAloneERV(StandAloneERVNum).Name)) {
16971695
return StandAloneERVNum;
1698-
break;
16991696
}
17001697
}
17011698
return 0;

src/EnergyPlus/HVACUnitaryBypassVAV.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ namespace HVACUnitaryBypassVAV {
330330
bool ErrorsFound(false); // Set to true if errors in input, fatal at end of routine
331331
bool DXErrorsFound(false); // Set to true if errors in get coil input
332332
Array1D_int OANodeNums(4); // Node numbers of OA mixer (OA, EA, RA, MA)
333-
std::string HXDXCoolCoilName; // Name of DX cooling coil used with Heat Exchanger Assisted Cooling Coil
334333
bool DXCoilErrFlag; // used in warning messages
335334

336335
Array1D_string Alphas(20, "");
@@ -754,7 +753,7 @@ namespace HVACUnitaryBypassVAV {
754753
ShowContinueError(state, format("...occurs in {} \"{}\"", thisCBVAV.UnitType, thisCBVAV.Name));
755754
ErrorsFound = true;
756755
} else {
757-
auto &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum];
756+
auto const &newCoil = state.dataCoilCooingDX->coilCoolingDXs[thisCBVAV.DXCoolCoilIndexNum];
758757
thisCBVAV.DXCoilInletNode = newCoil.evapInletNodeIndex;
759758
thisCBVAV.DXCoilOutletNode = newCoil.evapOutletNodeIndex;
760759
thisCBVAV.CondenserNodeNum = newCoil.condInletNodeIndex;
@@ -2444,7 +2443,7 @@ namespace HVACUnitaryBypassVAV {
24442443
}
24452444
// now find the speed ratio for the found speednum
24462445
auto f = [&state, CBVAVNum, SpeedNum, DesOutTemp](Real64 const SpeedRatio) {
2447-
auto &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum);
2446+
auto const &thisCBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum);
24482447
// FUNCTION LOCAL VARIABLE DECLARATIONS:
24492448
Real64 OutletAirTemp; // outlet air temperature [C]
24502449
Real64 QZnReqCycling = 0.001;
@@ -3429,7 +3428,7 @@ namespace HVACUnitaryBypassVAV {
34293428

34303429
// SUBROUTINE LOCAL VARIABLE DECLARATIONS:
34313430
Real64 ZoneLoad = 0.0; // Total load in controlled zone [W]
3432-
int lastDayOfSim(0); // used during warmup to reset changeOverTimer since need to do same thing next warmup day
3431+
int lastDayOfSim(0); // used during warmup to reset changeOverTimer since need to do same thing next warmup day
34333432

34343433
auto &cBVAV = state.dataHVACUnitaryBypassVAV->CBVAV(CBVAVNum);
34353434

0 commit comments

Comments
 (0)