Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix water coil user-specified sizing and Component Sizing Summary table for fan coils #7988

Merged
merged 29 commits into from
Sep 21, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d4f949e
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Apr 30, 2020
ab9bad4
Use user-specified value for sizing with water cooling coils. This do…
matthew-larson May 1, 2020
db898ff
Add unit test for final coil design air volume flow rate.
matthew-larson May 11, 2020
d74f7f6
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 11, 2020
5d6324e
Modify code for water flow as well to use user-specified flow rate fo…
matthew-larson May 12, 2020
3cff38c
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 12, 2020
2af1e0a
Revert optimum start fix from this branch.
matthew-larson May 12, 2020
76ac382
Revert optimum start fix from this branch.
matthew-larson May 12, 2020
252c67e
Revert optimum start fix from this branch.
matthew-larson May 12, 2020
8de1653
Revert back changes for water flow.
matthew-larson May 14, 2020
13e4f63
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 14, 2020
3597966
Add check for parent object and add implementation to hot water coil.
matthew-larson May 14, 2020
16e7a81
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 14, 2020
f87c527
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 15, 2020
ab85069
Modify unit tests for new required inputs and change in coil sizing d…
matthew-larson May 15, 2020
274d8e3
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson May 18, 2020
275f8e1
Merge develop and fix conflicts.
matthew-larson Jun 17, 2020
4b73dbf
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Jun 17, 2020
6bf93f3
Fix conficts in unit tests.
matthew-larson Jun 17, 2020
731cbfb
Modify based on pull request comments.
matthew-larson Jun 18, 2020
aa64b7e
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Jun 18, 2020
16ae3db
Merge develop and resolve conflicts.
matthew-larson Aug 5, 2020
98f765f
Fix minor unit test bugs for successful completion.
matthew-larson Aug 5, 2020
66886ff
Resolve merge issues.
matthew-larson Aug 5, 2020
d870996
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Aug 13, 2020
a974a60
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Aug 24, 2020
a3e45a8
Update for different autosize/hardsize situations.
matthew-larson Aug 28, 2020
a707072
Merge branch 'develop' of https://github.com/nrel/energyplus into fix…
matthew-larson Aug 28, 2020
df4518b
Code fixes based on unit tests.
matthew-larson Aug 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/EnergyPlus/FanCoilUnits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2118,6 +2118,7 @@ namespace FanCoilUnits {
ZoneEqSizing(CurZoneEqNum).AirVolFlow = FanCoil(FanCoilNum).MaxAirVolFlow;
ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = FanCoil(FanCoilNum).DesCoolingLoad;
ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FanCoil(FanCoilNum).DesHeatingLoad;
ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent = true;
}

if (ErrorsFound) {
Expand Down
48 changes: 40 additions & 8 deletions src/EnergyPlus/WaterCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2209,9 +2209,20 @@ namespace WaterCoils {
CompName = WaterCoil(CoilNum).Name;
RequestSizing(state, CompType, CompName, CoolingAirflowSizing, SizingString, TempSize, bPRINT, RoutineName);
WaterCoil(CoilNum).InletAirMassFlowRate = StdRhoAir * TempSize; // inlet air mass flow rate is the autosized value
DataAirFlowUsedForSizing = TempSize; // many autosized inputs use the design (autosized) air volume flow rate, save this value
DataFlowUsedForSizing = TempSize;

// Check if the air volume flow rate is defined in parent HVAC equipment and set water coil design air volume flow rate accordingly
if (CurZoneEqNum > 0) {
if (ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent) {
DataAirFlowUsedForSizing = ZoneEqSizing(CurZoneEqNum).AirVolFlow;
DataFlowUsedForSizing = ZoneEqSizing(CurZoneEqNum).AirVolFlow;
WaterCoil(CoilNum).DesAirVolFlowRate = ZoneEqSizing(CurZoneEqNum).AirVolFlow;
} else {
DataAirFlowUsedForSizing = TempSize; // many autosized inputs use the design (autosized) air volume flow rate, save this value
DataFlowUsedForSizing = TempSize;
}
} else {
DataAirFlowUsedForSizing = TempSize; // many autosized inputs use the design (autosized) air volume flow rate, save this value
DataFlowUsedForSizing = TempSize;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This first change looks OK to me.

if (CurSysNum > 0 && CurOASysNum == 0) {
Real64 DesCoilExitHumRat(0.0); // fix coil sizing inconsistency
GetCoilDesFlowT(CurSysNum, CpAirStd, DesCoilAirFlow, DesCoilExitTemp, DesCoilExitHumRat);
Expand All @@ -2233,9 +2244,19 @@ namespace WaterCoils {
TempSize = AutoSize;
RequestSizing(state, CompType, CompName, CoolingCapacitySizing, SizingString, TempSize, bPRINT, RoutineName);
DataCapacityUsedForSizing = TempSize;
TempSize = WaterCoil(CoilNum).MaxWaterVolFlowRate;
TempSize = AutoSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

This second change always autosizes the HW coil water flow rate. What if the coil input is hard-sized? And the coil is on the main branch. I am on the fence whether this is OK for zone equipment, but if the fan coil HW flow rate is hard-sized or autosized then that flow rate will be used in the HW coil, even if the HW coil hard-sized the HW flow rate. This is an input over-specification problem and this does correct that. Do all other zone equipment also pass the ZoneEqSizing data, I assume they do, so again this is probably OK.

RequestSizing(state, CompType, CompName, CoolingWaterflowSizing, SizingString, TempSize, bPRINT, RoutineName);
DataWaterFlowUsedForSizing = TempSize;
// Check if the water flow rate is defined in parent HVAC equipment and set water coil design water flow rate accordingly
if (CurZoneEqNum > 0) {
if (ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent) {
DataWaterFlowUsedForSizing = ZoneEqSizing(CurZoneEqNum).MaxCWVolFlow;
WaterCoil(CoilNum).MaxWaterVolFlowRate = ZoneEqSizing(CurZoneEqNum).MaxCWVolFlow;
} else {
DataWaterFlowUsedForSizing = TempSize;
}
} else {
DataWaterFlowUsedForSizing = TempSize;
}
// end pre-sizing data calculations

if (WaterCoil(CoilNum).WaterCoilModel == CoilModel_Detailed) { // 'DETAILED FLAT FIN'
Expand Down Expand Up @@ -2579,7 +2600,7 @@ namespace WaterCoils {

FieldNum = 2; // N2 , \field Maximum Water Flow Rate
SizingString = WaterCoilNumericFields(CoilNum).FieldNames(FieldNum) + " [m3/s]";
TempSize = WaterCoil(CoilNum).MaxWaterVolFlowRate;
TempSize = AutoSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above for always autosizing the HW flow rate whether or not the HW coil input is hard-sized.

SizingMethod = HeatingWaterflowSizing;

if (WaterCoil(CoilNum).CoilPerfInpMeth == NomCap && NomCapUserInp) {
Expand All @@ -2594,8 +2615,19 @@ namespace WaterCoils {
DataFractionUsedForSizing = 1.0;
}
RequestSizing(state, CompType, CompName, SizingMethod, SizingString, TempSize, bPRINT, RoutineName);
WaterCoil(CoilNum).MaxWaterVolFlowRate = TempSize;
DataWaterFlowUsedForSizing = WaterCoil(CoilNum).MaxWaterVolFlowRate;
// Check if the water flow rate is defined in parent HVAC equipment and set water coil design water flow rate accordingly
if (CurZoneEqNum > 0) {
if (ZoneEqSizing(CurZoneEqNum).DesignSizeFromParent) {
DataWaterFlowUsedForSizing = ZoneEqSizing(CurZoneEqNum).MaxHWVolFlow;
WaterCoil(CoilNum).MaxWaterVolFlowRate = ZoneEqSizing(CurZoneEqNum).MaxHWVolFlow;
} else {
DataWaterFlowUsedForSizing = TempSize;
WaterCoil(CoilNum).MaxWaterVolFlowRate = TempSize;
}
} else {
DataWaterFlowUsedForSizing = TempSize;
WaterCoil(CoilNum).MaxWaterVolFlowRate = TempSize;
}
DataConstantUsedForSizing = 0.0; // reset these in case NomCapUserInp was true
DataFractionUsedForSizing = 0.0;
if (WaterCoil(CoilNum).MaxWaterVolFlowRate <= 0.0) {
Expand Down
8 changes: 4 additions & 4 deletions tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7758,13 +7758,13 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimFCU_ATMInletSideTest)
SecondaryAirMassFlowRate = Node(thisFanCoil.AirInNode).MassFlowRate - PrimaryAirMassFlowRate;
// check results in cooling mode operation
EXPECT_NEAR(QZnReq, QUnitOut, 5.0);
EXPECT_NEAR(thisFanCoil.PLR, 0.83865, 0.00001);
EXPECT_NEAR(thisFanCoil.PLR, 0.78843, 0.00001);
// check mass flow rates
EXPECT_NEAR(PrimaryAirMassFlowRate, 0.2, 0.000001);
EXPECT_NEAR(SecondaryAirMassFlowRate, 0.405995, 0.000001);
EXPECT_NEAR(SecondaryAirMassFlowRate, 0.369710, 0.000001);
EXPECT_NEAR(Node(thisFanCoil.AirInNode).MassFlowRate, thisFan.InletAirMassFlowRate, 0.000001);
EXPECT_NEAR(Node(thisFanCoil.ATMixerPriNode).MassFlowRate, 0.2, 0.0001);
EXPECT_NEAR(Node(thisFanCoil.ATMixerSecNode).MassFlowRate, 0.405995, 0.000001);
EXPECT_NEAR(Node(thisFanCoil.ATMixerOutNode).MassFlowRate, 0.605995, 0.000001);
EXPECT_NEAR(Node(thisFanCoil.ATMixerSecNode).MassFlowRate, 0.369710, 0.000001);
EXPECT_NEAR(Node(thisFanCoil.ATMixerOutNode).MassFlowRate, 0.569710, 0.000001);
}
} // namespace EnergyPlus
6 changes: 6 additions & 0 deletions tst/EnergyPlus/unit/FanCoilUnits.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,8 @@ TEST_F(EnergyPlusFixture, FanCoil_ASHRAE90VariableFan)
UpdateScheduleValues();

ZoneEqSizing.allocate(1);
ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(16);
ZoneEqSizing(CurZoneEqNum).SizingMethod(16) = 0;
CurDeadBandOrSetback.allocate(1);
CurDeadBandOrSetback(1) = false;
TempControlType.allocate(1);
Expand Down Expand Up @@ -2795,6 +2797,8 @@ TEST_F(EnergyPlusFixture, FanCoil_CyclingFanMode)
UpdateScheduleValues();

ZoneEqSizing.allocate(1);
ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(16);
ZoneEqSizing(CurZoneEqNum).SizingMethod(16) = 0;
CurDeadBandOrSetback.allocate(1);
CurDeadBandOrSetback(1) = false;
TempControlType.allocate(1);
Expand Down Expand Up @@ -3206,6 +3210,8 @@ TEST_F(EnergyPlusFixture, FanCoil_FanSystemModelCyclingFanMode)
UpdateScheduleValues();

ZoneEqSizing.allocate(1);
ZoneEqSizing(CurZoneEqNum).SizingMethod.allocate(16);
ZoneEqSizing(CurZoneEqNum).SizingMethod(16) = 0;
CurDeadBandOrSetback.allocate(1);
CurDeadBandOrSetback(1) = false;
TempControlType.allocate(1);
Expand Down
Loading