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

Revision history [back]

This was a bug that has been fixed in v2.5.1: https://github.com/NREL/OpenStudio/issues/3096

Part of the problem was the App was setting the value shown for "Fraction Visible" to the "Return Air Fraction" field in the osm. If you don't want to upgrade to the latest development release, that would be one workaround. The other is to fix it with a measure.

This was a bug that has been fixed in v2.5.1: https://github.com/NREL/OpenStudio/issues/3096

Part of the problem was the App was setting the value shown for "Fraction Visible" to the "Return Air Fraction" field in the osm. If you don't want to upgrade to the latest development release, that would be one workaround. The other is to fix it with a measure.

To change the fractions of all lights definitions in a measure, the code would look like:

# assign fractions to variables
frac_radiant = 0.3
frac_visible = 0.2
return_frac = 0.5

model.getLightsDefinitions.each do |def| # loops through all OS:Lights:Definition in model
  # set fractions
  def.setFractionRadiant(frac_radiant)
  def.setFractionVisible(frac_visible)
  def.setReturnAirFraction(return_frac)
end

This was a bug that has been fixed in v2.5.1: https://github.com/NREL/OpenStudio/issues/3096

Part of the problem was the App was setting the value shown for "Fraction Visible" to the "Return Air Fraction" field in the osm. If you don't want to upgrade to the latest development release, that would be one workaround. The other is to fix it with a measure.

To change the fractions of all lights definitions in a measure, the code would look like:

# assign fractions to variables
frac_radiant = 0.3
frac_visible = 0.2
return_frac = 0.5

model.getLightsDefinitions.each do |def| |light_def| # loops through all OS:Lights:Definition in model
  # set fractions
  def.setFractionRadiant(frac_radiant)
light_def.setFractionRadiant(frac_radiant)
 def.setFractionVisible(frac_visible)
light_def.setFractionVisible(frac_visible)
 def.setReturnAirFraction(return_frac)
light_def.setReturnAirFraction(return_frac)
end