Address energy outside of an HVAC season or during unavailable period#2151
Address energy outside of an HVAC season or during unavailable period#2151joseph-robertson wants to merge 46 commits intomasterfrom
Conversation
…riods in defrost, pan, and crankcase ems programs.
HPXMLtoOpenStudio/resources/hvac.rb
Outdated
| # Don't run crankcase heater during HVAC unavailable period either | ||
| temp_criteria += " && (#{hvac_avail_sensor.name} == 1)" |
There was a problem hiding this comment.
Should this only run when (A) AC and cooling available, and (B) HP and either heating/cooling available?
HPXMLtoOpenStudio/resources/hvac.rb
Outdated
| name: "#{clg_coil.name} crankcase program" | ||
| ) | ||
| program.addLine("Set T_out = #{tout_db_sensor.name}") | ||
| temp_criteria = "If (T_out < #{max_oat_crankcase})" |
There was a problem hiding this comment.
Crankcase heater only operates when the compressor is not running -- how do we incorporate that here?
There was a problem hiding this comment.
1 minus the coil runtime fraction?
There was a problem hiding this comment.
e.g., crankcase_power * (1 - coil_rtf)
You don't incorporate it in the criteria, you incorporate it in the energy use calculation.
| base-hvac-air-to-air-heat-pump-var-speed-pan-heater-none.xml,52.657,52.657,52.657,52.657,0.0,0.0,0.0,0.0,0.0,0.0,13.275,1.067,2.3,0.011,3.764,0.458,10.77,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.074,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-var-speed-research-features.xml,53.164,53.164,53.164,53.164,0.0,0.0,0.0,0.0,0.0,0.0,13.643,1.36,2.14,0.017,3.764,0.46,10.771,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.072,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-var-speed.xml,53.503,53.503,53.503,53.503,0.0,0.0,0.0,0.0,0.0,0.0,14.121,1.067,2.3,0.011,3.764,0.458,10.77,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.074,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-2-speed.xml,52.895,52.895,52.895,52.895,0.0,0.0,0.0,0.0,0.0,0.0,11.775,1.245,3.477,0.071,4.057,0.489,10.77,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.074,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 |
There was a problem hiding this comment.
I'm struggling to understand why the new crankcase EMS program shows agreement for 1-speed ASHP, but not multispeed ASHP. See the following, where the original crankcase output variable is reported vs the EMS power * (1 - RTF) calculation. Is there something other than RTF that E+ uses for determining whether the compressor is running or not?
There was a problem hiding this comment.
This definitely looks related: NatLabRockies/EnergyPlus#10052
There was a problem hiding this comment.
The above issue is somewhat related, but not the cause of the discrepancy. This commit should bring E+ crankcase and EMS crankcase into alignment: ecdc565
| base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml,56.092,56.092,56.092,56.092,0.0,0.0,0.0,0.0,0.0,0.0,14.02,1.462,3.162,0.044,5.195,0.428,10.77,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.074,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-var-speed-max-power-ratio-schedule-10-mins.xml,54.018,54.018,54.018,54.018,0.0,0.0,0.0,0.0,0.0,0.0,13.789,1.379,2.63,0.028,3.924,0.487,10.773,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.072,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-var-speed-max-power-ratio-schedule-two-systems.xml,51.274,51.274,51.274,51.274,0.0,0.0,0.0,0.0,0.0,0.0,13.666,0.625,1.882,0.0,3.141,0.181,10.769,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.075,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-hvac-air-to-air-heat-pump-var-speed-max-power-ratio-schedule-two-systems.xml,51.287,51.287,51.287,51.287,0.0,0.0,0.0,0.0,0.0,0.0,13.678,0.625,1.882,0.0,3.141,0.181,10.769,0.0,0.0,4.507,0.0,0.334,0.0,0.0,0.0,0.0,2.075,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 |
There was a problem hiding this comment.
This one needs more investigation. It looks like, using calling point InsideHVACSystemIterationLoop, sensor values for "Unitary System DX Coil Cycling Ratio" in the program do not match what is ultimately reported.
There was a problem hiding this comment.
Changing InsideHVACSystemIterationLoop -> EndOfSystemTimestepBeforeHVACReporting in 2afbc95 seems to do the trick. Not totally sure why.
…stepBeforeHVACReporting.
| ObjectTypeMiscWellPump = 'misc well pump' | ||
| ObjectTypeNaturalVentilation = 'natural vent' | ||
| ObjectTypeNeighbors = 'neighbors' | ||
| ObjectTypeOATDrybulbSensor = 'outdoor air drybulb temperature sensor' |
There was a problem hiding this comment.
This is used for both defrost and crankcase.
| ObjectTypeNeighbors = 'neighbors' | ||
| ObjectTypeOATDrybulbSensor = 'outdoor air drybulb temperature sensor' | ||
| ObjectTypeOccupants = 'occupants' | ||
| ObjectTypeCrankcaseHeater = 'crankcase heater' |
There was a problem hiding this comment.
This is the new "end use" for actuated other equipment objects.
| coil_name = clg_coil.name.to_s | ||
| if (heat_pump.is_a? HPXML::HeatPump) && (heat_pump.fraction_heat_load_served > 0) | ||
| coil_name = htg_coil.name.to_s | ||
| else | ||
| htg_coil = nil | ||
| end |
There was a problem hiding this comment.
By default, use the cooling coil name in the actuated object and program names. Unless it's a heat pump that provides heating -- then use the heating coil name.
| if heat_pump.is_a? HPXML::CoolingSystem | ||
| crankcase_heater_energy_oe.additionalProperties.setFeature('FractionHeatLoadServed', 0.0) # Used by reporting measure | ||
| elsif heat_pump.is_a? HPXML::HeatPump | ||
| crankcase_heater_energy_oe.additionalProperties.setFeature('FractionHeatLoadServed', heat_pump.fraction_heat_load_served) # Used by reporting measure | ||
| end |
There was a problem hiding this comment.
Used by the reporting measure for allocating crankcase either to heating or cooling end use.
| else | ||
| program.addLine('Set cyc_ratio = 0') | ||
| end | ||
| temp_criteria = "If (T_out < #{max_oat_crankcase}) && (cyc_ratio < 1)" |
There was a problem hiding this comment.
Cycling ratio is 1 for multispeed objects operating at speeds above 1 (i.e., compressor is not off).
| clg_sys.cooling_capacity *= unit_multiplier | ||
| clg_sys.cooling_design_airflow_cfm *= unit_multiplier | ||
| clg_ap.cooling_actual_airflow_cfm *= unit_multiplier | ||
| clg_sys.crankcase_heater_watts *= unit_multiplier unless clg_sys.crankcase_heater_watts.nil? |
There was a problem hiding this comment.
Meters incoporate thermal zone multipliers.
| if object.additionalProperties.getFeatureAsDouble('FractionHeatLoadServed').is_initialized && object.additionalProperties.getFeatureAsDouble('FractionHeatLoadServed').get <= 0 | ||
| # HP only provides cooling, allocate crankcase to cooling end use | ||
| vars[[FT::Elec, EUT::Cooling]] = ['Heating Coil Crankcase Heater Electricity Energy'] | ||
| else | ||
| # Allocate crankcase to heating end use | ||
| vars[[FT::Elec, EUT::Heating]] << 'Heating Coil Crankcase Heater Electricity Energy' | ||
| end |
There was a problem hiding this comment.
This allocation logic (and some below) is moved to the OtherEquipment block.
| end | ||
|
|
||
| def test_heat_pump_defrost_and_pan_heater | ||
| def test_heat_pump_defrost_and_pan_heater_and_crankcase_heater |
There was a problem hiding this comment.
Move the existing crankcase test into here since we're now, like defrost and pan heater, using EMS programs.
| base-residents-5-5.xml,85.91,65.659,51.703,31.451,34.208,0.0,0.0,0.0,0.0,0.0,0.0,1.065,0.0,0.0,2.232,0.43,8.644,0.0,0.328,4.507,0.0,0.334,1.14,0.0,0.0,1.174,2.163,0.0,0.0,0.593,0.511,3.798,2.36,0.745,3.423,10.263,0.0,0.0,0.0,0.0,0.0,-20.251,0.0,0.342,7.652,34.208,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-all-10-mins.xml,71.755,71.755,39.573,39.573,32.181,0.0,0.0,0.0,0.0,0.0,0.0,1.002,0.0,0.0,5.512,1.267,10.778,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.077,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,32.181,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-mixed-timesteps-power-outage.xml,37.62,37.62,30.798,30.798,6.823,0.0,0.0,0.0,0.0,0.0,0.0,0.212,0.0,0.0,3.926,0.847,8.726,0.0,0.0,3.618,0.0,0.267,0.0,0.0,0.0,0.0,1.69,0.0,0.0,0.238,0.296,1.183,1.275,0.0,1.713,6.806,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,6.823,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-mixed-timesteps-power-outage.xml,37.531,37.531,30.709,30.709,6.823,0.0,0.0,0.0,0.0,0.0,0.0,0.212,0.0,0.0,3.837,0.847,8.726,0.0,0.0,3.618,0.0,0.267,0.0,0.0,0.0,0.0,1.69,0.0,0.0,0.238,0.296,1.183,1.275,0.0,1.713,6.806,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,6.823,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 |
There was a problem hiding this comment.
The 3.926 -> 3.837 is expected decrease since "it is now possible to eliminate all HVAC energy use (e.g. crankcase/defrost energy) in EnergyPlus during an unavailable period."
| base-schedules-detailed-occupancy-stochastic-no-space-cooling.xml,68.334,68.334,36.884,36.884,31.45,0.0,0.0,0.0,0.0,0.0,0.0,0.979,0.0,0.0,3.34,0.759,10.762,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.106,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,31.45,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-occupancy-stochastic-no-space-heating.xml,66.558,66.558,39.177,39.177,27.38,0.0,0.0,0.0,0.0,0.0,0.0,0.852,0.0,0.0,5.314,1.231,10.781,0.0,0.0,4.51,0.0,0.334,0.0,0.0,0.0,0.0,2.061,0.0,0.0,0.284,0.347,1.436,1.529,0.0,2.116,8.384,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,27.38,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-occupancy-stochastic-power-outage.xml,52.628,52.628,32.948,32.948,19.68,0.0,0.0,0.0,0.0,0.0,0.0,0.613,0.0,0.0,5.292,1.225,8.667,0.0,0.0,3.618,0.0,0.267,0.0,0.0,0.0,0.0,1.754,0.0,0.0,0.238,0.296,1.183,1.275,0.0,1.713,6.806,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,19.68,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 | ||
| base-schedules-detailed-occupancy-stochastic-power-outage.xml,52.54,52.54,32.86,32.86,19.68,0.0,0.0,0.0,0.0,0.0,0.0,0.613,0.0,0.0,5.204,1.225,8.667,0.0,0.0,3.618,0.0,0.267,0.0,0.0,0.0,0.0,1.754,0.0,0.0,0.238,0.296,1.183,1.275,0.0,1.713,6.806,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,19.68,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0 |
There was a problem hiding this comment.
Again, expected decrease.
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml # ReportSimulationOutput/measure.xml # workflow/tests/base_results/results_simulations_misc.csv

Pull Request Description
Addresses #2149, model the crankcase heater via EMS so that it can be disallowed during power outages.
Checklist
Not all may apply:
EPvalidator.sch) has been updatedopenstudio tasks.rb update_hpxmls)HPXMLtoOpenStudio/tests/test*.rband/orworkflow/tests/test*.rb)openstudio tasks.rb update_measureshas been run