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

Add a new object type DataLoopNode::ConnectionObjectType #10388

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

lgu1234
Copy link
Contributor

@lgu1234 lgu1234 commented Feb 1, 2024

Pull request overview

A correct function is required to get an air node number. The function requires a connection type as an argument. The AirLoopHVAC:Splitter object is not available in the connection list. The fix adds the object in the list.

The test file is an example file as SmallOffice_CentralDOAS.idf.

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • [X ] Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • [ X] Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • [ X] Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • [ X] Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • [ X] If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@lgu1234 lgu1234 added the Defect Includes code to repair a defect in EnergyPlus label Feb 1, 2024
@@ -383,7 +383,15 @@ namespace AirLoopHVACDOAS {

thisSplitter.name = Util::makeUPPER(thisObjectName);
thisSplitter.InletNodeName = Util::makeUPPER(fields.at("inlet_node_name").get<std::string>());
thisSplitter.InletNodeNum = Util::FindItemInList(thisSplitter.InletNodeName, state.dataLoopNodes->NodeID);
thisSplitter.InletNodeNum = NodeInputManager::GetOnlySingleNode(state,
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 correct function is used to get an air node number.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lgu1234 This looks good. The same change is needed for the Mixer inlet nodes and the Splitter outlet nodes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mjwitte Thanks. The same changes are made.

@@ -11579,6 +11579,9 @@ TEST_F(EnergyPlusFixture, AirLoopHVACDOAS_TestFanDrawThroughPlacement)
EXPECT_NEAR(AirLoopDOAS_SplitterInletNode.MassFlowRate, 0.1, 0.0001);
EXPECT_NEAR(DOAS_FanInletNode.MassFlowRate, 0.1, 0.0001);
EXPECT_NEAR(DOAS_HeatingCOilOutletNode.MassFlowRate, 0.1, 0.0001);

// Issue 10204 Get AirLoopHVAC:Splitter inlet node number using NodeInputManager::GetOnlySingleNode
EXPECT_EQ(thisAirLoopDOASObjec.m_CompPointerAirLoopSplitter->InletNodeNum, 17);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unit test

@mjwitte mjwitte self-assigned this Feb 6, 2024
Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

@lgu1234 Looks good. Unit tests run, diffs are as expected. Merging.

@mjwitte mjwitte merged commit fe5ebf3 into develop Feb 7, 2024
15 checks passed
@mjwitte mjwitte deleted the 10204-Add-more-object-types branch February 7, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more object types in the DataLoopNode::ConnectionObjectType
7 participants