ladybug-tools / honeybee-energy

🐝 :fire: Honeybee extension for energy simulation
https://www.ladybug.tools/honeybee-energy/docs/
GNU Affero General Public License v3.0
28 stars 18 forks source link

Error when adding VentilationFan with VentilationControl object #1012

Closed marctavenier closed 5 months ago

marctavenier commented 5 months ago

When adding a VentilationFan with a VentilationControl object that includes an On-Off schedule, OpenStudio throws an error. The error message is as follows:

SWIG director method error. NoMethodError: undefined method `setOpeningAreaFractionSchedule' for #

Traceback (most recent call last): C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/ventcool/fan.rb:108:in to_openstudio' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/geometry/room.rb:442:inblock in to_openstudio' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/geometry/room.rb:440:in each' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/geometry/room.rb:440:into_openstudio' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/model.rb:473:in block in create_rooms' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/model.rb:471:ineach' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/model.rb:471:in create_rooms' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/model.rb:189:increate_openstudio_objects' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/to_openstudio/model.rb:93:in to_openstudio_model' C:/Program Files/ladybug_tools/resources/measures/honeybee_openstudio_gem/lib/measures/from_honeybee_model/measure.rb:116:inrun'

If I understand correctly the assigned schedule affects the OpeningAreaFraction, but a VentilationFan does not have an OpeningAreaFraction.

chriswmackey commented 5 months ago

Thanks for finding and reporting this bug, @marctavenier . I am able to recreate it and I will push a fix shortly.

chriswmackey commented 5 months ago

I have the fix ready and I verified that it's working correctly:

image