-
Notifications
You must be signed in to change notification settings - Fork 457
Retrieve correct runtime fraction for AirLoopHVAC:UnitaryHeatCool to be used by AFN
#11367
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
base: develop
Are you sure you want to change the base?
Conversation
…crepancy between heating coil and system sizes.
…ndexes are not found.
lymereJ
left a comment
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.
Code changes walk-through:
| SetupOutputVariable(m_state, | ||
| "AFN Zone Infiltration Mass Flow Rate", | ||
| Constant::Units::kg_s, | ||
| AirflowNetworkZnRpt(i).infilMassFlow, | ||
| OutputProcessor::TimeStepType::System, | ||
| OutputProcessor::StoreType::Average, | ||
| Zone(i).Name); |
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.
Add a new output variable so users don't have to manually calculate the mass flow rate from the ACH.
| if (state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).FractionOfAutosizedHeatingCapacity > 0) { | ||
| // apply sizing factor and reset it to 1.0 so it doesn't get apply again during heating coil sizing | ||
| thisFurnace.DesignHeatingCapacity *= | ||
| state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).FractionOfAutosizedHeatingCapacity; | ||
| state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).FractionOfAutosizedHeatingCapacity = 1.0; | ||
| } |
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.
System size is determined first, then heating coil size is determined after. In the former, the FractionOfAutosizedHeatingCapacity is not taken into account when sizing the system, but it is when sizing the coil. If the coil is part of a system, the system size is used for the coil and is modified by FractionOfAutosizedHeatingCapacity. Here we're applying FractionOfAutosizedHeatingCapacity to the system size and reset to 1 so it doesn't get used again to size the heating coil.
With develop:
Component Sizing Information, AirLoopHVAC:UnitaryHeatCool, ACANDF_UNIT1, Nominal Heating Capacity [W], 8519.83583
Component Sizing Information, Coil:Heating:Fuel, MAIN FUEL HEATING COIL_UNIT1, Design Size Nominal Capacity [W], 10649.79479
With this branch:
Component Sizing Information, AirLoopHVAC:UnitaryHeatCool, ACANDF_UNIT1, Nominal Heating Capacity [W], 10649.79479
Component Sizing Information, Coil:Heating:Fuel, MAIN FUEL HEATING COIL_UNIT1, Design Size Nominal Capacity [W], 10649.79479
| // Save the current AFNLoopHeatingCoilMaxRTF for comparison with the one calculated below | ||
| Real64 refAFNLoopHeatingCoilMaxRTF(0.0); | ||
| if (state.afn->distribution_simulated) { | ||
| refAFNLoopHeatingCoilMaxRTF = state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).AFNLoopHeatingCoilMaxRTF; | ||
| } | ||
|
|
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.
Save the maximum RTF that may have been previously determined from another component and use it later to determine the actual maximum RTF.
| // Get the actual maximum RTF for AFN simulations | ||
| if (state.afn->distribution_simulated) { | ||
| Real64 heatingCoilRTF = 0.0; | ||
| Real64 suppHeatingCoilRTF = 0.0; | ||
| bool errorFound(false); | ||
| if (thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingGasOrOtherFuel || | ||
| thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingElectric || thisFurnace.HeatingCoilType_Num == HVAC::Coil_HeatingDesuperheater) { | ||
| int heatingCoilIndex; | ||
| HeatingCoils::GetCoilIndex(state, thisFurnace.HeatingCoilName, heatingCoilIndex, errorFound); | ||
| if (heatingCoilIndex > 0) { | ||
| heatingCoilRTF = state.dataHeatingCoils->HeatingCoil(heatingCoilIndex).RTF; | ||
| } | ||
| } | ||
| if (errorFound) { | ||
| ShowSevereError(state, format("The index of \"{}\" is not found", thisFurnace.HeatingCoilName)); | ||
| ShowContinueError(state, format("...occurs for {}", thisFurnace.Name)); | ||
| errorFound = false; | ||
| } | ||
| if (thisFurnace.SuppHeatCoilType_Num == HVAC::Coil_HeatingGasOrOtherFuel || | ||
| thisFurnace.SuppHeatCoilType_Num == HVAC::Coil_HeatingElectric || | ||
| thisFurnace.SuppHeatCoilType_Num == HVAC::Coil_HeatingDesuperheater) { | ||
| int suppHeatingCoilIndex; | ||
| HeatingCoils::GetCoilIndex(state, thisFurnace.SuppHeatCoilName, suppHeatingCoilIndex, errorFound); | ||
| if (suppHeatingCoilIndex > 0) { | ||
| suppHeatingCoilRTF = state.dataHeatingCoils->HeatingCoil(suppHeatingCoilIndex).RTF; | ||
| } | ||
| } | ||
| if (errorFound) { | ||
| ShowSevereError(state, format("The index of \"{}\" is not found", thisFurnace.SuppHeatCoilName)); | ||
| ShowContinueError(state, format("...occurs for {}", thisFurnace.Name)); | ||
| errorFound = false; | ||
| } | ||
| state.dataAirLoop->AirLoopAFNInfo(AirLoopNum).AFNLoopHeatingCoilMaxRTF = | ||
| max(refAFNLoopHeatingCoilMaxRTF, heatingCoilRTF, suppHeatingCoilRTF); | ||
| } |
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.
Set the maximum RTF at the furnace level, overwriting the one calculated at the heating coil level (==1).
| // Check that the runtime fraction is less than one so the impact of cycling fan is correctly accounted for in the AFN | ||
| EXPECT_TRUE(state->dataAirLoop->AirLoopAFNInfo(1).AFNLoopHeatingCoilMaxRTF < 1); | ||
|
|
||
| // Check that the system heating capacity is the same as the heating coil | ||
| EXPECT_NEAR(state->dataHeatingCoils->HeatingCoil(1).NominalCapacity, state->dataFurnaces->Furnace(1).DesignHeatingCapacity, 1e-6); |
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.
New unit test that checks for both fixes. develop fails both assertions.
|
|

Pull request overview
Description of the purpose of this PR
The defect files highlighted two issues:
AirLoopHVAC:UnitaryHeatCoolfurnace-type system, is currently determined by the heating coil code. However, during the furnace simulation, the furnace's full load output is calculated with the heating coil'sRTF == 1. As a result, the maximum heating RTF is always set to 1 for the airflow network calculations, which does not appropriately capture the impact of cycling fan operations.AirLoopHVAC:UnitaryHeatCoolnominal capacity does not account for theSizing:System'sFraction of Autosized Heating Design Capacitywhen theHeating Design Capacity Methodis set toFractionOfAutosizedHeatingCapacity, whereas the heating coil does.This pull request fixes both issues.
Pull Request Author
Reviewer