Repository navigation
HeatPumpAirToWaterCooling and HeatPumpAirToWaterCoolingSpeedData constructors use heating-mode ratings and curves #5675
Description
Issue overview
The constructors for the cooling side of HeatPumpAirToWater use the heating defaults:
HeatPumpAirToWaterCooling(const Model&)sets the heating rating conditions: Rated Inlet Air Temperature = 8 °C, Rated Leaving Water Temperature = 40 °C (HeatPumpAirToWaterCooling.cpp#L554-L556). EnergyPlus's IDD defaults for cooling mode are 30 °C inlet air and 8 °C leaving water. Its defaults for heating mode are 8 °C and 40 °C.HeatPumpAirToWaterCoolingSpeedData(const Model&)creates the heating curves (HeatPumpAirToWaterCoolingSpeedData.cpp#L239-L275). They are named... CapCurveFuncTempHTand... EIRCurveFuncTempHT. Their coefficients and limits are those ofCapCurveFuncTempHT2andEIRCurveFuncTempHT2in PlantLoopHeatPump_EIR_AirSource_and_AWHP.idf. The x range of 30–50 °C is a hot water leaving temperature, so with chilled water at about 7 °C, x is far outside the curve's range.
A cooling mode made with default constructors therefore uses heating ratings and heating performance curves.
Current Behavior
m = OpenStudio::Model::Model.new
c = OpenStudio::Model::HeatPumpAirToWaterCooling.new(m)
c.ratedInletAirTemperature # => 8.0
c.ratedLeavingWaterTemperature # => 40.0
s = OpenStudio::Model::HeatPumpAirToWaterCoolingSpeedData.new(m)
cap = s.normalizedCoolingCapacityFunctionofTemperatureCurve.to_CurveBiquadratic.get
cap.nameString # => "Heat Pump Air To Water Cooling Speed Data 1 CapCurveFuncTempHT"
cap.coefficient1Constant # => 0.885 (same as the heating speed data)
[cap.minimumValueofx, cap.maximumValueofx] # => [30.0, 50.0]Expected Behavior
The cooling mode defaults to the cooling rating conditions, and the cooling speed data defaults to cooling curves.
Suggested fix
In HeatPumpAirToWaterCooling::HeatPumpAirToWaterCooling(const Model&), use the EnergyPlus IDD cooling defaults:
setRatedInletAirTemperature(30.0);
setRatedLeavingWaterTemperature(8.0);In HeatPumpAirToWaterCoolingSpeedData::HeatPumpAirToWaterCoolingSpeedData(const Model&), use the cooling curves from the same example file. The heating default matches that unit's speed 2 (CapCurveFuncTempHT2), so its cooling counterparts are CapCurveFuncTempCL2 and EIRCurveFuncTempCL2:
CurveBiquadratic capFT(model);
capFT.setName(fmt::format("{} CapCurveFuncTempCL", this->nameString()));
capFT.setCoefficient1Constant(0.910);
capFT.setCoefficient2x(-0.00034);
capFT.setCoefficient3xPOW2(-0.00040);
capFT.setCoefficient4y(-0.0096);
capFT.setCoefficient5yPOW2(0.0208);
capFT.setCoefficient6xTIMESY(-0.000205);
capFT.setMinimumValueofx(5.0);
capFT.setMaximumValueofx(15.0);
capFT.setMinimumValueofy(15.0);
capFT.setMaximumValueofy(45.0);
capFT.setMinimumCurveOutput(0.7);
capFT.setMaximumCurveOutput(1.3);
CurveBiquadratic eirFT(model);
eirFT.setName(fmt::format("{} EIRCurveFuncTempCL", this->nameString()));
eirFT.setCoefficient1Constant(0.990);
eirFT.setCoefficient2x(0.00019);
eirFT.setCoefficient3xPOW2(0.00017);
eirFT.setCoefficient4y(0.0075);
eirFT.setCoefficient5yPOW2(-0.0078);
eirFT.setCoefficient6xTIMESY(0.000165);
eirFT.setMinimumValueofx(5.0);
eirFT.setMaximumValueofx(15.0);
eirFT.setMinimumValueofy(15.0);
eirFT.setMaximumValueofy(45.0);
eirFT.setMinimumCurveOutput(0.7);
eirFT.setMaximumCurveOutput(1.3);(Speed 1's CapCurveFuncTempCL and EIRCurveFuncTempCL would also work. Either set is a cooling fit over chilled water leaving temperature, 5–15 °C, and outdoor air temperature, 15–45 °C.)
HeatPumpAirToWaterCooling_GTest.cpp asserts the current defaults, so its lines 65 and 87 (EXPECT_EQ(8.0, ...) and EXPECT_EQ(40.0, ...)) would change to 30.0 and 8.0.
Steps to Reproduce
- Create a
HeatPumpAirToWaterCoolingand aHeatPumpAirToWaterCoolingSpeedDatawith their default constructors. - Check the rated temperatures and the speed data's capacity and EIR curves, as shown above.
Possible Solution
See "Suggested fix" above.
Details
Environment
- Platform: Windows 11
- Version of OpenStudio: 3.11.0+241b8abb4d
Context
We found this while adding HeatPumpAirToWater to the OpenStudio Application library (OpenStudioApplication#896). In the library, we work around it by setting the cooling mode to 30 °C and 8 °C and giving its speed data CapCurveFuncTempCL and EIRCurveFuncTempCL from the example file.
Activity
Address review: grouping, IddObjectType lookup, inspector, curves, icons