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

Correction of FEI Calculation #10572

Merged
merged 2 commits into from
Jun 25, 2024
Merged

Conversation

RKStrand
Copy link
Contributor

Pull request overview

  • Fixes Fan Energy Index (FEI) calculations use reference standard air density at elevation instead of at sea level #10509
  • It was identified that there was an issue with the fan FEI calculation where it was not using the correct density values for a density ratio of design conditions to assumed conditions at sea level. In the ANSI/AMCA Standard 207-17, the value for density at sea level is defined as 1.2 kg/m^3. This was implemented along with changes to the design conditions density which is now assumed to be 21C, 50% RH at the elevation of the location. The function that was used to do the FEI calculation was modified to conform to the standard with these assumptions. Existing unit tests were updated to accommodate this change and an existing unit test was significantly expanded to more fully test the FEI calculation function. Minor edits (additions) were made to the Engineering Reference in the section that docments the FEI calculation. There are a number of differences in the output. These are all changes to the report table that shows the FEI result. Since the FEI calculation has changed, this was in line with expectations.

NOTE: ENHANCEMENTS MUST FOLLOW A SUBMISSION PROCESS INCLUDING A FEATURE PROPOSAL AND DESIGN DOCUMENT PRIOR TO SUBMITTING CODE

Pull Request Author

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

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • 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
  • 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

EnergyPlus code modifications to implement fix for GitHub Issue #10509.  Updates to existing unit tests that use the function modified and expansion of an existing unit test to more fully exercise the various cases of the function updated.
Additional text added to the FEI documentation contained in the engineering reference.  Also found and corrected a typo in the input/output reference.
@RKStrand RKStrand added the Defect Includes code to repair a defect in EnergyPlus label Jun 18, 2024
@RKStrand RKStrand added this to the EnergyPlus 24.2 milestone Jun 18, 2024
@RKStrand RKStrand self-assigned this Jun 18, 2024
@@ -2643,8 +2643,7 @@ void FanSystem::set_size(EnergyPlusData &state)
}
}
}
Real64 _rhoAir = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataLoopNodes->Node(inletNodeNum).Press, inletAirTemp, inletAirHumRat);
designPointFEI = report_fei(state, maxAirFlowRate, designElecPower, deltaPress, _rhoAir);
designPointFEI = report_fei(state, maxAirFlowRate, designElecPower, deltaPress);
Copy link
Contributor

@rraustad rraustad Jun 18, 2024

Choose a reason for hiding this comment

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

report_fei is called in 2 places during sizing, 1 for the component model and another place for all other fan types. During sizing there is no indication of inlet condition other than what is determined by sizing. And if sizing is not requested then there is no data to grab when calling report_fei. So I think this is a reasonable solution to random 0's found for temperature at the inlet of the fan when this function is called. In the Eng Ref the equation is provided right above the description so the user does have a way to adjust this value if needed.

Copy link
Member

Choose a reason for hiding this comment

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

@rraustad could you clarify if you are asking for changes here or not? The random 0's phrase has me curious...

Copy link
Contributor

Choose a reason for hiding this comment

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

I was just talking this through. The random 0's for T or w at the fan inlet node is what was previously used to calculate rhoAir, now rhoAir uses a reference condition (i.e., non-zero T and w). This is good to go.

Real64 constexpr tempAirFan = 21.0; // Standard fan inlet temperature in Celsius
Real64 constexpr hrAirFan = 0.5;    // Standard fan inlet humidity ratio (50%)
Real64 _wAirFan = Psychrometrics::PsyWFnTdbRhPb(state, tempAirFan, hrAirFan, state.dataEnvrn->StdBaroPress);
Real64 _rhoAirFan = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataEnvrn->StdBaroPress, tempAirFan, _wAirFan);

Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

Seems fine to me; I'll yield to @rraustad's thoughts on the sizing comment before approving/merging.

@@ -90,7 +90,7 @@ TEST_F(EnergyPlusFixture, Fans_FanSizing)
fan1->set_size(*state);
EXPECT_DOUBLE_EQ(1.00635, fan1->maxAirFlowRate);
state->dataSize->DataNonZoneNonAirloopValue = 0.0;
EXPECT_NEAR(1.0371, fan1->designPointFEI, 0.0001);
EXPECT_NEAR(1.0352, fan1->designPointFEI, 0.0001);
Copy link
Member

Choose a reason for hiding this comment

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

Personal preference here: maybe just loosen up the precision to 0.01 or something, but this is fine.

@@ -2643,8 +2643,7 @@ void FanSystem::set_size(EnergyPlusData &state)
}
}
}
Real64 _rhoAir = Psychrometrics::PsyRhoAirFnPbTdbW(state, state.dataLoopNodes->Node(inletNodeNum).Press, inletAirTemp, inletAirHumRat);
designPointFEI = report_fei(state, maxAirFlowRate, designElecPower, deltaPress, _rhoAir);
designPointFEI = report_fei(state, maxAirFlowRate, designElecPower, deltaPress);
Copy link
Member

Choose a reason for hiding this comment

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

@rraustad could you clarify if you are asking for changes here or not? The random 0's phrase has me curious...

@Myoldmopar
Copy link
Member

Ran regressions locally and just table diffs no other issues. Looks good to go in. This will cause table diffs in other branches, so they will need updated develop. Thanks @RKStrand and @rraustad

@Myoldmopar Myoldmopar merged commit 7f3151c into develop Jun 25, 2024
15 of 17 checks passed
@Myoldmopar Myoldmopar deleted the 10509feiUseStdDensityAtSeaLevel branch June 25, 2024 17:37
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.

Fan Energy Index (FEI) calculations use reference standard air density at elevation instead of at sea level
8 participants