Skip to content

Commit

Permalink
trying to address issues related to change in EP 23.2 and 24.1 from D…
Browse files Browse the repository at this point in the history
…istrict Heating to District Heating Water
  • Loading branch information
DavidGoldwasser committed Nov 7, 2024
1 parent 6dd4485 commit b2fe6a4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,30 @@ def energyPlusOutputRequests(runner, user_arguments)
result << OpenStudio::IdfObject.load("Output:Variable,,#{variable},hourly;").get
end

# TODO - add in monthly variables
=begin
# add in monthly variables (needed for OpenStudio 3.7 but not 3.8 and later)
category_strs = []
OpenStudio::EndUseCategoryType.getValues.each do |category_type|
category_str = OpenStudio::EndUseCategoryType.new(category_type).valueDescription
category_strs << category_str
end
monthly_array = ['Output:Table:Monthly']
monthly_array << "Building Energy Performance - District Heating Water"
monthly_array << '2'
category_strs.each do |category_string|
monthly_array << "#{category_string}:District Heating Water"
monthly_array << 'SumOrAverage'
end
result << OpenStudio::IdfObject.load("#{monthly_array.join(',')};").get
monthly_array = ['Output:Table:Monthly']
monthly_array << "Building Energy Performance - District Heating Water Peak Demand"
monthly_array << '2'
category_strs.each do |category_string|
monthly_array << "#{category_string}:District Heating Water"
monthly_array << 'SumOrAverage'
end
result << OpenStudio::IdfObject.load("#{monthly_array.join(',')};").get
=end

result
end
Expand Down
11 changes: 7 additions & 4 deletions shared_resources/os_lib_reporting_bestest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1128,11 +1128,11 @@ def self.monthly_htg_clg_table_section(model, sqlFile, runner, name_only = false

# gather monthly heating from BUILDING ENERGY PERFORMANCE - DISTRICT HEATING Custom Monthly Report
query = 'SELECT Value FROM tabulardatawithstrings WHERE '
query << "ReportName='BUILDING ENERGY PERFORMANCE - DISTRICT HEATING' and "
query << "ReportName='BUILDING ENERGY PERFORMANCE - DISTRICT HEATING WATER' and "
query << "ReportForString='Meter' and "
query << "TableName='Custom Monthly Report' and "
query << "RowName='#{month}' and "
query << "ColumnName='HEATING:DISTRICTHEATING' and "
query << "ColumnName='HEATING:DISTRICTHEATINGWATER' and "
query << "Units='J';"
query_results = sqlFile.execAndReturnFirstDouble(query)
if query_results.empty?
Expand Down Expand Up @@ -1166,11 +1166,11 @@ def self.monthly_htg_clg_table_section(model, sqlFile, runner, name_only = false

# gather monthly heating from BUILDING ENERGY PERFORMANCE - DISTRICT HEATING PEAK DEMAND Custom Monthly Report
query = 'SELECT Value FROM tabulardatawithstrings WHERE '
query << "ReportName='BUILDING ENERGY PERFORMANCE - DISTRICT HEATING PEAK DEMAND' and "
query << "ReportName='BUILDING ENERGY PERFORMANCE - DISTRICT HEATING WATER PEAK DEMAND' and "
query << "ReportForString='Meter' and "
query << "TableName='Custom Monthly Report' and "
query << "RowName='#{month}' and "
query << "ColumnName='DISTRICTHEATING:FACILITY {Maximum}' and "
query << "ColumnName='DISTRICTHEATINGWATER:FACILITY {Maximum}' and "
query << "Units='W';"
query_results = sqlFile.execAndReturnFirstDouble(query)
if query_results.empty?
Expand Down Expand Up @@ -1236,6 +1236,9 @@ def self.monthly_htg_clg_table_section(model, sqlFile, runner, name_only = false
end

# populated runnerRegisterValues for each column. Each is Jan-Dec
runner.registerInfo("Writing out Monthly heating and cooling values")
runner.registerInfo("help: #{monthly_htg_cons.join(",")}")
runner.registerInfo("help2: #{monthly_clg_cons.join(",")}")
runner.registerValue("monthly_htg_cons",monthly_htg_cons.join(",")) #kWh
runner.registerValue("monthly_clg_cons",monthly_clg_cons.join(",")) #kWh
runner.registerValue("monthly_htg_peak_val",monthly_htg_peak_val.join(",")) #kW
Expand Down

0 comments on commit b2fe6a4

Please sign in to comment.