diff --git a/developer/doc/ReleaseNotes/OpenStudio_Release_Notes_3_8_0_TBD.md b/developer/doc/ReleaseNotes/OpenStudio_Release_Notes_3_8_0_TBD.md index ed286101a6c..a232fe46b1f 100644 --- a/developer/doc/ReleaseNotes/OpenStudio_Release_Notes_3_8_0_TBD.md +++ b/developer/doc/ReleaseNotes/OpenStudio_Release_Notes_3_8_0_TBD.md @@ -61,7 +61,7 @@ The 3.8.0 is a **major** release. This update includes several new features, per ## C++ Workflow code -As of OpenStudio SDK 3.7.0 a re-written workflow written in C++ is used by default in place of the Ruby based Workflow Gem that had been used in the past. This enhancement is in support of Python measures being used in an OpenStudio workflow, including mixed language workflows that include both Ruby Measures and Python Measures. If you need to use the older Workflow Gem implementation, you can do that by using the `classic` subcommand after `openstudio`. `classic` will be deprecated in a future version of OpenStudio. +As of OpenStudio SDK 3.7.0 a re-written workflow written in C++ is used by default in place of the Ruby based Workflow Gem that had been used in the past. This enhancement is in support of Python measures being used in an OpenStudio workflow, including mixed language workflows that include both Ruby Measures and Python Measures. If you need to use the older Workflow Gem implementation, you can do that by using the `classic` subcommand after `openstudio`. `classic` will be deprecated in a future version of OpenStudio. ## Python Bindings @@ -75,13 +75,21 @@ You can also refer to the [OpenStudio SDK Python Binding Version Compatibility M ## New Features, Major Fixes and API-breaking changes -* -* -* +For a list of deprecated and removed methods, please refer to [deprecated_methods.csv](../../ruby/deprecated_methods.csv) + +* [#TDB]() - Update to EnergyPlus 24.1.0 + +* [#5099](https://github.com/NREL/OpenStudio/pull/5099) - HeatExchangerAirToAirSensibleAndLatent changes for effectiveness + * To conform to E+ 24.1.0, where "Sensible/Latent Effectiveness at 75% Heating/Cooling" numeric fields have been replaced with a curve, the numeric getters / setters are now deprecated in favor of the new curves getters / setters: `sensibleEffectivenessofHeatingAirFlowCurve`, `latentEffectivenessofHeatingAirFlowCurve`, `sensibleEffectivenessofCoolingAirFlowCurve`, `latentEffectivenessofCoolingAirFlowCurve` + * The constructor will no longer assign an effectiveness at 75% and assume a constant effectiveness. A helper method `bool assignHistoricalEffectivenessCurves()` is provided to create and assign 4 `TableLookup`s that will match the pre E+ 24.1.0 defaults for Sensible/Latent Effectiveness at 75% Heating/Cooling airflow +* [#5105](https://github.com/NREL/OpenStudio/pull/5105) - ElectricEquipmentITEAirCooled / ElectricEquipmentITEAirCooledDefinition - align objects with other SpaceLoads + * A number of methods have been renamed (and the old ones deprecated) to conform to the API for other `SpaceLoadInstance` / `SpaceLoadDefinition` objects + * Mostly `getWattsperUnit` is changed to `getDesignLevel` and `getWattsperZoneFloorArea` is changed to `getPowerPerFloorArea` + * Refer to [deprecated_methods.csv](../../ruby/deprecated_methods.csv) for the complete list ## Minor changes and bug fixes -* +* * * diff --git a/developer/ruby/DeprecatedMethods.rb b/developer/ruby/DeprecatedMethods.rb index 2fa9c7532c1..3a3c2d77471 100644 --- a/developer/ruby/DeprecatedMethods.rb +++ b/developer/ruby/DeprecatedMethods.rb @@ -92,7 +92,7 @@ def update_removed_deprecated(known_deprecated, old_deprecated, os_version_str) # Save to CSV (and make a copy of old CSV) def output_to_csv(new_table) # Create a copy of the old CSV - FileUtils.cp('deprecated_methods.csv', 'deprecated_methods.csv.bak') + FileUtils.cp(DEPRECATED_CSV_PATH, "#{DEPRECATED_CSV_PATH}.bak") CSV.open(DEPRECATED_CSV_PATH, "wb") do |csv| csv << new_table.first.keys # adds the header diff --git a/developer/ruby/deprecated_methods.csv b/developer/ruby/deprecated_methods.csv index d5f94829050..3e89706c25a 100644 --- a/developer/ruby/deprecated_methods.csv +++ b/developer/ruby/deprecated_methods.csv @@ -286,3 +286,44 @@ model,AirLoopHVACUnitarySystem,resetSupplyAirFlowRateDuringHeatingOperation,3.7. model,AirLoopHVACUnitarySystem,resetSupplyAirFlowRatePerFloorAreaduringHeatingOperation,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateDuringHeatingOperation, autosizeSupplyAirFlowRateDuringHeatingOperation, setSupplyAirFlowRatePerFloorAreaDuringHeatingOperation, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation", model,AirLoopHVACUnitarySystem,resetFractionofAutosizedDesignHeatingSupplyAirFlowRate,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateDuringHeatingOperation, autosizeSupplyAirFlowRateDuringHeatingOperation, setSupplyAirFlowRatePerFloorAreaDuringHeatingOperation, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation", model,AirLoopHVACUnitarySystem,resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateDuringHeatingOperation, autosizeSupplyAirFlowRateDuringHeatingOperation, setSupplyAirFlowRatePerFloorAreaDuringHeatingOperation, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperation", +model,AirLoopHVACUnitarySystem,setSupplyAirFlowRateMethodWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetSupplyAirFlowRateWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetFractionofAutosizedDesignCoolingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetFractionofAutosizedDesignHeatingSupplyAirFlowRateWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetDesignSupplyAirFlowRatePerUnitofCapacityDuringCoolingOperationWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,AirLoopHVACUnitarySystem,resetDesignSupplyAirFlowRatePerUnitofCapacityDuringHeatingOperationWhenNoCoolingorHeatingisRequired,3.7.0,84bd57c5117cba9fc0716f2329d70ba5708c080a,"Done when calling setSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisRequired, setSupplyAirFlowRatePerFloorAreaWhenNoCoolingorHeatingisRequired, setFractionofAutosizedDesignHeatingSupplyAirFlowRate, setDesignSupplyAirFlowRatePerUnitofCapacityWhenNoCoolingorHeatingisRequired", +model,CoilHeatingGasMultiStage,parasiticGasLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,offCycleParasiticGasLoad, +model,CoilHeatingGasMultiStage,setParasiticGasLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,setOffCycleParasiticGasLoad, +model,CoilHeatingGasMultiStage,resetParasiticGasLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,resetOffCycleParasiticGasLoad, +model,CoilHeatingGas,parasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,onCycleParasiticElectricLoad, +model,CoilHeatingGas,setParasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,setOnCycleParasiticElectricLoad, +model,CoilHeatingGas,parasiticGasLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,offCycleParasiticGasLoad, +model,CoilHeatingGas,setParasiticGasLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,setOffCycleParasiticGasLoad, +model,CoilHeatingDesuperheater,parasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,onCycleParasiticElectricLoad, +model,CoilHeatingDesuperheater,isParasiticElectricLoadDefaulted,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,isOnCycleParasiticElectricLoadDefaulted, +model,CoilHeatingDesuperheater,setParasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,setOnCycleParasiticElectricLoad, +model,CoilHeatingDesuperheater,resetParasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,resetOnCycleParasiticElectricLoad, +model,CoilHeatingGasMultiStageStageData,parasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,onCycleParasiticElectricLoad, +model,CoilHeatingGasMultiStageStageData,setParasiticElectricLoad,3.7.0,c3a9fb2e5e805dce4ef8791b59ca1a48ef4915a6,setOnCycleParasiticElectricLoad, +model,BoilerHotWater,parasiticElectricLoad,3.7.0,9b40ed0036baa1eab5e2a4ae2fe11a10373d96b5,onCycleParasiticElectricLoad, +model,BoilerHotWater,setParasiticElectricLoad,3.7.0,9b40ed0036baa1eab5e2a4ae2fe11a10373d96b5,setOnCycleParasiticElectricLoad, +model,BoilerHotWater,resetParasiticElectricLoad,3.7.0,9b40ed0036baa1eab5e2a4ae2fe11a10373d96b5,resetOnCycleParasiticElectricLoad, +model,HeatExchangerAirToAirSensibleAndLatent,sensibleEffectivenessat75HeatingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,sensibleEffectivenessofHeatingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,setSensibleEffectivenessat75HeatingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,sensibleEffectivenessofHeatingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,latentEffectivenessat75HeatingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,latentEffectivenessofHeatingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,setLatentEffectivenessat75HeatingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,latentEffectivenessofHeatingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,sensibleEffectivenessat75CoolingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,sensibleEffectivenessofCoolingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,setSensibleEffectivenessat75CoolingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,sensibleEffectivenessofCoolingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,latentEffectivenessat75CoolingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,latentEffectivenessofCoolingAirFlowCurve, +model,HeatExchangerAirToAirSensibleAndLatent,setLatentEffectivenessat75CoolingAirFlow,3.8.0,ebce271d28e5d256f0a749a5ccf674179976d538,latentEffectivenessofCoolingAirFlowCurve, +model,ElectricEquipmentITEAirCooled,wattsperUnit,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,designLevel, +model,ElectricEquipmentITEAirCooled,getWattsperUnit,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,getDesignLevel, +model,ElectricEquipmentITEAirCooled,wattsperZoneFloorArea,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,powerPerFloorArea, +model,ElectricEquipmentITEAirCooled,getWattsperZoneFloorArea,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,getPowerPerFloorArea, +model,ElectricEquipmentITEAirCooledDefinition,wattsperUnit,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,designLevel, +model,ElectricEquipmentITEAirCooledDefinition,setWattsperUnit,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,setDesignLevel, +model,ElectricEquipmentITEAirCooledDefinition,wattsperZoneFloorArea,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,wattsperSpaceFloorArea, +model,ElectricEquipmentITEAirCooledDefinition,setWattsperZoneFloorArea,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,setWattsperSpaceFloorArea, +model,ElectricEquipmentITEAirCooledDefinition,getWattsperUnit,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,getDesignLevel, +model,ElectricEquipmentITEAirCooledDefinition,getWattsperZoneFloorArea,3.8.0,6e6f5980662b43881f1db8e0f3464ae63acb4c18,getPowerPerFloorArea, diff --git a/resources/model/OpenStudio.idd b/resources/model/OpenStudio.idd index 41670d9174b..6391b4346c0 100644 --- a/resources/model/OpenStudio.idd +++ b/resources/model/OpenStudio.idd @@ -4130,7 +4130,7 @@ OS:ElectricEquipment:ITE:AirCooled:Definition, A4 , \field Design Power Input Calculation Method \note The entered calculation method is used to specify the design power input \note Watts/Unit => Watts per Unit -- Design Power = Watts per Unit * Number of Units - \note Watts/Area => Watts per Zone Floor Area -- Design Power = Watts per Zone Floor Area * Floor Area + \note Watts/Area => Watts per Space Floor Area -- Design Power = Watts per Space Floor Area * Floor Area \type choice \key Watts/Unit \key Watts/Area @@ -4140,7 +4140,7 @@ OS:ElectricEquipment:ITE:AirCooled:Definition, \units W \ip-units W \minimum 0 - N2 , \field Watts per Zone Floor Area + N2 , \field Watts per Space Floor Area \type real \units W/m2 \ip-units W/ft2 diff --git a/src/energyplus/ForwardTranslator/ForwardTranslateElectricEquipmentITEAirCooled.cpp b/src/energyplus/ForwardTranslator/ForwardTranslateElectricEquipmentITEAirCooled.cpp index 5823aa24f65..471a2b43df4 100644 --- a/src/energyplus/ForwardTranslator/ForwardTranslateElectricEquipmentITEAirCooled.cpp +++ b/src/energyplus/ForwardTranslator/ForwardTranslateElectricEquipmentITEAirCooled.cpp @@ -165,14 +165,14 @@ namespace energyplus { // this is to get rid of the warning message for leaving the Number of Units field blank. idfObject.setDouble(ElectricEquipment_ITE_AirCooledFields::NumberofUnits, 1.0); - double multiplier = modelObject.multiplier(); + const double multiplier = modelObject.multiplier(); - OptionalDouble d = definition.wattsperUnit(); + OptionalDouble d = definition.designLevel(); if (d) { idfObject.setDouble(ElectricEquipment_ITE_AirCooledFields::WattsperUnit, (*d) * multiplier); } - d = definition.wattsperZoneFloorArea(); + d = definition.wattsperSpaceFloorArea(); if (d) { idfObject.setDouble(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea, (*d) * multiplier); } diff --git a/src/energyplus/Test/ElectricEquipmentITEAirCooled_GTest.cpp b/src/energyplus/Test/ElectricEquipmentITEAirCooled_GTest.cpp index 4c3961b4607..fd253145485 100644 --- a/src/energyplus/Test/ElectricEquipmentITEAirCooled_GTest.cpp +++ b/src/energyplus/Test/ElectricEquipmentITEAirCooled_GTest.cpp @@ -215,7 +215,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_OneSpa // 20 W/m^2 SpaceType spaceType(model); ElectricEquipmentITEAirCooledDefinition definition(model); - definition.setWattsperZoneFloorArea(20.0); + definition.setWattsperSpaceFloorArea(20.0); ElectricEquipmentITEAirCooled electricEquipmentITEAirCooled(definition); electricEquipmentITEAirCooled.setSpaceType(spaceType); @@ -315,7 +315,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_TwoSpa // 20 W/m^2 ElectricEquipmentITEAirCooledDefinition definition(model); - definition.setWattsperZoneFloorArea(20.0); + definition.setWattsperSpaceFloorArea(20.0); boost::optional space1 = Space::fromFloorPrint(points, 3, model); ASSERT_TRUE(space1); @@ -629,10 +629,10 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT // | Total | 750.0 | // |================================================================================================================================| - EXPECT_TRUE(iteSpace1Definition.setWattsperZoneFloorArea(1.0)); - EXPECT_TRUE(iteSpace3Definition.setWattsperUnit(150.0)); - EXPECT_TRUE(iteOfficeDefinition.setWattsperZoneFloorArea(1.2)); - EXPECT_TRUE(iteBuildingDefinition.setWattsperUnit(130.0)); + EXPECT_TRUE(iteSpace1Definition.setWattsperSpaceFloorArea(1.0)); + EXPECT_TRUE(iteSpace3Definition.setDesignLevel(150.0)); + EXPECT_TRUE(iteOfficeDefinition.setWattsperSpaceFloorArea(1.2)); + EXPECT_TRUE(iteBuildingDefinition.setDesignLevel(130.0)); auto spaces = z.spaces(); double modelWatts = std::accumulate(spaces.cbegin(), spaces.cend(), 0.0, @@ -679,19 +679,19 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT // These two are absolute, no issue whatsoever if (name.find(iteBuilding.nameString()) != std::string::npos) { EXPECT_EQ(130.0, w); - EXPECT_EQ(iteBuildingDefinition.wattsperUnit().get(), w); + EXPECT_EQ(iteBuildingDefinition.designLevel().get(), w); } else if (name.find(iteSpace3.nameString()) != std::string::npos) { EXPECT_EQ(150.0, w); - EXPECT_EQ(iteSpace3Definition.wattsperUnit().get(), w); + EXPECT_EQ(iteSpace3Definition.designLevel().get(), w); // These two are per floor area } else if (name.find(iteOffice.nameString()) != std::string::npos) { EXPECT_EQ(120.0, w); - EXPECT_EQ(iteOfficeDefinition.wattsperZoneFloorArea().get() * spaceFloorArea, w); - EXPECT_EQ(iteOffice.getWattsperUnit(spaceFloorArea), w); + EXPECT_EQ(iteOfficeDefinition.wattsperSpaceFloorArea().get() * spaceFloorArea, w); + EXPECT_EQ(iteOffice.getDesignLevel(spaceFloorArea), w); } else if (name.find(iteSpace1.nameString()) != std::string::npos) { EXPECT_EQ(100.0, w); - EXPECT_EQ(iteSpace1Definition.wattsperZoneFloorArea().get() * spaceFloorArea, w); - EXPECT_EQ(iteSpace1.getWattsperUnit(spaceFloorArea), w); + EXPECT_EQ(iteSpace1Definition.wattsperSpaceFloorArea().get() * spaceFloorArea, w); + EXPECT_EQ(iteSpace1.getDesignLevel(spaceFloorArea), w); } } @@ -753,7 +753,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT double w = ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperUnit).get(); EXPECT_EQ(130.0, w); - EXPECT_EQ(iteBuildingDefinition.wattsperUnit().get(), w); + EXPECT_EQ(iteBuildingDefinition.designLevel().get(), w); EXPECT_TRUE(ite.isEmpty(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea)); @@ -775,7 +775,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT double w = ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperUnit).get(); EXPECT_EQ(150.0, w); - EXPECT_EQ(iteSpace3Definition.wattsperUnit().get(), w); + EXPECT_EQ(iteSpace3Definition.designLevel().get(), w); EXPECT_TRUE(ite.isEmpty(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea)); @@ -798,7 +798,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT ASSERT_TRUE(ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea, false)); double w_perArea = ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea).get(); - EXPECT_EQ(iteOffice.wattsperZoneFloorArea().get(), w_perArea); + EXPECT_EQ(iteOffice.powerPerFloorArea().get(), w_perArea); double w = w_perArea * spaceFloorArea; @@ -823,7 +823,7 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_ElectricEquipmentITEAirCooled_SpaceT ASSERT_TRUE(ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea, false)); double w_perArea = ite.getDouble(ElectricEquipment_ITE_AirCooledFields::WattsperFloorArea).get(); - EXPECT_EQ(iteSpace1.wattsperZoneFloorArea().get(), w_perArea); + EXPECT_EQ(iteSpace1.powerPerFloorArea().get(), w_perArea); double w = w_perArea * spaceFloorArea; diff --git a/src/model/ElectricEquipmentITEAirCooled.cpp b/src/model/ElectricEquipmentITEAirCooled.cpp index 22ebc330d8b..d03a4d4f640 100644 --- a/src/model/ElectricEquipmentITEAirCooled.cpp +++ b/src/model/ElectricEquipmentITEAirCooled.cpp @@ -27,6 +27,7 @@ #include "../utilities/units/Unit.hpp" #include "../utilities/core/Assert.hpp" +#include "../utilities/core/DeprecatedHelpers.hpp" namespace openstudio { namespace model { @@ -148,14 +149,14 @@ namespace model { cost.convertToCostPerEach(); } - boost::optional wattsperUnit = electricEquipmentITEAirCooledDefinition.wattsperUnit(); - if (wattsperUnit) { + boost::optional designLevel = electricEquipmentITEAirCooledDefinition.designLevel(); + if (designLevel) { return true; } - boost::optional wattsperZoneFloorArea = electricEquipmentITEAirCooledDefinition.wattsperZoneFloorArea(); - if (wattsperZoneFloorArea) { - return electricEquipmentITEAirCooledDefinition.setWattsperUnit(*wattsperZoneFloorArea * space->floorArea()); + boost::optional wattsperSpaceFloorArea = electricEquipmentITEAirCooledDefinition.wattsperSpaceFloorArea(); + if (wattsperSpaceFloorArea) { + return electricEquipmentITEAirCooledDefinition.setDesignLevel(*wattsperSpaceFloorArea * space->floorArea()); } return false; @@ -191,7 +192,7 @@ namespace model { bool ElectricEquipmentITEAirCooled_Impl::isAbsolute() const { ElectricEquipmentITEAirCooledDefinition definition = electricEquipmentITEAirCooledDefinition(); - if (definition.wattsperUnit()) { + if (definition.designLevel()) { return true; } return false; @@ -361,28 +362,28 @@ namespace model { // Other functions - boost::optional ElectricEquipmentITEAirCooled_Impl::wattsperUnit() const { - OptionalDouble result = electricEquipmentITEAirCooledDefinition().wattsperUnit(); + boost::optional ElectricEquipmentITEAirCooled_Impl::designLevel() const { + OptionalDouble result = electricEquipmentITEAirCooledDefinition().designLevel(); if (result) { return result.get() * multiplier(); } return result; } - boost::optional ElectricEquipmentITEAirCooled_Impl::wattsperZoneFloorArea() const { - OptionalDouble result = electricEquipmentITEAirCooledDefinition().wattsperZoneFloorArea(); + boost::optional ElectricEquipmentITEAirCooled_Impl::powerPerFloorArea() const { + OptionalDouble result = electricEquipmentITEAirCooledDefinition().wattsperSpaceFloorArea(); if (result) { return result.get() * multiplier(); } return result; } - double ElectricEquipmentITEAirCooled_Impl::getWattsperUnit(double floorArea) const { - return electricEquipmentITEAirCooledDefinition().getWattsperUnit(floorArea) * multiplier(); + double ElectricEquipmentITEAirCooled_Impl::getDesignLevel(double floorArea) const { + return electricEquipmentITEAirCooledDefinition().getDesignLevel(floorArea) * multiplier(); } - double ElectricEquipmentITEAirCooled_Impl::getWattsperZoneFloorArea(double floorArea) const { - return electricEquipmentITEAirCooledDefinition().getWattsperZoneFloorArea(floorArea) * multiplier(); + double ElectricEquipmentITEAirCooled_Impl::getPowerPerFloorArea(double floorArea) const { + return electricEquipmentITEAirCooledDefinition().getPowerPerFloorArea(floorArea) * multiplier(); } } // namespace detail @@ -497,20 +498,42 @@ namespace model { getImpl()->resetElectricPowerSupplyEndUseSubcategory(); } - boost::optional ElectricEquipmentITEAirCooled::wattsperUnit() const { - return getImpl()->wattsperUnit(); + boost::optional ElectricEquipmentITEAirCooled::designLevel() const { + return getImpl()->designLevel(); } - boost::optional ElectricEquipmentITEAirCooled::wattsperZoneFloorArea() const { - return getImpl()->wattsperZoneFloorArea(); + boost::optional ElectricEquipmentITEAirCooled::powerPerFloorArea() const { + return getImpl()->powerPerFloorArea(); + } + + double ElectricEquipmentITEAirCooled::getDesignLevel(double floorArea) const { + return getImpl()->getDesignLevel(floorArea); + } + + double ElectricEquipmentITEAirCooled::getPowerPerFloorArea(double floorArea) const { + return getImpl()->getPowerPerFloorArea(floorArea); + } + + // DEPRECATED + + boost::optional ElectricEquipmentITEAirCooled::wattsperUnit() const { + DEPRECATED_AT_MSG(3, 8, 0, "Use designLevel instead."); + return getImpl()->designLevel(); } double ElectricEquipmentITEAirCooled::getWattsperUnit(double floorArea) const { - return getImpl()->getWattsperUnit(floorArea); + DEPRECATED_AT_MSG(3, 8, 0, "Use getDesignLevel instead."); + return getImpl()->getDesignLevel(floorArea); + } + + boost::optional ElectricEquipmentITEAirCooled::wattsperZoneFloorArea() const { + DEPRECATED_AT_MSG(3, 8, 0, "Use powerPerFloorArea instead."); + return getImpl()->powerPerFloorArea(); } double ElectricEquipmentITEAirCooled::getWattsperZoneFloorArea(double floorArea) const { - return getImpl()->getWattsperZoneFloorArea(floorArea); + DEPRECATED_AT_MSG(3, 8, 0, "Use getPowerPerFloorArea instead."); + return getImpl()->getPowerPerFloorArea(floorArea); } /// @cond diff --git a/src/model/ElectricEquipmentITEAirCooled.hpp b/src/model/ElectricEquipmentITEAirCooled.hpp index 012ce61c6bc..59715563b11 100644 --- a/src/model/ElectricEquipmentITEAirCooled.hpp +++ b/src/model/ElectricEquipmentITEAirCooled.hpp @@ -9,6 +9,8 @@ #include "ModelAPI.hpp" #include "SpaceLoadInstance.hpp" +#include "../utilities/core/Deprecated.hpp" + namespace openstudio { namespace model { @@ -107,13 +109,21 @@ namespace model { /** @name Other */ //@{ - boost::optional wattsperUnit() const; + /** Returns the designLevel if possible based on the underlying data of electricEquipmentITEAirCooledDefinition(). */ + boost::optional designLevel() const; + OS_DEPRECATED(3, 8, 0) boost::optional wattsperUnit() const; - boost::optional wattsperZoneFloorArea() const; + /** Returns the powerPerFloorArea (Design Level) if possible based on the underlying data of electricEquipmentITEAirCooledDefinition(). */ + boost::optional powerPerFloorArea() const; + OS_DEPRECATED(3, 8, 0) boost::optional wattsperZoneFloorArea() const; - double getWattsperUnit(double floorArea) const; + /** Returns the design level represented by this instance, assuming floorArea (m^2). */ + double getDesignLevel(double floorArea) const; + OS_DEPRECATED(3, 8, 0) double getWattsperUnit(double floorArea) const; - double getWattsperZoneFloorArea(double floorArea) const; + /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2). */ + double getPowerPerFloorArea(double floorArea) const; + OS_DEPRECATED(3, 8, 0) double getWattsperZoneFloorArea(double floorArea) const; //@} protected: @@ -140,3 +150,4 @@ namespace model { } // namespace openstudio #endif // MODEL_ELECTRICEQUIPMENTITEAIRCOOLED_HPP + diff --git a/src/model/ElectricEquipmentITEAirCooledDefinition.cpp b/src/model/ElectricEquipmentITEAirCooledDefinition.cpp index 728da03c9b6..6d69bbcab87 100644 --- a/src/model/ElectricEquipmentITEAirCooledDefinition.cpp +++ b/src/model/ElectricEquipmentITEAirCooledDefinition.cpp @@ -24,6 +24,8 @@ #include "../utilities/core/Compare.hpp" #include "../utilities/core/Assert.hpp" +#include "../utilities/core/DeprecatedHelpers.hpp" // For deprecation + namespace openstudio { namespace model { @@ -81,7 +83,7 @@ namespace model { return value.get(); } - boost::optional ElectricEquipmentITEAirCooledDefinition_Impl::wattsperUnit() const { + boost::optional ElectricEquipmentITEAirCooledDefinition_Impl::designLevel() const { boost::optional result; if (istringEqual("Watts/Unit", this->designPowerInputCalculationMethod())) { result = getDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperUnit, true); @@ -90,10 +92,10 @@ namespace model { return result; } - boost::optional ElectricEquipmentITEAirCooledDefinition_Impl::wattsperZoneFloorArea() const { + boost::optional ElectricEquipmentITEAirCooledDefinition_Impl::wattsperSpaceFloorArea() const { boost::optional result; if (istringEqual("Watts/Area", this->designPowerInputCalculationMethod())) { - result = getDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperZoneFloorArea, true); + result = getDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperSpaceFloorArea, true); //OS_ASSERT(result); } return result; @@ -270,23 +272,25 @@ namespace model { boost::to_lower(wmethod); if (wmethod == "watts/unit") { - return setWattsperUnit(getWattsperUnit(floorArea)); + return setDesignLevel(getDesignLevel(floorArea)); } else if (wmethod == "watts/area") { - return setWattsperZoneFloorArea(getWattsperZoneFloorArea(floorArea)); + return setWattsperSpaceFloorArea(getPowerPerFloorArea(floorArea)); } return false; } - bool ElectricEquipmentITEAirCooledDefinition_Impl::setWattsperUnit(boost::optional wattsperUnit) { + bool ElectricEquipmentITEAirCooledDefinition_Impl::setDesignLevel(boost::optional designLevel) { bool result = true; - if (wattsperUnit) { - if (*wattsperUnit < 0) { + if (designLevel) { + if (*designLevel < 0) { result = false; } else { result = setString(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::DesignPowerInputCalculationMethod, "Watts/Unit"); OS_ASSERT(result); - result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperUnit, wattsperUnit.get()); + result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperUnit, designLevel.get()); + OS_ASSERT(result); + result = setString(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperSpaceFloorArea, ""); OS_ASSERT(result); } } else { @@ -297,20 +301,22 @@ namespace model { return result; } - bool ElectricEquipmentITEAirCooledDefinition_Impl::setWattsperZoneFloorArea(boost::optional wattsperZoneFloorArea) { + bool ElectricEquipmentITEAirCooledDefinition_Impl::setWattsperSpaceFloorArea(boost::optional wattsperSpaceFloorArea) { bool result = true; - if (wattsperZoneFloorArea) { - if (*wattsperZoneFloorArea < 0) { + if (wattsperSpaceFloorArea) { + if (*wattsperSpaceFloorArea < 0) { result = false; } else { result = setString(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::DesignPowerInputCalculationMethod, "Watts/Area"); OS_ASSERT(result); - result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperZoneFloorArea, wattsperZoneFloorArea.get()); + result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperSpaceFloorArea, wattsperSpaceFloorArea.get()); + OS_ASSERT(result); + result = setString(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperUnit, ""); OS_ASSERT(result); } } else { if (istringEqual("Watts/Area", this->designPowerInputCalculationMethod())) { - result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperZoneFloorArea, 0.0); + result = setDouble(OS_ElectricEquipment_ITE_AirCooled_DefinitionFields::WattsperSpaceFloorArea, 0.0); } } return result; @@ -469,29 +475,29 @@ namespace model { } //Other functions - double ElectricEquipmentITEAirCooledDefinition_Impl::getWattsperUnit(double floorArea) const { - std::string method = designPowerInputCalculationMethod(); + double ElectricEquipmentITEAirCooledDefinition_Impl::getDesignLevel(double floorArea) const { + const std::string method = designPowerInputCalculationMethod(); if (method == "Watts/Unit") { - return wattsperUnit().get(); + return designLevel().get(); } else if (method == "Watts/Area") { - return wattsperZoneFloorArea().get() * floorArea; + return wattsperSpaceFloorArea().get() * floorArea; } OS_ASSERT(false); return 0.0; } - double ElectricEquipmentITEAirCooledDefinition_Impl::getWattsperZoneFloorArea(double floorArea) const { - std::string method = designPowerInputCalculationMethod(); + double ElectricEquipmentITEAirCooledDefinition_Impl::getPowerPerFloorArea(double floorArea) const { + const std::string method = designPowerInputCalculationMethod(); if (method == "Watts/Unit") { if (equal(floorArea, 0.0)) { LOG_AND_THROW("Calculation would require division by zero."); } - return wattsperUnit().get() / floorArea; + return designLevel().get() / floorArea; } else if (method == "Watts/Area") { - return wattsperZoneFloorArea().get(); + return wattsperSpaceFloorArea().get(); } OS_ASSERT(false); @@ -542,7 +548,7 @@ namespace model { fanPowerInputFunctionofFlowCurve.setMaximumValueofx(99.0); setFanPowerInputFunctionofFlowCurve(fanPowerInputFunctionofFlowCurve); - bool test = this->setWattsperUnit(0.0); + bool test = this->setDesignLevel(0.0); OS_ASSERT(test); } @@ -557,7 +563,7 @@ namespace model { setAirFlowFunctionofLoadingandAirTemperatureCurve(airFlowFunctionofLoadingandAirTemperatureCurve); setFanPowerInputFunctionofFlowCurve(fanPowerInputFunctionofFlowCurve); - bool test = this->setWattsperUnit(0.0); + bool test = this->setDesignLevel(0.0); OS_ASSERT(test); } @@ -593,12 +599,12 @@ namespace model { return getImpl()->designPowerInputCalculationMethod(); } - boost::optional ElectricEquipmentITEAirCooledDefinition::wattsperUnit() const { - return getImpl()->wattsperUnit(); + boost::optional ElectricEquipmentITEAirCooledDefinition::designLevel() const { + return getImpl()->designLevel(); } - boost::optional ElectricEquipmentITEAirCooledDefinition::wattsperZoneFloorArea() const { - return getImpl()->wattsperZoneFloorArea(); + boost::optional ElectricEquipmentITEAirCooledDefinition::wattsperSpaceFloorArea() const { + return getImpl()->wattsperSpaceFloorArea(); } Curve ElectricEquipmentITEAirCooledDefinition::cPUPowerInputFunctionofLoadingandAirTemperatureCurve() const { @@ -707,12 +713,12 @@ namespace model { floorArea); } - bool ElectricEquipmentITEAirCooledDefinition::setWattsperUnit(double wattsperUnit) { - return getImpl()->setWattsperUnit(wattsperUnit); + bool ElectricEquipmentITEAirCooledDefinition::setDesignLevel(double designLevel) { + return getImpl()->setDesignLevel(designLevel); } - bool ElectricEquipmentITEAirCooledDefinition::setWattsperZoneFloorArea(double wattsperZoneFloorArea) { - return getImpl()->setWattsperZoneFloorArea(wattsperZoneFloorArea); + bool ElectricEquipmentITEAirCooledDefinition::setWattsperSpaceFloorArea(double wattsperSpaceFloorArea) { + return getImpl()->setWattsperSpaceFloorArea(wattsperSpaceFloorArea); } bool ElectricEquipmentITEAirCooledDefinition::setCPUPowerInputFunctionofLoadingandAirTemperatureCurve(const Curve& curve) { @@ -829,12 +835,44 @@ namespace model { getImpl()->resetReturnTemperatureDifferenceSchedule(); } + double ElectricEquipmentITEAirCooledDefinition::getDesignLevel(double floorArea) const { + return getImpl()->getDesignLevel(floorArea); + } + + double ElectricEquipmentITEAirCooledDefinition::getPowerPerFloorArea(double floorArea) const { + return getImpl()->getPowerPerFloorArea(floorArea); + } + + // DEPRECATED + + boost::optional ElectricEquipmentITEAirCooledDefinition::wattsperUnit() const { + DEPRECATED_AT_MSG(3, 8, 0, "Use designLevel instead."); + return getImpl()->designLevel(); + } + + bool ElectricEquipmentITEAirCooledDefinition::setWattsperUnit(double designLevel) { + DEPRECATED_AT_MSG(3, 8, 0, "Use setDesignLevel instead."); + return getImpl()->setDesignLevel(designLevel); + } + double ElectricEquipmentITEAirCooledDefinition::getWattsperUnit(double floorArea) const { - return getImpl()->getWattsperUnit(floorArea); + DEPRECATED_AT_MSG(3, 8, 0, "Use getDesignLevel instead."); + return getImpl()->getDesignLevel(floorArea); + } + + boost::optional ElectricEquipmentITEAirCooledDefinition::wattsperZoneFloorArea() const { + DEPRECATED_AT_MSG(3, 8, 0, "Use wattsperSpaceFloorArea instead."); + return getImpl()->wattsperSpaceFloorArea(); + } + + bool ElectricEquipmentITEAirCooledDefinition::setWattsperZoneFloorArea(double wattsperSpaceFloorArea) { + DEPRECATED_AT_MSG(3, 8, 0, "Use setWattsperSpaceFloorArea instead."); + return getImpl()->setWattsperSpaceFloorArea(wattsperSpaceFloorArea); } double ElectricEquipmentITEAirCooledDefinition::getWattsperZoneFloorArea(double floorArea) const { - return getImpl()->getWattsperZoneFloorArea(floorArea); + DEPRECATED_AT_MSG(3, 8, 0, "Use getPowerPerFloorArea instead."); + return getImpl()->getPowerPerFloorArea(floorArea); } /// @cond diff --git a/src/model/ElectricEquipmentITEAirCooledDefinition.hpp b/src/model/ElectricEquipmentITEAirCooledDefinition.hpp index 3274040b71b..d3649af9dc1 100644 --- a/src/model/ElectricEquipmentITEAirCooledDefinition.hpp +++ b/src/model/ElectricEquipmentITEAirCooledDefinition.hpp @@ -9,6 +9,8 @@ #include "ModelAPI.hpp" #include "SpaceLoadDefinition.hpp" +#include "../utilities/core/Deprecated.hpp" + namespace openstudio { namespace model { @@ -63,9 +65,11 @@ namespace model { std::string designPowerInputCalculationMethod() const; - boost::optional wattsperUnit() const; + boost::optional designLevel() const; + OS_DEPRECATED(3, 8, 0) boost::optional wattsperUnit() const; - boost::optional wattsperZoneFloorArea() const; + boost::optional wattsperSpaceFloorArea() const; + OS_DEPRECATED(3, 8, 0) boost::optional wattsperZoneFloorArea() const; Curve cPUPowerInputFunctionofLoadingandAirTemperatureCurve() const; @@ -121,11 +125,13 @@ namespace model { bool setAirFlowCalculationMethod(const std::string& airFlowCalculationMethod); - bool setDesignPowerInputCalculationMethod(const std::string& designPowerInputCalculationMethod, double floorArea); - - bool setWattsperUnit(double wattsperUnit); + /** Also sets setDesignPowerInputCalculationMethod accordingly. */ + bool setDesignLevel(double designLevel); + OS_DEPRECATED(3, 8, 0) bool setWattsperUnit(double designLevel); - bool setWattsperZoneFloorArea(double wattsperZoneFloorArea); + /** Also sets setDesignPowerInputCalculationMethod accordingly. */ + bool setWattsperSpaceFloorArea(double wattsperSpaceFloorArea); + OS_DEPRECATED(3, 8, 0) bool setWattsperZoneFloorArea(double wattsperSpaceFloorArea); bool setCPUPowerInputFunctionofLoadingandAirTemperatureCurve(const Curve& curve); @@ -189,9 +195,17 @@ namespace model { /** @name Other */ //@{ - double getWattsperUnit(double floorArea) const; + /** Returns the design level represented by this definition, assuming floorArea (m^2). */ + double getDesignLevel(double floorArea) const; + OS_DEPRECATED(3, 8, 0) double getWattsperUnit(double floorArea) const; - double getWattsperZoneFloorArea(double floorArea) const; + /** Returns the watts/m^2 represented by this definition, assuming floorArea (m^2) */ + double getPowerPerFloorArea(double floorArea) const; + OS_DEPRECATED(3, 8, 0) double getWattsperZoneFloorArea(double floorArea) const; + + /** If method is a \link validDesignPowerInputCalculationMethodValues valid design power input calculation method \endlink, + * changes this definition to an equivalent power level, under the assumptions of floorArea (m^2). */ + bool setDesignPowerInputCalculationMethod(const std::string& designPowerInputCalculationMethod, double floorArea); //@} protected: diff --git a/src/model/ElectricEquipmentITEAirCooledDefinition_Impl.hpp b/src/model/ElectricEquipmentITEAirCooledDefinition_Impl.hpp index 15e111e441e..daf897f82b1 100644 --- a/src/model/ElectricEquipmentITEAirCooledDefinition_Impl.hpp +++ b/src/model/ElectricEquipmentITEAirCooledDefinition_Impl.hpp @@ -51,9 +51,9 @@ namespace model { std::string designPowerInputCalculationMethod() const; - boost::optional wattsperUnit() const; + boost::optional designLevel() const; - boost::optional wattsperZoneFloorArea() const; + boost::optional wattsperSpaceFloorArea() const; Curve cPUPowerInputFunctionofLoadingandAirTemperatureCurve() const; boost::optional optionalCPUPowerInputFunctionofLoadingandAirTemperatureCurve() const; @@ -113,9 +113,9 @@ namespace model { bool setDesignPowerInputCalculationMethod(const std::string& designPowerInputCalculationMethod, double floorArea); - bool setWattsperUnit(boost::optional wattsperUnit); + bool setDesignLevel(boost::optional designLevel); - bool setWattsperZoneFloorArea(boost::optional wattsperZoneFloorArea); + bool setWattsperSpaceFloorArea(boost::optional wattsperSpaceFloorArea); bool setCPUPowerInputFunctionofLoadingandAirTemperatureCurve(const Curve& curve); @@ -179,9 +179,9 @@ namespace model { /** @name Other */ //@{ - double getWattsperUnit(double floorArea) const; + double getDesignLevel(double floorArea) const; - double getWattsperZoneFloorArea(double floorArea) const; + double getPowerPerFloorArea(double floorArea) const; //@} protected: diff --git a/src/model/ElectricEquipmentITEAirCooled_Impl.hpp b/src/model/ElectricEquipmentITEAirCooled_Impl.hpp index 5a1a476644e..76bb97e1d17 100644 --- a/src/model/ElectricEquipmentITEAirCooled_Impl.hpp +++ b/src/model/ElectricEquipmentITEAirCooled_Impl.hpp @@ -120,13 +120,13 @@ namespace model { /** @name Other */ //@{ - boost::optional wattsperUnit() const; + boost::optional designLevel() const; - boost::optional wattsperZoneFloorArea() const; + boost::optional powerPerFloorArea() const; - double getWattsperUnit(double floorArea) const; + double getDesignLevel(double floorArea) const; - double getWattsperZoneFloorArea(double floorArea) const; + double getPowerPerFloorArea(double floorArea) const; //@} protected: diff --git a/src/model/Space.cpp b/src/model/Space.cpp index 0dbcdd76175..b63cdd745c1 100644 --- a/src/model/Space.cpp +++ b/src/model/Space.cpp @@ -1615,12 +1615,12 @@ namespace model { double area = floorArea(); for (const ElectricEquipmentITEAirCooled& iTequipment : electricEquipmentITEAirCooled()) { - result += iTequipment.getWattsperUnit(area); + result += iTequipment.getDesignLevel(area); } if (OptionalSpaceType spaceType = this->spaceType()) { for (const ElectricEquipmentITEAirCooled& iTequipment : spaceType->electricEquipmentITEAirCooled()) { - result += iTequipment.getWattsperUnit(area); + result += iTequipment.getDesignLevel(area); } } @@ -1710,12 +1710,12 @@ namespace model { double area = floorArea(); for (const ElectricEquipmentITEAirCooled& iTequipment : electricEquipmentITEAirCooled()) { - result += iTequipment.getWattsperZoneFloorArea(area); + result += iTequipment.getPowerPerFloorArea(area); } if (OptionalSpaceType spaceType = this->spaceType()) { for (const ElectricEquipmentITEAirCooled& iTequipment : spaceType->electricEquipmentITEAirCooled()) { - result += iTequipment.getWattsperZoneFloorArea(area); + result += iTequipment.getPowerPerFloorArea(area); } } diff --git a/src/model/SpaceType.cpp b/src/model/SpaceType.cpp index 25e273fa073..5b000e27f2c 100644 --- a/src/model/SpaceType.cpp +++ b/src/model/SpaceType.cpp @@ -906,7 +906,7 @@ namespace model { boost::optional SpaceType_Impl::electricEquipmentITEAirCooledPowerPerFloorArea() const { double result(0.0); for (const ElectricEquipmentITEAirCooled& iTequipment : electricEquipmentITEAirCooled()) { - OptionalDouble temp = iTequipment.wattsperZoneFloorArea(); + OptionalDouble temp = iTequipment.powerPerFloorArea(); if (temp) { result += temp.get(); } else { diff --git a/src/model/test/ElectricEquipmentITEAirCooled_GTest.cpp b/src/model/test/ElectricEquipmentITEAirCooled_GTest.cpp index 9928f001d3b..6e87277a20d 100644 --- a/src/model/test/ElectricEquipmentITEAirCooled_GTest.cpp +++ b/src/model/test/ElectricEquipmentITEAirCooled_GTest.cpp @@ -61,9 +61,9 @@ TEST_F(ModelFixture, ElectricEquipmentITEAirCooled_DefaultConstructor1) { //model.save(toPath("./ITE1.osm"), true); - ASSERT_TRUE(definition.wattsperUnit()); - EXPECT_EQ(0, definition.wattsperUnit().get()); - EXPECT_FALSE(definition.wattsperZoneFloorArea()); + ASSERT_TRUE(definition.designLevel()); + EXPECT_EQ(0, definition.designLevel().get()); + EXPECT_FALSE(definition.wattsperSpaceFloorArea()); } //test the constructor with input curves @@ -142,15 +142,15 @@ TEST_F(ModelFixture, ElectricEquipmentITEAirCooled_equipmentLevel) { ElectricEquipmentITEAirCooled electricEquipmentITEAirCooled(definition); ASSERT_TRUE(electricEquipmentITEAirCooled.setSpace(space1.get())); - ASSERT_TRUE(definition.wattsperUnit()); - EXPECT_EQ(0, definition.wattsperUnit().get()); - EXPECT_FALSE(definition.wattsperZoneFloorArea()); - ASSERT_TRUE(definition.setWattsperUnit(50.0)); - ASSERT_EQ(50.0, definition.wattsperUnit().get()); + ASSERT_TRUE(definition.designLevel()); + EXPECT_EQ(0, definition.designLevel().get()); + EXPECT_FALSE(definition.wattsperSpaceFloorArea()); + ASSERT_TRUE(definition.setDesignLevel(50.0)); + ASSERT_EQ(50.0, definition.designLevel().get()); //change input method to watts/area, see if watts/area is assigned. ASSERT_TRUE(definition.setDesignPowerInputCalculationMethod("Watts/Area", electricEquipmentITEAirCooled.floorArea())); - EXPECT_EQ(0.5, definition.wattsperZoneFloorArea().get()); + EXPECT_EQ(0.5, definition.wattsperSpaceFloorArea().get()); //model.save(toPath("./ITE3.osm"), true); }