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

# Calculate window to wall ratio (WWR) from IDF or OSM file I have a set of EnergyPlus IDF files that I received from a third party and I'd simply like to extract the window to wall ratio (WWR) from the geometry-related objects in the models. Ideally, I'd like to do this without simulating all of them.

Anyone have a workflows, open studio scripts, or other methods to extract the WWR metric?

edit retag close merge delete

Sort by » oldest newest most voted

You can call surface.windowToWallRatio on any surface in the model and it will give you the window to wall ratio for that surface. For the AEDG measures we made a helper method that lets you pass in an array of spaces (so it could be the entire building or portion of it). It returns the window to wall ratio. This for example excludes interior windows and does take zone multipliers into account.

Here is a link to one of those measures. There is also a more complex method that returns the window to wall ratio by orientation in the same OSLib_Geometry.rb file. The file is in the resources folder that comes with the measure. For reference the code to the more basic version is below.

def OsLib_Geometry.getExteriorWindowToWallRatio(spaceArray)

# counters
total_gross_ext_wall_area = 0
total_ext_window_area = 0

spaceArray.each do |space|

#get surface area adjusting for zone multiplier
zone = space.thermalZone
if not zone.empty?
zone_multiplier = zone.get.multiplier
if zone_multiplier > 1
end
else
zone_multiplier = 1 #space is not in a thermal zone
end

space.surfaces.each do |s|
next if not s.surfaceType == "Wall"
next if not s.outsideBoundaryCondition == "Outdoors"

surface_gross_area = s.grossArea * zone_multiplier

#loop through sub surfaces and add area including multiplier
ext_window_area = 0
s.subSurfaces.each do |subSurface|
ext_window_area = ext_window_area + subSurface.grossArea * subSurface.multiplier * zone_multiplier
end

total_gross_ext_wall_area += surface_gross_area
total_ext_window_area += ext_window_area
end #end of surfaces.each do
end # end of space.each do

result = total_ext_window_area/total_gross_ext_wall_area
return result

end

more

1

@Clayton Miller I just noticed that you have IDF files. You could write a script that runs on the IDF files directly, converts them to a temporary OpenStudio model in memory to extract the WWR, and then throws the model away. The script could batch run an a large set of IDF files without having to manually do anything in our GUI's.