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.15k stars 392 forks source link

HeatPump:PlantLoop:EIR:Heating/Cooling AutoSizing appears broken #8948

Open jmarrec opened 3 years ago

jmarrec commented 3 years ago

Issue overview

I'm trying to create a regression test for HeatPump:PlantLoop:EIR:Heating and HeatPump:PlantLoop:EIR:Cooling for the OpenStudio SDK. No matter what I try, I can never get the Autosize of the reference capacity working. I've tried with real loads connected to the objects, and I've tried to replicate the PlantLoopHeatPump_EIR_AirSource.idf by creating two loops with LoadProfile:Plant. Still cannot manage to do it.

Reproducing the defect

Take PlantLoopHeatPump_EIR_AirSource.idf, and change this line to "Autosize": https://github.com/NREL/EnergyPlus/blob/e0d2dea7123012ea6f5bdea4cb007f1f01d70993/testfiles/PlantLoopHeatPump_EIR_AirSource.idf#L271

Or do it with https://github.com/NREL/EnergyPlus/blob/e0d2dea7123012ea6f5bdea4cb007f1f01d70993/testfiles/PlantLoopHeatPump_EIR_AirSource.idf#L430 alternatively, it produces the same issue but on the cooling loop.

   ** Severe  ** Plant temperatures are getting far too cold, check controls and relative loads and capacities
   **   ~~~   **  Environment=CHICAGO OHARE INTL AP ANN HTG 99.6% CONDNS DB, at Simulation time=01/21 18:00 - 19:00
   **   ~~~   ** PlantLoop Name (DemandSide)= HEATING COIL LOAD LOOP
   **   ~~~   ** PlantLoop Setpoint Temperature=65.0 {C}
   **   ~~~   ** PlantLoop Inlet Node (SupplySide) does not have a Setpoint.
   **   ~~~   ** PlantLoop Inlet Node (DemandSide) does not have a Setpoint.
   **   ~~~   ** PlantLoop Outlet Node (SupplySide) has a Setpoint.
   **   ~~~   ** PlantLoop Outlet Node (DemandSide) does not have a Setpoint.
   **   ~~~   ** PlantLoop Outlet Node (DemandSide) "HEATING COIL LOAD LOOP DEMAND OUTLET NODE" has temperature=-98.2 {C}
   **   ~~~   ** PlantLoop Inlet Node (DemandSide) "HEATING COIL LOAD LOOP DEMAND INLET NODE" has temperature=-97.9 {C}
   **   ~~~   ** PlantLoop Minimum Temperature=3.0 {C}
   **   ~~~   ** PlantLoop Maximum Temperature=100.0 {C}
   **   ~~~   ** PlantLoop Flow Request (SupplySide)=5.0 {kg/s}
   **   ~~~   ** PlantLoop Flow Request (DemandSide)=5.0 {kg/s}
   **   ~~~   ** PlantLoop Node (DemandSide) "HEATING COIL LOAD LOOP DEMAND OUTLET NODE" has mass flow rate =4.9 {kg/s}
   **   ~~~   ** PlantLoop PumpHeat (SupplySide)=18.8 {W}
   **   ~~~   ** PlantLoop PumpHeat (DemandSide)=0.0 {W}
   **   ~~~   ** PlantLoop Cooling Demand=0.0 {W}
   **   ~~~   ** PlantLoop Heating Demand=3371235.8 {W}
   **   ~~~   ** PlantLoop Demand not Dispatched=0.0 {W}
   **   ~~~   ** PlantLoop Unmet Demand=3371235.8 {W}
   **   ~~~   ** PlantLoop Capacity=-99999.0 {W}
   **   ~~~   ** PlantLoop Capacity (SupplySide)=-99999.0 {W}
   **   ~~~   ** PlantLoop Capacity (DemandSide)=0.0 {W}
   **   ~~~   ** PlantLoop Operation Scheme=HEATING COIL LOAD LOOP OPERATION
   **   ~~~   ** PlantLoop Operation Dispatched Load = 3371235.8 {W}
   **   ~~~   ** PlantLoop Operation Dispatched Load (SupplySide)= 3371235.8 {W}
   **   ~~~   ** PlantLoop Operation Dispatched Load (DemandSide)= 0.0 {W}
   **   ~~~   ** Branches on the Loop.
   **   ~~~   ** Demand Branches:
   **   ~~~   **   HEATING COIL LOAD LOOP DEMAND BRANCH
   **   ~~~   **     Components on Branch:
   **   ~~~   **       LOADPROFILE:PLANT:HEATING COIL LOAD PROFILE
   **   ~~~   ** Supply Branches:
   **   ~~~   **   HEATING COIL LOAD LOOP SUPPLY BRANCH
   **   ~~~   **     Components on Branch:
   **   ~~~   **       PUMP:VARIABLESPEED:HEATING COIL LOAD LOOP PUMP
   **   ~~~   **       HEATPUMP:PLANTLOOP:EIR:HEATING:HEATING COIL
   **   ~~~   ** *************************
   **   ~~~   ** Possible things to look for to correct this problem are:
   **   ~~~   **   Capacity, Operation Scheme, Mass flow problems, Pump Heat building up over time.
   **   ~~~   **   Try a shorter runperiod to stop before it fatals and look at
   **   ~~~   **     lots of node time series data to see what is going wrong.
   **   ~~~   **   If this is happening during Warmup, you can use Output:Diagnostics,ReportDuringWarmup;
   **   ~~~   **   This is detected at the loop level, but the typical problems are in the components.
   **  Fatal  ** CheckForRunawayPlantTemps: Simulation terminated because of run away plant temperatures, too cold
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=1
   ..... Last severe error=Plant temperatures are getting far too cold, check controls and relative loads and capacities

Details

Some additional details for this issue (if relevant):

Checklist

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

jmarrec commented 3 years ago

Also, it seems that the Design Size Source Side Volume Flow Rate [m3/s] is only reported in the case where it's a WaterSource heat pump, not an AirSource one.

lincolnharmer commented 2 years ago

Check this out. I was able to get the autosizing to work by defining Sizing:Plant info but it is still very delicate and fails if you try to autosize other flow rates and capacities. I also had to apply Sizing factors to get the sizing to be reasonable. PlantLoopHeatPump_EIR_WaterSource v2.txt

lincolnharmer commented 2 years ago

I realized I had a few things that needed to be cleaned up. This updated file is probably a better model to investigate. Things appear to be getting sized properly but no flow is being requested on the supply side of one of the loops. See error file below and EIO file attached with some useful sizing information.

`Program Version,EnergyPlus, Version 9.6.0-f420c06a69, YMD=2021.12.08 09:08, Warning ManageSizing: The ZoneComponentLoadSummary report was requested but no sizing objects were found so that report cannot be generated. Beginning Plant Sizing Calculations Testing Individual Branch Integrity All Branches passed integrity testing Testing Individual Supply Air Path Integrity All Supply Air Paths passed integrity testing Testing Individual Return Air Path Integrity All Return Air Paths passed integrity testing No node connection errors were found. Severe Plant temperatures are getting far too hot, check controls and relative loads and capacities ~~~ During Warmup, Environment=CHICAGO SUMMER 1% HVAC Sizing Pass 1, at Simulation time=07/21 07:00 - 08:00 ~~~ PlantLoop Name (DemandSide)= COOLING COIL LOAD LOOP ~~~ PlantLoop Setpoint Temperature=10.0 {C} ~~~ PlantLoop Inlet Node (SupplySide) does not have a Setpoint. ~~~ PlantLoop Inlet Node (DemandSide) does not have a Setpoint. ~~~ PlantLoop Outlet Node (SupplySide) has a Setpoint. ~~~ PlantLoop Outlet Node (DemandSide) does not have a Setpoint. ~~~ PlantLoop Outlet Node (DemandSide) "COOLING COIL LOAD LOOP DEMAND OUTLET NODE" has temperature=319.3 {C} ~~~ PlantLoop Inlet Node (DemandSide) "COOLING COIL LOAD LOOP DEMAND INLET NODE" has temperature=318.3 {C} ~~~ PlantLoop Minimum Temperature=3.0 {C} ~~~ PlantLoop Maximum Temperature=100.0 {C} ~~~ PlantLoop Flow Request (SupplySide)=0.0 {kg/s}


     ~~~   ** PlantLoop Node (DemandSide) "COOLING COIL LOAD LOOP DEMAND OUTLET NODE" has mass flow rate =4.8 {kg/s}
   **   ~~~   ** PlantLoop PumpHeat (SupplySide)=19.1 {W}
   **   ~~~   ** PlantLoop PumpHeat (DemandSide)=0.0 {W}
   **   ~~~   ** PlantLoop Cooling Demand=6278729.8 {W}
   **   ~~~   ** PlantLoop Heating Demand=0.0 {W}
   **   ~~~   ** PlantLoop Demand not Dispatched=6103903.8 {W}
   **   ~~~   ** PlantLoop Unmet Demand=-6278729.8 {W}
   **   ~~~   ** PlantLoop Capacity=174826.0 {W}
   **   ~~~   ** PlantLoop Capacity (SupplySide)=174826.0 {W}
   **   ~~~   ** PlantLoop Capacity (DemandSide)=0.0 {W}
   **   ~~~   ** PlantLoop Operation Scheme=COOLING COIL LOAD LOOP OPERATION
   **   ~~~   ** PlantLoop Operation Dispatched Load = 174826.0 {W}
   **   ~~~   ** PlantLoop Operation Dispatched Load (SupplySide)= 174826.0 {W}
   **   ~~~   ** PlantLoop Operation Dispatched Load (DemandSide)= 0.0 {W}
   **   ~~~   ** Branches on the Loop.
   **   ~~~   ** Demand Branches:
   **   ~~~   **   COOLING COIL LOAD LOOP DEMAND BRANCH
   **   ~~~   **     Components on Branch:
   **   ~~~   **       LOADPROFILE:PLANT:COOLING COIL LOAD PROFILE
   **   ~~~   ** Supply Branches:
   **   ~~~   **   COOLING COIL LOAD LOOP SUPPLY BRANCH
   **   ~~~   **     Components on Branch:
   **   ~~~   **       PUMP:VARIABLESPEED:COOLING COIL LOAD LOOP PUMP
   **   ~~~   **       HEATPUMP:PLANTLOOP:EIR:COOLING:COOLING COIL
   **   ~~~   ** *************************
   **   ~~~   ** Possible things to look for to correct this problem are:
   **   ~~~   **   Capacity, Operation Scheme, Mass flow problems, Pump Heat building up over time.
   **   ~~~   **   Try a shorter runperiod to stop before it fatals and look at
   **   ~~~   **     lots of node time series data to see what is going wrong.
   **   ~~~   **   If this is happening during Warmup, you can use Output:Diagnostics,ReportDuringWarmup;
   **   ~~~   **   This is detected at the loop level, but the typical problems are in the components.
   **  Fatal  ** CheckForRunawayPlantTemps: Simulation terminated because of run away plant temperatures, too hot
   ...Summary of Errors that led to program termination:
   ..... Reference severe error count=1
   ..... Last severe error=Plant temperatures are getting far too hot, check controls and relative loads and capacities
   *************
   ************* ===== Recurring Error Summary =====
   ************* The following recurring error messages occurred.
   *************
   *************  ** Warning ** Plant loop exceeding upper temperature limit, PlantLoop="COOLING COIL LOAD LOOP"
   *************  **   ~~~   **   This error occurred 21 total times;
   *************  **   ~~~   **   during Warmup 21 times;
   *************  **   ~~~   **   during Sizing 0 times.
   *************  **   ~~~   **   Max=319.330375
   *************
   ************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 1 Severe Errors.
   ************* EnergyPlus Sizing Error Summary. During Sizing: 1 Warning; 0 Severe Errors.
   ************* EnergyPlus Terminated--Fatal Error Detected. 22 Warning; 1 Severe Errors; Elapsed Time=00hr 00min  0.66sec
`
[PlantLoopHeatPump_EIR_WaterSource v2.txt](https://github.com/NREL/EnergyPlus/files/7677394/PlantLoopHeatPump_EIR_WaterSource.v2.txt)
lincolnharmer commented 2 years ago

I think the issue has to do with the autosizing of the source-side mass flow rates for the air-source heat pumps. For some reason they are registering negative values during the simulation

lymereJ commented 2 years ago

@jmarrec - I looked into this issue to make sure that #9733 wasn't a duplicate. I don't think it is, and along the way I found the following information:

So unless I'm missing something, I think the code is okay, the only issue might be that the severe error about the Sizing:Plant being missing is not published before the simulation crash (which I think is addressed in #9734). It just appears that the inputs to the Sizing:Plant object are critical to getting a reasonable capacity. I think that the fact the the source side air flow rate is sized to be negative is an issue and that's what #9733 is about. Let me know what you think.

Modified example file: in.zip

swangdb commented 1 year ago

I'd like to add some info.

The tests show that the autosize works for source side flow rate input (with capacity and load side flow rate hard sized). For water-cooled unit, the eio gives the sized value for the source side flow rate:

Component Sizing Information, HeatPump:PlantLoop:EIR:Cooling, HEAT PUMP COOLING, Design Size Nominal Capacity [W], 48091.64886 Component Sizing Information, HeatPump:PlantLoop:EIR:Cooling, HEAT PUMP COOLING, User-Specified Nominal Capacity [W], 75000.00000 Component Sizing Information, HeatPump:PlantLoop:EIR:Cooling, HEAT PUMP COOLING, Design Size Load Side Volume Flow Rate [m3/s], 2.86430E-003 Component Sizing Information, HeatPump:PlantLoop:EIR:Cooling, HEAT PUMP COOLING, User-Specified Load Side Volume Flow Rate [m3/s], 5.00000E-003 Component Sizing Information, HeatPump:PlantLoop:EIR:Cooling, HEAT PUMP COOLING, Design Size Source Side Volume Flow Rate [m3/s], 4.55684E-003

But for air-cooled units, there is not any Design Size Source Side Volume Flow Rate shown in the eio file.

I'm keen to know the progress on the fix to this issue.

lymereJ commented 1 year ago

@swangdb - The air-cooled reporting issue was fixed in #9734. It'll be part of EnergyPlus 23.1.

swangdb commented 1 year ago

@lymereJ Thank you very much for pointing it out.