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

Revision history [back]

click to hide/show revision 1
initial version

Set COP Measure Methods

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end

Set COP Measure Methods

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end

Set COP is_initialized and to_ Measure Methods

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end

is_initialized Measure Methods (is_initialized and to_ Measure Methodsto_) what they do

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end

Measure Methods (is_initialized and to_) what they do

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end

Measure Methods (is_initialized and to_) what they do

I want to change the COP for WSHP, so I am trying to modify the OS measure below that I found in here, but I did not understand what these two methods do (to_ZoneHVACPackagedTerminalAirConditioner and is_initialized). I searched the documentation for ZoneHVACPackagedTerminalAirConditioner, but did not find any information about what these methods do. Can someone shade some light on these methods and where I can find their documentation?

Thank you,

 # loop through zone equipment
model.getZoneHVACComponents.each do |component|

  # see if it is a PTAC
  if component.to_ZoneHVACPackagedTerminalAirConditioner.is_initialized
    runner.registerInfo("#{component.name} is a PTAC")
    ptac = component.to_ZoneHVACPackagedTerminalAirConditioner.get

    # get the cooling coil
    coil_cooling = ptac.coolingCoil

    # see if it is single speed dx
    if coil_cooling.to_CoilCoolingDXSingleSpeed.is_initialized
      single_speed_dx = coil_cooling.to_CoilCoolingDXSingleSpeed.get
      runner.registerInfo("The intial COP is #{single_speed_dx.ratedCOP}")

      # set cop
      target_cop = 1.5 * single_speed_dx.ratedCOP.get # need the get because ratedCOP returns an optional, should check if it exists before doing a get
      optionalDoubleCOP = OpenStudio::OptionalDouble.new(target_cop) # not many objects need this step, this is an odd one
      single_speed_dx.setRatedCOP(optionalDoubleCOP)
      runner.registerInfo("The adjusted COP is #{single_speed_dx.ratedCOP}")

    else
      # could add in elsif to look for other types of cooling coils
    end

  else  
    # could add in elsif to look for other kinds of zone equipment
  end

end