Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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':

image description

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:

Link to Documentation for HPWH

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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. parameters. 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':

image description

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:

Link to Documentation for HPWH

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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) parameters. 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':

Screenshot from debugger

image description

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:

Link to Documentation for HPWH

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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) parameters. 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':

Screenshot from debugger

image description

Anybody have some thoughts as to why that might be? The rest of the fields (e.g. name, schedules) all came out correction.correct.

Useful links:

Link to Documentation for HPWH

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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) parameters. 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':

Screenshot from debugger

image description

Anybody have some thoughts as to why that might be? The rest of the fields (e.g. name, schedules) all came out correct.

Useful links:

Link to Documentation for HPWH

Issues writing HPWH open studio measure-- object attributes not being passed to OS

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) parameters. 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':

Screenshot from debugger

image description

Anybody have some thoughts as to why that might be? The rest of the fields (e.g. name, schedules) all came out correct.

Useful links:

Link to Documentation for HPWH