Skip to content

Commit

Permalink
fix(shw): Ensure hot water plant does not get created when all load is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Aug 1, 2022
1 parent a612dd4 commit 7c58340
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions lib/to_openstudio/geometry/room.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

# as#filtration if it exists
Expand Down
10 changes: 6 additions & 4 deletions lib/to_openstudio/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7c58340

Please # to comment.