Skip to content

Conversation

@yujiex
Copy link
Collaborator

@yujiex yujiex commented Jul 26, 2024

Pull request overview

Details on the fix of heat pump heating rate not matching total heating coil heating rate

The issue of heat pump heating rate not matching total heating coil heating rate, is caused by three factors

  • In function ControlVRFIUCoil, the capacity calculation method in FanSpdResidualHeat uses temperature difference (TotCap = FanSpdRto * Garate * 1005.0 * (Tout - Tin)) rather enthalpy difference (TotCap = FanSpdRto * RatedAirMassFlowRate * (PsyHFnTdbW(Tout, Wout) - PsyHFnTdbW(Tin, Win))). This is different from the coil heating rate calculation, causing some mismatches. So a function FanSpdResidualHeatUsingH is used to compute the capacity instead.

after using FanSpdResidualHeatUsingH in the coil heating rate calculation, the mismatch reduction is as follows

// before
      diff          percent.diff     
 Min.   :-73.044   Min.   :-1.03251  
 1st Qu.:  0.000   1st Qu.: 0.00000  
 Median :  0.000   Median : 0.00000  
 Mean   : -3.613   Mean   :-0.05856  
 3rd Qu.:  0.000   3rd Qu.: 0.00000  
 Max.   :  0.000   Max.   : 0.00000  

// after
      diff         percent.diff     
 Min.   :-24.84   Min.   :-0.41946  
 1st Qu.:  0.00   1st Qu.: 0.00000  
 Median :  0.00   Median : 0.00000  
 Mean   : -1.14   Mean   :-0.01852  
 3rd Qu.:  0.00   3rd Qu.: 0.00000  
 Max.   :  0.00   Max.   : 0.00000  
  • Within each time step, this->HeatingCapacity, this->PipingCorrectionHeating, HeatingPLR are involved in the calculation of VRF heat pump heating rate, this->TotalHeatingCapacity. In each time step, this->HeatingCapacity and this->PipingCorrectionHeating is evaluated twice. The coil heating rate calculation uses the values from the first round while the output of heat pump heating rate and piping correction factor uses the values from the second round. By re-evaluating coil heating rate using the updated OU capacity and heating rate, and removing the 100W lower bound on coil heating rate calculation, the difference between the coil heating rate and heat pump heating rate reduced to below 1E-10
// before
      diff         percent.diff     
 Min.   :-24.84   Min.   :-0.41946  
 1st Qu.:  0.00   1st Qu.: 0.00000  
 Median :  0.00   Median : 0.00000  
 Mean   : -1.14   Mean   :-0.01852  
 3rd Qu.:  0.00   3rd Qu.: 0.00000  
 Max.   :  0.00   Max.   : 0.00000  

// after
      diff             percent.diff       
 Min.   :-6.366e-12   Min.   :-1.820e-13  
 1st Qu.:-4.547e-13   1st Qu.:-1.515e-14  
 Median : 0.000e+00   Median : 0.000e+00  
 Mean   :-2.070e-14   Mean   :-4.444e-16  
 3rd Qu.: 4.547e-13   3rd Qu.: 1.479e-14  
 Max.   : 6.366e-12   Max.   : 1.554e-13  

The following is relevant debugging prints

// the following is a timestep, heating coil heating rate is 5849.6, heat pump heating rate is 5921, 
reported piping correction factor is 0.984. However 5921 x 0.984 is about 5826, 
different from coil heating rate of 5849.6.
   timestamp           heat.pump.heating.rate piping.correction.heating coil.heating.rate  diff percent.diff
   <dttm>                               <dbl>                     <dbl>             <dbl> <dbl>        <dbl>
 1 2024-01-06 22:40:00                  5921.                     0.984             5849.566. -24.8       -0.419

// There are two rounds of evaluations of this->HeatingCapacity and this->PipingCorrectionHeating
01/06 22-4,this->HeatingCapacity=5930.29974800236,PipingCor=0.9863862943052852
=7000.000000000003/(7000.000000000003+96.61117597961002)
01/06 22-4,this->HeatingCapacity=5921.339831212836,PipingCor=0.9837523896967507
=5849.5663925516155/(5849.5663925516155+96.61117592655613)

// coil TotalHeatingEnergyRate 5849.6 uses the OU capacity of 5930.3 and piping correction of 0.986. 
This is from the first round of this->HeatingCapacity evaluation. 
The following are some more details
// thisDXCoil.TotalHeatingEnergyRate = AirMassFlow * (OutletAirEnthalpy - InletAirEnthalpy) * PartLoadRatio
=5849.5663925516155
=0.4523946203083688 * (41284.34272289792 - 28354.112941287483) * 1,
Here the demand QCoilReq=5849.566392551615, it gets value from the MaxHeatCap, which is a result of LimitTUCapacity. 
This function restricts coil output to not exceed OU capacity. 
The TotalTUHeatingCapacity (OU capacity) value is calculated using 5930.3 x 0.986, 
corresponding to first round of this->HeatingCapacity evaluation
01/06 22-4,TotalTUHeatingCapacity=5849.566392551615
=5930.29974800236 * 0.9863862943052852

// Heat pump heating rate (this->TotalHeatingCapacity) uses value from the second round
// VRF heat pump heating rate is computed here
this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR;
// TotalCondHeatingCapacity is 5921.3 (which gets value from this->HeatingCapacity), 
so is this->TotalHeatingCapacity (as HeatingPLR is 1 here), piping correction is 0.9838. 
01/06 22-4,
TotalTUHeatingCapacity = TotalCondHeatingCapacity * this->PipingCorrectionHeating
=5825.132209162181=5921.339831212836 * 0.9837523896967507

before fixing
eplusout_develop.csv

after fixing
eplusout_recalcCoilHeat.csv

Regression diffs

Regression diffs happen in four files

  • US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF
  • VariableRefrigerantFlow_FluidTCtrl_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_HR_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone

Meter diffs happen in VariableRefrigerantFlow_FluidTCtrl_5Zone.idf and
VariableRefrigerantFlow_FluidTCtrl_HR_5Zone.idf. It happens in the following fields. It's reasonable as heating coil heating rate is updated in this PR. The magnitude of the maximum percent difference is around 1e-5 to 1e-6.

  • HeatingCoils:EnergyTransfer J
  • HeatingCoils:EnergyTransfer J
  • Electricity:Facility J
  • Electricity:HVAC J
  • Electricity:Facility J
  • Electricity:HVAC J

Table diffs happen in

  • VariableRefrigerantFlow_FluidTCtrl_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone

Table diffs are in Coil Total Capacity at Rating Conditions and Coil Sensible Capacity at Rating Conditions for three heating coils, as well as Heating:EnergyTransfer, General:Heating:EnergyTransfer, HeatingCoils:EnergyTransfer, Heating:EnergyTransfer:Zone*. These are also expected as coil heating rate is updated.

ESO output happens in all four files

  • US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF
  • VariableRefrigerantFlow_FluidTCtrl_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_HR_5Zone
  • VariableRefrigerantFlow_FluidTCtrl_wSuppHeater_5Zone

Take the US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf as example, the Heating Coil Heating Rate is different (0.005 relative diff) as expected. Zone heating demand is relative stable (1e-7 relative diff), the supplemental heating coil heating rate also differs as a result of the heating coil heating rate change. The diffs in cooling rate and related fields are very small (1e-12 relative diff). Heat Pump Terminal Unit Heating Load Rate (0.003 relative diff).

regression diff unfinished

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

previously it says HP total heating rate is the sum of air terminal heating
rate (which includes supplemental heating coil heating rate). This is wrong for
both the curve-based model and FluidTCtrl model. FluidTCtrl model doesn't have
an entry to this output field, so one is added.
@yujiex yujiex added Defect Includes code to repair a defect in EnergyPlus Documentation Related primarily on the LaTeX-based EnergyPlus documentation labels Jul 26, 2024
@yujiex yujiex added this to the EnergyPlus 24.2 milestone Jul 26, 2024
@yujiex yujiex self-assigned this Jul 26, 2024
coil heating rate calculation is like the following
AirMassFlow * (OutletAirEnthalpy - InletAirEnthalpy) * PartLoadRatio

In the computation of fan speed ratio, the coil heating capacity is
FanSpdRto * Garate * 1005.0 * (Tout - Tin)

The difference between
1005.0 * (Tout - Tin) and (OutletAirEnthalpy - InletAirEnthalpy)
can cause mismatches between coil heating rate and heating demand

Here we change the fan speed ratio caculation to also use the enthalpy
difference way to compute its heating capacity to match the demand
\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w}

This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit output variables for Zone VRF Air Terminal Total Heating Rate.
This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate.
Copy link
Contributor

Choose a reason for hiding this comment

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

It thought this should say "sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate less any piping loss."

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It might just be the total of heating coil heating rate rather than total coil heating rate - piping loss.

in CalcVRFCondenser, vrf.TotalHeatingCapacity (VRF Heat Pump Total Heating Rate output variable) is computed like this

vrf.TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR * CyclingRatio;

And in HeatingPLR is like this

if (TotalCondHeatingCapacity > 0.0) {
    HeatingPLR = min(1.0, (TUHeatingLoad / vrf.PipingCorrectionHeating) / TotalCondHeatingCapacity);
} else {
    HeatingPLR = 0.0;
}

For normal cases where TotalCondHeatingCapacity > 0.0,

vrf.TotalHeatingCapacity would just be

TotalCondHeatingCapacity * ((TUHeatingLoad / vrf.PipingCorrectionHeating) / TotalCondHeatingCapacity) * CyclingRatio 
= TUHeatingLoad / vrf.PipingCorrectionHeating * CyclingRatio

TUHeatingLoad / vrf.PipingCorrectionHeating would be coil heating rate plus the piping loss.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, I meant coil heating rates plus piping loss is the output from the outdoor unit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see. Sorry I misunderstood earlier. I will modify the description.


Note: refer to the rdd file after a simulation for exact output variable names

\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w}
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs a unique label (there are duplicate label warnings when file changes are viewed in github).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. I'll add a suffix to it

Garate = state.dataDXCoils->DXCoil(CoilIndex).RatedAirMassFlowRate(1);
// why always limit the minimum fan speed ratio to 0.65?
FanSpdRatioMin = min(max(OAMassFlow / Garate, 0.65), 1.0); // ensure that coil flow rate is higher than OA flow rate
FanSpdRatioMin = min(max(OAMassFlow / Garate, 0.0), 1.0); // ensure that coil flow rate is higher than OA flow rate
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 big change, unrelated to the heating rate outputs. Does this branch include some changes from another branch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I might have left it in by accident. Just reverted it.

@yujiex
Copy link
Collaborator Author

yujiex commented Aug 26, 2024

@mjwitte @rraustad would you mind taking another look at this PR? Thanks. I was wondering whether the type of adjustment in HVACVariableRefrigerantFlow.cc look Okay.

if (std::abs(ZnSenLoad) < 100.0) ZnSenLoad = sign(100.0, ZnSenLoad);
Real64 Wout = Win;
Real64 TotCap = FanSpdRto * RatedAirMassFlowRate * (PsyHFnTdbW(Tout, Wout) - PsyHFnTdbW(Tin, Win));
return (TotCap - ZnSenLoad) / ZnSenLoad;
Copy link
Contributor

@rraustad rraustad Aug 26, 2024

Choose a reason for hiding this comment

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

Do you really need to iterate on this? There's only 1 unknown.., FanSpdRto.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess not. I will change it to directly calculate FanSpdRto

Tout = Tin + (Ts_1 - Tin) * (1 - BF);
Real64 RatedAirMassFlowRate = state.dataDXCoils->DXCoil(CoilIndex).RatedAirMassFlowRate[0];
auto f = [QCoilSenHeatingLoad, RatedAirMassFlowRate, Tout, Tin, Win](Real64 FanSpdRto) {
return FanSpdResidualHeatUsingH(FanSpdRto, QCoilSenHeatingLoad, RatedAirMassFlowRate, Tout, Tin, Win);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not saying to change this but it just seems odd to me when meeting a load to modulate the fan based on suction temperature (which meets the load using air flow) instead of modulating the compressor at some known fan speed. I guess this is an artifact of using VS fan. I would hope in the case of a VS fan that the refrigerant suction T is relatively constant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems that modulating the compressor is at the next step after the calculation of the TU's are finished. In this function, I don't think refrigerant suction temperature changes

}
if (this->TUHeatingLoad / this->PipingCorrectionHeating > TotalCondHeatingCapacity) {
this->TotalHeatingCapacity = this->HeatingCapacityPrev * HeatingPLR * this->PipingCorrectionHeatingPrev;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

TotalHeatingCapacity should match the sum of the TU capacity + piping losses. So isn't it just that? TotalHeatingCapacity = Q_h_TU_PL = TU_HeatingLoad + Pipe_Q_h?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, it is matching this.

autosize, !- Cooling Outdoor Air Flow Rate {m3/s}
autosize, !- Heating Outdoor Air Flow Rate {m3/s}
0, !- Cooling Outdoor Air Flow Rate {m3/s}
0, !- Heating Outdoor Air Flow Rate {m3/s}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does including OA flow cause a difference between the sum of TU heating capacity + piping losses and condenser total heating capacity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it does cause some more difference

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rraustad Here is the output file when the heating cooling air flow rate is autosize
eplusout_when heating cooling air flow rate autosize.xlsx

The following is a snapshot sorted with column O in descending order

image

Copy link
Contributor

Choose a reason for hiding this comment

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

If L x M = 9083.83288 * 0.98793126 = 8974.2, which closely matches column K at 8973.19993, then why is the TU heating coil "allowed" to provide more than that "max" heating rate? Is the TU heating coil capacity getting limited by the MaxHeatingCapacity variable? I recall discussing that function LimitTUCapacity should include piping losses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Coil capacity should have been limited. Maybe there's some lingering issues there. I will check on that.

Copy link
Collaborator Author

@yujiex yujiex Aug 29, 2024

Choose a reason for hiding this comment

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

@rraustad I've changed to just using TU_HeatingLoad for this->TotalHeatingCapacity. Now the total "Heating Coil Heating Rate" and the "VRF Heat Pump Total Heating Rate" equals (regardless of whether the "Heating/Cooling Outdoor Air Flow Rate" is autosize or 0). The following are the outputs for these two cases.

eplusout_0 heating cooling air flow.csv
eplusout_autosize heating cooling air flow.csv

The coil capacity is indeed limited. I set the OU evaporative capacity to 5000W (coil capacity is 10023W). Coil heating rate is less than OU capacity at max speed.

image

@dareumnam dareumnam self-requested a review August 28, 2024 17:39
@github-actions
Copy link

github-actions bot commented Sep 3, 2024

⚠️ Regressions detected on macos-14 for commit b9a481a

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

@dareumnam
Copy link
Collaborator

@rraustad @mjwitte Do you have any further comments on this? If this PR needs more time for discussion, we can move it to the 25.1 bug freeze milestone, as we're planning to tag the first RC for 24.2 tomorrow.

\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w}

This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit output variables for Zone VRF Air Terminal Total Heating Rate.
This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate plus any piping loss.
Copy link
Contributor

Choose a reason for hiding this comment

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

This does seem like the correct definition for the VRF heating capacity.

this->TotalCoolingCapacity = TotalCondCoolingCapacity * CoolingPLR;
this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR;
// adjustment for matching HP heating rate and coil heating rate
this->TotalHeatingCapacity = TU_HeatingLoad;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not actually correct. The TU_HeatingLoad is the target (coil load + piping loss) that the model will iterate on to find a solution. The TotalHeatingCapacity is the result. With a tolerance on the iterations these 2 variables should not match. They should be very close (like within 0.001%), but not match. How far off TotalHeatingCapacity is from TU_HeatingLoad tells you how well the model did to calculate the final result. To equate these at the end will hide any issues with the model. TU_HeatingLoad should match exactly with the coil loads + piping loss. TotalHeatingCapacity should represent the refrigerant side heating capacity. Since this model has refrigerant properties could TotalHeatingCapacity = Mdot deltaH on the refrigerant side? Then you would know how well the model did to meet the load.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see.

I think the piping correction is not consistent in the IU and OU calculation, which might have partly caused the discrepancy. See comment here: #10625 (comment)

There might be other places contributing to it as well. I've been playing around with adjusting stuff but so far I've not been able to figure out how to effectively resolve the discrepancy.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just revert this one change and revisit how different these 2 results are. TotalHeatingCapacity versus TU_HeatingLoad. Maybe also add another report for refrigerant side capacity?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will do that

@Myoldmopar
Copy link
Member

Thank you both for the comments this afternoon. I'm going to mark, for now, that this is not going into 24.2. If things get resolved and we agree, we can certainly go ahead and drop it in. But I'm going to change it to focus on other things.

@Myoldmopar Myoldmopar removed this from the EnergyPlus 24.2 milestone Sep 11, 2024
@yujiex
Copy link
Collaborator Author

yujiex commented Feb 6, 2025

@yujiex just touching base on here. It seems like this had momentum, but then it got slowed down trying to get some things to agree. Could you comment on the latest status? If it's just that the current code could be merged as an improvement, with a follow-up to continue the investigation, then I'll work to get this merged in. If the current code is not necessarily the right changes, then obviously we'll just keep holding. Also, if you want to get the documentation changes in while you continue investigating code, we can trim this down to just documentation changes.

Hi @Myoldmopar, the current one still can't fix the issue of heat pump heating rate not matching the heating coil heating rate. I think the major thing is in the piping loss correction. But I still can't figure out how it should be fixed. So maybe we can merge in the documentation change first? Do I create a new PR with documentation changes in the new PR?

@nrel-bot-2
Copy link

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

1 similar comment
@nrel-bot-2
Copy link

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

@yujiex
Copy link
Collaborator Author

yujiex commented Feb 25, 2025

@Myoldmopar I put the documentation update in a new PR (#10957). Maybe we can merge that one in first? I will continue investigating the remaining issues in this PR.

@yujiex yujiex changed the title Fix documentation of VRF Heat Pump Total Heating Rate, should equal the sum of coil heating rate, not air terminal heating rate Fix VRF Heat Pump Total Heating Rate not match the sum of coil heating rate (with piping loss) Feb 26, 2025
@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit e333a28

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

@yujiex
Copy link
Collaborator Author

yujiex commented Feb 27, 2025

@mjwitte and @rraustad I modified the code to update the coil heating rate after the latest piping correction and heat pump capacity is computed. The 100W capacity limit is removed as there was not such a limit on the OU side: if OU was less than 100W or when the piping correction is very low, there will be some coil and OU mismatch. Some details are added in the PR description to explain the fixes. Please see if they make sense. Thanks.

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit bb3d010

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

@rraustad
Copy link
Contributor

rraustad commented Feb 28, 2025

@yujiex this looks very close now with very little difference (1E-11) between the TU heating rate and the HP heating rate adjusted for piping losses. Are you finished with this branch?

image

@yujiex
Copy link
Collaborator Author

yujiex commented Feb 28, 2025

@yujiex this looks very close now with very little difference (1E-11) between the TU heating rate and the HP heating rate adjusted for piping losses. Are you finished with this branch?

image

@rraustad Mostly finished. I will need to look into the regression diffs in more detail but the list of files that has diffs are reasonable.

ActualSC);
Real64 AirMassFlow = FanSpdRatio * heatingCoil.RatedAirMassFlowRate(1); // heating mode
// fixme: temporary remove multiply of coil PLR
heatingCoil.TotalHeatingEnergyRate = AirMassFlow * (OutletAirEnthalpy - heatingCoil.InletAirEnthalpy);
Copy link
Contributor

@rraustad rraustad Feb 28, 2025

Choose a reason for hiding this comment

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

Why is the parent writing to the child? The parent should call the child and the child should calculate it's own operation. Isn't the child heating coil TotalHeatingEnergyRate here already equal to AirMassFlow * (OutletAirEnthalpy - heatingCoil.InletAirEnthalpy)? i.e., wasn't TotalHeatingEnergyRate set in the child on the call above?

Copy link
Collaborator Author

@yujiex yujiex Feb 28, 2025

Choose a reason for hiding this comment

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

The coil TotalHeatingEnergyRate was set when the demand QCoilReq was calculated with the old piping loss (calculated with rated values) and OU capacity. The following shows the section in the PR description with details on this. 0.986 piping loss used the rated capacity of 7000W in the calculation. So the above is added to recalculate the coil heating rate with the updated piping loss.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

When the parent changes the child's TotalHeatingEnergyRate, should the heating coil outlet air condition also change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh probably that too. I'll add these to save the updated outlet values

        heatingCoil.OutletAirTemp = OutletAirTemp;
        heatingCoil.OutletAirHumRat = OutletAirHumRat;
        heatingCoil.OutletAirEnthalpy = OutletAirEnthalpy;
        heatingCoil.ActualSH = ActualSH;
        heatingCoil.ActualSC = ActualSC;

Copy link
Contributor

@rraustad rraustad Feb 28, 2025

Choose a reason for hiding this comment

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

And if the heating coil outlet condition changes, then doesn't the fan speed need to change to meet the same load? And if the fan speed changes doesn't the fan heat also change? This is a good example of why the parent shouldn't update child component performance. Couldn't you just send the piping loss adjusted QCoilReq over to the heating coil?

Copy link
Contributor

@rraustad rraustad Mar 5, 2025

Choose a reason for hiding this comment

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

I don't see piping losses used in LimitCoilCapacity to calculate the limit, if piping losses were used there would that correct the problem?

RemainingCapacity = TotalCapacity * PipingLosses;

Copy link
Contributor

Choose a reason for hiding this comment

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

When the TU capacity is limited the OU will be running at full load. I think you are saying you don't know the operating full load capacity yet. I think that's OK and the next iteration will include the correct piping losses that were calculated at the end of the previous iteration. I think there will be, within a time step's iteration sequence, a FirstHVACIteration = true, FirstHVACIteration = false, and then a final FirstHVACIteration = false (although I am not positive about this last one happening all the time). So the piping losses should be correct on the second iteration and the final iteration should have the correct answer? I do still think PipingLosses needs to be included in LimitCoilCapacity.

Copy link
Contributor

Choose a reason for hiding this comment

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

I just checked the calls into LimitCoilCapacity and what is passed in as TotalCapacity is already corrected for piping losses. That makes me wonder what is actually happening for this issue.

    TotalTUCoolingCapacity = TotalCondCoolingCapacity * this->PipingCorrectionCooling;

    if (TU_CoolingLoad > TotalTUCoolingCapacity) {
        LimitTUCapacity(state,
                        VRFCond,
                        NumTUInList,
                        TotalTUCoolingCapacity,

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this issue only happen in heating mode?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it did correct for piping loss, but the piping correction factor was computed using the rated capacity, not the actual capacity, so that piping correction is also not right at the time of limitTUCapacity

This issue also happens for cooling mode
image

@nrel-bot-2
Copy link

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

@nrel-bot-2
Copy link

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

@nrel-bot-2c
Copy link

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

@nrel-bot-2
Copy link

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

@yujiex yujiex removed this from the EnergyPlus 25.2 milestone Aug 7, 2025
@nrel-bot-2c
Copy link

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

@dareumnam dareumnam assigned dareumnam and unassigned dareumnam Sep 24, 2025
@nrel-bot-2c
Copy link

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

2 similar comments
@nrel-bot-2c
Copy link

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

@nrel-bot-2
Copy link

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

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 Documentation Related primarily on the LaTeX-based EnergyPlus documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VRF FluidTCtrl heat pump total heating rate doesn't match zone VRF air terminal total heating rate