Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(hot_water): Fix bug with translating default "ideal" hot water load #339

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading