Skip to content

Commit

Permalink
Merge pull request #8101 from NREL/173380574_Issue8087
Browse files Browse the repository at this point in the history
Support Electric Heating Coil with ASHRAE90VariableFan Capacity Control
  • Loading branch information
Myoldmopar authored Jul 2, 2020
2 parents 2516c7e + d14936c commit 7a28efb
Show file tree
Hide file tree
Showing 7 changed files with 7,008 additions and 4,259 deletions.
8 changes: 6 additions & 2 deletions src/EnergyPlus/FanCoilUnits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3104,15 +3104,19 @@ namespace FanCoilUnits {
PLR,
CompressorOnFlag);
}
}
Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut);
} else if ((CoolingLoad && QUnitOutMax > QZnReq && QZnReq < 0.0) || (HeatingLoad && QUnitOutMax < QZnReq && QZnReq > 0.0)) {
// load is larger than capacity, thus run the fancoil unit at full capacity
PLR = 1.0;
}
Calc4PipeFanCoil(state, FanCoilNum, ControlledZoneNum, FirstHVACIteration, QUnitOut, PLR);
PowerMet = QUnitOut;
AirMassFlow = Node(InletNode).MassFlowRate;
// CR9155 Remove specific humidity calculations
SpecHumOut = Node(OutletNode).HumRat;
SpecHumIn = Node(InletNode).HumRat;
// Latent rate (kg/s), dehumid = negative
LatOutputProvided = AirMassFlow * (SpecHumOut - SpecHumIn);
FanCoil(FanCoilNum).PLR = PLR;

// cycling fan constant water flow AND VarFanVarFlow
} else if (SELECT_CASE_var == CCM_VarFanConsFlow) {
Expand Down
52 changes: 38 additions & 14 deletions src/EnergyPlus/SZVAVModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ namespace SZVAVModel {

// MODULE PARAMETER DEFINITIONS
static std::string const BlankString;
int const HCoil_Water(1);

// Functions

Expand Down Expand Up @@ -772,8 +773,11 @@ namespace SZVAVModel {
Par(9) = lowWaterMdot; // minCoilFluidFlow - low fan speed water flow rate > 0 if SAT limited
Par(12) = AirMassFlow; // sets air flow rate used when iterating on coil capacity
Par(13) = 0.0; // other than 0 means to iterate on SA temperature

TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
if (SZVAVModel.HCoilType_Num == HCoil_Water || !HeatingLoad) {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
} else {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilLoadResidual, 0.0, 1.0, Par);
}
outletTemp = DataLoopNode::Node(OutletNode).Temp;
if ((CoolingLoad && outletTemp < maxOutletTemp) || (HeatingLoad && outletTemp > maxOutletTemp)) {
// must do something here to maintain outlet temp while in Region 2
Expand All @@ -784,20 +788,32 @@ namespace SZVAVModel {
} else { // not enough capacity at this air flow rate. Unit does have enough capacity a full water/air, otherwise wouldn't be here
// this is different from the PTUnit and UnitarySys routines in this module
// find the water flow rate that meets the min load at region 1/2 bounday
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, lowWaterMdot, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
Par(9) = lowWaterMdot;
if (SolFlag < 0) {
MessagePrefix = "Step 2a: ";
if (SZVAVModel.HCoilType_Num == HCoil_Water || !HeatingLoad) {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, lowWaterMdot, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
Par(9) = lowWaterMdot;
if (SolFlag < 0) {
MessagePrefix = "Step 2a: ";
} else {
Par(9) = 0.0;
}
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
if (SolFlag < 0) {
MessagePrefix = "Step 2b: ";
}
} else {
Par(9) = 0.0;
}
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
if (SolFlag < 0) {
MessagePrefix = "Step 2b: ";
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilLoadResidual, 0.0, 1.0, Par);
if (SolFlag < 0) {
MessagePrefix = "Step 2: ";
}
}
}
} else { // too much capacity when coil off, could lower air flow rate here to meet load if air flow is above minimum
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
if (SZVAVModel.HCoilType_Num == HCoil_Water || !HeatingLoad) {
TempSolveRoot::SolveRoot(
state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
} else {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilLoadResidual, 0.0, 1.0, Par);
}
if (SolFlag < 0) {
MessagePrefix = "Step 2c: ";
}
Expand Down Expand Up @@ -855,12 +871,20 @@ namespace SZVAVModel {
// otherwise iterate on load
Par(12) = maxAirMassFlow; // operating air flow rate, minAirMassFlow indicates low speed, maxAirMassFlow indicates full speed
Par(13) = 0.0; // SA Temp target, 0 means iterate on load and not SA temperature
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
if (SZVAVModel.HCoilType_Num == HCoil_Water || !HeatingLoad) {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilWaterFlowResidual, 0.0, 1.0, Par);
} else {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilLoadResidual, 0.0, 1.0, Par);
}
if (SolFlag < 0) {
MessagePrefix = "Step 3: ";
}
} else { // too much capacity at full air flow with coil off, operate coil and fan in unison
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
if (SZVAVModel.HCoilType_Num == HCoil_Water || !HeatingLoad) {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilAirAndWaterFlowResidual, 0.0, 1.0, Par);
} else {
TempSolveRoot::SolveRoot(state, 0.001, MaxIter, SolFlag, PartLoadRatio, FanCoilUnits::CalcFanCoilLoadResidual, 0.0, 1.0, Par);
}
if (SolFlag < 0) {
MessagePrefix = "Step 3a: ";
}
Expand Down
2 changes: 1 addition & 1 deletion src/EnergyPlus/SZVAVModel.hh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace SZVAVModel {
// parts of the simulation.

// MODULE PARAMETER DEFINITIONS
// na
extern int const HCoil_Water;

// DERIVED TYPE DEFINITIONS
// na
Expand Down
1 change: 1 addition & 0 deletions testfiles/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ ADD_SIMULATION_TEST(IDF_FILE ExhFiredAbsorptionChiller.idf EPW_FILE USA_IL_Chica
ADD_SIMULATION_TEST(IDF_FILE ExteriorLightsAndEq.idf EPW_FILE USA_CO_Golden-NREL.724666_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE FanCoilAutoSize.idf EPW_FILE USA_CO_Golden-NREL.724666_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE FanCoilAutoSizeScalableSizing.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE FanCoilAutoSize_ASHRAE90VariableFan.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE FanCoilAutoSize_MultiSpeedFan.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE FanCoil_HybridVent_VentSch.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
ADD_SIMULATION_TEST(IDF_FILE Fault_ChillerSWTSensorOffset_RefBldgLargeOfficeNew2004.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
Expand Down
Loading

7 comments on commit 7a28efb

@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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (2194 of 2194 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-cppcheck: OK (0 of 0 tests passed, 0 test warnings)

Build 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-custom_check: Build Failed

Build 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1463 of 1463 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

8056-LowTempRadSysAddPipeAndContactResistance (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2150 of 2150 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.

develop (Myoldmopar) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: OK (714 of 714 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2150 of 2150 tests passed, 0 test warnings)

Build Badge Test Badge

Please # to comment.