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 crash with new Multi-speed Fans for WSHP Zone Equipment #10249

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

rraustad
Copy link
Contributor

@rraustad rraustad commented Sep 28, 2023

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.

  • 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

@rraustad rraustad added the Defect Includes code to repair a defect in EnergyPlus label Sep 28, 2023
@rraustad rraustad requested a review from lgu1234 September 28, 2023 02:11
@@ -142,6 +142,7 @@ namespace HVACFan {
bool AirPathFlag; // Yes, this fan is a part of airpath
int m_numSpeeds; // input for how many speed levels for discrete fan
std::vector<Real64> m_massFlowAtSpeed;
std::vector<Real64> m_flowFractionAtSpeed; // array of flow fractions for speed levels
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to public access

@@ -6791,55 +6791,72 @@ namespace UnitarySystems {
if (state.dataHVACFan->fanObjs[FanIndex]->speedControl == HVACFan::FanSystem::SpeedControlMethod::Discrete) {
int NumSpeeds = state.dataHVACFan->fanObjs[FanIndex]->m_numSpeeds;
if (NumSpeeds > 1) {
Copy link
Contributor Author

@rraustad rraustad Sep 28, 2023

Choose a reason for hiding this comment

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

Made the following very targeted to these coil types, only for WSHP, only if air flow is not autoszied for both WSHP parent and accompanied fan object. Also, mass flow should not need to be set here but I left those lines of code, mass flow should get overwritten later unless that is somehow protected. Notice here too that the fan's m_flowFractionAtSpeed had to be made public.

@rraustad rraustad requested a review from Myoldmopar September 28, 2023 02:17
@rraustad rraustad added this to the EnergyPlus 23.2 milestone Sep 28, 2023
@rraustad
Copy link
Contributor Author

rraustad commented Sep 28, 2023

Defect file results in this branch (not sure what warnings were present in 23.1):

************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
************* EnergyPlus Completed Successfully-- 53650 Warning; 0 Severe Errors; Elapsed Time=00hr 00min  5.79sec

@Myoldmopar
Copy link
Member

Thanks @rraustad !! If CI is happy, I'm merging this and the miktex fix and taking rc2 either later tonight or in the morning. That should do it.

@rraustad
Copy link
Contributor Author

Oops, I didn't see your comment. My warning fix erased the previous CI results.

@rraustad
Copy link
Contributor Author

@Myoldmopar merge in #10242 while your at it.

@rraustad
Copy link
Contributor Author

rraustad commented Sep 28, 2023

FYI, the err diff (1 test warning) here is adding a " in the warning message that was previously missing at old line 6839/6840 and is now present at new line 6853. This warning does not make much sense.

-   ** Warning ** ZoneHVAC:WaterToAirHeatPump = SPACE3-1 HEAT PUMP with Fan:SystemModel is used in  SPACE3-1 SUPPLY FAN"
+   ** Warning ** ZoneHVAC:WaterToAirHeatPump = SPACE3-1 HEAT PUMP with Fan:SystemModel is used in "SPACE3-1 SUPPLY FAN"

@rraustad
Copy link
Contributor Author

rraustad commented Sep 28, 2023

I ran the 23.1 defect file with results showing even more warnings than this branch:

************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
************* EnergyPlus Completed Successfully-- 67168 Warning; 0 Severe Errors; Elapsed Time=00hr 00min  5.37sec

in-23.1.idf.txt

Used Chicago Ohare Intl Ap weather for these (and above) test results. Defect file shows Denver Intl Ap_CO_USA.

@Myoldmopar
Copy link
Member

Thank you @rraustad! I really appreciate the quick fix on this! FYI @shorowit

@Myoldmopar Myoldmopar merged commit 6029a24 into develop Sep 28, 2023
@Myoldmopar Myoldmopar deleted the 9746-FollowUp-Fix-Crash branch September 28, 2023 12:04
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.

8 participants