Skip to content
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

Fix flow rate issue for fanless unitary system #10825

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
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
24 changes: 12 additions & 12 deletions src/EnergyPlus/UnitarySystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,8 @@ namespace UnitarySystems {
this->m_IterationCounter = 0;
std::fill(this->m_IterationMode.begin(), this->m_IterationMode.end(), 0);

// for DX systems, just read the inlet node flow rate and let air loop decide flow
if (this->m_ControlType == UnitarySysCtrlType::Setpoint && this->m_sysType == SysType::Unitary) {
// for systems without a fan, just read the inlet node flow rate and let air loop decide flow
if (this->m_ControlType == UnitarySysCtrlType::Setpoint && this->m_sysType == SysType::Unitary && this->m_FanExists) {
Copy link
Contributor

@rraustad rraustad Nov 19, 2024

Choose a reason for hiding this comment

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

Not sure this will work as expected. 1) if it's scheduled off it won't turn off at line 942?, 2) if the control zone is in the deadband the air flow should change to the no load flow at line 936/938 but that can't happen when using constant fan (which is used for Setpoint control) and the no load flow = 0, and 3) what if the unit does have a fan?. So I think you want to move the && this->m_FanExists down to lines 936 (shown) and 938. The tests are if it can turn off when scheduled off, turn back on after flow = 0, and fixes the defect. And then what kind of warning if any to report for this configuration of no fan and no load flow = 0.

if (this->m_FanExists && this->MaxNoCoolHeatAirMassFlow > 0.0) {
    state.dataLoopNodes->Node(this->AirInNode).MassFlowRate = this->MaxNoCoolHeatAirMassFlow;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, lines 936 and 938 are duplicates.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does my suggestion matter if a fan is present? If it's in the deadband or load is opposite to that unitarysystem and that unitary system does have a fan, should it turn off if there is a down stream system? This seems tricky.

Copy link
Contributor

@rraustad rraustad Nov 19, 2024

Choose a reason for hiding this comment

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

Just use the no flow check at line 936 and wait for the next defect?

if (this->MaxNoCoolHeatAirMassFlow > 0.0) {

Copy link
Contributor Author

@mjwitte mjwitte Nov 19, 2024

Choose a reason for hiding this comment

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

Does my suggestion matter if a fan is present? If it's in the deadband or load is opposite to that unitarysystem and that unitary system does have a fan, should it turn off if there is a down stream system? This seems tricky.

It didn't seem tricky to me. If the unitary system doesn't have a fan, in my simple view it should not be touching mass flow rates. It should behave like CoilSystem:*:*. Or do we promise somewhere that a fanless unitary system should control a fan elsewhere on the branch?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think at the very least the unit should turn off if not available and this is independent of a fan? Whether that is an issue with a down stream component or not is a question of coordination of availability managers. I guess another option is to modify this text and docs, where "off" only refers to capacity. With the current change I don't think the unit will ever turn off if desired (how does it turn on?, maybe FirstHVACIteration turns it on?) but then you could always schedule the fan for this configuration. I guess if this meets the current need and doesn't break anything then just forge ahead.

AirLoopHVAC:UnitarySystem,
  A5,  \field Availability Schedule Name
   \type object-list
   \object-list ScheduleNames
   \note Availability schedule name for this system. Schedule value > 0 means the system is available.
   \note If this field is blank, the system is always available.
   \note A schedule value greater than zero (usually 1 is used) indicates that the unit is
   \note available to operate as needed. A value less than or equal to zero (usually zero
   \note is used) denotes that the unit must be off.

Fan:SystemModel,
  A2 , \field Availability Schedule Name
   \note Availability schedule name for this fan. Schedule value > 0 means the fan is available.
   \note If this field is blank, the fan is always available.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The availability schedule is checked again in controlCoolingSystemToSP
https://github.com/NREL/EnergyPlus/blob/4a17be908304e8ca2266863e76a7f790f2fcca19/src/EnergyPlus/UnitarySystem.cc#L12195-L12198
and in controlHeatingSystemToSP
https://github.com/NREL/EnergyPlus/blob/4a17be908304e8ca2266863e76a7f790f2fcca19/src/EnergyPlus/UnitarySystem.cc#L14011-L14014
and in controlSuppHeatSystemToSP
https://github.com/NREL/EnergyPlus/blob/4a17be908304e8ca2266863e76a7f790f2fcca19/src/EnergyPlus/UnitarySystem.cc#L14649-L14651

so I think the availability schedule question is covered. Without a fan, the unitary system is just a coil wrapper, so if it's off it should just pass through flow and conditions.

if (ScheduleManager::GetCurrentScheduleValue(state, this->m_SysAvailSchedPtr) > 0.0) {
if (this->m_LastMode == CoolingMode) {
if (this->m_MultiOrVarSpeedCoolCoil) {
Expand Down Expand Up @@ -1046,7 +1046,7 @@ namespace UnitarySystems {
state, "Coil:Heating:Steam", this->m_SuppHeatCoilName, state.dataUnitarySystems->initUnitarySystemsErrorsFound);

} // from IF(UnitarySystem(UnitarySysNum)%SuppHeatCoilType_Num == Coil_HeatingSteam) THEN
} // from IF( FirstHVACIteration ) THEN
} // from IF( FirstHVACIteration ) THEN

this->m_IterationCounter += 1;

Expand Down Expand Up @@ -9511,7 +9511,7 @@ namespace UnitarySystems {
HeatPLR = 0.0;
PartLoadRatio = 0.0;
} // IF((HeatingLoad .AND. ZoneLoad > SensOutputOff) .OR. (CoolingLoad .AND. ZoneLoad < SensOutputOff))THEN
} // IF((HeatingLoad .AND. ZoneLoad < SensOutputOn) .OR. (CoolingLoad .AND. ZoneLoad > SensOutputOn))THEN
} // IF((HeatingLoad .AND. ZoneLoad < SensOutputOn) .OR. (CoolingLoad .AND. ZoneLoad > SensOutputOn))THEN
}

if (state.dataUnitarySystems->HeatingLoad && (this->m_MultiSpeedHeatingCoil || this->m_VarSpeedHeatingCoil)) {
Expand Down Expand Up @@ -10829,8 +10829,8 @@ namespace UnitarySystems {
state.dataUnitarySystems->CompOnMassFlow = this->MaxCoolAirMassFlow;
state.dataUnitarySystems->CompOnFlowRatio = this->m_CoolingFanSpeedRatio;
} // IF(MultiOrVarSpeedCoolCoil) THEN
} // IF(UnitarySystem(UnitarySysNum)%LastMode .EQ. HeatingMode)THEN
} // IF(CompOnMassFlow .EQ. 0.0d0)THEN
} // IF(UnitarySystem(UnitarySysNum)%LastMode .EQ. HeatingMode)THEN
} // IF(CompOnMassFlow .EQ. 0.0d0)THEN

if (this->m_FanOpMode == HVAC::FanOp::Continuous) {
if (this->m_AirFlowControl == UseCompFlow::On) {
Expand Down Expand Up @@ -10889,7 +10889,7 @@ namespace UnitarySystems {
state.dataUnitarySystems->CompOffFlowRatio = this->m_CoolingFanSpeedRatio;
state.dataUnitarySystems->OACompOffMassFlow = this->m_CoolOutAirMassFlow;
}
} // IF(UnitarySystem(UnitarySysNum)%LastMode .EQ. HeatingMode)THEN
} // IF(UnitarySystem(UnitarySysNum)%LastMode .EQ. HeatingMode)THEN
} else { // IF (UnitarySystem(UnitarySysNum)%AirFlowControl .EQ. UseCompressorOnFlow) THEN
if (this->m_LastMode == HeatingMode) {
if (this->m_MultiOrVarSpeedHeatCoil) {
Expand All @@ -10910,9 +10910,9 @@ namespace UnitarySystems {
}
state.dataUnitarySystems->OACompOffMassFlow = this->m_NoCoolHeatOutAirMassFlow;
} // IF (UnitarySystem(UnitarySysNum)%AirFlowControl .EQ. UseCompressorOnFlow) THEN
} // IF(UnitarySystem(UnitarySysNum)%FanOpMode == HVAC::FanOp::Continuous)THEN
} // ELSE ! No Moisture Load
} // No Heating/Cooling Load
} // IF(UnitarySystem(UnitarySysNum)%FanOpMode == HVAC::FanOp::Continuous)THEN
} // ELSE ! No Moisture Load
} // No Heating/Cooling Load

if (this->m_FanOpMode == HVAC::FanOp::Continuous) {
if (this->m_AirFlowControl == UseCompFlow::On &&
Expand Down Expand Up @@ -12507,7 +12507,7 @@ namespace UnitarySystems {
PartLoadFrac = 0.0;
} else { // need to turn on compressor to see if load is met
doIt = true; // CoilSystem:Cooling:DX
} // CoilSystem:Cooling:DX
} // CoilSystem:Cooling:DX
if (this->m_EMSOverrideCoilSpeedNumOn) doIt = false;

if (doIt) { // CoilSystem:Cooling:DX
Expand Down Expand Up @@ -14979,7 +14979,7 @@ namespace UnitarySystems {
} // IF (NOT EMS OVERRIDE) THEN

} // IF SENSIBLE LOAD
} // IF((GetCurrentScheduleValue(state, UnitarySystem(UnitarySysNum)%m_SysAvailSchedPtr) > 0.0d0) .AND. &
} // IF((GetCurrentScheduleValue(state, UnitarySystem(UnitarySysNum)%m_SysAvailSchedPtr) > 0.0d0) .AND. &

// LoopHeatingCoilMaxRTF used for AirflowNetwork gets set in child components (gas and fuel)
if (state.afn->distribution_simulated && this->m_sysType != SysType::PackagedAC && this->m_sysType != SysType::PackagedHP &&
Expand Down
Loading