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 UnmetLoads measure for OS 3.0 and newer #168

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
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
7 changes: 5 additions & 2 deletions lib/measures/UnmetLoadHoursTroubleshooting/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# update
# start the measure
class UnmetLoadHoursTroubleshooting < OpenStudio::Measure::ReportingMeasure

def name
return 'Unmet Load Hours Troubleshooting'
end
Expand Down Expand Up @@ -55,7 +56,7 @@ def get_unmet_hours_matrix(zoneMetrics)
@metrics[:toleranceTimeHeatSetUnmet] = d.getDouble(1).empty? ? 0.2 : d.getDouble(1).get
@metrics[:toleranceTimeCoolSetUnmet] = d.getDouble(2).empty? ? 0.2 : d.getDouble(2).get
end
# We must use Kelvin -> Rankine conversion instead of Celsius -> Farenheit because the latter conversion adds the 32 degree offset
# We must use Kelvin -> Rankine conversion instead of Celsius -> Fahrenheit because the latter conversion adds the 32 degree offset
@metrics[:toleranceTimeHeatSetUnmetF] = OpenStudio.convert(@metrics[:toleranceTimeHeatSetUnmet], 'K', 'R').get
@metrics[:toleranceTimeCoolSetUnmetF] = OpenStudio.convert(@metrics[:toleranceTimeCoolSetUnmet], 'K', 'R').get

Expand Down Expand Up @@ -258,7 +259,7 @@ def plant_loop_temp_vs_setpoints(zoneMetrics)

rawMin, rawMax = getMinMaxForSchedule(schedule)

exit_temp = plantloop.sizingPlant.getDesignLoopExitTemperature.value
exit_temp = plantloop.sizingPlant.designLoopExitTemperature
Comment on lines -261 to +262
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primary bugfix

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit_temp = OpenStudio.convert(exit_temp, 'C', 'F').get

maxSetpointValue = OpenStudio.convert(rawMax, 'C', 'F').get
Expand Down Expand Up @@ -443,6 +444,8 @@ def time_series_setpoint_vs_temp(zoneMetrics)
@test_nine_data << graph
end
end

attr_reader :measureMetrics
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for the measure unit tests to work


# define what happens when the measure is run
def run(runner, user_arguments)
Expand Down
68 changes: 6 additions & 62 deletions lib/measures/UnmetLoadHoursTroubleshooting/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,69 +3,13 @@
<schema_version>3.1</schema_version>
<name>unmet_load_hours_troubleshooting</name>
<uid>edf8fc3a-5607-4e0f-9dd2-4a1e1545433b</uid>
<version_id>c6295e86-6d14-43d9-ad33-702bbd4aab0f</version_id>
<version_modified>2024-07-11T14:32:03Z</version_modified>
<version_id>f3f2ef3e-9876-47d3-8d66-1e3a75e17fea</version_id>
<version_modified>2024-09-24T19:28:23Z</version_modified>
<xml_checksum>5BFE84C4</xml_checksum>
<class_name>UnmetLoadHoursTroubleshooting</class_name>
<display_name>Unmet Load Hours Troubleshooting</display_name>
<description>Unmet load hours are any hours of operation when conditioned spaces are outside the throttling range for heating or cooling controls. That is, they are the hours in a year that the HVAC system serving a space cannot maintain space setpoint. This measure performs a series of checks against various model input variables and when applicable informs the user of possible sources of unmet cooling and heating hours. The measure also creates a dynamic time series plot of unmet cooling and heating hours, by zone - whose patterns may be interpreted to assist in troubleshooting unmet cooling and heating hours. Prior to running this measure, users will need to add the following output variables to their model: 1) Zone Mean Air Temperature,hourly 2) Zone Thermostat Heating Setpoint Temperature, hourly 3) Zone Thermostat Cooling Setpoint Temperature, hourly 4) Zone People Occupant Count, hourly using the AddOutputVariable OS measure, or the add output variables screen in the OpenStudio application.



























</description>
<modeler_description>This measure performs a series of logic checks against model inputs for diagnosing common issues responsible for unmet cooling and heating hours. The measure will also create a time series interactive chart (using dygraph libraries) to provide a visual inspection of when unmet heating and cooling hours are occurring.



























</modeler_description>
<description>Unmet load hours are any hours of operation when conditioned spaces are outside the throttling range for heating or cooling controls. That is, they are the hours in a year that the HVAC system serving a space cannot maintain space setpoint. This measure performs a series of checks against various model input variables and when applicable informs the user of possible sources of unmet cooling and heating hours. The measure also creates a dynamic time series plot of unmet cooling and heating hours, by zone - whose patterns may be interpreted to assist in troubleshooting unmet cooling and heating hours. Prior to running this measure, users will need to add the following output variables to their model: 1) Zone Mean Air Temperature,hourly 2) Zone Thermostat Heating Setpoint Temperature, hourly 3) Zone Thermostat Cooling Setpoint Temperature, hourly 4) Zone People Occupant Count, hourly using the AddOutputVariable OS measure, or the add output variables screen in the OpenStudio application.</description>
<modeler_description>This measure performs a series of logic checks against model inputs for diagnosing common issues responsible for unmet cooling and heating hours. The measure will also create a time series interactive chart (using dygraph libraries) to provide a visual inspection of when unmet heating and cooling hours are occurring.</modeler_description>
<arguments>
<argument>
<name>measure_zone</name>
Expand Down Expand Up @@ -127,7 +71,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>D516E015</checksum>
<checksum>0A588C59</checksum>
</file>
<file>
<filename>report.html.in</filename>
Expand All @@ -151,7 +95,7 @@
<filename>UnmetLoadHoursTroubleshooting_Test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>EDF1ED99</checksum>
<checksum>A71A5D73</checksum>
</file>
<file>
<filename>sqlfile.sql</filename>
Expand Down
Loading
Loading