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 VRFFluidTCtrl OU Fan Power not considering system cycling #10650

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

yujiex
Copy link
Collaborator

@yujiex yujiex commented Aug 8, 2024

Pull request overview

Regression diffs

Regression diffs occur in the following two files:

  • VariableRefrigerantFlow_FluidTCtrl_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_HR_5Zone

eplusout.csv diff

The diffs in eplusout.csv in the following variables.

  • VRF HEAT PUMP:VRF Heat Pump Cooling Electricity Rate,
  • VRF HEAT PUMP:VRF Heat Pump Cooling Electricity Energy,
  • VRF HEAT PUMP:VRF Heat Pump Heating Electricity Rate,
  • VRF HEAT PUMP:VRF Heat Pump Heating Electricity Energy,
  • Cooling:Electricity,

VRF Heat Pump Cooling and Heating Electricity Rate and Energy differences are due to outdoor unit fan power changes in this feature (``this->ElecCoolingPower = state.dataHVACVarRefFlow->VRF(VRFCond).Ncomp + this->OUFanPower;`).
Cooling:Electricity is affected by VRF Heat Pump Cooling/Heating Electricity, so the diffs are also expected.

meter diff

The following variables have meter diffs. These are expected as OU fan power is part of cooling, HVAC, and facility electricity. So these diffs are also expected.

  • Cooling:Electricity
  • Electricity:Facility
  • Electricity:HVAC

table diff

The following electricity terms have diffs. The Electricity:Facility, Electricity:HVAC, Heating:Electricity terms are due to reasons discussed above in meter and eplusout csv diffs. The ElectricityPurchased are also dependent on the electricity demand, which includes facility and HVAC electricity demand. These are affected by OU fan power as well. So diffs in *ElectricityPurchased is also expected.

  • Electricity:Facility
  • ElectricityPurchased:Facility
  • ElectricityPurchased:Plant
  • Cogeneration:ElectricityPurchased
  • General:Cogeneration:ElectricityPurchased
  • ElectricityNet:Facility
  • ElectricityNet:Plant
  • Cogeneration:ElectricityNet
  • General:Cogeneration:ElectricityNet
  • Electricity:HVAC
  • Heating:Electricity
  • General:Heating:Electricity
     
    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

@yujiex yujiex added the Defect Includes code to repair a defect in EnergyPlus label Aug 8, 2024
@yujiex yujiex added this to the EnergyPlus 24.2 milestone Aug 8, 2024
@yujiex yujiex self-assigned this Aug 8, 2024
@@ -11736,7 +11736,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)
// Key outputs of this subroutine
this->CompActSpeed = max(CompSpdActual, 0.0);
this->Ncomp = max(Ncomp, 0.0) / this->EffCompInverter;
this->OUFanPower = this->RatedOUFanPower;
this->OUFanPower = this->RatedOUFanPower * CyclingRatio;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a reasonable change IF the system uses cycling fan. For constant fan I don't think you want to do this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, wait. this is the outdoor unit fan. Yes, I think this is reasonable that the entire system would cycle when below min part load ratio.

@dareumnam dareumnam self-requested a review August 28, 2024 17:49
@dareumnam
Copy link
Collaborator

This is a side PR related to #10341, and it aligns with the changes we made in #10341. The test diffs are expected, and there are no conflicts with the develop branch. I believe this is good to go. @Myoldmopar

@Myoldmopar
Copy link
Member

This is now causing a unit test failure in develop, at least locally. I'm going to push the branch up and let CI confirm. FWIW, I'm seeing the issue with the assertion that these two are equal-ish:

state->dataHVACVarRefFlow->VRF(1).OUFanPower
state->dataHVACVarRefFlow->VRF(1).RatedOUFanPower

@yujiex
Copy link
Collaborator Author

yujiex commented Sep 11, 2024

I will check the unit test

Copy link

⚠️ Regressions detected on macos-14 for commit fa3f782

Regression Summary
  • ESO Big Diffs: 3
  • Table Big Diffs: 4
  • MTR Small Diffs: 1
  • MTR Big Diffs: 1
  • Table String Diffs: 1

@Myoldmopar
Copy link
Member

OK, CI confirmed my results, the unit test is failing here as seen here: https://github.com/NREL/EnergyPlus/actions/runs/10814479373/job/30001042106

@yujiex
Copy link
Collaborator Author

yujiex commented Sep 11, 2024

OK, CI confirmed my results, the unit test is failing here as seen here: https://github.com/NREL/EnergyPlus/actions/runs/10814479373/job/30001042106

@Myoldmopar I just fixed it. Need to multiply by cycling ratio in unit test too.

Copy link

⚠️ Regressions detected on macos-14 for commit ff1fe4a

Regression Summary
  • ESO Small Diffs: 8
  • EDD: 2
  • MTR Small Diffs: 10
  • Table Big Diffs: 8
  • Table String Diffs: 5
  • ERR: 2
  • ESO Big Diffs: 4
  • EIO: 6
  • Table Small Diffs: 6
  • MTR Big Diffs: 1

@Myoldmopar
Copy link
Member

Yep, that was it! More diffs appearing, but obviously not because you changed one line in a unit test :) It was behind develop and develop was moving way too fast. Anyway, this is good to go, will merge it in later when CI calms down a bit. Thanks!

@yujiex
Copy link
Collaborator Author

yujiex commented Sep 11, 2024

Thanks @Myoldmopar. Glad it resolved :)

@Myoldmopar
Copy link
Member

OK, got the branch pulled and merged develop. It's all happy now. Thanks @yujiex !

@Myoldmopar Myoldmopar merged commit 6ebeecd into develop Sep 12, 2024
10 checks passed
@Myoldmopar Myoldmopar deleted the fixVRFOUfanCycling branch September 12, 2024 16:36
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.

VRF Cooling issue: Heat Pump outdoor unit fan power does not consider runtime fraction
9 participants