NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.13k stars 389 forks source link

CentralHeatPumpSystem problems #5904

Closed mjwitte closed 4 years ago

mjwitte commented 8 years ago

Issue overview

User notes that example file CentralChillerHeaterSystem_Simultaneous_Cooling_Heating does not seem to be working. Reviewing this file, and the companion CentralChillerHeaterSystem_Cooling_Heating, there are some problems:

  1. The heat transfer from the ground heat exchanger is always negative.

  2. The ground heat exchanger is only operating when the central heat pump system is in heating mode. Flows to the HX are zero when the system is cooling, so where is the heat rejection going?

  3. Both files have unused district heating and cooling objects that should be removed.

  4. Also see #5808

  5. The IDD is missing the "autosizable" tag for ChillerHeaterPerformance:Electric:EIR field "Design Hot Water Flow Rate". MJW 15 Feb 2019 - quick inspection of the code says this isn't autosizeable, that's why.

  6. And the curve types are wrong for the ChillerHeaterPerformance:Electric:EIR fPLR curves - the code assumes a single variable curve. IDD and I/O ref talk about bi-cubic curves. This needs review, but it appears these should just accept any univariate curve or table.

  7. And user file trips over divide by zero here. At this point CHPower and FRAC are zero, because QEvaporator is zero. Regardless of why QEvaporater is zero (there are many places in the code above where this can happen), this line needs protection for divide by zero and possibly a whole block can be skipped when it's zero.

  8. So, QEvaporator is zero because of this check here. TempLowLimitEout =12.2, EvapInletTemp =8.0, and EvapOutletTempSetPoint = 6.7. So, the setpoint is 6.7 but the min temp limit is 12.2. Is this an input error or a logic flaw? The 12.2 comes from here

    ChillerHeaterPerformance:Electric:EIR,
    
    12.22,                   !- Heating Mode Entering Chilled Water Temperature Low Limit {C}

    This field is being misapplied in the model as lower limit on leaving chilled water temp.

  9. Defect file has times with negative values for HEATPUMP:Chiller Heater Cooling Electric Energy Unit 1.

  10. With the 12.22 changed to 6.7, there's another place that divides by zero because ReferenceCOP = 0 here. That's zero, because the heating capacity calcs are done here before the cooling cap has been sized! What a mess. Are there other places that aren't fully compatible with autosizing this component?

Details

Some additional details for this issue (if relevant):

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

mjwitte commented 5 years ago

Also, see helpdesk ticket 13106 - odd electric values. Defect files added to EnergyPlusDevSupport\DefectFiles. Reference also Unmethours 35582.

eringold commented 5 years ago

May I add a request that the CentralHeatPumpSystem output values of Ancillary Power and Ancillary Energy, similar to the Boiler and IceThermalStorage objects?

YanfeiNREL commented 5 years ago

Thanks for the details of defects. @mjwitte The example IDF has RunPeriod of a week from 5.1-5.5. I did a whole year simulation (CentralChillerHeaterSystem_Simultaneous_Cooling_Heating), using the Melbourne Australia weather file. Version 9.2.

Here is phase-1 to recreate the defects, for each item below:

  1. Negative heat transfer rate for ground heat exchanger for a whole year. Q1_HeatTransferRate From the figure based on the simulations, it is obvious during most time steps the heat transfer rate < 0. However, there are a few time steps when heat transfer rate >0 . Please see this figure: Q1_HeatTransferRate_Cooling

    2.1. Ground heat exchange only operates in heating mode. ( No need to work ) Q2_mode From the figure we can see it has multiple modes. According to InputOutput Ref we have the mode definitions:

      1. off
      1. cooling-only mode
      1. heating-only mode
      1. heat recovery mode
      1. cooling dominant simultaneous cooling-heating mode
      1. heating dominant simultaneous cooling-heating mode.

    2.2. Flows to the HX are zero when the system is cooling. ( No need to work ) Q2_HXflow Above figure shows the HX flow rate all year along. Q2_Flow_Cooling Q2_Flow_Heating Q2_Flow_HeatingRecovery It looks like in cooling/heating/heat-recovery modes, the flow rate is not zero. I think it might be some changes in recent source code, comparing to the results two years ago.

    1. Both files have unused district heating and cooling objects that should be removed. yes. They will be removed.

    2. Details will be in #5808

    3. InputOutput Ref will remove "autosizeable"

    4. IDD and I/O ref talk about bi-cubic curves. Both will be updated.

    5. Details will be provided later

    6. From the PlantCenterlGSHP.cc, it was changed to 6.7 from 12.2 already. ( No need to work )

    7. Negative values for HEATPUMP:Chiller Heater Cooling Electric Energy Unit 1: ( No need to work ) I didn't find the Electric Energy, but i have Electric Power values as in the figure below: Q9_ChillerHeaterCoolingElectricPower It looks like the electric energy is not negative. Probably because of some changes in recent version EnergyPlus, comparing to 2 year ago when the bug was reported.

    8. I will provide details later

YanfeiNREL commented 5 years ago

Some updates for above issues: Q1: After further checking source code in GroundHeatExchangers.cc, the ground heat exchanger heat transfer rate is calculated by:

 `QGLHE = tmpQnSubHourly * totalTubeLength`

where QGLHE is impacted by tmpQnSubHourly, because totalTubeLength is a constant.

tmpQnSubHourly is subject to calculations of the following snippet:

 // Dr.Spitler's Explicit set of equations to calculate the New Outlet Temperature of the U-Tube
       C0 = RQSubHr;
       C1 = tempGround - (sumTotal - QnSubHr(1) * RQSubHr);
       C2 = totalTubeLength / (2.0 * massFlowRate * cpFluid);
       C3 = massFlowRate * cpFluid / (totalTubeLength);
       tmpQnSubHourly = (C1 - inletTemp) / (HXResistance + C0 - C2 + (1 / C3));
       fluidAveTemp = C1 - (C0 + HXResistance) * tmpQnSubHourly;
       ToutNew = C1 + (C2 - C0 - HXResistance) * tmpQnSubHourly;

The negative/positive value of tmpQSubHourly is subject to the difference between the tempGround and [inletTemp + sumTotal - *QnSubHr(1) RQSubHr**]

The figure below shows the difference is big. Q1_GroundTemp

YanfeiNREL commented 5 years ago

By talking to Dr. Matt Mitchell, he is working on completely rewriting the GroundHeatExchangers.cc, using the enhanced/updated models based on his PhD dissertation. The updated model will fix the related issues. Because the old model assumes steady state calculations, instead of transient calculations. This might the root cause of the issue. Here I only update the issue related with 5,6,7,8.

YanfeiNREL commented 5 years ago

It looks like the only change necessary is division by zero in 7.

Myoldmopar commented 4 years ago

I couldn't verify the crash, but I'll leave this closed via the PR. If anyone still encounters this, just reopen.

alexanderjanusz commented 10 months ago

Hi - just want to bring this back up... I've been working with this system (centralheatpump, based on the CentralChillerHeaterSystem_Cooling_Heating.idf, and CentralChillerHeaterSystem_Simultaneous_Cooling_Heating.idf example files, and things don't make sense to me.

The answer above from Yanfei, in particular that the simulation is not broken because the heat transfer is positive for a few hours per year.... doesn't seem like good reason to dismiss that issue (it seems like only the divide by zero was addressed?). From what I can tell, in version 23.2 the model is doing things which don't make physical sense.

Some things I've observed while running the example files (I also tried running for full year, other climates etc).

  1. GHX heat transfer is negative all year, except the odd "blip" as it starts up / shuts down. It should be absorbing heat in the winter, and be rejecting heat in the summer.
  2. the system operates in heating mode in the winter, and then heat recovery mode all summer, regardless of whether there is significant heating demand or not. No matter what I tried, I never saw it go into mode 4 or mode 5.
  3. In heating mode, looking at GHX inlet and outlet temperatures, it appears the GHX is still rejecting heat to the ground, and the inlet temperature is far too high. Looking at Kavanaugh & Rafferty 2014, Normal GHX would have a inlet temperature around 1-5deg C, and an outlet around 3-10C. It should get warmed by the ground. but this one has the inlet temperature of >20C, and an outlet temperature < 10c. This would seem to be physically incorrect; it is rejecting heat to the ground mid-winter. (See below)
  4. CentralHeatPump "Source" inlet/outlet temperatures (ie Chiller Heater System Source Inlet Temp Variable) do not appear to align with the GHX inlet/outlet conditions; they should be nearly the same. (Also shown below)

This screenshot is from the CentralChillerHeaterSystem_Cooling_Heating.idf, run with the CAN_ON_Toronto.Pearson.Intl.AP.716240_CWEC2016.epw

Screenshot 2023-12-21 143344

Thanks, Alex