Skip to content

Commit

Permalink
Squashed 'hpxml-measures/' changes from 7e4625205..df2b9e477
Browse files Browse the repository at this point in the history
df2b9e477 Merge pull request #1184 from NREL/os350
cccb637e2 Update to 3.5.0-rc1
e94640a16 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os350
08bf340cf Update README.md [ci skip]
df0fdbbcc Merge pull request #1200 from NREL/wh_location_defaulting_bugfix
06a7b0bf1 Fixes possible ruby error when defaulting water heater location.
4c519231e Merge pull request #1198 from NREL/timestamp_convention
656680f85 Latest results.
fc9fce103 First pass.
a5e00de5a Merge pull request #1197 from NREL/sip_rename
d242f552e Latest results.
cfc0422dc Replaces `WallType/StructurallyInsulatedPanel` with `WallType/StructuralInsulatedPanel` per HPXML schema change.
a86acdd41 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os350
06530d541 Remove old file.
253c6b2ad Merge pull request #1185 from NREL/cfis_supplemental_fan
9071be55a Update docs
f66159aa7 Merge branch 'cfis_supplemental_fan' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
0e9507816 Adds error-checking around HoursInOperation specified for a CFIS supplemental fan.
1138d1062 Latest results.
bd30d3ec2 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
d0cf4f78e Merge pull request #1196 from NREL/sync_hpxml
1ba612241 Sync w/ latest HPXML schema.
12fadf0be Merge pull request #1194 from NREL/deprecate_report_hpxml_output
bb4e326e7 Latest results.
9c61140da Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
d1bea4e67 Add CFIS definition/description. [ci skip]
5a94d26eb Remove results_hvac_sizing.csv, now captured as part of results.csv.
47c14dfda Latest results.
9e90bfc75 Bugfix.
7b1726c02 Minor cleanup.
3dee61034 First pass.
4e6d1a66a Merge pull request #1193 from NREL/kiva_initial_temp
9a37f9eee Minor code simplification.
d55139bc2 Update defaulting and tests.
fcd1cc6be Latest results.
993bc8ae5 Merge branch 'kiva_initial_temp' of https://github.com/NREL/OpenStudio-HPXML into kiva_initial_temp
0350656ee Refinements and some unit tests.
9005fe10a Update Changelog.md and docs. [ci skip]
43e2bd409 Latest results.
6fe9c6c6b Handle buildings w/o HVAC. Update base-hvac-none.xml to be in a mild climate.
7b5685541 s
b6e3af677 Some cleanup and better comments.
535b31c08 Update Changelog.md.
01270816c Initial pass at setting a Kiva:Foundation initial temperature better than E+ does.
e71eb1a21 Update test.
b4fbf9672 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os350
45afda16e Latest results.
96f08d39d Update docs [ci skip]
bee170643 Bugfix.
5a8aabdea Latest results.
481bd2f76 Fix tests.
b1b5ec3d8 Update docs. [ci skip]
d87137a1c Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
00181ede4 Update tests.
423ec798c Bugfixes. If CFIS supplemental fan is undersized, provide warning and ensure supplemental fan RTF does not exceed 1.
59bdd4bec Merge branch 'cfis_supplemental_fan' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
3a8fab085 Allow supply/exhaust systems only.
230925090 Merge pull request #1191 from NREL/design_temperatures
07309550b Latest results.
c4093b93d Latest results.
8f50ae7b0 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
282201348 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into design_temperatures
77f7bce74 Bugfix.
7bef24e6e First pass on applying sensible/latent effectiveness when the CFIS supplemental fan is an ERV/HRV.
07b5e5f02 Add design temperatures to output files; update docs.
762a1fcc2 Merge pull request #1190 from NREL/requires
c57d9c889 Simplify/clean up requires.
978f93f37 Merge branch 'cfis_supplemental_fan' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
7953bbe94 Fix tests.
74b7cf005 Latest results.
cee898a64 Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
d34db690c Merge pull request #1189 from NREL/standbyloss
02f3cf405 Update to latest HPXML schema for standby losses. Code backported from NREL/OpenStudio-HPXML#1150.
87ac9dbb2 Handle outdoor air impact of supplemental fan. (Still need to handle HRV/ERV effectiveness.)
731386c05 Revert PTACHeating change.
c98080595 Latest results.
b2848b45a Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into cfis_supplemental_fan
bbaf9b28c Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML into os350
b2b1ae1f2 Switch to OS:develop
7f8adbf5a Initial model updates and sample file.
f62df2c38 Merge pull request #1183 from NREL/ground_conductivity
a7fffdf29 Latest results.
f0ab7cfb2 Use for GSHP model too.
34f3ff967 Saving progress.
813d36712 Latest results.
77f053032 Merge branch 'ground_conductivity' of https://github.com/NREL/OpenStudio-HPXML into ground_conductivity
bee3915af Bugfix.
98821f1b0 Latest results.
36beee646 Finish docs [ci skip]
4dc30f7ab First pass.

git-subtree-dir: hpxml-measures
git-subtree-split: df2b9e4779f7342ca0e45b87262453c8fab9cf3f
  • Loading branch information
shorowit committed Oct 24, 2022
1 parent f702f1d commit 5373cea
Show file tree
Hide file tree
Showing 72 changed files with 5,031 additions and 3,145 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
run-unit-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:dev-3.5.0-alpha
image: docker://nrel/openstudio:3.5.0-rc1
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
run-workflow-tests:
runs-on: ubuntu-latest
container:
image: docker://nrel/openstudio:dev-3.5.0-alpha
image: docker://nrel/openstudio:3.5.0-rc1
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -68,20 +68,20 @@ jobs:
path: workflow/tests/results
name: results

# run-windows-tests:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# with:
# ref: ${{ github.head_ref }}
# - name: Install software and run test
# shell: pwsh
# run: |
# $env:OS_VERSION="3.4.0"
# $env:OS_SHA="4bd816f785"
# Invoke-WebRequest -OutFile Windows.tar.gz -URI "https://github.com/NREL/OpenStudio/releases/download/v${env:OS_VERSION}/OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows.tar.gz"
# tar -xzf Windows.tar.gz
# & .\OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows\bin\openstudio.exe workflow\run_simulation.rb -x workflow\sample_files\base.xml --hourly ALL --add-component-loads --add-detailed-schedule stochastic
run-windows-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Install software and run test
shell: pwsh
run: |
$env:OS_VERSION="3.5.0-rc1"
$env:OS_SHA="0aa781eed9"
Invoke-WebRequest -OutFile Windows.tar.gz -URI "https://github.com/NREL/OpenStudio/releases/download/v${env:OS_VERSION}/OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows.tar.gz"
tar -xzf Windows.tar.gz
& .\OpenStudio-${env:OS_VERSION}+${env:OS_SHA}-Windows\bin\openstudio.exe workflow\run_simulation.rb -x workflow\sample_files\base.xml --hourly ALL --add-component-loads --add-detailed-schedule stochastic
compare-results:
if: github.event_name == 'pull_request'
Expand Down
56 changes: 25 additions & 31 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,14 @@
require 'pathname'
require 'csv'
require 'oga'
require_relative 'resources/geometry'
require_relative '../HPXMLtoOpenStudio/resources/airflow'
require_relative '../HPXMLtoOpenStudio/resources/battery'
require_relative '../HPXMLtoOpenStudio/resources/constants'
require_relative '../HPXMLtoOpenStudio/resources/constructions'
require_relative '../HPXMLtoOpenStudio/resources/geometry'
require_relative '../HPXMLtoOpenStudio/resources/hotwater_appliances'
require_relative '../HPXMLtoOpenStudio/resources/hpxml_defaults'
require_relative '../HPXMLtoOpenStudio/resources/hpxml'
require_relative '../HPXMLtoOpenStudio/resources/hvac'
require_relative '../HPXMLtoOpenStudio/resources/hvac_sizing'
require_relative '../HPXMLtoOpenStudio/resources/lighting'
require_relative '../HPXMLtoOpenStudio/resources/location'
require_relative '../HPXMLtoOpenStudio/resources/materials'
require_relative '../HPXMLtoOpenStudio/resources/misc_loads'
require_relative '../HPXMLtoOpenStudio/resources/meta_measure'
require_relative '../HPXMLtoOpenStudio/resources/psychrometrics'
require_relative '../HPXMLtoOpenStudio/resources/pv'
require_relative '../HPXMLtoOpenStudio/resources/schedules'
require_relative '../HPXMLtoOpenStudio/resources/unit_conversions'
require_relative '../HPXMLtoOpenStudio/resources/util'
require_relative '../HPXMLtoOpenStudio/resources/utility_bills'
require_relative '../HPXMLtoOpenStudio/resources/version'
require_relative '../HPXMLtoOpenStudio/resources/waterheater'
require_relative '../HPXMLtoOpenStudio/resources/weather'
require_relative '../HPXMLtoOpenStudio/resources/xmlhelper'
require_relative '../HPXMLtoOpenStudio/resources/xmlvalidator'
Dir["#{File.dirname(__FILE__)}/resources/*.rb"].each do |resource_file|
require resource_file
end
Dir["#{File.dirname(__FILE__)}/../HPXMLtoOpenStudio/resources/*.rb"].each do |resource_file|
next if resource_file.include? 'minitest_helper.rb'

require resource_file
end

# start the measure
class BuildResidentialHPXML < OpenStudio::Measure::ModelMeasure
Expand Down Expand Up @@ -137,6 +118,12 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setDescription('Presence of nearby buildings, trees, obstructions for infiltration model. If not provided, the OS-HPXML default is used.')
args << arg

arg = OpenStudio::Measure::OSArgument.makeDoubleArgument('site_ground_conductivity', false)
arg.setDisplayName('Site: Ground Conductivity')
arg.setDescription('Conductivity of the ground soil. If not provided, the OS-HPXML default is used.')
arg.setUnits('Btu/hr-ft-F')
args << arg

arg = OpenStudio::Measure::OSArgument.makeStringArgument('site_zip_code', false)
arg.setDisplayName('Site: Zip Code')
arg.setDescription('Zip code of the home address.')
Expand Down Expand Up @@ -3722,7 +3709,11 @@ def self.set_header(hpxml, args)

def self.set_site(hpxml, args)
if args[:site_shielding_of_home].is_initialized
shielding_of_home = args[:site_shielding_of_home].get
hpxml.site.shielding_of_home = args[:site_shielding_of_home].get
end

if args[:site_ground_conductivity].is_initialized
hpxml.site.ground_conductivity = args[:site_ground_conductivity].get
end

if args[:site_type].is_initialized
Expand Down Expand Up @@ -3761,7 +3752,6 @@ def self.set_site(hpxml, args)
end

hpxml.site.azimuth_of_front_of_home = args[:geometry_unit_orientation]
hpxml.site.shielding_of_home = shielding_of_home
end

def self.set_neighbor_buildings(hpxml, args)
Expand Down Expand Up @@ -4995,6 +4985,7 @@ def self.set_ventilation_fans(hpxml, args)

distribution_system_idref = hvac_distribution.id
end
cfis_addtl_runtime_operating_mode = HPXML::CFISModeAirHandler
end

if args[:mech_vent_num_units_served] > 1
Expand Down Expand Up @@ -5027,6 +5018,7 @@ def self.set_ventilation_fans(hpxml, args)

hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
fan_type: args[:mech_vent_fan_type],
cfis_addtl_runtime_operating_mode: cfis_addtl_runtime_operating_mode,
rated_flow_rate: rated_flow_rate,
hours_in_operation: hours_in_operation,
used_for_whole_building_ventilation: true,
Expand Down Expand Up @@ -5217,7 +5209,8 @@ def self.set_water_heating_systems(hpxml, args)
if [HPXML::WaterHeaterTypeCombiTankless, HPXML::WaterHeaterTypeCombiStorage].include? water_heater_type
if args[:water_heater_standby_loss].is_initialized
if args[:water_heater_standby_loss].get > 0
standby_loss = args[:water_heater_standby_loss].get
standby_loss_units = HPXML::UnitsDegFPerHour
standby_loss_value = args[:water_heater_standby_loss].get
end
end
end
Expand Down Expand Up @@ -5280,7 +5273,8 @@ def self.set_water_heating_systems(hpxml, args)
recovery_efficiency: recovery_efficiency,
uses_desuperheater: uses_desuperheater,
related_hvac_idref: related_hvac_idref,
standby_loss: standby_loss,
standby_loss_units: standby_loss_units,
standby_loss_value: standby_loss_value,
jacket_r_value: jacket_r_value,
temperature: temperature,
heating_capacity: heating_capacity,
Expand Down
27 changes: 18 additions & 9 deletions BuildResidentialHPXML/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>95907b11-41a6-4840-9451-2b5ed94a6ade</version_id>
<version_modified>20220927T182223Z</version_modified>
<version_id>d6845eb1-ab38-46cd-a135-f2d6f179501d</version_id>
<version_modified>20221014T143310Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -165,6 +165,15 @@
</choice>
</choices>
</argument>
<argument>
<name>site_ground_conductivity</name>
<display_name>Site: Ground Conductivity</display_name>
<description>Conductivity of the ground soil. If not provided, the OS-HPXML default is used.</description>
<type>Double</type>
<units>Btu/hr-ft-F</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>site_zip_code</name>
<display_name>Site: Zip Code</display_name>
Expand Down Expand Up @@ -6389,6 +6398,12 @@
<usage_type>resource</usage_type>
<checksum>80E1626B</checksum>
</file>
<file>
<filename>build_residential_hpxml_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>CB987FCD</checksum>
</file>
<file>
<version>
<software_program>OpenStudio</software_program>
Expand All @@ -6398,13 +6413,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>B3FCE1F4</checksum>
</file>
<file>
<filename>build_residential_hpxml_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>CB987FCD</checksum>
<checksum>19F95231</checksum>
</file>
</files>
</measure>
17 changes: 8 additions & 9 deletions BuildResidentialScheduleFile/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
require 'openstudio'
require 'pathname'
require 'oga'
require_relative 'resources/schedules'
require_relative '../HPXMLtoOpenStudio/resources/constants'
require_relative '../HPXMLtoOpenStudio/resources/geometry'
require_relative '../HPXMLtoOpenStudio/resources/hpxml'
require_relative '../HPXMLtoOpenStudio/resources/lighting'
require_relative '../HPXMLtoOpenStudio/resources/location'
require_relative '../HPXMLtoOpenStudio/resources/meta_measure'
require_relative '../HPXMLtoOpenStudio/resources/schedules'
require_relative '../HPXMLtoOpenStudio/resources/xmlhelper'
Dir["#{File.dirname(__FILE__)}/resources/*.rb"].each do |resource_file|
require resource_file
end
Dir["#{File.dirname(__FILE__)}/../HPXMLtoOpenStudio/resources/*.rb"].each do |resource_file|
next if resource_file.include? 'minitest_helper.rb'

require resource_file
end

# start the measure
class BuildResidentialScheduleFile < OpenStudio::Measure::ModelMeasure
Expand Down
43 changes: 9 additions & 34 deletions BuildResidentialScheduleFile/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>build_residential_schedule_file</name>
<uid>f770b2db-1a9f-4e99-99a7-7f3161a594b1</uid>
<version_id>dc6aaebd-e92c-4cd5-8af8-1c70c0729a2d</version_id>
<version_modified>20220927T030237Z</version_modified>
<version_id>6d7c42b2-ca3c-4d3f-b428-8164641d0dcf</version_id>
<version_modified>20221004T143231Z</version_modified>
<xml_checksum>03F02484</xml_checksum>
<class_name>BuildResidentialScheduleFile</class_name>
<display_name>Schedule File Builder</display_name>
Expand All @@ -16,19 +16,14 @@
<display_name>HPXML File Path</display_name>
<description>Absolute/relative path of the HPXML file.</description>
<type>String</type>
<units></units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value></default_value>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>schedules_type</name>
<display_name>Schedules: Type</display_name>
<description>The type of occupant-related schedules to use.</description>
<type>Choice</type>
<units></units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value>smooth</default_value>
Expand All @@ -42,20 +37,14 @@
<display_name>stochastic</display_name>
</choice>
</choices>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>schedules_vacancy_period</name>
<display_name>Schedules: Vacancy Period</display_name>
<description>Specifies the vacancy period. Enter a date like "Dec 15 - Jan 15".</description>
<type>String</type>
<units></units>
<required>false</required>
<model_dependent>false</model_dependent>
<default_value></default_value>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>schedules_random_seed</name>
Expand All @@ -65,40 +54,28 @@
<units>#</units>
<required>false</required>
<model_dependent>false</model_dependent>
<default_value></default_value>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>output_csv_path</name>
<display_name>Schedules: Output CSV Path</display_name>
<description>Absolute/relative path of the CSV file containing occupancy schedules. Relative paths are relative to the HPXML output path.</description>
<type>String</type>
<units></units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value></default_value>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>hpxml_output_path</name>
<display_name>HPXML Output File Path</display_name>
<description>Absolute/relative output path of the HPXML file. This HPXML file will include the output CSV path.</description>
<type>String</type>
<units></units>
<required>true</required>
<model_dependent>false</model_dependent>
<default_value></default_value>
<min_value></min_value>
<max_value></max_value>
</argument>
<argument>
<name>debug</name>
<display_name>Debug Mode?</display_name>
<description>Applicable when schedules type is stochastic. If true: Write extra state column(s).</description>
<type>Boolean</type>
<units></units>
<required>false</required>
<model_dependent>false</model_dependent>
<default_value>false</default_value>
Expand All @@ -112,8 +89,6 @@
<display_name>false</display_name>
</choice>
</choices>
<min_value></min_value>
<max_value></max_value>
</argument>
</arguments>
<outputs />
Expand Down Expand Up @@ -921,6 +896,12 @@
<usage_type>resource</usage_type>
<checksum>15F4F182</checksum>
</file>
<file>
<filename>build_residential_schedule_file_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>41CA164F</checksum>
</file>
<file>
<version>
<software_program>OpenStudio</software_program>
Expand All @@ -930,13 +911,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>AAE8B0D8</checksum>
</file>
<file>
<filename>build_residential_schedule_file_test.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>41CA164F</checksum>
<checksum>8FF07C66</checksum>
</file>
</files>
</measure>
Loading

0 comments on commit 5373cea

Please sign in to comment.