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

Source side outlet tempearture calculation uses loadside heat tranfer rate #10628

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

Nigusse
Copy link
Contributor

@Nigusse Nigusse commented Jul 29, 2024

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

@Nigusse Nigusse added the Defect Includes code to repair a defect in EnergyPlus label Jul 29, 2024
@Nigusse
Copy link
Contributor Author

Nigusse commented Aug 2, 2024

This code change impacts the water source heat pump performance. It uses the source heat transfer to determine the source side outlet temperature and the PLR adjustment calculation. I've included below a sample of cooling mode operation parameters plots to show the impact of the change. This change increased the cooling mode heater transfer (due to the addition of the power term) used to determine the source side outlet temperature. Hence, the cooling PLR or the cycling ratio is decreased to limit the source side outlet temperature at the user-specified limit of 50.0C. The Cycling Ratio was reduced since the heat pump operates at the minimum PLR. Where the Cycling Ratio was reduced, the load and source side outlet temperatures were also reduced. Compared to the developed branch, this branch's source side outlet temperature is well aligned with the user-specified source side maximum temperature limit of 50C.

image

@Nigusse
Copy link
Contributor Author

Nigusse commented Aug 2, 2024

In heating mode, it is the opposite; the source side heat transfer rate is less than the load side by the amount of electric power usage rate. I've included below a sample of plots of heating mode operation parameters to show the impact of the change. This change decreases the heating mode source side heater transfer rate (due to the subtraction of the power term) used to determine the source side outlet temperature. Hence, a higher heating PLR can be tolerated before it exceeds the user-specified source side temperature limit. Where the branch's PLR exceeded the developed branch's PLR, source-side outlet temperatures are within the limit but lower than the Develop branch values. This branch's source side outlet temperature behaves as expected and never undershoots or overshoots the user-specified source side temperature limits of 2C/25C while sometimes delivering slightly higher hot water temperature.

WSHP_Heating_Mode_Performance

Copy link
Contributor Author

@Nigusse Nigusse left a comment

Choose a reason for hiding this comment

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

Code changes walkthrough:

  • the source side heat transfer rate is determined for source side outlet temperature estimation. This change was possible because of the recent code refactor.

@@ -486,13 +486,18 @@ void EIRPlantLoopHeatPump::calcAvailableCapacity(EnergyPlusData &state, Real64 c
}
}
if (this->heatRecoveryHeatPump) {
this->calcLoadSideHeatTransfer(state, availableCapacity);
this->calcPowerUsage(state);
Real64 sourceSideHeatTransfer = this->calcQsource(availableCapacity * partLoadRatio, this->powerUsage);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adds the steps required to calculate the power usage so that the source side heat transfer is estimated correctly.

Real64 const sourceMCp = this->sourceSideMassFlowRate * CpSrc;
Real64 const tempSourceOutletTemp =
this->calcSourceOutletTemp(this->sourceSideInletTemp, (availableCapacity * partLoadRatio) / sourceMCp);
Real64 const tempSourceOutletTemp = this->calcSourceOutletTemp(this->sourceSideInletTemp, sourceSideHeatTransfer / sourceMCp);
if (this->EIRHPType == DataPlant::PlantEquipmentType::HeatPumpEIRHeating && tempSourceOutletTemp < this->minSourceTempLimit) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The source side outlet temperature is calculated using the source side heat transfer rate.

EXPECT_NEAR(1672.07, thisCoolingPLHP->sourceSideHeatTransfer, 0.01);
EXPECT_NEAR(50.0, thisCoolingPLHP->sourceSideOutletTemp, 0.01);
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a unit test to demonstrate the impact of the code changes.

@Nigusse
Copy link
Contributor Author

Nigusse commented Aug 6, 2024

The code change impacted one example file only and the diffs are in the EIO and ESO files. The diffs are expected as demonstrated the plots above.

@Nigusse Nigusse added this to the EnergyPlus 24.2 milestone Aug 7, 2024
@Myoldmopar
Copy link
Member

OK, I'm buying it, this is a good addition. Thanks @Nigusse, merging.

@Myoldmopar Myoldmopar merged commit 351c68d into develop Aug 12, 2024
15 checks passed
@Myoldmopar Myoldmopar deleted the Issue10626_EIR_ashp_tempLimit branch August 12, 2024 19:57
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.

Source side outlet tempearture calculation uses loadside heat tranfer rate for temperature limit check
7 participants