Skip to content

Commit

Permalink
Merge pull request #4752 from NREL/VSHPWH
Browse files Browse the repository at this point in the history
New Variable Speed Heat Pump Water Heater Model
  • Loading branch information
Myoldmopar committed Apr 1, 2015
2 parents 0faf9c1 + 6401973 commit 09141bd
Show file tree
Hide file tree
Showing 10 changed files with 9,161 additions and 260 deletions.
965 changes: 963 additions & 2 deletions idd/Energy+.idd.in

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/EnergyPlus/DataHVACGlobals.cc
Expand Up @@ -164,6 +164,7 @@ namespace DataHVACGlobals {
int const Coil_HeatingWaterToAirHPVSEquationFit( 27 );
int const Coil_CoolingAirToAirVariableSpeed( 28 );
int const Coil_HeatingAirToAirVariableSpeed( 29 );
int const CoilDX_HeatPumpWaterHeaterVariableSpeed(30);

// Water to air HP coil types
int const WatertoAir_Simple( 1 );
Expand Down
1 change: 1 addition & 0 deletions src/EnergyPlus/DataHVACGlobals.hh
Expand Up @@ -154,6 +154,7 @@ namespace DataHVACGlobals {
extern int const Coil_HeatingWaterToAirHPVSEquationFit;
extern int const Coil_CoolingAirToAirVariableSpeed;
extern int const Coil_HeatingAirToAirVariableSpeed;
extern int const CoilDX_HeatPumpWaterHeaterVariableSpeed;

// Water to air HP coil types
extern int const WatertoAir_Simple;
Expand Down
1,415 changes: 1,385 additions & 30 deletions src/EnergyPlus/VariableSpeedCoils.cc

Large diffs are not rendered by default.

113 changes: 110 additions & 3 deletions src/EnergyPlus/VariableSpeedCoils.hh
Expand Up @@ -91,6 +91,10 @@ namespace VariableSpeedCoils {
extern Real64 Winput; // Power Consumption [W]
extern Real64 PLRCorrLoadSideMdot; // Load Side Mdot corrected for Part Load Ratio of the unit

extern Real64 VSHPWHHeatingCapacity; // Used by Heat Pump:Water Heater object as total water heating capacity [W]
extern Real64 VSHPWHHeatingCOP; // Used by Heat Pump:Water Heater object as water heating COP [W/W]


// SUBROUTINE SPECIFICATIONS FOR MODULE

// Driver/Manager Routines
Expand Down Expand Up @@ -219,6 +223,9 @@ namespace VariableSpeedCoils {
FArray1D_int MSWasteHeat;
// index of waste heat as a function of temperature
FArray1D< Real64 > MSWasteHeatFrac;
// water heating coil pump power at various speeds
FArray1D< Real64 > MSWHPumpPower;
FArray1D< Real64 > MSWHPumpPowerPerRatedTotCap;
// Waste heat fraction
Real64 SpeedNumReport;
//speed number for output
Expand Down Expand Up @@ -287,6 +294,26 @@ namespace VariableSpeedCoils {
Real64 InletSourceAirEnthalpy; // source air enthalpy entering the outdoor coil [J/kg]
//end variables for water system interactions

//begin varibles for HPWH
Real64 RatedCapWH; // Rated water heating Capacity [W]
int InletAirTemperatureType; // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
Real64 WHRatedInletDBTemp; // Rated inlet air dry-bulb temperature [C]
Real64 WHRatedInletWBTemp; // Rated inlet air wet-bulb temperature [C]
Real64 WHRatedInletWaterTemp; // Rated condenser water inlet temperature [C]
Real64 HPWHCondPumpElecNomPower; // Nominal power input to the condenser water circulation pump [W]
Real64 HPWHCondPumpFracToWater; // Nominal power fraction to water for the condenser water circulation pump
Real64 RatedHPWHCondWaterFlow; // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
Real64 ElecWaterHeatingPower; // Total electric power consumed by compressor and condenser pump [W]
Real64 ElecWaterHeatingConsumption; // Total electric consumption by compressor and condenser pump [J]
bool FanPowerIncludedInCOP; // Indicates that fan heat is included in heating capacity and COP
bool CondPumpHeatInCapacity; // Indicates that condenser pump heat is included in heating capacity
bool CondPumpPowerInCOP; // Indicates that condenser pump power is included in heating COP
bool AirVolFlowAutoSized; // Used to report autosizing info for the HPWH DX coil
bool WaterVolFlowAutoSized; // Used to report autosizing info for the HPWH DX coil
Real64 TotalHeatingEnergy; //total water heating energy
Real64 TotalHeatingEnergyRate;//total WH energy rate
//end variables for HPWH

// Default Constructor
VariableSpeedCoilData() :
NumOfSpeeds( 2 ),
Expand Down Expand Up @@ -375,6 +402,8 @@ namespace VariableSpeedCoils {
MSEIRWaterFFlow( MaxSpedLevels, 0 ),
MSWasteHeat( MaxSpedLevels, 0 ),
MSWasteHeatFrac( MaxSpedLevels, 0.0 ),
MSWHPumpPower( MaxSpedLevels, 0.0 ),
MSWHPumpPowerPerRatedTotCap(MaxSpedLevels, 0.0),
SpeedNumReport( 0.0 ),
SpeedRatioReport( 0.0 ),
DefrostStrategy( 0 ),
Expand Down Expand Up @@ -423,7 +452,26 @@ namespace VariableSpeedCoils {
CondInletTemp( 0.0 ),
SourceAirMassFlowRate( 0.0 ),
InletSourceAirTemp( 0.0 ),
InletSourceAirEnthalpy( 0.0 )
InletSourceAirEnthalpy( 0.0 ),
//begin varibles for HPWH
RatedCapWH( 0.0 ), // Rated water heating Capacity [W]
InletAirTemperatureType( 0 ), // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
WHRatedInletDBTemp( 0.0 ), // Rated inlet air dry-bulb temperature [C]
WHRatedInletWBTemp( 0.0 ), // Rated inlet air wet-bulb temperature [C]
WHRatedInletWaterTemp( 0.0 ), // Rated condenser water inlet temperature [C]
HPWHCondPumpElecNomPower( 0.0 ), // Nominal power input to the condenser water circulation pump [W]
HPWHCondPumpFracToWater( 1.0 ), // Nominal power fraction to water for the condenser water circulation pump
RatedHPWHCondWaterFlow( 0.0 ), // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
ElecWaterHeatingPower( 0.0 ), // Total electric power consumed by compressor and condenser pump [W]
ElecWaterHeatingConsumption( 0.0 ), // Total electric consumption by compressor and condenser pump [J]
FanPowerIncludedInCOP( false ), // Indicates that fan heat is included in heating capacity and COP
CondPumpHeatInCapacity( false ), // Indicates that condenser pump heat is included in heating capacity
CondPumpPowerInCOP( false ), // Indicates that condenser pump power is included in heating COP
AirVolFlowAutoSized( false ), // Used to report autosizing info for the HPWH DX coil
WaterVolFlowAutoSized( false ), // Used to report autosizing info for the HPWH DX coil
TotalHeatingEnergy( 0.0 ), //total water heating energy
TotalHeatingEnergyRate( 0.0 ) //total WH energy rate
//end variables for HPWH
{}

// Member Constructor
Expand Down Expand Up @@ -517,6 +565,8 @@ namespace VariableSpeedCoils {
FArray1_int const & MSEIRWaterFFlow,
FArray1_int const & MSWasteHeat,
FArray1< Real64 > const & MSWasteHeatFrac,
FArray1< Real64 > const & MSWHPumpPower,
FArray1< Real64 > const & MSWHPumpPowerPerRatedTotCap,
Real64 const SpeedNumReport,
Real64 const SpeedRatioReport,
int const DefrostStrategy, // defrost strategy; 1=reverse-cycle, 2=resistive
Expand Down Expand Up @@ -567,7 +617,26 @@ namespace VariableSpeedCoils {
Real64 const CondInletTemp, // Evap condenser inlet temperature [C], report variable
Real64 const SourceAirMassFlowRate, // source air mass flow rate [kg/s]
Real64 const InletSourceAirTemp, // source air temperature entering the outdoor coil [C]
Real64 const InletSourceAirEnthalpy // source air enthalpy entering the outdoor coil [J/kg]
Real64 const InletSourceAirEnthalpy, // source air enthalpy entering the outdoor coil [J/kg]
//begin varibles for HPWH
Real64 const RatedCapWH, // Rated water heating Capacity [W]
int const InletAirTemperatureType, // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
Real64 const WHRatedInletDBTemp, // Rated inlet air dry-bulb temperature [C]
Real64 const WHRatedInletWBTemp, // Rated inlet air wet-bulb temperature [C]
Real64 const WHRatedInletWaterTemp, // Rated condenser water inlet temperature [C]
Real64 const HPWHCondPumpElecNomPower, // Nominal power input to the condenser water circulation pump [W]
Real64 const HPWHCondPumpFracToWater, // Nominal power fraction to water for the condenser water circulation pump
Real64 const RatedHPWHCondWaterFlow, // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
Real64 const ElecWaterHeatingPower, // Total electric power consumed by compressor and condenser pump [W]
Real64 const ElecWaterHeatingConsumption, // Total electric consumption by compressor and condenser pump [J]
bool const FanPowerIncludedInCOP, // Indicates that fan heat is included in heating capacity and COP
bool const CondPumpHeatInCapacity, // Indicates that condenser pump heat is included in heating capacity
bool const CondPumpPowerInCOP, // Indicates that condenser pump power is included in heating COP
bool const AirVolFlowAutoSized, // Used to report autosizing info for the HPWH DX coil
bool const WaterVolFlowAutoSized, // Used to report autosizing info for the HPWH DX coil
Real64 const TotalHeatingEnergy, //total water heating energy
Real64 const TotalHeatingEnergyRate//total WH energy rate
//end variables for HPWH
) :
Name( Name ),
VarSpeedCoilType( VarSpeedCoilType ),
Expand Down Expand Up @@ -658,6 +727,8 @@ namespace VariableSpeedCoils {
MSEIRWaterFFlow( MaxSpedLevels, MSEIRWaterFFlow ),
MSWasteHeat( MaxSpedLevels, MSWasteHeat ),
MSWasteHeatFrac( MaxSpedLevels, MSWasteHeatFrac ),
MSWHPumpPower(MaxSpedLevels, MSWHPumpPower),
MSWHPumpPowerPerRatedTotCap(MaxSpedLevels, MSWHPumpPowerPerRatedTotCap),
SpeedNumReport( SpeedNumReport ),
SpeedRatioReport( SpeedRatioReport ),
DefrostStrategy( DefrostStrategy ),
Expand Down Expand Up @@ -708,7 +779,26 @@ namespace VariableSpeedCoils {
CondInletTemp( CondInletTemp ),
SourceAirMassFlowRate( SourceAirMassFlowRate ),
InletSourceAirTemp( InletSourceAirTemp ),
InletSourceAirEnthalpy( InletSourceAirEnthalpy )
InletSourceAirEnthalpy( InletSourceAirEnthalpy ),
//begin varibles for HPWH
RatedCapWH( RatedCapWH ), // Rated water heating Capacity [W]
InletAirTemperatureType( InletAirTemperatureType ), // Specifies to use either air wet-bulb or dry-bulb temp for curve objects
WHRatedInletDBTemp( WHRatedInletDBTemp ), // Rated inlet air dry-bulb temperature [C]
WHRatedInletWBTemp( WHRatedInletWBTemp ), // Rated inlet air wet-bulb temperature [C]
WHRatedInletWaterTemp( WHRatedInletWaterTemp ), // Rated condenser water inlet temperature [C]
HPWHCondPumpElecNomPower( HPWHCondPumpElecNomPower ), // Nominal power input to the condenser water circulation pump [W]
HPWHCondPumpFracToWater( HPWHCondPumpFracToWater ), // Nominal power fraction to water for the condenser water circulation pump
RatedHPWHCondWaterFlow( RatedHPWHCondWaterFlow ), // Rated water flow rate through the condenser of the HPWH DX coil [m3/s]
ElecWaterHeatingPower( ElecWaterHeatingPower ), // Total electric power consumed by compressor and condenser pump [W]
ElecWaterHeatingConsumption( ElecWaterHeatingConsumption ), // Total electric consumption by compressor and condenser pump [J]
FanPowerIncludedInCOP( FanPowerIncludedInCOP ), // Indicates that fan heat is included in heating capacity and COP
CondPumpHeatInCapacity( CondPumpHeatInCapacity ), // Indicates that condenser pump heat is included in heating capacity
CondPumpPowerInCOP( CondPumpPowerInCOP ), // Indicates that condenser pump power is included in heating COP
AirVolFlowAutoSized( AirVolFlowAutoSized ), // Used to report autosizing info for the HPWH DX coil
WaterVolFlowAutoSized( WaterVolFlowAutoSized ), // Used to report autosizing info for the HPWH DX coil
TotalHeatingEnergy( TotalHeatingEnergy ), //total water heating energy
TotalHeatingEnergyRate( TotalHeatingEnergyRate ) //total WH energy rate
//end variables for HPWH
{}

};
Expand Down Expand Up @@ -826,6 +916,13 @@ namespace VariableSpeedCoils {
bool & ErrorsFound // set to true if problem
);

int
GetVSCoilPLFFPLR(
std::string const & CoilType, // must match coil types in this module
std::string const & CoilName, // must match coil names for the coil type
bool & ErrorsFound // set to true if problem
);

Real64
GetVSCoilMinOATCompressor(
std::string const & CoilName, // must match coil names for the coil type
Expand Down Expand Up @@ -907,6 +1004,16 @@ namespace VariableSpeedCoils {
Real64 const SHR // sensible heat ratio at the given capacity and flow rate
);

void
CalcVarSpeedHPWH(
int const DXCoilNum, // the number of the DX coil to be simulated
Real64 & RuntimeFrac, // Runtime Fraction of compressor or percent on time (on-time/cycle time)
Real64 const PartLoadRatio, // sensible water heating load / full load sensible water heating capacity
Real64 const SpeedRatio, // SpeedRatio varies between 1.0 (higher speed) and 0.0 (lower speed)
int const SpeedNum, // Speed number, high bound capacity
int const CyclingScheme // Continuous fan OR cycling compressor
);

// NOTICE

// Copyright © 1996-2014 The Board of Trustees of the University of Illinois
Expand Down

6 comments on commit 09141bd

@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) - x86_64-MacOS-10.9-clang: OK (1165 of 1167 tests passed)

Build Badge Test Badge

@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) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1168 of 1170 tests passed)

Build Badge Test Badge

@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) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@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) - i386-Windows-7-VisualStudio-12: OK (1169 of 1170 tests passed)

Build Badge Test Badge

@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) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (657 of 658 tests passed)

Build Badge Test Badge Coverage Badge

@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) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1168 of 1170 tests passed)

Build Badge Test Badge Coverage Badge

Please sign in to comment.