Skip to content

Commit

Permalink
Merge pull request #10455 from NREL/air_to_water_hp_with_heat_recovery2
Browse files Browse the repository at this point in the history
Adds Heat Recovery to Air-to-Water Heat Pump
  • Loading branch information
Myoldmopar authored Jun 5, 2024
2 parents 65c3bc8 + d033a85 commit f58fb10
Show file tree
Hide file tree
Showing 10 changed files with 26,252 additions and 61 deletions.
157 changes: 116 additions & 41 deletions idd/Energy+.idd.in

Large diffs are not rendered by default.

557 changes: 538 additions & 19 deletions src/EnergyPlus/PlantLoopHeatPumpEIR.cc

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion src/EnergyPlus/PlantLoopHeatPumpEIR.hh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ namespace EIRPlantLoopHeatPumps {
Real64 sizingFactor = 1.0;
bool waterSource = false;
bool airSource = false;
bool heatRecoveryAvailable = false;
bool heatRecoveryIsActive = false;
int heatRecoveryOperatingStatus = 0;
ControlType sysControlType = ControlType::Invalid;
DataPlant::FlowMode flowControl = DataPlant::FlowMode::Invalid;

Expand All @@ -132,6 +135,8 @@ namespace EIRPlantLoopHeatPumps {
Real64 cyclingRatio = 0.0;
Real64 minSourceTempLimit = -999.0;
Real64 maxSourceTempLimit = 999.0;
Real64 minHeatRecoveryTempLimit = 4.5;
Real64 maxHeatRecoveryTempLimit = 60.0;

// curve references
int capFuncTempCurveIndex = 0;
Expand All @@ -140,6 +145,8 @@ namespace EIRPlantLoopHeatPumps {
int capacityDryAirCurveIndex = 0;
int minSupplyWaterTempCurveIndex = 0;
int maxSupplyWaterTempCurveIndex = 0;
int heatRecoveryCapFTempCurveIndex = 0;
int heatRecoveryEIRFTempCurveIndex = 0;

// flow rate terms
Real64 loadSideDesignVolFlowRate = 0.0;
Expand All @@ -156,6 +163,10 @@ namespace EIRPlantLoopHeatPumps {
bool loadVSLoopPump = false;
bool sourceVSBranchPump = false;
bool sourceVSLoopPump = false;
bool heatRecoveryDesignVolFlowRateWasAutoSized = false;
Real64 heatRecoveryDesignVolFlowRate = 0.0;
Real64 heatRecoveryDesignMassFlowRate = 0.0;
Real64 heatRecoveryMassFlowRate = 0.0;

// simulation variables
Real64 loadSideHeatTransfer = 0.0;
Expand All @@ -164,10 +175,14 @@ namespace EIRPlantLoopHeatPumps {
Real64 loadSideOutletTemp = 0.0;
Real64 sourceSideInletTemp = 0.0;
Real64 sourceSideOutletTemp = 0.0;
Real64 heatRecoveryInletTemp = 0.0;
Real64 heatRecoveryOutletTemp = 0.0;
Real64 powerUsage = 0.0;
Real64 loadSideEnergy = 0.0;
Real64 sourceSideEnergy = 0.0;
Real64 powerEnergy = 0.0;
Real64 heatRecoveryRate = 0.0;
Real64 heatRecoveryEnergy = 0.0;
// Real64 sourceSideCp = 0.0; // debugging variable
bool running = false;

Expand All @@ -176,6 +191,8 @@ namespace EIRPlantLoopHeatPumps {
PlantLocation sourceSidePlantLoc;
InOutNodePair loadSideNodes;
InOutNodePair sourceSideNodes;
PlantLocation heatRecoveryPlantLoc;
InOutNodePair heatRecoveryNodes;
bool heatRecoveryHeatPump = false; // HP that transfers heat between plants and should not increase plant size

// counters and indexes
Expand All @@ -190,6 +207,8 @@ namespace EIRPlantLoopHeatPumps {
int capModFTErrorIndex = 0;
int eirModFTErrorIndex = 0;
int eirModFPLRErrorIndex = 0;
int heatRecCapModFTErrorIndex = 0;
int heatRecEIRModFTErrorIndex = 0;

// defrost
DefrostControl defrostStrategy = DefrostControl::Invalid;
Expand All @@ -212,6 +231,8 @@ namespace EIRPlantLoopHeatPumps {
std::function<Real64(Real64, Real64)> calcLoadOutletTemp;
std::function<Real64(Real64, Real64)> calcQsource;
std::function<Real64(Real64, Real64)> calcSourceOutletTemp;
std::function<Real64(Real64, Real64)> calcQheatRecovery;
std::function<Real64(Real64, Real64)> calcHROutletTemp;

virtual ~EIRPlantLoopHeatPump() = default;

Expand Down Expand Up @@ -248,6 +269,10 @@ namespace EIRPlantLoopHeatPumps {

void calcSourceSideHeatTransferASHP(EnergyPlusData &state);

void calcHeatRecoveryHeatTransferASHP(EnergyPlusData &state);

void setHeatRecoveryOperatingStatusASHP(EnergyPlusData &state, bool FirstHVACIteration);

virtual void report(EnergyPlusData &state);

void sizeLoadSide(EnergyPlusData &state);
Expand All @@ -256,11 +281,19 @@ namespace EIRPlantLoopHeatPumps {

void sizeSrcSideASHP(EnergyPlusData &state);

void sizeHeatRecoveryASHP(EnergyPlusData &state);

void doDefrost(EnergyPlusData &state, Real64 &AvailableCapacity);

void capModFTCurveCheck(EnergyPlusData &state, const Real64 loadSideOutletSPTemp, Real64 &capModFTemp);

void eirModCurveCheck(EnergyPlusData &state, Real64 &eirModFTemp, Real64 &eirModFPLR);
void heatRecoveryCapModFTCurveCheck(EnergyPlusData &state, const Real64 loadSideOutletSPTemp, Real64 &capModFTemp);

void eirModCurveCheck(EnergyPlusData &state, Real64 &eirModFTemp);

void eirModFPLRCurveCheck(EnergyPlusData &state, Real64 &eirModFPLR);

void heatRecoveryEIRModCurveCheck(EnergyPlusData &state, Real64 &eirModFTemp);

Real64 getLoadSideOutletSetPointTemp(EnergyPlusData &state) const;

Expand Down
1 change: 1 addition & 0 deletions testfiles/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_WaterSource.idf EPW_FILE USA_
add_simulation_test(IDF_FILE PlantLoopHeatPump_Fuel-Fired.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_Large-Office-2-AWHP-DedHR-AuxBoiler-Pri-Sec-HW.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_LargeOffice-2-AWHP-AuxBoiler-Pri-Sec-4PipeBeam.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_AirSource_Hospital_wSixPipeHeatRecovery.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantPressureDrop.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantPressure_PumpCurve.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantPressure_VFD_Scheduled.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
Expand Down
6 changes: 6 additions & 0 deletions testfiles/PlantLoopHeatPump_EIR_AirSource.idf
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,12 @@
AirSource, !- Condenser Type
Outdoor Air Inlet Node, !- Source Side Inlet Node Name
Outdoor Air Outlet Node, !- Source Side Outlet Node Name
, !- Heat Recovery Inlet Node Name
, !- Heat Recovery Outlet Node Name
Cooling Coil, !- Companion Heat Pump Name
0.005, !- Load Side Reference Flow Rate {m3/s}
2, !- Source Side Reference Flow Rate {m3/s}
, !- Heat Recovery Reference Flow Rate {m3/s}
80000, !- Reference Capacity {W}
3.5, !- Reference Coefficient of Performance {W/W}
, !- Sizing Factor
Expand Down Expand Up @@ -424,9 +427,12 @@
AirSource, !- Condenser Type
Outdoor Air Inlet Node, !- Source Side Inlet Node Name
Outdoor Air Outlet Node, !- Source Side Outlet Node Name
, !- Heat Recovery Inlet Node Name
, !- Heat Recovery Outlet Node Name
Heating Coil, !- Companion Heat Pump Name
0.005, !- Load Side Reference Flow Rate {m3/s}
20, !- Source Side Reference Flow Rate {m3/s}
, !- Heat Recovery Reference Flow Rate {m3/s}
400000, !- Reference Capacity {W}
3.5, !- Reference Coefficient of Performance {W/W}
, !- Sizing Factor
Expand Down
Loading

5 comments on commit f58fb10

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2797 of 2797 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-MacOS-10.18-clang-15.0.0: OK (2798 of 2798 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2819 of 2819 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2008 of 2008 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (792 of 792 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.