-
Notifications
You must be signed in to change notification settings - Fork 461
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
Changes from all commits
56f4b29
1ba57ef
18aecd1
47318b8
a83373a
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 |
|---|---|---|
|
|
@@ -213,6 +213,12 @@ namespace Furnaces { | |
| state.dataFurnaces->GetFurnaceInputFlag = false; | ||
| } | ||
|
|
||
| // 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; | ||
| } | ||
|
|
||
|
Comment on lines
+216
to
+221
Collaborator
Author
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. Save the maximum RTF that may have been previously determined from another component and use it later to determine the actual maximum RTF. |
||
| // Find the correct Furnace | ||
| if (CompIndex == 0) { | ||
| FurnaceNum = Util::FindItemInList(FurnaceName, state.dataFurnaces->Furnace); | ||
|
|
@@ -660,6 +666,49 @@ namespace Furnaces { | |
| // Report the current Furnace output | ||
| ReportFurnace(state, FurnaceNum, AirLoopNum); | ||
|
|
||
| // Get the actual maximum RTF for AFN simulations | ||
| if (state.afn->distribution_simulated) { | ||
| Real64 heatingCoilRTF = 0.0; | ||
| Real64 suppHeatingCoilRTF = 0.0; | ||
| bool errorFound(false); | ||
| switch (thisFurnace.HeatingCoilType_Num) { | ||
| case HVAC::Coil_HeatingGasOrOtherFuel: | ||
| case HVAC::Coil_HeatingElectric: | ||
| case HVAC::Coil_HeatingDesuperheater: { | ||
| int heatingCoilIndex; | ||
| HeatingCoils::GetCoilIndex(state, thisFurnace.HeatingCoilName, heatingCoilIndex, errorFound); | ||
| if (heatingCoilIndex > 0) { | ||
| heatingCoilRTF = state.dataHeatingCoils->HeatingCoil(heatingCoilIndex).RTF; | ||
| } | ||
| } break; | ||
| default:; | ||
| } | ||
| if (errorFound) { | ||
| ShowSevereError(state, format("The index of \"{}\" is not found", thisFurnace.HeatingCoilName)); | ||
| ShowContinueError(state, format("...occurs for {}", thisFurnace.Name)); | ||
| errorFound = false; | ||
| } | ||
| switch (thisFurnace.SuppHeatCoilType_Num) { | ||
| case HVAC::Coil_HeatingGasOrOtherFuel: | ||
| case HVAC::Coil_HeatingElectric: | ||
| case HVAC::Coil_HeatingDesuperheater: { | ||
| int suppHeatingCoilIndex; | ||
| HeatingCoils::GetCoilIndex(state, thisFurnace.SuppHeatCoilName, suppHeatingCoilIndex, errorFound); | ||
| if (suppHeatingCoilIndex > 0) { | ||
| suppHeatingCoilRTF = state.dataHeatingCoils->HeatingCoil(suppHeatingCoilIndex).RTF; | ||
| } | ||
| } break; | ||
| default:; | ||
| } | ||
| 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); | ||
| } | ||
|
|
||
| // Reset OnOffFanPartLoadFraction to 1 in case another on/off fan is called without a part-load curve | ||
| state.dataHVACGlobal->OnOffFanPartLoadFraction = 1.0; | ||
|
|
||
|
|
@@ -903,6 +952,7 @@ namespace Furnaces { | |
| // Determine if furnace is on air loop served by the thermostat location specified | ||
| for (int zoneInNode = 1; zoneInNode <= state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumInletNodes; ++zoneInNode) { | ||
| int AirLoopNumber = state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).InletNodeAirLoopNum(zoneInNode); | ||
| thisFurnace.airloopNum = AirLoopNumber; | ||
| if (AirLoopNumber > 0) { | ||
| for (int BranchNum = 1; BranchNum <= state.dataAirSystemsData->PrimaryAirSystems(AirLoopNumber).NumBranches; ++BranchNum) { | ||
| for (int CompNum = 1; | ||
|
|
@@ -1441,6 +1491,7 @@ namespace Furnaces { | |
| // Determine if system is on air loop served by the thermostat location specified | ||
| for (int zoneInNode = 1; zoneInNode <= state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumInletNodes; ++zoneInNode) { | ||
| int AirLoopNumber = state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).InletNodeAirLoopNum(zoneInNode); | ||
| thisFurnace.airloopNum = AirLoopNumber; | ||
| if (AirLoopNumber > 0) { | ||
| for (int BranchNum = 1; BranchNum <= state.dataAirSystemsData->PrimaryAirSystems(AirLoopNumber).NumBranches; ++BranchNum) { | ||
| for (int CompNum = 1; | ||
|
|
@@ -2736,6 +2787,7 @@ namespace Furnaces { | |
| // Determine if furnace is on air loop served by the thermostat location specified | ||
| for (int zoneInNode = 1; zoneInNode <= state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumInletNodes; ++zoneInNode) { | ||
| int AirLoopNumber = state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).InletNodeAirLoopNum(zoneInNode); | ||
| thisFurnace.airloopNum = AirLoopNumber; | ||
| if (AirLoopNumber > 0) { | ||
| for (int BranchNum = 1; BranchNum <= state.dataAirSystemsData->PrimaryAirSystems(AirLoopNumber).NumBranches; ++BranchNum) { | ||
| for (int CompNum = 1; | ||
|
|
@@ -3667,6 +3719,7 @@ namespace Furnaces { | |
| // Determine if furnace is on air loop served by the thermostat location specified | ||
| for (int zoneInNode = 1; zoneInNode <= state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).NumInletNodes; ++zoneInNode) { | ||
| int AirLoopNumber = state.dataZoneEquip->ZoneEquipConfig(ControlledZoneNum).InletNodeAirLoopNum(zoneInNode); | ||
| thisFurnace.airloopNum = AirLoopNumber; | ||
| if (AirLoopNumber > 0) { | ||
| for (int BranchNum = 1; BranchNum <= state.dataAirSystemsData->PrimaryAirSystems(AirLoopNumber).NumBranches; ++BranchNum) { | ||
| for (int CompNum = 1; | ||
|
|
@@ -4761,7 +4814,6 @@ namespace Furnaces { | |
| // Pass the fan cycling schedule index up to the air loop. Set the air loop unitary system flag. | ||
| state.dataAirLoop->AirLoopControlInfo(AirLoopNum).cycFanSched = thisFurnace.fanOpModeSched; | ||
| state.dataAirLoop->AirLoopControlInfo(AirLoopNum).UnitarySys = true; | ||
| // RR this is wrong, Op mode needs to be updated each time atep | ||
| state.dataAirLoop->AirLoopControlInfo(AirLoopNum).fanOp = thisFurnace.fanOp; | ||
|
|
||
| // Check that heat pump heating capacity is within 20% of cooling capacity | ||
|
|
@@ -6273,6 +6325,12 @@ namespace Furnaces { | |
| CheckSysSizing(state, HVAC::unitarySysTypeNames[(int)thisFurnace.type], thisFurnace.Name); | ||
|
|
||
| thisFurnace.DesignHeatingCapacity = state.dataSize->FinalSysSizing(state.dataSize->CurSysNum).HeatCap; | ||
| 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; | ||
| } | ||
|
Comment on lines
+6328
to
+6333
Collaborator
Author
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. System size is determined first, then heating coil size is determined after. In the former, the With With this branch:
Collaborator
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. This looks better. |
||
| } | ||
|
|
||
| if (thisFurnace.DesignHeatingCapacity < HVAC::SmallLoad) { | ||
|
|
||
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.
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.
Looks ok