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 Fan:ZoneExhaust AFN validation #10661

Merged
merged 2 commits into from
Sep 11, 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
16 changes: 9 additions & 7 deletions src/EnergyPlus/AirflowNetwork/src/Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11225,13 +11225,15 @@ namespace AirflowNetwork {
found = true;
}
}
if (!found) {
ShowSevereError(m_state, format("{}Fan:ZoneExhaust is not defined in {}", RoutineName, CurrentModuleObject));
ShowContinueError(m_state,
"Zone Air Exhaust Node in ZoneHVAC:EquipmentConnections =" +
m_state.dataLoopNodes->NodeID(m_state.dataZoneEquip->ZoneEquipConfig(j).ExhaustNode(k)));
ErrorsFound = true;
}
}
if (!found) {
ShowSevereError(m_state, format("{}Fan:ZoneExhaust is not defined in {}", RoutineName, CurrentModuleObject));
ShowContinueError(
m_state,
format("The inlet node of the {} Fan:ZoneExhaust is not defined in the {}'s ZoneHVAC:EquipmentConnections",
m_state.dataZoneEquip->ZoneEquipList(j).EquipName,
m_state.dataZoneEquip->ZoneEquipConfig(j).ZoneName));
ErrorsFound = true;
Comment on lines +11228 to +11236
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved this verification so it can be done after iterating through all exhaust nodes.

Copy link
Member

Choose a reason for hiding this comment

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

👍 reasonable!

}
}
}
Expand Down
73 changes: 70 additions & 3 deletions tst/EnergyPlus/unit/AirflowNetworkHVAC.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19667,7 +19667,8 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ZoneOrderTest)

" NodeList,",
" Zone Inlet Nodes_unit1, !- Name",
" Zone Inlet Node_unit1; !- Node 1 Name",
" Dehumidifier Outlet Node,",
" Zone Inlet Node_unit1;",

" ZoneHVAC:EquipmentList,",
" ZoneEquipment_unit1, !- Name",
Expand All @@ -19683,13 +19684,19 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ZoneOrderTest)
" 2, !- Zone Equipment 2 Cooling Sequence",
" 2, !- Zone Equipment 2 Heating or No-Load Sequence",
" , !- Zone Equipment 2 Sequential Cooling Fraction Schedule Name",
" ; !- Zone Equipment 2 Sequential Heating Fraction Schedule Name",
" , !- Zone Equipment 2 Sequential Heating Fraction Schedule Name",
" ZoneHVAC:Dehumidifier:DX, !- Zone Equipment 3 Object Type",
" North Zone Dehumidifier !- Zone Equipment 3 Name",
" 3, !- Zone Equipment 3 Cooling Sequence",
" 3, !- Zone Equipment 3 Heating or No-Load Sequence",
" , !- Zone Equipment 3 Sequential Cooling Fraction Schedule Name",
" ; !- Zone Equipment 3 Sequential Heating Fraction Schedule Name",

" ZoneHVAC:EquipmentConnections,",
" living_unit1, !- Zone Name",
" ZoneEquipment_unit1, !- Zone Conditioning Equipment List Name",
" zone inlet nodes_unit1, !- Zone Air Inlet Node or NodeList Name",
" Zone Exhaust Node_unit1, !- Zone Air Exhaust Node or NodeList Name",
" Zone Exhaust Node_unit1 Nodes, !- Zone Air Exhaust Node or NodeList Name",
" Zone Node_unit1, !- Zone Air Node Name",
" Zone Outlet Node_unit1; !- Zone Return Air Node or NodeList Name",

Expand Down Expand Up @@ -19752,6 +19759,60 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ZoneOrderTest)
" CommaAndHTML, !- Column Separator",
" InchPound; !- Unit Conversion",

" NodeList,",
" Zone Exhaust Node_unit1 Nodes,",
" Zone3DehumidifierInlet,",
" Zone Exhaust Node_unit1;",

" ZoneHVAC:Dehumidifier:DX,",
" North Zone Dehumidifier, !- Name",
" always_avail, !- Availability Schedule Name",
" Zone3DehumidifierInlet, !- Air Inlet Node Name",
" Dehumidifier Outlet Node,!- Air Outlet Node Name",
" 50.16, !- Rated Water Removal {L/day}",
" 3.412, !- Rated Energy Factor {L/kWh}",
" 0.12036, !- Rated Air Flow Rate {m3/s}",
" ZoneDehumidWaterRemoval, !- Water Removal Curve Name",
" ZoneDehumidEnergyFactor, !- Energy Factor Curve Name",
" ZoneDehumidPLFFPLR, !- Part Load Fraction Correlation Curve Name",
" 10.0, !- Minimum Dry-Bulb Temperature for Dehumidifier Operation {C}",
" 32.0, !- Maximum Dry-Bulb Temperature for Dehumidifier Operation {C}",
" 0.0; !- Off-Cycle Parasitic Electric Load {W}",
Comment on lines +19767 to +19780
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add a dehumidifier to this test to create the same situation as the defect file (multiple exhaust nodes). The defect file uses a VRF terminal.

Copy link
Member

Choose a reason for hiding this comment

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

Nice job just modifying an existing test here.


" Curve:Biquadratic,",
" ZoneDehumidWaterRemoval, !- Name",
" -2.724878664080, !- Coefficient1 Constant",
" 0.100711983591, !- Coefficient2 x",
" -0.000990538285, !- Coefficient3 x**2",
" 0.050053043874, !- Coefficient4 y",
" -0.000203629282, !- Coefficient5 y**2",
" -0.000341750531, !- Coefficient6 x*y",
" 21.0, !- Minimum Value of x",
" 32.22, !- Maximum Value of x",
" 40.0, !- Minimum Value of y",
" 80.0; !- Maximum Value of y",

" Curve:Biquadratic,",
" ZoneDehumidEnergyFactor, !- Name",
" -2.388319068955, !- Coefficient1 Constant",
" 0.093047739452, !- Coefficient2 x",
" -0.001369700327, !- Coefficient3 x**2",
" 0.066533716758, !- Coefficient4 y",
" -0.000343198063, !- Coefficient5 y**2",
" -0.000562490295, !- Coefficient6 x*y",
" 21.0, !- Minimum Value of x",
" 32.22, !- Maximum Value of x",
" 40.0, !- Minimum Value of y",
" 80.0; !- Maximum Value of y",

" Curve:Quadratic,",
" ZoneDehumidPLFFPLR, !- Name",
" 0.95, !- Coefficient1 Constant",
" 0.05, !- Coefficient2 x",
" 0.0, !- Coefficient3 x**2",
" 0.0, !- Minimum Value of x",
" 1.0; !- Maximum Value of x",

});

ASSERT_TRUE(process_idf(idf_objects));
Expand All @@ -19766,6 +19827,12 @@ TEST_F(EnergyPlusFixture, AirflowNetwork_ZoneOrderTest)
state->afn->AirflowNetworkNodeData(2).EPlusNodeNum = 4;
// Attic_Unit1
state->afn->AirflowNetworkNodeData(3).EPlusNodeNum = 0;

// Check that the validation fails if the AFN exhaust fan is not well setup
int exhaustFanInletNodeIndex = state->afn->MultizoneCompExhaustFanData(1).InletNode;
state->afn->MultizoneCompExhaustFanData(1).InletNode = 6;
state->afn->ValidateExhaustFanInputOneTimeFlag = true;
EXPECT_THROW(state->afn->validate_exhaust_fan_input(), std::runtime_error);
Comment on lines +19830 to +19835
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Mess with the exhaust fan node to make sure that the if statement that was moved still creates a fatal error.

}

TEST_F(EnergyPlusFixture, AirflowNetwork_TestZoneEqpSupportZoneWindowAC)
Expand Down
Loading