lib/to_openstudio/model.rb in honeybee-openstudio-2.21.1 vs lib/to_openstudio/model.rb in honeybee-openstudio-2.22.0
- old
+ new
@@ -120,10 +120,11 @@
# initialize global hashes for various model properties
$gas_gap_hash = Hash.new # hash to track gas gaps in case they are split by shades
$air_boundary_hash = Hash.new # hash to track any air boundary constructions
$window_shade_hash = Hash.new # hash to track any window constructions with shade
+ $window_dynamic_hash = Hash.new # hash to track any dynamic window constructions
$programtype_shw_hash = Hash.new # hash to track ServiceHotWater objects
$programtype_setpoint_hash = Hash.new # hash to track Setpoint objects
$interior_afn_srf_hash = Hash.new # track whether an adjacent surface is already in the AFN
$shw_for_plant = nil # track whether a hot water plant is needed
@@ -183,10 +184,17 @@
puts 'Translating Window Shading Control'
end
create_shading_control
end
+ unless $window_dynamic_hash.empty?
+ if log_report
+ puts 'Translating Dynamic Windows'
+ end
+ create_dynamic_windows
+ end
+
if log_report
puts 'Translating HVAC Systems'
end
create_hvacs
create_hot_water_plant
@@ -264,10 +272,13 @@
when 'WindowConstructionAbridged'
construction_object = WindowConstructionAbridged.new(construction)
when 'WindowConstructionShadeAbridged'
construction_object = WindowConstructionShadeAbridged.new(construction)
$window_shade_hash[construction[:identifier]] = construction_object
+ when 'WindowConstructionDynamicAbridged'
+ construction_object = WindowConstructionDynamicAbridged.new(construction)
+ $window_dynamic_hash[construction[:identifier]] = construction_object
when 'ShadeConstruction'
construction_object = ShadeConstruction.new(construction)
when 'AirBoundaryConstructionAbridged'
construction_object = AirBoundaryConstructionAbridged.new(construction)
$air_boundary_hash[construction[:identifier]] = construction
@@ -497,9 +508,17 @@
os_shd_control = window_shd_constr.to_openstudio_shading_control(@openstudio_model)
sub_face.setShadingControl(os_shd_control)
end
end
end
+ end
+ end
+
+ def create_dynamic_windows
+ # create the actuators and EMS program for any dynamic windows
+ WindowConstructionDynamicAbridged.add_sub_faces_to_window_dynamic_hash(@openstudio_model)
+ $window_dynamic_hash.each do |constr_id, constr_obj|
+ constr_obj.ems_program_to_openstudio(@openstudio_model)
end
end
def create_hvacs
if @hash[:properties][:energy][:hvacs]