diff --git a/lib/to_openstudio/geometry/room.rb b/lib/to_openstudio/geometry/room.rb index c158eb7..d260e68 100644 --- a/lib/to_openstudio/geometry/room.rb +++ b/lib/to_openstudio/geometry/room.rb @@ -312,10 +312,12 @@ def to_openstudio(openstudio_model) # assign service hot water if it exists if @hash[:properties][:energy][:service_hot_water] - shw_space = ServiceHotWaterAbridged.new(@hash[:properties][:energy][:service_hot_water]) - os_shw_space = shw_space.to_openstudio( - openstudio_model, os_space, @hash[:properties][:energy][:shw]) - $shw_for_plant = shw_space + if @hash[:properties][:energy][:service_hot_water][:flow_per_area].to_f != 0 + shw_space = ServiceHotWaterAbridged.new(@hash[:properties][:energy][:service_hot_water]) + os_shw_space = shw_space.to_openstudio( + openstudio_model, os_space, @hash[:properties][:energy][:shw]) + $shw_for_plant = shw_space + end end # assign infiltration if it exists diff --git a/lib/to_openstudio/model.rb b/lib/to_openstudio/model.rb index e37c9dd..f529da2 100644 --- a/lib/to_openstudio/model.rb +++ b/lib/to_openstudio/model.rb @@ -454,10 +454,12 @@ def create_rooms program_type_id = room[:properties][:energy][:program_type] shw_hash = $programtype_shw_hash[program_type_id] unless shw_hash.nil? - shw_object = ServiceHotWaterAbridged.new(shw_hash) - openstudio_shw = shw_object.to_openstudio( - @openstudio_model, openstudio_room, room[:properties][:energy][:shw]) - $shw_for_plant = shw_object + if shw_hash[:flow_per_area].to_f != 0 + shw_object = ServiceHotWaterAbridged.new(shw_hash) + openstudio_shw = shw_object.to_openstudio( + @openstudio_model, openstudio_room, room[:properties][:energy][:shw]) + $shw_for_plant = shw_object + end end end