-
Notifications
You must be signed in to change notification settings - Fork 392
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
Removal of Unused Fuel Factor Inputs #9581
Conversation
This commit eliminates the two parameters that are not used in the FuelFactors input. This includes code changes, IDD changes, IDF changes, transition updates, and one documentation change. Still yet to do: create a unit test and add a table to the IO Ref for source to site ratios from EPA.
Unit test was added to test the fix to the indexing problem. Also, a table of EPA data was added to the IORef. This completes the requirements for this defect.
More files that have FuelFactors inputs that needed to be adjusted (these were in datasets).
Missed some input files in the Performance folder that had FuelFactors in it that were causing linux to have errors. This should fix the problems.
@@ -246,7 +246,7 @@ void GetPollutionFactorInput(EnergyPlusData &state) | |||
} | |||
|
|||
// If Steam Conversion Efficiency defined by the User is negative or zero then a default of 25% will be assigned. | |||
if (state.dataIPShortCut->rNumericArgs(1) > 0.0) { | |||
if (state.dataIPShortCut->rNumericArgs(3) > 0.0) { |
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've never looked at this module before. Sacre bleu! It has about (at least) 10X more code than it needs to. This entire logic can be implemented using loops over fuels and pollutants. Instead it has copies of the code (with one parameter changed) for each fuel and pollutant and sometimes for the cross product of each loop and pollutant. Not sure who wants to take this on, but this will probably be the most satisfying couple of hours you will spend with EnergyPlus source code.
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.
@amirroth yes, it was painful and I had similar thoughts. Probably would be very satisfying work. Can we make it a new defect? I’m willing to take a whack at it.
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.
@RKStrand, sure. Go for it!
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.
This seems great and ready to go. I'll pull in develop and test locally, but assuming everything is clean, this can go right in.
ErrorsFound); | ||
} | ||
Pollution.OtherFuel2Coef.NucHi = state.dataIPShortCut->rNumericArgs(17); | ||
Pollution.OtherFuel2Coef.NucLo = state.dataIPShortCut->rNumericArgs(17); |
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.
Changes here seem minimal, and fine. It looks like lots of changes, but obviously it's just removing the unused field input processing.
nodiff=.false. | ||
OutArgs(1)=InArgs(1) | ||
OutArgs(2:CurArgs-2)=InArgs(4:CurArgs) | ||
CurArgs = CurArgs - 2 |
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.
Simple and perfect.
The second and third input parameters for the FuelFactors input syntax were eliminated because they were never used in the program. Everything else that comes after it is simply shifted forward. | ||
|
||
Link to the Issue in GitHub: [FuelFactors: Units of Measures and Energy per Unit Factor are never used](https://github.com/NREL/EnergyPlus/issues/9493) |
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.
Great, clear, thanks!
|
||
// The get routine should rest the steam conversion efficiency to the default value of 0.25. | ||
// Previously because of a typo, it would reset it to the input value of zero (or even a negative number). | ||
ASSERT_NEAR(state->dataPollutionModule->Pollution.SteamConvEffic, ExpectedOutput, AllowedTolerance); |
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.
Very nice test!
Oh right, this is the Clang format one. I'll pull in develop and clean that up, then test and push, then merge, because this is ready after that. |
Everything is super happy, and I cleaned up the clang format concerns. I'll merge this momentarily once GHA picks up the commit, but before Decent gets to it. |
Pull request overview
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.