-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows ZoneHVAC:EvaporativeCooler unit to cycle #7319
Changes from 1 commit
51599e7
1ec83b2
1ab2988
b57d690
69c0402
6c25607
e749dd6
f985636
74e6a1a
498e95e
13302b6
3ff729a
9ab09e8
55ef3e4
63d53b5
0d23eeb
130d322
065af28
cdf25ef
43a9545
cf4bb3e
f0d6887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,7 +193,7 @@ namespace EvaporativeCoolers { | |
|
||
// Functions | ||
|
||
void SimEvapCooler(std::string const &CompName, int &CompIndex) | ||
void SimEvapCooler(std::string const &CompName, int &CompIndex, Optional<Real64 const> PartLoadRatio) | ||
{ | ||
|
||
// SUBROUTINE INFORMATION: | ||
|
@@ -243,16 +243,25 @@ namespace EvaporativeCoolers { | |
} | ||
} | ||
|
||
Real64 ZoneEvapCoolerPLR = 1.0; | ||
// If PLR is not present, then set to 1. Used only by ZoneHVAC:*:CelDekPad | ||
if (present(PartLoadRatio)) { | ||
// serrogate for pump part load ratio | ||
ZoneEvapCoolerPLR = PartLoadRatio; | ||
} else { | ||
ZoneEvapCoolerPLR = 1.0; | ||
} | ||
|
||
// With the correct EvapCoolNum Initialize | ||
InitEvapCooler(EvapCoolNum); // Initialize all related parameters | ||
|
||
{ | ||
auto const SELECT_CASE_var(EvapCond(EvapCoolNum).EvapCoolerType); | ||
|
||
if (SELECT_CASE_var == iEvapCoolerDirectCELDEKPAD) { | ||
CalcDirectEvapCooler(EvapCoolNum); | ||
CalcDirectEvapCooler(EvapCoolNum, ZoneEvapCoolerPLR); | ||
} else if (SELECT_CASE_var == iEvapCoolerInDirectCELDEKPAD) { | ||
CalcDryIndirectEvapCooler(EvapCoolNum); | ||
CalcDryIndirectEvapCooler(EvapCoolNum, ZoneEvapCoolerPLR); | ||
} else if (SELECT_CASE_var == iEvapCoolerInDirectWETCOIL) { | ||
CalcWetIndirectEvapCooler(EvapCoolNum); | ||
} else if (SELECT_CASE_var == iEvapCoolerInDirectRDDSpecial) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Nigusse Hi, Bereket, is there any specific reason not to allow researchspecial types cycling with fan as well? In these lines, it confused me that it reported power consumption by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The research special evaporative coolers models are different from the other models. They have pump power modifier curve that accounts for pump power calculation as a function of flow fraction. The PartLoad is used only if user did not provide pump power correction curve. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Nigusse Yes that's correct. So if there's no modifier curve, the pump power would only be calculated based on In my personal opinion (might be wrong), it seems only consider one of them in each situation looks not enough to include both outlet temperature control (PLR) and mass flow rate control (PLR). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I knew that type is different so you didn't touch that in this PR. I mean maybe we could rethink about if we need to change something there as well. 😛 |
||
|
@@ -1647,7 +1656,7 @@ namespace EvaporativeCoolers { | |
// Begin Algorithm Section of the Module | ||
//****************************************************************************** | ||
|
||
void CalcDirectEvapCooler(int &EvapCoolNum) | ||
void CalcDirectEvapCooler(int &EvapCoolNum, Real64 const PartLoadRatio) | ||
{ | ||
|
||
// SUBROUTINE INFORMATION: | ||
|
@@ -1736,12 +1745,7 @@ namespace EvaporativeCoolers { | |
//*************************************************************************** | ||
// ENERGY CONSUMED BY THE RECIRCULATING PUMP | ||
// Add the pump energy to the total Evap Cooler energy comsumption | ||
Real64 FlowFraction = 1.0; | ||
Real64 MassFlowRateMax = Node(EvapCond(EvapCoolNum).InletNode).MassFlowRateMax; | ||
if (MassFlowRateMax > 0) { | ||
FlowFraction = EvapCond(EvapCoolNum).InletMassFlowRate / MassFlowRateMax; | ||
} | ||
EvapCond(EvapCoolNum).EvapCoolerPower += FlowFraction * EvapCond(EvapCoolNum).RecircPumpPower; | ||
EvapCond(EvapCoolNum).EvapCoolerPower += PartLoadRatio * EvapCond(EvapCoolNum).RecircPumpPower; | ||
//****************** | ||
// WATER CONSUMPTION IN m3 OF WATER FOR DIRECT | ||
// H2O [m3/sec] = Delta W[KgH2O/Kg air]*Mass Flow Air[Kg air] | ||
|
@@ -1776,7 +1780,7 @@ namespace EvaporativeCoolers { | |
EvapCond(EvapCoolNum).OutletPressure = EvapCond(EvapCoolNum).InletPressure; | ||
} | ||
|
||
void CalcDryIndirectEvapCooler(int &EvapCoolNum) | ||
void CalcDryIndirectEvapCooler(int &EvapCoolNum, Real64 const PartLoadRatio) | ||
{ | ||
|
||
// SUBROUTINE INFORMATION: | ||
|
@@ -1890,21 +1894,16 @@ namespace EvaporativeCoolers { | |
EvapCond(EvapCoolNum).OutletEnthalpy = PsyHFnTdbW(EvapCond(EvapCoolNum).OutletTemp, EvapCond(EvapCoolNum).OutletHumRat); | ||
|
||
//*************************************************************************** | ||
Real64 FlowFraction = 1.0; | ||
Real64 MassFlowRateMax = Node(EvapCond(EvapCoolNum).InletNode).MassFlowRateMax; | ||
if (MassFlowRateMax > 0) { | ||
FlowFraction = EvapCond(EvapCoolNum).InletMassFlowRate / MassFlowRateMax; | ||
} | ||
// POWER OF THE SECONDARY AIR FAN | ||
if (EvapCond(EvapCoolNum).IndirectFanEff > 0.0) { | ||
EvapCond(EvapCoolNum).EvapCoolerPower += FlowFraction * EvapCond(EvapCoolNum).IndirectFanDeltaPress * | ||
EvapCond(EvapCoolNum).EvapCoolerPower += PartLoadRatio * EvapCond(EvapCoolNum).IndirectFanDeltaPress * | ||
EvapCond(EvapCoolNum).IndirectVolFlowRate / EvapCond(EvapCoolNum).IndirectFanEff; | ||
} | ||
|
||
// ENERGY CONSUMED BY THE RECIRCULATING PUMP | ||
// ENERGY CONSUMED BY THE RECIRCULATING PUMP | ||
// Add the pump energy to the total Evap Cooler energy comsumption | ||
EvapCond(EvapCoolNum).EvapCoolerPower += FlowFraction * EvapCond(EvapCoolNum).IndirectRecircPumpPower; | ||
EvapCond(EvapCoolNum).EvapCoolerPower += PartLoadRatio * EvapCond(EvapCoolNum).IndirectRecircPumpPower; | ||
|
||
//****************** | ||
// WATER CONSUMPTION IN LITERS OF WATER FOR DIRECT | ||
|
@@ -1917,7 +1916,7 @@ namespace EvaporativeCoolers { | |
PsyRhoAirFnPbTdbW(EvapCond(EvapCoolNum).SecInletPressure, TDBSec, HumRatSec)) / | ||
2.0; | ||
EvapCond(EvapCoolNum).EvapWaterConsumpRate = | ||
FlowFraction * (HumRatSec - EvapCond(EvapCoolNum).SecInletHumRat) * EvapCond(EvapCoolNum).IndirectVolFlowRate * RhoAir / RhoWater; | ||
PartLoadRatio * (HumRatSec - EvapCond(EvapCoolNum).SecInletHumRat) * EvapCond(EvapCoolNum).IndirectVolFlowRate * RhoAir / RhoWater; | ||
// A numerical check to keep from having very tiny negative water consumption values being reported | ||
if (EvapCond(EvapCoolNum).EvapWaterConsumpRate < 0.0) EvapCond(EvapCoolNum).EvapWaterConsumpRate = 0.0; | ||
|
||
|
@@ -4604,11 +4603,11 @@ namespace EvaporativeCoolers { | |
} | ||
|
||
if (ZoneEvapUnit(UnitNum).EvapCooler_1_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index, PartLoadRatio); | ||
} | ||
|
||
if ((ZoneEvapUnit(UnitNum).EvapCooler_2_Index > 0) && ZoneEvapUnit(UnitNum).EvapCooler_2_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index, PartLoadRatio); | ||
} | ||
if (ZoneEvapUnit(UnitNum).FanLocation == DrawThruFan) { | ||
if (ZoneEvapUnit(UnitNum).FanType_Num != DataHVACGlobals::FanType_SystemModelObject) { | ||
|
@@ -4785,11 +4784,11 @@ namespace EvaporativeCoolers { | |
} | ||
|
||
if (ZoneEvapUnit(UnitNum).EvapCooler_1_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index, _); | ||
} | ||
|
||
if ((ZoneEvapUnit(UnitNum).EvapCooler_2_Index > 0) && ZoneEvapUnit(UnitNum).EvapCooler_2_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index, _); | ||
} | ||
if (ZoneEvapUnit(UnitNum).FanLocation == DrawThruFan) { | ||
if (ZoneEvapUnit(UnitNum).FanType_Num != DataHVACGlobals::FanType_SystemModelObject) { | ||
|
@@ -4918,11 +4917,11 @@ namespace EvaporativeCoolers { | |
} | ||
|
||
if (ZoneEvapUnit(UnitNum).EvapCooler_1_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_1_Name, ZoneEvapUnit(UnitNum).EvapCooler_1_Index, _); | ||
} | ||
|
||
if ((ZoneEvapUnit(UnitNum).EvapCooler_2_Index > 0) && ZoneEvapUnit(UnitNum).EvapCooler_2_AvailStatus) { | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index); | ||
SimEvapCooler(ZoneEvapUnit(UnitNum).EvapCooler_2_Name, ZoneEvapUnit(UnitNum).EvapCooler_2_Index, _); | ||
} | ||
if (ZoneEvapUnit(UnitNum).FanLocation == DrawThruFan) { | ||
if (ZoneEvapUnit(UnitNum).FanType_Num != DataHVACGlobals::FanType_SystemModelObject) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nigusse We're trying to avoid using optional arguments (for performance). A default value for the argument is better (if the argument is left off then it's set to the default value). See discussion here. Then you don't need
if (present . . .)
. You can just use and passPartLoadRatio
directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mjwitte Okay, will modify the code accordingly. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.