Skip to content

Commit

Permalink
fix(hot_water): Fix bug with translating default "ideal" hot water load
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Jun 3, 2024
1 parent c6b5abb commit 8dbc329
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/to_openstudio/load/service_hot_water.rb
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ def add_hot_water_plants(openstudio_model, shw_hashes)
end

def to_openstudio(openstudio_model, os_space, shw_name)
# if there's no name, assume that we're using the default district water heater
if shw_name.nil?
shw_name = 'default_district_shw'
end

# create water use equipment + connection and set identifier
os_shw_def = OpenStudio::Model::WaterUseEquipmentDefinition.new(openstudio_model)
os_shw = OpenStudio::Model::WaterUseEquipment.new(os_shw_def)
Expand Down Expand Up @@ -273,9 +278,6 @@ def to_openstudio(openstudio_model, os_space, shw_name)
@@max_target_temp = target_temp
@@max_temp_schedule = target_water_sch
end
if shw_name.nil?
shw_name = 'default_district_shw'
end
if @@shw_connections[shw_name].nil?
@@shw_connections[shw_name] = []
end
Expand Down

0 comments on commit 8dbc329

Please sign in to comment.