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

Avoid AFN fan array bounds error #10636

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ namespace AirflowNetwork {
void venting_control(int i, // AirflowNetwork surface number
Real64 &OpenFactor // Window or door opening factor (used to calculate airflow)
);
void assign_fan_airloop();
void validate_distribution();
void validate_fan_flowrate(); // Catch a fan flow rate from EPlus input file and add a flag for VAV terminal damper
void validate_exhaust_fan_input();
Expand Down Expand Up @@ -364,7 +363,6 @@ namespace AirflowNetwork {
int NumOfOAFans = 0; // number of OutdoorAir fans
int NumOfReliefFans = 0; // number of OutdoorAir relief fans
bool AirflowNetworkGetInputFlag = true;
bool AssignFanAirLoopNumFlag = true;
bool ValidateDistributionSystemFlag = true;
Array1D<Real64> FacadeAng =
Array1D<Real64>(5); // Facade azimuth angle (for walls, angle of outward normal to facade measured clockwise from North) (deg)
Expand Down Expand Up @@ -592,7 +590,6 @@ namespace AirflowNetwork {
NumOfOAFans = 0;
NumOfReliefFans = 0;
AirflowNetworkGetInputFlag = true;
AssignFanAirLoopNumFlag = true;
ValidateDistributionSystemFlag = true;
FacadeAng = Array1D<Real64>(5);
AirflowNetworkZnRpt.deallocate();
Expand Down
24 changes: 0 additions & 24 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,6 @@ namespace AirflowNetwork {
// VAV terminal set only
if (present(FirstHVACIteration) && FirstHVACIteration) VAVTerminalRatio = 0.0;

// Set AirLoop Number for fans
if (FirstHVACIteration && AssignFanAirLoopNumFlag) {
assign_fan_airloop();
AssignFanAirLoopNumFlag = false;
}

if (AirflowNetworkFanActivated && distribution_simulated) {
if (ValidateDistributionSystemFlag) {
validate_distribution();
Expand Down Expand Up @@ -10098,24 +10092,6 @@ namespace AirflowNetwork {
}
}

void Solver::assign_fan_airloop()
{
// Assign the system Fan AirLoop Number based on the zone inlet node

for (int i = 1; i <= AirflowNetworkNumOfZones; i++) {
for (int j = 1; j <= m_state.dataGlobal->NumOfZones; j++) {
if (!m_state.dataZoneEquip->ZoneEquipConfig(j).IsControlled) continue;
if ((MultizoneZoneData(i).ZoneNum == j) && (m_state.dataZoneEquip->ZoneEquipConfig(j).NumInletNodes > 0)) {
for (int k = 1; k <= DisSysNumOfCVFs; k++) {
if (DisSysCompCVFData(k).AirLoopNum == 0) {
DisSysCompCVFData(k).AirLoopNum = m_state.dataZoneEquip->ZoneEquipConfig(j).InletNodeAirLoopNum(1);
}
}
}
}
}
}

void Solver::validate_distribution()
{

Expand Down
Loading