-
Notifications
You must be signed in to change notification settings - Fork 389
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
Conversation
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.
@@ -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); |
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.
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.
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.
@rraustad could you clarify if you are asking for changes here or not? The random 0's phrase has me curious...
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.
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);
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.
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); |
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.
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); |
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.
@rraustad could you clarify if you are asking for changes here or not? The random 0's phrase has me curious...
Pull request overview
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.
Reviewer
This will not be exhaustively relevant to every PR.