Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 8 additions & 3 deletions resources/measures/upgrade_hvac_console_gshp/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def run(model, runner, user_arguments)
thermal_zone.equipment.each do |equip|
next unless equip.to_ZoneHVACUnitHeater.is_initialized

if !ptacs.size.empty? || !pthps.empty?
if !ptacs.empty? || !pthps.empty?
zones_to_skip << thermal_zone.name.get
else
unit_heaters << equip.to_ZoneHVACUnitHeater.get
Expand Down Expand Up @@ -856,8 +856,13 @@ def run(model, runner, user_arguments)
building = model.getBuilding
soil_conductivity = building.additionalProperties.getFeatureAsDouble('Soil Conductivity')
undisturbed_ground_temp = building.additionalProperties.getFeatureAsDouble('Undisturbed Ground Temperature')
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
# only overwrite the default from the json file if a value was found in building additional properties
if !soil_conductivity.empty?
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
end
if !undisturbed_ground_temp.empty?
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
end

borefield_defaults['loads'] = {}
borefield_defaults['loads']['ground_loads'] = ground_loads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def create_table_lookup(model, name, hvac_system_type, curve_type, divisor, path
end
wb_values = data['wb_data'].uniq.sort
# get db data values if relevant
if ['sen_clg_cap', 'htg_cap htg_pow'].include?(curve_type)
if ['sen_clg_cap', 'htg_cap', 'htg_pow'].include?(curve_type)
if data['db_data'].empty?
runner.registerError("No DB temp performance curve data at path (#{path})")
return false
Expand Down
9 changes: 7 additions & 2 deletions resources/measures/upgrade_hvac_hydronic_gshp/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,13 @@ def run(model, runner, user_arguments)
building = model.getBuilding
soil_conductivity = building.additionalProperties.getFeatureAsDouble('Soil Conductivity')
undisturbed_ground_temp = building.additionalProperties.getFeatureAsDouble('Undisturbed Ground Temperature')
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
# only overwrite the default from the json file if a value was found in building additional properties
if !soil_conductivity.empty?
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
end
if !undisturbed_ground_temp.empty?
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
end

# add timeseries ground loads to json file
borefield_defaults['loads'] = {}
Expand Down
9 changes: 7 additions & 2 deletions resources/measures/upgrade_hvac_packaged_gshp/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,13 @@ def run(model, runner, user_arguments)
building = model.getBuilding
soil_conductivity = building.additionalProperties.getFeatureAsDouble('Soil Conductivity')
undisturbed_ground_temp = building.additionalProperties.getFeatureAsDouble('Undisturbed Ground Temperature')
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
# only overwrite the default from the json file if a value was found in building additional properties
if !soil_conductivity.empty?
borefield_defaults['soil']['conductivity'] = soil_conductivity.to_f.round(2)
end
if !undisturbed_ground_temp.empty?
borefield_defaults['soil']['undisturbed_temp'] = undisturbed_ground_temp.to_f.round(2)
end

borefield_defaults['loads'] = {}
borefield_defaults['loads']['ground_loads'] = ground_loads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def create_table_lookup(model, name, hvac_system_type, curve_type, divisor, path
end
wb_values = data['wb_data'].uniq.sort
# get db data values if relevant
if ['sen_clg_cap', 'htg_cap htg_pow'].include?(curve_type)
if ['sen_clg_cap', 'htg_cap', 'htg_pow'].include?(curve_type)
if data['db_data'].empty?
runner.registerError("No DB temp performance curve data at path (#{path})")
return false
Expand Down