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

New plant heat pump features and supervisory controller #9979

Merged
merged 90 commits into from
Aug 23, 2023

Conversation

rraustad
Copy link
Contributor

@rraustad rraustad commented Apr 24, 2023

Pull request overview

  • New Feature: Chiller plant support for advanced plant configurations
  • The use of heat pumps as plant equipment requires knowledge of plant loads to dispatch the heat pumps in the correct operating mode. A new supervisory controller will poll building and plant loads to dispatch plant equipment according to the user specified plant operation schemes.
  • This branch also updates how PlantLoop:HeatPump:EIR object's EIR as a function of PLR curves are interpreted. EIR curves should be proportional to part load ratio so example file curve objects were updated to reflect this concept.
  • There is also a minor correction to Coil Sizing table reports to not calculate coil design entering wet-bulb temperature when coil design entering humidity ratio is unknown (i.e., it will appear as -999.0 since the data is not available for calculation).
  • Closes Testing for diffs as part of 9979 that are needed for proper plant simulation #10133 that was used for testing and documenting differences found due to these changes.

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

To Do:

  • Convert new input files to hourly reporting and only for 2 select weather periods (or DDs only)

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

@rraustad rraustad added the NewFeature Includes code to add a new feature to EnergyPlus label Apr 24, 2023
@rraustad
Copy link
Contributor Author

rraustad commented Apr 24, 2023

Some results from the new example file. The supervisory controller polls building loads and dispatches plant equipment. The following shows what the supervisory controller building loads profiles looks like. Updated based on most recent commit.

image

A couple zone temperatures to show zone control:

image

@EnergyArchmage EnergyArchmage self-assigned this Apr 25, 2023
EnergyArchmage and others added 10 commits May 4, 2023 09:44
…urrent plant loads in equipment dispatch

add and revise output variables from supervisory operation scheme.

revert draft changes to plant component temperature sources as out of scope for this project, was for early testing of supervisory routines
…-Chiller-Plant-Support-for-Carbon-Initiatives
Copy link
Contributor Author

@rraustad rraustad left a comment

Choose a reason for hiding this comment

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

walk-thru

@@ -0,0 +1,1718 @@
// EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New source that holds all the supervisor logic

InitAirSourcePlantEquipmentOff(state);
ProcessAndSetAirSourcePlantEquipLists(state);
ProcessAndSetDedicatedHeatRecovWWHP(state);
ProcessAndSetAuxilBoiler(state);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dedicated worker functions to find building loads, plant loads, determine dispatch logic for equipment, initialize plant equipment, dispatch plant equipment, dispatch heat recovery equipment, and dispatch boiler if needed.


void ChillerHeaterSupervisoryOperationData::DetermineCurrentBuildingLoads(EnergyPlusData &state)
{
// Poll the loads on the zones to help decide how to run
Copy link
Contributor Author

Choose a reason for hiding this comment

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

sum building loads


void ChillerHeaterSupervisoryOperationData::DetermineCurrentPlantLoads(EnergyPlusData &state)
{

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sum plant loads

this->PlantOps.AirSourcePlantHeatingOnly = false;
this->PlantOps.AirSourcePlantSimultaneousHeatingAndCooling = false;
this->PlantOps.SimultaneousHeatingCoolingWithCoolingDominant = false;
this->PlantOps.SimultaneousHeatingCoolingWithHeatingDominant = false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Set these control flags based on building and/or plant loads

@@ -1999,4 +2016,54 @@ bool verifyTwoNodeNumsOnSamePlantLoop(EnergyPlusData &state, int const nodeIndex
return (matchedIndexA == matchedIndexB) && (matchedIndexA != 0); // only return true if both are equal and non-zero
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

new worker function below to check VS pump configurations

@@ -752,7 +752,7 @@ void ReportCoilSelection::doFinalProcessingOfCoilData(EnergyPlusData &state)
}

// call psych routine to flush out moist air metrics from those available
Copy link
Contributor Author

Choose a reason for hiding this comment

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

next just avoids reporting wierd data to table reports

@@ -474,7 +474,7 @@ namespace UnitarySystems {
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

note as reminder that UnitarySystem can't set fan volume flow until components have sized. this is a defect that needs to be corrected.

@@ -441,6 +441,8 @@ add_simulation_test(IDF_FILE PlantLoopChainHeating.idf EPW_FILE USA_IL_Chicago-O
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_AirSource.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_WaterSource.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_Fuel-Fired.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

new example files and units tests are below

@@ -313,8 +313,8 @@

Curve:Quadratic,
EIRCurveFuncPLR, !- Name

This comment was marked as resolved.

This comment was marked as resolved.

This comment was marked as resolved.

@rraustad
Copy link
Contributor Author

Snapshot view of supervisory control from a new example file. Left top is building loads, right top is plant loads. Magnitude is similar between these plots, a good sign plant operation represents what is shown by building loads. Lower row starting at left shows dispatch of plant HPs (0=off, 1=heating, 2=cooling, 3=simultaneous cooling and heating. Then heat recovery HP (0 = off, 1 = heating led, 2 = cooling led). Then auxilliary boiler dispatch, minimal boiler operation is a good sign.

image

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

@rraustad Lots going on here: new fields and options in HeatPump:PlantLoop:EIR:Heating/Cooling plus new PlantEquipmentOperation:ChillerHeaterChangeover.

How about this for the main PR title: "New plant heat pump features and supervisory controller"?

Comment on lines 74663 to 74696
\note Multiplies the autosized capacity and flow rates
\required-field
\note Multiplies the autosized source side reference 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.

Sizing factor doesn't multiply capacity now? I would expect the autosized capacity will also change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indirectly. The sizing factor multiplies the water flow rate. The capacity is calculated from the water flow rate. I could change that comment back but I think it's now clear what is getting multiplied.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but it's not clear that the flow rate becomes the basis for the capacity sizing. I would suggest something like:
\note Multiplies the autosized source side reference flow rate which is then used to autosize the capacity.

\object-list ControlSchemeList
A7 , \field Dedicated Chilled Water Return Recovery Heat Pump Name
\type object-list
\object-list validPlantEquipmentNames
Copy link
Contributor

Choose a reason for hiding this comment

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

PLHPCoolingNames

\note enter name of HeatPump:PlantLoop:EIR:Cooling object to control chilled water return adding heat to hot water return
A8 , \field Dedicated Hot Water Return Recovery Heat Pump Name
\type object-list
\object-list validPlantEquipmentNames
Copy link
Contributor

Choose a reason for hiding this comment

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

PLHPHeatingNames

@rraustad rraustad changed the title NFP-Chiller Plant Support for Carbon Initiatives New plant heat pump features and supervisory controller Aug 21, 2023
\dot Q_{BuildingHeating} = \dot Q_{ZonePredictedHeating} + \dot Q_{AirSysVentHeating} + \dot Q_{ProcessHeating}
\end{equation}
PlantEquipmentOperation:ChillerHeaterChangeover also determines current loads on the plant loops to use in control decisions. Plant loading uses a SingleSetPoint scheme in much the same way as for \hyperref[component-setpoint-based-operation]{Component Setpoint Based Operation}. Therefore single temperature setpoint values (Node().TempSetPoint) are used and applied as described in \hyperref[loop-demand-calculation-scheme-singlesetpoint]{Loop Demand Calculation Scheme SingleSetPoint} (regardless of the setting in the PlantLoop object). These calculations $\dot Q_{LoopDemand} = {\dot m }{ C_p} { \Delta {T}} $ are used to determine plant loading and the values calculated are reported as ``Supervisory Plant Operation Primary Plant Heating Load'' and ``Supervisory Plant Operation Primary Plant Cooling Load.'' The routines detect if there is a buffer tank (ThermalStorage:ChilledWater:Mixed or ThermalStorage:ChilledWater:Stratified) on the supply side inlet branch of the primary chilled water loop and if there is, the outlet node of the buffer tank is used for the temperature of the fluid entering the supply side when determining primary hydronic cooling load. If a dedicated heatpump for recovery is being controlled, the loads on secondary plant loops are also determined using single setpoint method with the loop temperature determined at the inlet of the source sides of the water-to-water heatpump companion machines (HeatPump:PlantLoop:EIR:Cooling and HeatPump:PlantLoop:EIR:Heating). These secondary plant loads are reported to the output variables called ``Supervisory Plant Operation Secondary Plant Heating Load'' and ``Supervisory Plant Operation Secondary Plant Cooling Load.''
The supervisory control routine uses the results of building and plant loads at the current timestep to decide if the heat-pump-based hydronic plant should be operated in one of four modes: off, heating-only, cooling-only, or simultaneous-heating-and-cooling. If $\dot Q_{BuildingHeating}$ is less than zero and $\dot Q_{BuildingCooling}$ is also negative (cooling loads are negative) then based on builing loads, the plant is expected to be in cooling-only mode. if $\dot Q_{BuildingCooling}$ is positive and $\dot Q_{BuildingHeating}$ is postive, then the plant is expected to be in heating-only mode. However, if the outdoor air temperature is lower than the input used in the field called ``Outdoor Low Temperature'' then the heat pump cannot operate in heating and the mode is reset to off. If the building shows both heating and cooling loads, when $\dot Q_{BuildingHeating}$ is postive and $\dot Q_{BuildingCooling}$ is negative, then the plant is expected to be in simultaneous-heating-and-cooling mode. In the case of a very small plant with only a single heat pump that cannot operate in simultaneous mode, the plant is set to cooling-only or heating-only depending on which has the more dominant load. However, if the outdoor air temperature is lower than the input used in the field called ``Outdoor Low Temperature'' then the heat pump cannot operate in heating and the mode is reset to cooling-only. After the building loads have been used, additional changes in mode are considered using the current plant loads. If the building loads indicate that the plant is expected to be in heating-only mode but the current primary cooling hydronic plant load is negative, $\dot Q_{LoopDemand, ChW} < 0.0$, then the mode is changed to simultaneous-heating-and-cooling (if available). Similarly, if the building loads indicate that the plant is expected to be in cooling-only mode but the current primary heating hydronic plant load is positive, $\dot Q_{LoopDemand, HW} > 0.0$, and the outdoor air temperature is higher than the minimum limit, then the mode is changed to simultaneous-heating-and-cooling (if available). The selected mode is reported to the output variable called ``Supervisory Plant Heat Pump Operation Mode.''
Copy link
Contributor

Choose a reason for hiding this comment

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

One minor issue for the documentation here: in the TeX text file, the paragraphs need an actual blank line (or one extra line break, like Line 578 above) between paragraphs. Otherwise these 3-4 paragraphs here (from Line 609 to Line 613, for example) would all cramped into one long paragraph in the pdf file compiled.

@rraustad
Copy link
Contributor Author

rraustad commented Aug 22, 2023

After this last commit, there should be only 2 files with diffs. The PlantLoopHeatPumpEIR* files. These are the diffs from the water source file. The air source file has very small diffs.

PlantLoopHeatPump_EIR_WaterSource.zip

The largest diff is the GHX heat transfer at 0.1%.

image

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

Doc changes look good (I didn't read them thoroughly but skimmed over them and they have all the right pieces and thorough explanations). Nice figures, too.

Unit tests run serially all pass.

The new example files have some significant warnings (max hvac iterations and plant loop temps out of range) that warrant some investigation post I/O-Freeze.

This adds an impressive new supervisory control. Assuming CI comes back clean, this looks good to go. @Myoldmopar do you want to review more?

@Myoldmopar
Copy link
Member

I don't. I am thankful to @rraustad for reverting the curve change there, and look forward to revisiting that soon so we can get that resolved. I checked everything out again and this looks great. Merge at will if CI is happy.

@mjwitte
Copy link
Contributor

mjwitte commented Aug 23, 2023

CI is all happy (except Mac which is AWOL) merging.

@mjwitte mjwitte merged commit a87b71b into develop Aug 23, 2023
10 checks passed
@mjwitte mjwitte deleted the NFP-Chiller-Plant-Support-for-Carbon-Initiatives branch August 23, 2023 16:53
@rraustad
Copy link
Contributor Author

rraustad commented Jan 31, 2024

I don't. I am thankful to @rraustad for reverting the curve change there, and look forward to revisiting that soon so we can get that resolved. I checked everything out again and this looks great. Merge at will if CI is happy.

I had an UnmetHours question on the EIR HP and looked at the code and was confused about the power equation. This comment made me remember why I thought I changed it but did not.

https://unmethours.com/question/98105/air-to-water-heat-pump-plr-performance-curve-issue/?answer=98123#post-id-98123

Added issue #10387.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) NewFeature Includes code to add a new feature to EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants