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 VRFFluidCtrl heating cycling issue by moving cycling ratio calc in compressor spd calc #10416

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

yujiex
Copy link
Collaborator

@yujiex yujiex commented Feb 28, 2024

Pull request overview

The PR fixes the cycling ratio calculation of the VRF model in heating mode.

image

It also enforces a lower bound on the outdoor unit's evaporating temperature. The older version uses the refrigerant lowest saturation temperature as the lower bound, which might not be realistically reachable.

        this->VRFOU_CalcCompH(state,
                              TU_HeatingLoad,
                              this->EvaporatingTemp,
                              Tdischarge,
                              h_IU_cond_out_ave,
                              this->IUCondensingTemp,
                              this->IUEvapTempLow,           // <-- lower bound enforced here
                              Tfs,
                              Pipe_Q_h,
                              Q_c_OU,
                              CompSpdActual,
                              Ncomp_new,
                              CyclingRatio);

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 Feb 28, 2024
@yujiex yujiex self-assigned this Feb 28, 2024
@yujiex yujiex marked this pull request as draft February 28, 2024 00:49
if (CapDiff > (Tolerance * Cap_Eva0)) NumIteCcap = 999;

Ncomp = this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(CounterCompSpdTemp), T_discharge, T_suction);
if (CapDiff > (Tolerance * Cap_Eva0)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cycling ratio calculation is moved to here

@@ -11856,80 +11856,60 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)
CapMinTe + 8,
this->IUCondensingTemp - 5);

if ((Q_c_OU * C_cap_operation) <= CompEvaporatingCAPSpdMin) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The cycling ratio calculation is removed here

Tdischarge,
h_IU_cond_out_ave,
this->IUCondensingTemp,
this->IUEvapTempLow,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

enforces a lower bound to the outdoor unit evaporating temperature

Copy link
Contributor

Choose a reason for hiding this comment

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

I know the goto Label20 was present in the original code but we should try to eliminate goto statements when possible. This does not need to change in this branch and is a suggestion for future code. I moved out of the loop any code that does not need to be calculated each iteration.

Counter = 1;
m_air = this->OUAirFlowRate * RhoAir;
Ncomp_new = Ncomp;
while (std::abs(Ncomp_new - Ncomp) > (Tolerance * Ncomp)) && (Counter < 30)) {
}

@yujiex yujiex added this to the EnergyPlus 24.2 milestone Mar 11, 2024
@yujiex yujiex marked this pull request as ready for review March 13, 2024 17:52
@nrel-bot
Copy link

@yujiex @Myoldmopar it has been 28 days since this pull request was last updated.

1 similar comment
@nrel-bot-2c
Copy link

@yujiex @Myoldmopar it has been 28 days since this pull request was last updated.

NumIteCcap = 999;
CyclingRatio = min(1.0, (TU_load + Pipe_Q) * C_cap_operation / Cap_Eva1);
} else {
CyclingRatio = 1.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks odd. This appears to say if the calculation converged set CyclingRatio = 1 ?

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 heating issue: same heating power with different compressor speed at low heating load
7 participants