diff --git a/resources/energyplus/ProposedEnergy+.idd b/resources/energyplus/ProposedEnergy+.idd index 1525d87d055..0f07725595a 100644 --- a/resources/energyplus/ProposedEnergy+.idd +++ b/resources/energyplus/ProposedEnergy+.idd @@ -44880,12 +44880,12 @@ HeatPump:PlantLoop:EIR:Cooling, \note The unit is disabled above this temperature. N9, \field Minimum Supply Water Temperature Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \note quadratic curve = a + b*OAT is typical, other univariate curves may be used \note OAT = Outdoor Dry-Bulb Temperature N10; \field Maximum Supply Water Temperature Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \note quadratic curve = a + b*OAT is typical, other univariate curves may be used \note OAT = Outdoor Dry-Bulb Temperature @@ -45029,17 +45029,17 @@ HeatPump:PlantLoop:EIR:Heating, \note The unit is disabled above this temperature. A14, \field Minimum Supply Water Temperature Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \note quadratic curve = a + b*OAT is typical, other univariate curves may be used \note OAT = Outdoor Dry-Bulb Temperature A15, \field Maximum Supply Water Temperature Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \note quadratic curve = a + b*OAT is typical, other univariate curves may be used \note OAT = Outdoor Dry-Bulb Temperature A16, \field Dry Outdoor Correction Factor Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions N10, \field Maximum Outdoor Dry Bulb Temperature For Defrost Operation \type real \default 10.0 @@ -45067,14 +45067,14 @@ HeatPump:PlantLoop:EIR:Heating, \note only required if Timed or OnDemand defrost strategy is specified A19, \field Timed Empirical Defrost Frequency Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \note univariate curve = a + b*OAT is typical, other univariate curves may be used \note OAT = outdoor air dry-bulb temperature (C) \note Timed Empirical Defrost Frequency fraction in hours = curve output \note only applicable if TimedEmpirical defrost control is specified A20, \field Timed Empirical Defrost Heat Load Penalty Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \object-list BivariateFunctions \note univariate curve = a + b*OAT is typical, other univariate curves may be used \note bivariate curve = a + b*WB + c*WB**2 + d*OAT + e*OAT**2 + f*WB*OAT @@ -45084,7 +45084,7 @@ HeatPump:PlantLoop:EIR:Heating, \note only applicable if TimedEmpirical defrost control is specified A21; \field Timed Empirical Defrost Heat Input Energy Fraction Curve Name \type object-list - \object-list UniVariateFunctions + \object-list UnivariateFunctions \object-list BivariateFunctions \note univariate curve = a + b*OAT is typical, other univariate curves may be used \note bivariate curve = a + b*WB + c*WB**2 + d*OAT + e*OAT**2 + f*WB*OAT diff --git a/resources/model/OpenStudio.idd b/resources/model/OpenStudio.idd index 26c0e37ee46..6bbdcf1c936 100644 --- a/resources/model/OpenStudio.idd +++ b/resources/model/OpenStudio.idd @@ -13969,7 +13969,7 @@ OS:HeatPump:WaterToWater:EquationFit:Cooling, OS:HeatPump:PlantLoop:EIR:Heating, \memo An EIR formulated water to water heat pump model, heating operation - \min-fields 16 + \min-fields 29 A1, \field Handle \type handle \required-field @@ -14055,7 +14055,7 @@ OS:HeatPump:PlantLoop:EIR:Heating, \note curve = a + b*CWS + c*CWS**2 + d*ECT + e*ECT**2 + f*CWS*ECT \note CWS = supply (leaving) hot water temperature(C) \note ECT = entering condenser fluid temperature(C) - A11;\field Electric Input to Output Ratio Modifier Function of Part Load Ratio Curve Name + A11,\field Electric Input to Output Ratio Modifier Function of Part Load Ratio Curve Name \note Electric Input Ratio (EIR) modifier as a function of Part Load Ratio (PLR) \note EIR = 1/COP \required-field @@ -14063,10 +14063,121 @@ OS:HeatPump:PlantLoop:EIR:Heating, \object-list UnivariateFunctions \note quadratic curve = a + b*PLR + c*PLR**2 is typical, other univariate curves may be used \note PLR = part load ratio (hot load/steady state capacity) + N6, \field Heating To Cooling Capacity Sizing Ratio + \note Multiplies the autosized heating capacity + \type real + \minimum 0.0 + \required-field + A12,\field Heat Pump Sizing Method + \note Specifies sizing method when companion coil exists + \type choice + \key CoolingCapacity + \key HeatingCapacity + \key GreaterOfHeatingOrCooling + \required-field + A13,\field Control Type + \note Heat pump can be controlled on leaving water temperature set point or plant load + \type choice + \key Setpoint + \key Load + \required-field + A14,\field Flow Mode + \note Select operating mode for fluid flow through the chiller. "ConstantFlow" is for + \note constant pumping with flow controlled by chiller to operate at full design + \note flow rate. "VariableSpeedPumping" is for variable pumping with flow proportional + \note to chiller operating part load ratio. + \type choice + \key ConstantFlow + \key VariableSpeedPumping + \required-field + N7, \field Minimum Part Load Ratio + \note Below this operating limit compressor cycling will occur + \type real + \minimum 0.0 + \required-field + N8, \field Minimum Source Inlet Temperature + \type real + \units C + \required-field + \note Enter the minimum inlet outdoor air dry-bulb temperature + \note for air-cooled units or minimum inlet water temperature for water-cooled units. + \note The unit is disabled below this temperature. + N9, \field Maximum Source Inlet Temperature + \type real + \units C + \required-field + \note Enter the maximum inlet outdoor air dry-bulb temperature + \note for air-cooled units or maximum inlet water temperature for water-cooled units. + \note The unit is disabled above this temperature. + A15,\field Minimum Supply Water Temperature Curve Name + \type object-list + \object-list UnivariateFunctions + \note quadratic curve = a + b*OAT is typical, other univariate curves may be used + \note OAT = Outdoor Dry-Bulb Temperature + A16,\field Maximum Supply Water Temperature Curve Name + \type object-list + \object-list UnivariateFunctions + \note quadratic curve = a + b*OAT is typical, other univariate curves may be used + \note OAT = Outdoor Dry-Bulb Temperature + A17,\field Dry Outdoor Correction Factor Curve Name + \type object-list + \object-list UnivariateFunctions + N10,\field Maximum Outdoor Dry Bulb Temperature For Defrost Operation + \type real + \required-field + \note defrost operation will not be active above this outdoor temperature + A18,\field Heat Pump Defrost Control + \type choice + \key None + \key Timed + \key OnDemand + \key TimedEmpirical + \required-field + N11,\field Heat Pump Defrost Time Period Fraction + \type real + \minimum 0.0 + \required-field + \note Nominal fraction of time in defrost mode + \note only applicable if Timed or TimedEmpirical heat pump defrost control is specified + A19,\field Defrost Energy Input Ratio Function of Temperature Curve Name + \type object-list + \object-list BivariateFunctions + \note univariate curve = a + b*OAT is typical, other univariate curves may be used + \note bivariate curve = a + b*WB + c*WB**2 + d*OAT + e*OAT**2 + f*WB*OAT + \note OAT = outdoor air dry-bulb temperature (C) + \note WB = wet-bulb temperature (C) of air entering the indoor coil + \note only required if Timed or OnDemand defrost strategy is specified + A20,\field Timed Empirical Defrost Frequency Curve Name + \type object-list + \object-list UnivariateFunctions + \note univariate curve = a + b*OAT is typical, other univariate curves may be used + \note OAT = outdoor air dry-bulb temperature (C) + \note Timed Empirical Defrost Frequency fraction in hours = curve output + \note only applicable if TimedEmpirical defrost control is specified + A21,\field Timed Empirical Defrost Heat Load Penalty Curve Name + \type object-list + \object-list UnivariateFunctions + \object-list BivariateFunctions + \note univariate curve = a + b*OAT is typical, other univariate curves may be used + \note bivariate curve = a + b*WB + c*WB**2 + d*OAT + e*OAT**2 + f*WB*OAT + \note OAT = outdoor air dry-bulb temperature (C) + \note WB = wet-bulb temperature (C) of air entering the indoor coil + \note Timed Empirical Defrost Heat Load Penalty in watts = hot load * curve output + \note only applicable if TimedEmpirical defrost control is specified + A22;\field Timed Empirical Defrost Heat Input Energy Fraction Curve Name + \type object-list + \object-list UnivariateFunctions + \object-list BivariateFunctions + \note univariate curve = a + b*OAT is typical, other univariate curves may be used + \note bivariate curve = a + b*WB + c*WB**2 + d*OAT + e*OAT**2 + f*WB*OAT + \note OAT = outdoor air dry-bulb temperature (C) + \note WB = wet-bulb temperature (C) of air entering the indoor coil + \note Timed Empirical Defrost Heat Input Energy in watts = rated hot load * curve output + \note only applicable if TimedEmpirical defrost control is specified OS:HeatPump:PlantLoop:EIR:Cooling, \memo An EIR formulated water to water heat pump model, cooling operation. - \min-fields 16 + \min-fields 21 A1, \field Handle \type handle \required-field @@ -14152,7 +14263,7 @@ OS:HeatPump:PlantLoop:EIR:Cooling, \note curve = a + b*CWS + c*CWS**2 + d*ECT + e*ECT**2 + f*CWS*ECT \note CWS = supply (leaving) chilled water temperature(C) \note ECT = entering condenser fluid temperature(C) - A11;\field Electric Input to Output Ratio Modifier Function of Part Load Ratio Curve Name + A11,\field Electric Input to Output Ratio Modifier Function of Part Load Ratio Curve Name \note Electric Input Ratio (EIR) modifier as a function of Part Load Ratio (PLR) \note EIR = 1/COP \required-field @@ -14160,6 +14271,50 @@ OS:HeatPump:PlantLoop:EIR:Cooling, \object-list UnivariateFunctions \note quadratic curve = a + b*PLR + c*PLR**2 is typical, other univariate curves may be used \note PLR = part load ratio (cooling load/steady state capacity) + A12,\field Control Type + \note Heat pump can be controlled on leaving water temperature set point or plant load + \type choice + \key Setpoint + \key Load + \required-field + A13,\field Flow Mode + \note Select operating mode for fluid flow through the chiller. "ConstantFlow" is for + \note constant pumping with flow controlled by chiller to operate at full design + \note flow rate. "VariableSpeedPumping" is for variable pumping with flow proportional + \note to chiller operating part load ratio. + \type choice + \key ConstantFlow + \key VariableSpeedPumping + \required-field + N6, \field Minimum Part Load Ratio + \note Below this operating limit compressor cycling will occur + \type real + \minimum 0.0 + \required-field + N7, \field Minimum Source Inlet Temperature + \type real + \units C + \required-field + \note Enter the minimum inlet outdoor air dry-bulb temperature + \note for air-cooled units or minimum inlet water temperature for water-cooled units. + \note The unit is disabled below this temperature. + N8, \field Maximum Source Inlet Temperature + \type real + \units C + \required-field + \note Enter the maximum inlet outdoor air dry-bulb temperature + \note for air-cooled units or maximum inlet water temperature for water-cooled units. + \note The unit is disabled above this temperature. + N9, \field Minimum Supply Water Temperature Curve Name + \type object-list + \object-list UnivariateFunctions + \note quadratic curve = a + b*OAT is typical, other univariate curves may be used + \note OAT = Outdoor Dry-Bulb Temperature + N10;\field Maximum Supply Water Temperature Curve Name + \type object-list + \object-list UnivariateFunctions + \note quadratic curve = a + b*OAT is typical, other univariate curves may be used + \note OAT = Outdoor Dry-Bulb Temperature OS:HeatPump:AirToWater:FuelFired:Heating, \memo The object defines a fuel-fired absorption heat pump based on equation-fit models. diff --git a/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRCooling.cpp b/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRCooling.cpp index 4b71bfd3ef0..4da9be9e6b7 100644 --- a/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRCooling.cpp +++ b/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRCooling.cpp @@ -139,6 +139,28 @@ namespace energyplus { } } + idfObject.setString(HeatPump_PlantLoop_EIR_CoolingFields::ControlType, modelObject.controlType()); + + idfObject.setString(HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, modelObject.flowMode()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, modelObject.minimumPartLoadRatio()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, modelObject.minimumSourceInletTemperature()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, modelObject.maximumSourceInletTemperature()); + + if (boost::optional curve = modelObject.minimumSupplyWaterTemperatureCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.maximumSupplyWaterTemperatureCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName, _curve->name().get()); + } + } + return idfObject; } diff --git a/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRHeating.cpp b/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRHeating.cpp index d5082d83beb..be05d50f746 100644 --- a/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRHeating.cpp +++ b/src/energyplus/ForwardTranslator/ForwardTranslateHeatPumpPlantLoopEIRHeating.cpp @@ -136,6 +136,69 @@ namespace energyplus { } } + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::HeatingToCoolingCapacitySizingRatio, modelObject.heatingToCoolingCapacitySizingRatio()); + + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpSizingMethod, modelObject.heatPumpSizingMethod()); + + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::ControlType, modelObject.controlType()); + + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::FlowMode, modelObject.flowMode()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::MinimumPartLoadRatio, modelObject.minimumPartLoadRatio()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::MinimumSourceInletTemperature, modelObject.minimumSourceInletTemperature()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::MaximumSourceInletTemperature, modelObject.maximumSourceInletTemperature()); + + if (boost::optional curve = modelObject.minimumSupplyWaterTemperatureCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::MinimumSupplyWaterTemperatureCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.maximumSupplyWaterTemperatureCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::MaximumSupplyWaterTemperatureCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.dryOutdoorCorrectionFactorCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::DryOutdoorCorrectionFactorCurveName, _curve->name().get()); + } + } + + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::MaximumOutdoorDryBulbTemperatureForDefrostOperation, + modelObject.maximumOutdoorDryBulbTemperatureForDefrostOperation()); + + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostControl, modelObject.heatPumpDefrostControl()); + + idfObject.setDouble(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostTimePeriodFraction, modelObject.heatPumpDefrostTimePeriodFraction()); + + if (boost::optional curve = modelObject.defrostEnergyInputRatioFunctionofTemperatureCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.timedEmpiricalDefrostFrequencyCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostFrequencyCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.timedEmpiricalDefrostHeatLoadPenaltyCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatLoadPenaltyCurveName, _curve->name().get()); + } + } + + if (boost::optional curve = modelObject.timedEmpiricalDefrostHeatInputEnergyFractionCurve()) { + if (boost::optional _curve = translateAndMapModelObject(curve.get())) { + idfObject.setString(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatInputEnergyFractionCurveName, _curve->name().get()); + } + } + return idfObject; } diff --git a/src/energyplus/Test/HeatPumpPlantLoopEIR_GTest.cpp b/src/energyplus/Test/HeatPumpPlantLoopEIR_GTest.cpp index 1d0d92f5d19..ce3f1501398 100644 --- a/src/energyplus/Test/HeatPumpPlantLoopEIR_GTest.cpp +++ b/src/energyplus/Test/HeatPumpPlantLoopEIR_GTest.cpp @@ -49,6 +49,15 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_HeatPumpPlantLoopEIR_AirSource) { EXPECT_TRUE(plhp_clg.setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(curve2)); CurveQuadratic curve3(m); EXPECT_TRUE(plhp_clg.setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(curve3)); + EXPECT_TRUE(plhp_clg.setControlType("Setpoint")); + EXPECT_TRUE(plhp_clg.setFlowMode("VariableSpeedPumping")); + EXPECT_TRUE(plhp_clg.setMinimumPartLoadRatio(6.0)); + EXPECT_TRUE(plhp_clg.setMinimumSourceInletTemperature(7.0)); + EXPECT_TRUE(plhp_clg.setMaximumSourceInletTemperature(8.0)); + CurveQuadratic curve4(m); + EXPECT_TRUE(plhp_clg.setMinimumSupplyWaterTemperatureCurve(curve4)); + CurveQuadratic curve5(m); + EXPECT_TRUE(plhp_clg.setMaximumSupplyWaterTemperatureCurve(curve5)); HeatPumpPlantLoopEIRHeating plhp_htg(m); EXPECT_TRUE(plhp_htg.setLoadSideReferenceFlowRate(1.0)); @@ -56,12 +65,36 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_HeatPumpPlantLoopEIR_AirSource) { EXPECT_TRUE(plhp_htg.setReferenceCapacity(3.0)); EXPECT_TRUE(plhp_htg.setReferenceCoefficientofPerformance(4.0)); EXPECT_TRUE(plhp_htg.setSizingFactor(5.0)); - CurveBiquadratic curve4(m); - EXPECT_TRUE(plhp_htg.setCapacityModifierFunctionofTemperatureCurve(curve4)); - CurveBiquadratic curve5(m); - EXPECT_TRUE(plhp_htg.setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(curve5)); - CurveQuadratic curve6(m); - EXPECT_TRUE(plhp_htg.setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(curve6)); + CurveBiquadratic curve6(m); + EXPECT_TRUE(plhp_htg.setCapacityModifierFunctionofTemperatureCurve(curve6)); + CurveBiquadratic curve7(m); + EXPECT_TRUE(plhp_htg.setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(curve7)); + CurveQuadratic curve8(m); + EXPECT_TRUE(plhp_htg.setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(curve8)); + EXPECT_TRUE(plhp_htg.setHeatingToCoolingCapacitySizingRatio(6.0)); + EXPECT_TRUE(plhp_htg.setHeatPumpSizingMethod("HeatingCapacity")); + EXPECT_TRUE(plhp_htg.setControlType("Setpoint")); + EXPECT_TRUE(plhp_htg.setFlowMode("VariableSpeedPumping")); + EXPECT_TRUE(plhp_htg.setMinimumPartLoadRatio(7.0)); + EXPECT_TRUE(plhp_htg.setMinimumSourceInletTemperature(8.0)); + EXPECT_TRUE(plhp_htg.setMaximumSourceInletTemperature(9.0)); + CurveQuadratic curve9(m); + EXPECT_TRUE(plhp_htg.setMinimumSupplyWaterTemperatureCurve(curve9)); + CurveQuadratic curve10(m); + EXPECT_TRUE(plhp_htg.setMaximumSupplyWaterTemperatureCurve(curve10)); + CurveQuadratic curve11(m); + EXPECT_TRUE(plhp_htg.setDryOutdoorCorrectionFactorCurve(curve11)); + EXPECT_TRUE(plhp_htg.setMaximumOutdoorDryBulbTemperatureForDefrostOperation(10.0)); + EXPECT_TRUE(plhp_htg.setHeatPumpDefrostControl("Timed")); + EXPECT_TRUE(plhp_htg.setHeatPumpDefrostTimePeriodFraction(11.0)); + CurveBiquadratic curve12(m); + EXPECT_TRUE(plhp_htg.setDefrostEnergyInputRatioFunctionofTemperatureCurve(curve12)); + CurveQuadratic curve13(m); + EXPECT_TRUE(plhp_htg.setTimedEmpiricalDefrostFrequencyCurve(curve13)); + CurveQuadratic curve14(m); + EXPECT_TRUE(plhp_htg.setTimedEmpiricalDefrostHeatLoadPenaltyCurve(curve14)); + CurveQuadratic curve15(m); + EXPECT_TRUE(plhp_htg.setTimedEmpiricalDefrostHeatInputEnergyFractionCurve(curve15)); EXPECT_TRUE(plhp_clg.setCompanionHeatingHeatPump(plhp_htg)); EXPECT_TRUE(plhp_htg.setCompanionCoolingHeatPump(plhp_clg)); @@ -107,6 +140,15 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_HeatPumpPlantLoopEIR_AirSource) { idf_cc.getTarget(HeatPump_PlantLoop_EIR_CoolingFields::ElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurveName)); EXPECT_TRUE(woCurve3); EXPECT_EQ(woCurve3->iddObject().type(), IddObjectType::Curve_Quadratic); + EXPECT_EQ("Setpoint", idf_cc.getString(HeatPump_PlantLoop_EIR_CoolingFields::ControlType, false).get()); + EXPECT_EQ("VariableSpeedPumping", idf_cc.getString(HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, false).get()); + EXPECT_EQ(6.0, idf_cc.getDouble(HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, false).get()); + EXPECT_EQ(7.0, idf_cc.getDouble(HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, false).get()); + EXPECT_EQ(8.0, idf_cc.getDouble(HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, false).get()); + boost::optional woCurve4(idf_cc.getTarget(HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName)); + EXPECT_TRUE(woCurve4); + boost::optional woCurve5(idf_cc.getTarget(HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName)); + EXPECT_TRUE(woCurve5); } { @@ -138,6 +180,32 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_HeatPumpPlantLoopEIR_AirSource) { idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::ElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurveName)); EXPECT_TRUE(woCurve3); EXPECT_EQ(woCurve3->iddObject().type(), IddObjectType::Curve_Quadratic); + EXPECT_EQ(6.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::HeatingToCoolingCapacitySizingRatio, false).get()); + EXPECT_EQ("HeatingCapacity", idf_hc.getString(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpSizingMethod, false).get()); + EXPECT_EQ("Setpoint", idf_hc.getString(HeatPump_PlantLoop_EIR_HeatingFields::ControlType, false).get()); + EXPECT_EQ("VariableSpeedPumping", idf_hc.getString(HeatPump_PlantLoop_EIR_HeatingFields::FlowMode, false).get()); + EXPECT_EQ(7.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::MinimumPartLoadRatio, false).get()); + EXPECT_EQ(8.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::MinimumSourceInletTemperature, false).get()); + EXPECT_EQ(9.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::MaximumSourceInletTemperature, false).get()); + boost::optional woCurve4(idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::MinimumSupplyWaterTemperatureCurveName)); + EXPECT_TRUE(woCurve4); + boost::optional woCurve5(idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::MaximumSupplyWaterTemperatureCurveName)); + EXPECT_TRUE(woCurve5); + boost::optional woCurve6(idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::DryOutdoorCorrectionFactorCurveName)); + EXPECT_TRUE(woCurve6); + EXPECT_EQ(10.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::MaximumOutdoorDryBulbTemperatureForDefrostOperation, false).get()); + EXPECT_EQ("Timed", idf_hc.getString(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostControl, false).get()); + EXPECT_EQ(11.0, idf_hc.getDouble(HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostTimePeriodFraction, false).get()); + boost::optional woCurve7( + idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName)); + EXPECT_TRUE(woCurve7); + boost::optional woCurve8(idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostFrequencyCurveName)); + EXPECT_TRUE(woCurve8); + boost::optional woCurve9(idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatLoadPenaltyCurveName)); + EXPECT_TRUE(woCurve9); + boost::optional woCurve10( + idf_hc.getTarget(HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatInputEnergyFractionCurveName)); + EXPECT_TRUE(woCurve10); } } diff --git a/src/model/HeatPumpPlantLoopEIRCooling.cpp b/src/model/HeatPumpPlantLoopEIRCooling.cpp index 17c331937a1..15b7b5e475a 100644 --- a/src/model/HeatPumpPlantLoopEIRCooling.cpp +++ b/src/model/HeatPumpPlantLoopEIRCooling.cpp @@ -241,6 +241,44 @@ namespace model { return wo.optionalCast().get(); } + std::string HeatPumpPlantLoopEIRCooling_Impl::controlType() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ControlType, true); + OS_ASSERT(value); + return value.get(); + } + + std::string HeatPumpPlantLoopEIRCooling_Impl::flowMode() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRCooling_Impl::minimumPartLoadRatio() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRCooling_Impl::minimumSourceInletTemperature() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRCooling_Impl::maximumSourceInletTemperature() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, true); + OS_ASSERT(value); + return value.get(); + } + + boost::optional HeatPumpPlantLoopEIRCooling_Impl::minimumSupplyWaterTemperatureCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName); + } + + boost::optional HeatPumpPlantLoopEIRCooling_Impl::maximumSupplyWaterTemperatureCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName); + } + bool HeatPumpPlantLoopEIRCooling_Impl::setCompanionHeatingHeatPump(const HeatPumpPlantLoopEIRHeating& companionHP) { return this->setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::CompanionHeatPumpName, companionHP.handle()); } @@ -300,6 +338,50 @@ namespace model { return result; } + bool HeatPumpPlantLoopEIRCooling_Impl::setControlType(const std::string& controlType) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::ControlType, controlType); + return result; + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setFlowMode(const std::string& flowMode) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::FlowMode, flowMode); + return result; + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumPartLoadRatio(double minimumPartLoadRatio) { + return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumPartLoadRatio, minimumPartLoadRatio); + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) { + return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSourceInletTemperature, minimumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) { + return setDouble(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSourceInletTemperature, maximumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName, minimumSupplyWaterTemperatureCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRCooling_Impl::resetMinimumSupplyWaterTemperatureCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::MinimumSupplyWaterTemperatureCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRCooling_Impl::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName, maximumSupplyWaterTemperatureCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRCooling_Impl::resetMaximumSupplyWaterTemperatureCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_CoolingFields::MaximumSupplyWaterTemperatureCurveName, ""); + OS_ASSERT(result); + } + boost::optional HeatPumpPlantLoopEIRCooling_Impl::autosizedLoadSideReferenceFlowRate() const { return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s"); } @@ -390,6 +472,11 @@ namespace model { setReferenceCoefficientofPerformance(7.5); // IDD default setSizingFactor(1.0); + setControlType("Load"); + setFlowMode("ConstantFlow"); + setMinimumPartLoadRatio(0.0); + setMinimumSourceInletTemperature(-100.0); + setMaximumSourceInletTemperature(100.0); } HeatPumpPlantLoopEIRCooling::HeatPumpPlantLoopEIRCooling(const Model& model) @@ -450,6 +537,11 @@ namespace model { setReferenceCoefficientofPerformance(7.5); setSizingFactor(1.0); + setControlType("Load"); + setFlowMode("ConstantFlow"); + setMinimumPartLoadRatio(0.0); + setMinimumSourceInletTemperature(-100.0); + setMaximumSourceInletTemperature(100.0); } IddObjectType HeatPumpPlantLoopEIRCooling::iddObjectType() { @@ -516,6 +608,34 @@ namespace model { return getImpl()->electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(); } + std::string HeatPumpPlantLoopEIRCooling::controlType() const { + return getImpl()->controlType(); + } + + std::string HeatPumpPlantLoopEIRCooling::flowMode() const { + return getImpl()->flowMode(); + } + + double HeatPumpPlantLoopEIRCooling::minimumPartLoadRatio() const { + return getImpl()->minimumPartLoadRatio(); + } + + double HeatPumpPlantLoopEIRCooling::minimumSourceInletTemperature() const { + return getImpl()->minimumSourceInletTemperature(); + } + + double HeatPumpPlantLoopEIRCooling::maximumSourceInletTemperature() const { + return getImpl()->maximumSourceInletTemperature(); + } + + boost::optional HeatPumpPlantLoopEIRCooling::minimumSupplyWaterTemperatureCurve() const { + return getImpl()->minimumSupplyWaterTemperatureCurve(); + } + + boost::optional HeatPumpPlantLoopEIRCooling::maximumSupplyWaterTemperatureCurve() const { + return getImpl()->maximumSupplyWaterTemperatureCurve(); + } + bool HeatPumpPlantLoopEIRCooling::setCondenserType(const std::string& condenserType) { return getImpl()->setCondenserType(condenserType); } @@ -573,6 +693,42 @@ namespace model { electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); } + bool HeatPumpPlantLoopEIRCooling::setControlType(const std::string& controlType) { + return getImpl()->setControlType(controlType); + } + + bool HeatPumpPlantLoopEIRCooling::setFlowMode(const std::string& flowMode) { + return getImpl()->setFlowMode(flowMode); + } + + bool HeatPumpPlantLoopEIRCooling::setMinimumPartLoadRatio(double minimumPartLoadRatio) { + return getImpl()->setMinimumPartLoadRatio(minimumPartLoadRatio); + } + + bool HeatPumpPlantLoopEIRCooling::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) { + return getImpl()->setMinimumSourceInletTemperature(minimumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRCooling::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) { + return getImpl()->setMaximumSourceInletTemperature(maximumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRCooling::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) { + return getImpl()->setMinimumSupplyWaterTemperatureCurve(minimumSupplyWaterTemperatureCurve); + } + + void HeatPumpPlantLoopEIRCooling::resetMinimumSupplyWaterTemperatureCurve() { + getImpl()->resetMinimumSupplyWaterTemperatureCurve(); + } + + bool HeatPumpPlantLoopEIRCooling::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) { + return getImpl()->setMaximumSupplyWaterTemperatureCurve(maximumSupplyWaterTemperatureCurve); + } + + void HeatPumpPlantLoopEIRCooling::resetMaximumSupplyWaterTemperatureCurve() { + getImpl()->resetMaximumSupplyWaterTemperatureCurve(); + } + boost::optional HeatPumpPlantLoopEIRCooling::autosizedLoadSideReferenceFlowRate() const { return getImpl()->autosizedLoadSideReferenceFlowRate(); } diff --git a/src/model/HeatPumpPlantLoopEIRCooling.hpp b/src/model/HeatPumpPlantLoopEIRCooling.hpp index 0f48c71f087..faf087dd33f 100644 --- a/src/model/HeatPumpPlantLoopEIRCooling.hpp +++ b/src/model/HeatPumpPlantLoopEIRCooling.hpp @@ -79,6 +79,20 @@ namespace model { Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const; + std::string controlType() const; + + std::string flowMode() const; + + double minimumPartLoadRatio() const; + + double minimumSourceInletTemperature() const; + + double maximumSourceInletTemperature() const; + + boost::optional minimumSupplyWaterTemperatureCurve() const; + + boost::optional maximumSupplyWaterTemperatureCurve() const; + //@} /** @name Setters */ //@{ @@ -110,6 +124,24 @@ namespace model { bool setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + bool setControlType(const std::string& controlType); + + bool setFlowMode(const std::string& flowMode); + + bool setMinimumPartLoadRatio(double minimumPartLoadRatio); + + bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature); + + bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature); + + bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve); + + void resetMinimumSupplyWaterTemperatureCurve(); + + bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve); + + void resetMaximumSupplyWaterTemperatureCurve(); + //@} /** @name Other */ //@{ diff --git a/src/model/HeatPumpPlantLoopEIRCooling_Impl.hpp b/src/model/HeatPumpPlantLoopEIRCooling_Impl.hpp index 728a7f7197b..f256c6aecec 100644 --- a/src/model/HeatPumpPlantLoopEIRCooling_Impl.hpp +++ b/src/model/HeatPumpPlantLoopEIRCooling_Impl.hpp @@ -96,6 +96,20 @@ namespace model { Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const; + std::string controlType() const; + + std::string flowMode() const; + + double minimumPartLoadRatio() const; + + double minimumSourceInletTemperature() const; + + double maximumSourceInletTemperature() const; + + boost::optional minimumSupplyWaterTemperatureCurve() const; + + boost::optional maximumSupplyWaterTemperatureCurve() const; + //@} /** @name Setters */ //@{ @@ -127,6 +141,24 @@ namespace model { bool setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve( const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + bool setControlType(const std::string& controlType); + + bool setFlowMode(const std::string& flowMode); + + bool setMinimumPartLoadRatio(double minimumPartLoadRatio); + + bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature); + + bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature); + + bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve); + + void resetMinimumSupplyWaterTemperatureCurve(); + + bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve); + + void resetMaximumSupplyWaterTemperatureCurve(); + //@} /** @name Other */ //@{ diff --git a/src/model/HeatPumpPlantLoopEIRHeating.cpp b/src/model/HeatPumpPlantLoopEIRHeating.cpp index 35925c66fbb..3fed91b8997 100644 --- a/src/model/HeatPumpPlantLoopEIRHeating.cpp +++ b/src/model/HeatPumpPlantLoopEIRHeating.cpp @@ -242,6 +242,97 @@ namespace model { return wo.optionalCast().get(); } + double HeatPumpPlantLoopEIRHeating_Impl::heatingToCoolingCapacitySizingRatio() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatingToCoolingCapacitySizingRatio, true); + OS_ASSERT(value); + return value.get(); + } + + std::string HeatPumpPlantLoopEIRHeating_Impl::heatPumpSizingMethod() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpSizingMethod, true); + OS_ASSERT(value); + return value.get(); + } + + std::string HeatPumpPlantLoopEIRHeating_Impl::controlType() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_HeatingFields::ControlType, true); + OS_ASSERT(value); + return value.get(); + } + + std::string HeatPumpPlantLoopEIRHeating_Impl::flowMode() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_HeatingFields::FlowMode, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRHeating_Impl::minimumPartLoadRatio() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumPartLoadRatio, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRHeating_Impl::minimumSourceInletTemperature() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumSourceInletTemperature, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRHeating_Impl::maximumSourceInletTemperature() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumSourceInletTemperature, true); + OS_ASSERT(value); + return value.get(); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::minimumSupplyWaterTemperatureCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumSupplyWaterTemperatureCurveName); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::maximumSupplyWaterTemperatureCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumSupplyWaterTemperatureCurveName); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::dryOutdoorCorrectionFactorCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_HeatingFields::DryOutdoorCorrectionFactorCurveName); + } + + double HeatPumpPlantLoopEIRHeating_Impl::maximumOutdoorDryBulbTemperatureForDefrostOperation() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumOutdoorDryBulbTemperatureForDefrostOperation, true); + OS_ASSERT(value); + return value.get(); + } + + std::string HeatPumpPlantLoopEIRHeating_Impl::heatPumpDefrostControl() const { + boost::optional value = getString(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostControl, true); + OS_ASSERT(value); + return value.get(); + } + + double HeatPumpPlantLoopEIRHeating_Impl::heatPumpDefrostTimePeriodFraction() const { + boost::optional value = getDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostTimePeriodFraction, true); + OS_ASSERT(value); + return value.get(); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::defrostEnergyInputRatioFunctionofTemperatureCurve() const { + return getObject().getModelObjectTarget( + OS_HeatPump_PlantLoop_EIR_HeatingFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::timedEmpiricalDefrostFrequencyCurve() const { + return getObject().getModelObjectTarget(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostFrequencyCurveName); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::timedEmpiricalDefrostHeatLoadPenaltyCurve() const { + return getObject().getModelObjectTarget( + OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatLoadPenaltyCurveName); + } + + boost::optional HeatPumpPlantLoopEIRHeating_Impl::timedEmpiricalDefrostHeatInputEnergyFractionCurve() const { + return getObject().getModelObjectTarget( + OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatInputEnergyFractionCurveName); + } + bool HeatPumpPlantLoopEIRHeating_Impl::setCompanionCoolingHeatPump(const HeatPumpPlantLoopEIRCooling& companionHP) { return this->setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::CompanionHeatPumpName, companionHP.handle()); } @@ -301,6 +392,131 @@ namespace model { return result; } + bool HeatPumpPlantLoopEIRHeating_Impl::setHeatingToCoolingCapacitySizingRatio(double heatingToCoolingCapacitySizingRatio) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatingToCoolingCapacitySizingRatio, heatingToCoolingCapacitySizingRatio); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setHeatPumpSizingMethod(const std::string& heatPumpSizingMethod) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpSizingMethod, heatPumpSizingMethod); + return result; + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setControlType(const std::string& controlType) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::ControlType, controlType); + return result; + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setFlowMode(const std::string& flowMode) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::FlowMode, flowMode); + return result; + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMinimumPartLoadRatio(double minimumPartLoadRatio) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumPartLoadRatio, minimumPartLoadRatio); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumSourceInletTemperature, minimumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumSourceInletTemperature, maximumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumSupplyWaterTemperatureCurveName, minimumSupplyWaterTemperatureCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetMinimumSupplyWaterTemperatureCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::MinimumSupplyWaterTemperatureCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumSupplyWaterTemperatureCurveName, maximumSupplyWaterTemperatureCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetMaximumSupplyWaterTemperatureCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumSupplyWaterTemperatureCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setDryOutdoorCorrectionFactorCurve(const Curve& dryOutdoorCorrectionFactorCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::DryOutdoorCorrectionFactorCurveName, dryOutdoorCorrectionFactorCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetDryOutdoorCorrectionFactorCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::DryOutdoorCorrectionFactorCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setMaximumOutdoorDryBulbTemperatureForDefrostOperation( + double maximumOutdoorDryBulbTemperatureForDefrostOperation) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::MaximumOutdoorDryBulbTemperatureForDefrostOperation, + maximumOutdoorDryBulbTemperatureForDefrostOperation); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl) { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostControl, heatPumpDefrostControl); + return result; + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction) { + return setDouble(OS_HeatPump_PlantLoop_EIR_HeatingFields::HeatPumpDefrostTimePeriodFraction, heatPumpDefrostTimePeriodFraction); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setDefrostEnergyInputRatioFunctionofTemperatureCurve( + const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve) { + bool result = setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, + defrostEnergyInputRatioFunctionofTemperatureCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetDefrostEnergyInputRatioFunctionofTemperatureCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::DefrostEnergyInputRatioFunctionofTemperatureCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setTimedEmpiricalDefrostFrequencyCurve(const Curve& timedEmpiricalDefrostFrequencyCurve) { + bool result = + setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostFrequencyCurveName, timedEmpiricalDefrostFrequencyCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetTimedEmpiricalDefrostFrequencyCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostFrequencyCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setTimedEmpiricalDefrostHeatLoadPenaltyCurve(const Curve& timedEmpiricalDefrostHeatLoadPenaltyCurve) { + bool result = setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatLoadPenaltyCurveName, + timedEmpiricalDefrostHeatLoadPenaltyCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetTimedEmpiricalDefrostHeatLoadPenaltyCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatLoadPenaltyCurveName, ""); + OS_ASSERT(result); + } + + bool HeatPumpPlantLoopEIRHeating_Impl::setTimedEmpiricalDefrostHeatInputEnergyFractionCurve( + const Curve& timedEmpiricalDefrostHeatInputEnergyFractionCurve) { + bool result = setPointer(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatInputEnergyFractionCurveName, + timedEmpiricalDefrostHeatInputEnergyFractionCurve.handle()); + return result; + } + + void HeatPumpPlantLoopEIRHeating_Impl::resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve() { + bool result = setString(OS_HeatPump_PlantLoop_EIR_HeatingFields::TimedEmpiricalDefrostHeatInputEnergyFractionCurveName, ""); + OS_ASSERT(result); + } + boost::optional HeatPumpPlantLoopEIRHeating_Impl::autosizedLoadSideReferenceFlowRate() const { return getAutosizedValue("Design Size Load Side Volume Flow Rate", "m3/s"); } @@ -391,6 +607,16 @@ namespace model { setReferenceCoefficientofPerformance(7.5); // IDD default setSizingFactor(1.0); + setHeatingToCoolingCapacitySizingRatio(1.0); + setHeatPumpSizingMethod("CoolingCapacity"); + setControlType("Load"); + setFlowMode("ConstantFlow"); + setMinimumPartLoadRatio(0.0); + setMinimumSourceInletTemperature(-100.0); + setMaximumSourceInletTemperature(100.0); + setMaximumOutdoorDryBulbTemperatureForDefrostOperation(10.0); + setHeatPumpDefrostControl("None"); + setHeatPumpDefrostTimePeriodFraction(0.058333); } HeatPumpPlantLoopEIRHeating::HeatPumpPlantLoopEIRHeating(const Model& model) @@ -451,6 +677,16 @@ namespace model { setReferenceCoefficientofPerformance(7.5); setSizingFactor(1.0); + setHeatingToCoolingCapacitySizingRatio(1.0); + setHeatPumpSizingMethod("CoolingCapacity"); + setControlType("Load"); + setFlowMode("ConstantFlow"); + setMinimumPartLoadRatio(0.0); + setMinimumSourceInletTemperature(-100.0); + setMaximumSourceInletTemperature(100.0); + setMaximumOutdoorDryBulbTemperatureForDefrostOperation(10.0); + setHeatPumpDefrostControl("None"); + setHeatPumpDefrostTimePeriodFraction(0.058333); } IddObjectType HeatPumpPlantLoopEIRHeating::iddObjectType() { @@ -517,6 +753,74 @@ namespace model { return getImpl()->electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(); } + double HeatPumpPlantLoopEIRHeating::heatingToCoolingCapacitySizingRatio() const { + return getImpl()->heatingToCoolingCapacitySizingRatio(); + } + + std::string HeatPumpPlantLoopEIRHeating::heatPumpSizingMethod() const { + return getImpl()->heatPumpSizingMethod(); + } + + std::string HeatPumpPlantLoopEIRHeating::controlType() const { + return getImpl()->controlType(); + } + + std::string HeatPumpPlantLoopEIRHeating::flowMode() const { + return getImpl()->flowMode(); + } + + double HeatPumpPlantLoopEIRHeating::minimumPartLoadRatio() const { + return getImpl()->minimumPartLoadRatio(); + } + + double HeatPumpPlantLoopEIRHeating::minimumSourceInletTemperature() const { + return getImpl()->minimumSourceInletTemperature(); + } + + double HeatPumpPlantLoopEIRHeating::maximumSourceInletTemperature() const { + return getImpl()->maximumSourceInletTemperature(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::minimumSupplyWaterTemperatureCurve() const { + return getImpl()->minimumSupplyWaterTemperatureCurve(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::maximumSupplyWaterTemperatureCurve() const { + return getImpl()->maximumSupplyWaterTemperatureCurve(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::dryOutdoorCorrectionFactorCurve() const { + return getImpl()->dryOutdoorCorrectionFactorCurve(); + } + + double HeatPumpPlantLoopEIRHeating::maximumOutdoorDryBulbTemperatureForDefrostOperation() const { + return getImpl()->maximumOutdoorDryBulbTemperatureForDefrostOperation(); + } + + std::string HeatPumpPlantLoopEIRHeating::heatPumpDefrostControl() const { + return getImpl()->heatPumpDefrostControl(); + } + + double HeatPumpPlantLoopEIRHeating::heatPumpDefrostTimePeriodFraction() const { + return getImpl()->heatPumpDefrostTimePeriodFraction(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::defrostEnergyInputRatioFunctionofTemperatureCurve() const { + return getImpl()->defrostEnergyInputRatioFunctionofTemperatureCurve(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::timedEmpiricalDefrostFrequencyCurve() const { + return getImpl()->timedEmpiricalDefrostFrequencyCurve(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::timedEmpiricalDefrostHeatLoadPenaltyCurve() const { + return getImpl()->timedEmpiricalDefrostHeatLoadPenaltyCurve(); + } + + boost::optional HeatPumpPlantLoopEIRHeating::timedEmpiricalDefrostHeatInputEnergyFractionCurve() const { + return getImpl()->timedEmpiricalDefrostHeatInputEnergyFractionCurve(); + } + bool HeatPumpPlantLoopEIRHeating::setCondenserType(const std::string& condenserType) { return getImpl()->setCondenserType(condenserType); } @@ -574,6 +878,109 @@ namespace model { electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); } + bool HeatPumpPlantLoopEIRHeating::setHeatingToCoolingCapacitySizingRatio(double heatingToCoolingCapacitySizingRatio) { + return getImpl()->setHeatingToCoolingCapacitySizingRatio(heatingToCoolingCapacitySizingRatio); + } + + bool HeatPumpPlantLoopEIRHeating::setHeatPumpSizingMethod(const std::string& heatPumpSizingMethod) { + return getImpl()->setHeatPumpSizingMethod(heatPumpSizingMethod); + } + + bool HeatPumpPlantLoopEIRHeating::setControlType(const std::string& controlType) { + return getImpl()->setControlType(controlType); + } + + bool HeatPumpPlantLoopEIRHeating::setFlowMode(const std::string& flowMode) { + return getImpl()->setFlowMode(flowMode); + } + + bool HeatPumpPlantLoopEIRHeating::setMinimumPartLoadRatio(double minimumPartLoadRatio) { + return getImpl()->setMinimumPartLoadRatio(minimumPartLoadRatio); + } + + bool HeatPumpPlantLoopEIRHeating::setMinimumSourceInletTemperature(double minimumSourceInletTemperature) { + return getImpl()->setMinimumSourceInletTemperature(minimumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRHeating::setMaximumSourceInletTemperature(double maximumSourceInletTemperature) { + return getImpl()->setMaximumSourceInletTemperature(maximumSourceInletTemperature); + } + + bool HeatPumpPlantLoopEIRHeating::setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve) { + return getImpl()->setMinimumSupplyWaterTemperatureCurve(minimumSupplyWaterTemperatureCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetMinimumSupplyWaterTemperatureCurve() { + getImpl()->resetMinimumSupplyWaterTemperatureCurve(); + } + + bool HeatPumpPlantLoopEIRHeating::setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve) { + return getImpl()->setMaximumSupplyWaterTemperatureCurve(maximumSupplyWaterTemperatureCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetMaximumSupplyWaterTemperatureCurve() { + getImpl()->resetMaximumSupplyWaterTemperatureCurve(); + } + + bool HeatPumpPlantLoopEIRHeating::setDryOutdoorCorrectionFactorCurve(const Curve& dryOutdoorCorrectionFactorCurve) { + return getImpl()->setDryOutdoorCorrectionFactorCurve(dryOutdoorCorrectionFactorCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetDryOutdoorCorrectionFactorCurve() { + getImpl()->resetDryOutdoorCorrectionFactorCurve(); + } + + bool + HeatPumpPlantLoopEIRHeating::setMaximumOutdoorDryBulbTemperatureForDefrostOperation(double maximumOutdoorDryBulbTemperatureForDefrostOperation) { + return getImpl()->setMaximumOutdoorDryBulbTemperatureForDefrostOperation( + maximumOutdoorDryBulbTemperatureForDefrostOperation); + } + + bool HeatPumpPlantLoopEIRHeating::setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl) { + return getImpl()->setHeatPumpDefrostControl(heatPumpDefrostControl); + } + + bool HeatPumpPlantLoopEIRHeating::setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction) { + return getImpl()->setHeatPumpDefrostTimePeriodFraction(heatPumpDefrostTimePeriodFraction); + } + + bool HeatPumpPlantLoopEIRHeating::setDefrostEnergyInputRatioFunctionofTemperatureCurve( + const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve) { + return getImpl()->setDefrostEnergyInputRatioFunctionofTemperatureCurve( + defrostEnergyInputRatioFunctionofTemperatureCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetDefrostEnergyInputRatioFunctionofTemperatureCurve() { + getImpl()->resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); + } + + bool HeatPumpPlantLoopEIRHeating::setTimedEmpiricalDefrostFrequencyCurve(const Curve& timedEmpiricalDefrostFrequencyCurve) { + return getImpl()->setTimedEmpiricalDefrostFrequencyCurve(timedEmpiricalDefrostFrequencyCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetTimedEmpiricalDefrostFrequencyCurve() { + getImpl()->resetTimedEmpiricalDefrostFrequencyCurve(); + } + + bool HeatPumpPlantLoopEIRHeating::setTimedEmpiricalDefrostHeatLoadPenaltyCurve(const Curve& timedEmpiricalDefrostHeatLoadPenaltyCurve) { + return getImpl()->setTimedEmpiricalDefrostHeatLoadPenaltyCurve( + timedEmpiricalDefrostHeatLoadPenaltyCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetTimedEmpiricalDefrostHeatLoadPenaltyCurve() { + getImpl()->resetTimedEmpiricalDefrostHeatLoadPenaltyCurve(); + } + + bool HeatPumpPlantLoopEIRHeating::setTimedEmpiricalDefrostHeatInputEnergyFractionCurve( + const Curve& timedEmpiricalDefrostHeatInputEnergyFractionCurve) { + return getImpl()->setTimedEmpiricalDefrostHeatInputEnergyFractionCurve( + timedEmpiricalDefrostHeatInputEnergyFractionCurve); + } + + void HeatPumpPlantLoopEIRHeating::resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve() { + getImpl()->resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve(); + } + boost::optional HeatPumpPlantLoopEIRHeating::autosizedLoadSideReferenceFlowRate() const { return getImpl()->autosizedLoadSideReferenceFlowRate(); } diff --git a/src/model/HeatPumpPlantLoopEIRHeating.hpp b/src/model/HeatPumpPlantLoopEIRHeating.hpp index 3ebbac9eec0..e5201985541 100644 --- a/src/model/HeatPumpPlantLoopEIRHeating.hpp +++ b/src/model/HeatPumpPlantLoopEIRHeating.hpp @@ -79,6 +79,40 @@ namespace model { Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const; + double heatingToCoolingCapacitySizingRatio() const; + + std::string heatPumpSizingMethod() const; + + std::string controlType() const; + + std::string flowMode() const; + + double minimumPartLoadRatio() const; + + double minimumSourceInletTemperature() const; + + double maximumSourceInletTemperature() const; + + boost::optional minimumSupplyWaterTemperatureCurve() const; + + boost::optional maximumSupplyWaterTemperatureCurve() const; + + boost::optional dryOutdoorCorrectionFactorCurve() const; + + double maximumOutdoorDryBulbTemperatureForDefrostOperation() const; + + std::string heatPumpDefrostControl() const; + + double heatPumpDefrostTimePeriodFraction() const; + + boost::optional defrostEnergyInputRatioFunctionofTemperatureCurve() const; + + boost::optional timedEmpiricalDefrostFrequencyCurve() const; + + boost::optional timedEmpiricalDefrostHeatLoadPenaltyCurve() const; + + boost::optional timedEmpiricalDefrostHeatInputEnergyFractionCurve() const; + //@} /** @name Setters */ //@{ @@ -110,6 +144,54 @@ namespace model { bool setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + bool setHeatingToCoolingCapacitySizingRatio(double heatingToCoolingCapacitySizingRatio); + + bool setHeatPumpSizingMethod(const std::string& heatPumpSizingMethod); + + bool setControlType(const std::string& controlType); + + bool setFlowMode(const std::string& flowMode); + + bool setMinimumPartLoadRatio(double minimumPartLoadRatio); + + bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature); + + bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature); + + bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve); + + void resetMinimumSupplyWaterTemperatureCurve(); + + bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve); + + void resetMaximumSupplyWaterTemperatureCurve(); + + bool setDryOutdoorCorrectionFactorCurve(const Curve& dryOutdoorCorrectionFactorCurve); + + void resetDryOutdoorCorrectionFactorCurve(); + + bool setMaximumOutdoorDryBulbTemperatureForDefrostOperation(double maximumOutdoorDryBulbTemperatureForDefrostOperation); + + bool setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl); + + bool setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction); + + bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve); + + void resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); + + bool setTimedEmpiricalDefrostFrequencyCurve(const Curve& timedEmpiricalDefrostFrequencyCurve); + + void resetTimedEmpiricalDefrostFrequencyCurve(); + + bool setTimedEmpiricalDefrostHeatLoadPenaltyCurve(const Curve& timedEmpiricalDefrostHeatLoadPenaltyCurve); + + void resetTimedEmpiricalDefrostHeatLoadPenaltyCurve(); + + bool setTimedEmpiricalDefrostHeatInputEnergyFractionCurve(const Curve& timedEmpiricalDefrostHeatInputEnergyFractionCurve); + + void resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve(); + //@} /** @name Other */ //@{ diff --git a/src/model/HeatPumpPlantLoopEIRHeating_Impl.hpp b/src/model/HeatPumpPlantLoopEIRHeating_Impl.hpp index 4d3e84f12ee..1f87fe9c55c 100644 --- a/src/model/HeatPumpPlantLoopEIRHeating_Impl.hpp +++ b/src/model/HeatPumpPlantLoopEIRHeating_Impl.hpp @@ -96,6 +96,40 @@ namespace model { Curve electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve() const; + double heatingToCoolingCapacitySizingRatio() const; + + std::string heatPumpSizingMethod() const; + + std::string controlType() const; + + std::string flowMode() const; + + double minimumPartLoadRatio() const; + + double minimumSourceInletTemperature() const; + + double maximumSourceInletTemperature() const; + + boost::optional minimumSupplyWaterTemperatureCurve() const; + + boost::optional maximumSupplyWaterTemperatureCurve() const; + + boost::optional dryOutdoorCorrectionFactorCurve() const; + + double maximumOutdoorDryBulbTemperatureForDefrostOperation() const; + + std::string heatPumpDefrostControl() const; + + double heatPumpDefrostTimePeriodFraction() const; + + boost::optional defrostEnergyInputRatioFunctionofTemperatureCurve() const; + + boost::optional timedEmpiricalDefrostFrequencyCurve() const; + + boost::optional timedEmpiricalDefrostHeatLoadPenaltyCurve() const; + + boost::optional timedEmpiricalDefrostHeatInputEnergyFractionCurve() const; + //@} /** @name Setters */ //@{ @@ -127,6 +161,54 @@ namespace model { bool setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve( const Curve& electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + bool setHeatingToCoolingCapacitySizingRatio(double heatingToCoolingCapacitySizingRatio); + + bool setHeatPumpSizingMethod(const std::string& heatPumpSizingMethod); + + bool setControlType(const std::string& controlType); + + bool setFlowMode(const std::string& flowMode); + + bool setMinimumPartLoadRatio(double minimumPartLoadRatio); + + bool setMinimumSourceInletTemperature(double minimumSourceInletTemperature); + + bool setMaximumSourceInletTemperature(double maximumSourceInletTemperature); + + bool setMinimumSupplyWaterTemperatureCurve(const Curve& minimumSupplyWaterTemperatureCurve); + + void resetMinimumSupplyWaterTemperatureCurve(); + + bool setMaximumSupplyWaterTemperatureCurve(const Curve& maximumSupplyWaterTemperatureCurve); + + void resetMaximumSupplyWaterTemperatureCurve(); + + bool setDryOutdoorCorrectionFactorCurve(const Curve& dryOutdoorCorrectionFactorCurve); + + void resetDryOutdoorCorrectionFactorCurve(); + + bool setMaximumOutdoorDryBulbTemperatureForDefrostOperation(double maximumOutdoorDryBulbTemperatureForDefrostOperation); + + bool setHeatPumpDefrostControl(const std::string& heatPumpDefrostControl); + + bool setHeatPumpDefrostTimePeriodFraction(double heatPumpDefrostTimePeriodFraction); + + bool setDefrostEnergyInputRatioFunctionofTemperatureCurve(const Curve& defrostEnergyInputRatioFunctionofTemperatureCurve); + + void resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); + + bool setTimedEmpiricalDefrostFrequencyCurve(const Curve& timedEmpiricalDefrostFrequencyCurve); + + void resetTimedEmpiricalDefrostFrequencyCurve(); + + bool setTimedEmpiricalDefrostHeatLoadPenaltyCurve(const Curve& timedEmpiricalDefrostHeatLoadPenaltyCurve); + + void resetTimedEmpiricalDefrostHeatLoadPenaltyCurve(); + + bool setTimedEmpiricalDefrostHeatInputEnergyFractionCurve(const Curve& timedEmpiricalDefrostHeatInputEnergyFractionCurve); + + void resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve(); + //@} /** @name Other */ //@{ diff --git a/src/model/test/HeatPumpPlantLoopEIRCooling_GTest.cpp b/src/model/test/HeatPumpPlantLoopEIRCooling_GTest.cpp index e128aea37f4..06351f11417 100644 --- a/src/model/test/HeatPumpPlantLoopEIRCooling_GTest.cpp +++ b/src/model/test/HeatPumpPlantLoopEIRCooling_GTest.cpp @@ -59,6 +59,13 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_HeatPumpPlantLoopEIRCooling) { boost::optional electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve = hp.electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(); EXPECT_TRUE(electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + EXPECT_EQ("Load", hp.controlType()); + EXPECT_EQ("ConstantFlow", hp.flowMode()); + EXPECT_EQ(0.0, hp.minimumPartLoadRatio()); + EXPECT_EQ(-100.0, hp.minimumSourceInletTemperature()); + EXPECT_EQ(100.0, hp.maximumSourceInletTemperature()); + EXPECT_FALSE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.maximumSupplyWaterTemperatureCurve()); } TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_GettersSetters) { @@ -79,6 +86,15 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_GettersSetters) { EXPECT_TRUE(hp.setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(curve2)); CurveQuadratic curve3(m); EXPECT_TRUE(hp.setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(curve3)); + EXPECT_TRUE(hp.setControlType("Setpoint")); + EXPECT_TRUE(hp.setFlowMode("VariableSpeedPumping")); + EXPECT_TRUE(hp.setMinimumPartLoadRatio(1)); + EXPECT_TRUE(hp.setMinimumSourceInletTemperature(2)); + EXPECT_TRUE(hp.setMaximumSourceInletTemperature(3)); + CurveQuadratic curve4(m); + EXPECT_TRUE(hp.setMinimumSupplyWaterTemperatureCurve(curve4)); + CurveQuadratic curve5(m); + EXPECT_TRUE(hp.setMaximumSupplyWaterTemperatureCurve(curve5)); EXPECT_EQ("AirSource", hp.condenserType()); ASSERT_TRUE(hp.companionHeatingHeatPump()); @@ -97,6 +113,15 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_GettersSetters) { EXPECT_EQ(curve1.handle(), hp.capacityModifierFunctionofTemperatureCurve().handle()); EXPECT_EQ(curve2.handle(), hp.electricInputtoOutputRatioModifierFunctionofTemperatureCurve().handle()); EXPECT_EQ(curve3.handle(), hp.electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve().handle()); + EXPECT_EQ("Setpoint", hp.controlType()); + EXPECT_EQ("VariableSpeedPumping", hp.flowMode()); + EXPECT_EQ(1, hp.minimumPartLoadRatio()); + EXPECT_EQ(2, hp.minimumSourceInletTemperature()); + EXPECT_EQ(3, hp.maximumSourceInletTemperature()); + ASSERT_TRUE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_EQ(curve4.handle(), hp.minimumSupplyWaterTemperatureCurve().get().handle()); + ASSERT_TRUE(hp.maximumSupplyWaterTemperatureCurve()); + EXPECT_EQ(curve5.handle(), hp.maximumSupplyWaterTemperatureCurve().get().handle()); hp.autosizeLoadSideReferenceFlowRate(); EXPECT_TRUE(hp.isLoadSideReferenceFlowRateAutosized()); @@ -112,6 +137,11 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_GettersSetters) { EXPECT_TRUE(hp.isLoadSideReferenceFlowRateAutosized()); EXPECT_TRUE(hp.isSourceSideReferenceFlowRateAutosized()); EXPECT_TRUE(hp.isReferenceCapacityAutosized()); + + hp.resetMinimumSupplyWaterTemperatureCurve(); + hp.resetMaximumSupplyWaterTemperatureCurve(); + EXPECT_FALSE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.maximumSupplyWaterTemperatureCurve()); } TEST_F(ModelFixture, HeatPumpPlantLoopEIRCooling_remove) { diff --git a/src/model/test/HeatPumpPlantLoopEIRHeating_GTest.cpp b/src/model/test/HeatPumpPlantLoopEIRHeating_GTest.cpp index 268267120df..8853d63e32e 100644 --- a/src/model/test/HeatPumpPlantLoopEIRHeating_GTest.cpp +++ b/src/model/test/HeatPumpPlantLoopEIRHeating_GTest.cpp @@ -59,6 +59,23 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_HeatPumpPlantLoopEIRHeating) { boost::optional electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve = hp.electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(); EXPECT_TRUE(electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve); + EXPECT_EQ(1.0, hp.heatingToCoolingCapacitySizingRatio()); + EXPECT_EQ("CoolingCapacity", hp.heatPumpSizingMethod()); + EXPECT_EQ("Load", hp.controlType()); + EXPECT_EQ("ConstantFlow", hp.flowMode()); + EXPECT_EQ(0.0, hp.minimumPartLoadRatio()); + EXPECT_EQ(-100.0, hp.minimumSourceInletTemperature()); + EXPECT_EQ(100.0, hp.maximumSourceInletTemperature()); + EXPECT_FALSE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.maximumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.dryOutdoorCorrectionFactorCurve()); + EXPECT_EQ(10.0, hp.maximumOutdoorDryBulbTemperatureForDefrostOperation()); + EXPECT_EQ("None", hp.heatPumpDefrostControl()); + EXPECT_EQ(0.058333, hp.heatPumpDefrostTimePeriodFraction()); + EXPECT_FALSE(hp.defrostEnergyInputRatioFunctionofTemperatureCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostFrequencyCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostHeatLoadPenaltyCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostHeatInputEnergyFractionCurve()); } TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_GettersSetters) { @@ -79,6 +96,30 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_GettersSetters) { EXPECT_TRUE(hp.setElectricInputtoOutputRatioModifierFunctionofTemperatureCurve(curve2)); CurveQuadratic curve3(m); EXPECT_TRUE(hp.setElectricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve(curve3)); + EXPECT_TRUE(hp.setHeatingToCoolingCapacitySizingRatio(1)); + EXPECT_TRUE(hp.setHeatPumpSizingMethod("HeatingCapacity")); + EXPECT_TRUE(hp.setControlType("Setpoint")); + EXPECT_TRUE(hp.setFlowMode("VariableSpeedPumping")); + EXPECT_TRUE(hp.setMinimumPartLoadRatio(2)); + EXPECT_TRUE(hp.setMinimumSourceInletTemperature(3)); + EXPECT_TRUE(hp.setMaximumSourceInletTemperature(4)); + CurveQuadratic curve4(m); + EXPECT_TRUE(hp.setMinimumSupplyWaterTemperatureCurve(curve4)); + CurveQuadratic curve5(m); + EXPECT_TRUE(hp.setMaximumSupplyWaterTemperatureCurve(curve5)); + CurveQuadratic curve6(m); + EXPECT_TRUE(hp.setDryOutdoorCorrectionFactorCurve(curve6)); + EXPECT_TRUE(hp.setMaximumOutdoorDryBulbTemperatureForDefrostOperation(5)); + EXPECT_TRUE(hp.setHeatPumpDefrostControl("Timed")); + EXPECT_TRUE(hp.setHeatPumpDefrostTimePeriodFraction(6)); + CurveBiquadratic curve7(m); + EXPECT_TRUE(hp.setDefrostEnergyInputRatioFunctionofTemperatureCurve(curve7)); + CurveQuadratic curve8(m); + EXPECT_TRUE(hp.setTimedEmpiricalDefrostFrequencyCurve(curve8)); + CurveQuadratic curve9(m); + EXPECT_TRUE(hp.setTimedEmpiricalDefrostHeatLoadPenaltyCurve(curve9)); + CurveQuadratic curve10(m); + EXPECT_TRUE(hp.setTimedEmpiricalDefrostHeatInputEnergyFractionCurve(curve10)); EXPECT_EQ("AirSource", hp.condenserType()); ASSERT_TRUE(hp.companionCoolingHeatPump()); @@ -98,6 +139,31 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_GettersSetters) { EXPECT_EQ(curve2.handle(), hp.electricInputtoOutputRatioModifierFunctionofTemperatureCurve().handle()); EXPECT_EQ(curve3.handle(), hp.electricInputtoOutputRatioModifierFunctionofPartLoadRatioCurve().handle()); + EXPECT_EQ(1, hp.heatingToCoolingCapacitySizingRatio()); + EXPECT_EQ("HeatingCapacity", hp.heatPumpSizingMethod()); + EXPECT_EQ("Setpoint", hp.controlType()); + EXPECT_EQ("VariableSpeedPumping", hp.flowMode()); + EXPECT_EQ(2, hp.minimumPartLoadRatio()); + EXPECT_EQ(3, hp.minimumSourceInletTemperature()); + EXPECT_EQ(4, hp.maximumSourceInletTemperature()); + ASSERT_TRUE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_EQ(curve4.handle(), hp.minimumSupplyWaterTemperatureCurve().get().handle()); + ASSERT_TRUE(hp.maximumSupplyWaterTemperatureCurve()); + EXPECT_EQ(curve5.handle(), hp.maximumSupplyWaterTemperatureCurve().get().handle()); + ASSERT_TRUE(hp.dryOutdoorCorrectionFactorCurve()); + EXPECT_EQ(curve6.handle(), hp.dryOutdoorCorrectionFactorCurve().get().handle()); + EXPECT_EQ(5, hp.maximumOutdoorDryBulbTemperatureForDefrostOperation()); + EXPECT_EQ("Timed", hp.heatPumpDefrostControl()); + EXPECT_EQ(6, hp.heatPumpDefrostTimePeriodFraction()); + ASSERT_TRUE(hp.defrostEnergyInputRatioFunctionofTemperatureCurve()); + EXPECT_EQ(curve7.handle(), hp.defrostEnergyInputRatioFunctionofTemperatureCurve().get().handle()); + ASSERT_TRUE(hp.timedEmpiricalDefrostFrequencyCurve()); + EXPECT_EQ(curve8.handle(), hp.timedEmpiricalDefrostFrequencyCurve().get().handle()); + ASSERT_TRUE(hp.timedEmpiricalDefrostHeatLoadPenaltyCurve()); + EXPECT_EQ(curve9.handle(), hp.timedEmpiricalDefrostHeatLoadPenaltyCurve().get().handle()); + ASSERT_TRUE(hp.timedEmpiricalDefrostHeatInputEnergyFractionCurve()); + EXPECT_EQ(curve10.handle(), hp.timedEmpiricalDefrostHeatInputEnergyFractionCurve().get().handle()); + hp.autosizeLoadSideReferenceFlowRate(); EXPECT_TRUE(hp.isLoadSideReferenceFlowRateAutosized()); EXPECT_FALSE(hp.isSourceSideReferenceFlowRateAutosized()); @@ -112,6 +178,21 @@ TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_GettersSetters) { EXPECT_TRUE(hp.isLoadSideReferenceFlowRateAutosized()); EXPECT_TRUE(hp.isSourceSideReferenceFlowRateAutosized()); EXPECT_TRUE(hp.isReferenceCapacityAutosized()); + + hp.resetMinimumSupplyWaterTemperatureCurve(); + hp.resetMaximumSupplyWaterTemperatureCurve(); + hp.resetDryOutdoorCorrectionFactorCurve(); + hp.resetDefrostEnergyInputRatioFunctionofTemperatureCurve(); + hp.resetTimedEmpiricalDefrostFrequencyCurve(); + hp.resetTimedEmpiricalDefrostHeatLoadPenaltyCurve(); + hp.resetTimedEmpiricalDefrostHeatInputEnergyFractionCurve(); + EXPECT_FALSE(hp.minimumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.maximumSupplyWaterTemperatureCurve()); + EXPECT_FALSE(hp.dryOutdoorCorrectionFactorCurve()); + EXPECT_FALSE(hp.defrostEnergyInputRatioFunctionofTemperatureCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostFrequencyCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostHeatLoadPenaltyCurve()); + EXPECT_FALSE(hp.timedEmpiricalDefrostHeatInputEnergyFractionCurve()); } TEST_F(ModelFixture, HeatPumpPlantLoopEIRHeating_remove) {