Hi all,
New to both ruby and writing OS measures so apologies if any terminology is off.
I'm writing a measure to add a HPWH to a zone and allowing users to specify a few of the heat pump water heater's (HPWH) values. Below is a code snippet showing how I'm currently specifying these attributes and adding the HPWH to the zone.
hpwh = OpenStudio::Model::WaterHeaterHeatPump.new(model, hpwh_coil, water_heater, hpwh_fan,\
compressor_temp_setpoint_schedule,\
inlet_air_mixture_fraction_schedule)
hpwh.setName('Heat Pump Water Heater')
hpwh.setInletAirHumiditySchedule(inlet_air_humidity_schedule)
hpwh.setInletAirTemperatureSchedule(inlet_air_temp_schedule)
hpwh.setCompressorAmbientTemperatureSchedule(compressor_ambient_temp_schedule)
#if packaged system
if @location == 'Conditioned space'
hpwh.setCompressorLocation('Zone')
hpwh.setInletAirConfiguration('ZoneAirOnly')
hpwh.setParasiticHeatRejectionLocation('Zone')
else#if split system
hpwh.setCompressorLocation('Outdoors')
hpwh.setInletAirConfiguration('OutdoorAirOnly')
hpwh.setParasiticHeatRejectionLocation('Outdoors')
end
hpwh.addToThermalZone(zone)
Issue/Question: Fields set by the if 'location== 'Conditioned space'' block are not getting passed over into OS. I ran a debugger and HPWH object seems to have these attributes set correctly, but when I go into OS, the compressor location is set to 'Zone' and inlet air configuration to 'ZoneAirOnly':
Anybody have some thoughts as to why that might be? The rest of the fields (e.g. name, schedules) all came out correction.
Useful links: