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

Revision history [back]

Add rooftop PV azimuth

I'd like to adapt the add rooftop pv measure to only apply to roof surfaces which face south, or say within 180 degrees of south. Looking at the measure it looks like this functionality was originally intended but not completed. I'm new to measure writing and Ruby, in the measure it looks like the following term gets the surfaces:

 model.getSurfaces.each do |surface|
  next if not surface.space.is_initialized
  if surface.surfaceType == "RoofCeiling" and surface.outsideBoundaryCondition == "Outdoors"

How would I include azimuth within this? Also to deal with flat roofs would it be possible to have an or function whereby all flat roofs would also be included?

Any advice appreciated.

Add rooftop PV azimuth

I'd like to adapt the add rooftop pv measure to only apply to roof surfaces which face south, or say within 180 degrees of south. Looking at the measure it looks like this functionality was originally intended but not completed. I'm new to measure writing and Ruby, in the measure it looks like the following term gets the surfaces:

 model.getSurfaces.each do |surface|
  next if not surface.space.is_initialized
  if surface.surfaceType == "RoofCeiling" and surface.outsideBoundaryCondition == "Outdoors"

How would I include azimuth within this? Also to deal with flat roofs would it be possible to have an or function whereby all flat roofs would also be included?

Any advice appreciated.