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

OpenStudio 3.9/EnergyPlus 24.2 #1815

Merged
merged 24 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5382bf1
Improves window component load calculation, uses EnergyPlus improveme…
shorowit Apr 29, 2024
b4aa2b4
Update to OS 3.9.0 [ci skip]
shorowit Aug 28, 2024
5f075ca
Update Changelog [ci skip]
shorowit Aug 28, 2024
2a70711
Update docs [ci skip]
shorowit Aug 28, 2024
544bd90
Update expected simulation message. [ci skip]
shorowit Aug 29, 2024
1ee8c03
Merge branch 'os390' of https://github.com/NREL/OpenStudio-HPXML into…
shorowit Sep 6, 2024
11be4d2
update measure [ci skip]
shorowit Sep 6, 2024
d3460f0
Set keep site location information. [ci skip]
shorowit Sep 11, 2024
0170f0a
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Sep 24, 2024
c4b533b
Clarify variable [ci skip]
shorowit Sep 26, 2024
9f2a57e
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Oct 4, 2024
7b5ec04
Shouldn't need this anymore [ci skip]
shorowit Oct 17, 2024
3be703b
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Oct 28, 2024
11f1c97
Try manual OS docker build w/ E+ 24.2
shorowit Oct 28, 2024
fcc71e3
Try again
shorowit Oct 28, 2024
6372cb0
Latest results.
Oct 28, 2024
ce5a5e2
Merge branch 'os390' of https://github.com/NREL/OpenStudio-HPXML into…
shorowit Oct 28, 2024
8843d6c
Latest results.
Oct 28, 2024
6a2d473
Merge pull request #1830 from NREL/os390_keep_site
shorowit Oct 28, 2024
20a4d18
Merge branch 'os390' of https://github.com/NREL/OpenStudio-HPXML into…
shorowit Oct 28, 2024
3e27504
Latest results.
Oct 28, 2024
57d1cf7
Merge pull request #1699 from NREL/window_component_loads
shorowit Oct 28, 2024
25d02cf
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Oct 31, 2024
b21b555
Update CI
shorowit Oct 31, 2024
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
10 changes: 5 additions & 5 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-22.04
container:
image: docker://nrel/openstudio:3.8.0
image: docker://nrel/openstudio:dev-3.9.0-rc1
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
run-workflow1-tests:
runs-on: ubuntu-22.04
container:
image: docker://nrel/openstudio:3.8.0
image: docker://nrel/openstudio:dev-3.9.0-rc1
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -100,7 +100,7 @@ jobs:
run-workflow2-tests:
runs-on: ubuntu-22.04
container:
image: docker://nrel/openstudio:3.8.0
image: docker://nrel/openstudio:dev-3.9.0-rc1
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -129,8 +129,8 @@ jobs:
- name: Install software and run test
shell: pwsh
run: |
$env:OS_VERSION="3.8.0"
$env:OS_SHA="f953b6fcaf"
$env:OS_VERSION="3.9.0-rc1"
$env:OS_SHA="fb69e5479c"
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-stochastic-schedules
Expand Down
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## OpenStudio-HPXML v1.9.0

__New Features__
- Updates to HPXML v4.0 final release.
- Updates to OpenStudio 3.9/EnergyPlus 24.2/HPXML v4.0 final release.
- Allows `Site/Address/ZipCode` to be provided instead of `ClimateandRiskZones/WeatherStation/extension/EPWFilePath`, in which case the closest TMY3 weather station will be automatically selected.
- Allows optional inputs for modeling skylight curbs and/or shafts.
- Allows modeling exterior horizontal insulation for a slab-on-grade foundation (or basement/crawlspace floor).
Expand Down
10 changes: 5 additions & 5 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>af21de2e-e4ba-4fda-9f29-f4ad94d0475c</version_id>
<version_modified>2024-10-30T04:55:55Z</version_modified>
<version_id>99bb1cf3-aeb6-42b0-ae5e-9fc90d0e03ef</version_id>
<version_modified>2024-10-31T03:05:01Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -411,7 +411,7 @@
<filename>location.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>5ACAD08F</checksum>
<checksum>E5CD0079</checksum>
</file>
<file>
<filename>materials.rb</filename>
Expand Down Expand Up @@ -453,7 +453,7 @@
<filename>output.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>8DBF34EC</checksum>
<checksum>573B31F4</checksum>
</file>
<file>
<filename>psychrometrics.rb</filename>
Expand Down Expand Up @@ -621,7 +621,7 @@
<filename>version.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>C8C5DD23</checksum>
<checksum>084EA5B1</checksum>
</file>
<file>
<filename>waterheater.rb</filename>
Expand Down
5 changes: 4 additions & 1 deletion HPXMLtoOpenStudio/resources/location.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ def self.apply_weather_file(model, epw_path)
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @return [nil]
def self.apply_site(model, hpxml_bldg)
# Note: None of these affect the model; see https://github.com/NREL/EnergyPlus/issues/10579.
site = model.getSite
site.setName("#{hpxml_bldg.city}_#{hpxml_bldg.state_code}")
site.setLatitude(hpxml_bldg.latitude)
site.setLongitude(hpxml_bldg.longitude)
site.setTimeZone(hpxml_bldg.time_zone_utc_offset)
site.setElevation(UnitConversions.convert(hpxml_bldg.elevation, 'ft', 'm').round)

# Tell EnergyPlus to use these values, not what's in the weather station (which
# may be at a very different, e.g., elevation)
site.setKeepSiteLocationInformation(true)
end

# Set calendar year on the OpenStudio YearDescription object.
Expand Down
11 changes: 4 additions & 7 deletions HPXMLtoOpenStudio/resources/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,8 @@ def self.apply_component_loads_ems_program(model, hpxml_osm_map, loads_data, sea

key = { 'Window' => :windows_solar,
'Skylight' => :skylights_solar }[surface_type]
vars = { 'Surface Window Transmitted Solar Radiation Energy' => 'ss_trans_in',
vars = { 'Surface Window Transmitted Solar Radiation Rate' => 'ss_trans_in',
'Surface Window Shortwave from Zone Back Out Window Heat Transfer Rate' => 'ss_back_out',
'Surface Window Total Glazing Layers Absorbed Shortwave Radiation Rate' => 'ss_sw_abs',
'Surface Window Total Glazing Layers Absorbed Solar Radiation Energy' => 'ss_sol_abs',
'Surface Inside Face Initial Transmitted Diffuse Transmitted Out Window Solar Radiation Rate' => 'ss_trans_out' }

surfaces_sensors[key] << []
Expand Down Expand Up @@ -682,10 +680,9 @@ def self.apply_component_loads_ems_program(model, hpxml_osm_map, loads_data, sea
surface_sensors.each do |sensors|
s = "Set hr_#{k} = hr_#{k}"
sensors.each do |sensor|
# remove ss_net if switch
if sensor.name.to_s.start_with?('ss_net', 'ss_sol_abs', 'ss_trans_in')
s += " - #{sensor.name}"
elsif sensor.name.to_s.start_with?('ss_sw_abs', 'ss_trans_out', 'ss_back_out')
if sensor.name.to_s.start_with?('ss_trans_in', 'ss_infra', 'ss_glaz')
s += " - #{sensor.name} * ZoneTimestep * 3600"
elsif sensor.name.to_s.start_with?('ss_trans_out', 'ss_back_out')
s += " + #{sensor.name} * ZoneTimestep * 3600"
else
s += " + #{sensor.name}"
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/resources/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Collection of methods related to software versions.
module Version
OS_HPXML_Version = '1.8.1' # Version of the OS-HPXML workflow
OS_Version = '3.8.0' # Required version of OpenStudio (can be 'X.X' or 'X.X.X')
OS_Version = '3.9.0' # Required version of OpenStudio (can be 'X.X' or 'X.X.X')
HPXML_Version = '4.0' # HPXML schemaVersion

# Checks whether the version of OpenStudio that is running OpenStudio-HPXML
Expand Down
6 changes: 3 additions & 3 deletions ReportUtilityBills/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>report_utility_bills</name>
<uid>ca88a425-e59a-4bc4-af51-c7e7d1e960fe</uid>
<version_id>ec7741e4-75b1-4c66-b40a-21ef0e5aa8f1</version_id>
<version_modified>2024-10-16T22:56:39Z</version_modified>
<version_id>31b1e987-41c7-4d52-965d-a902f73bcd90</version_id>
<version_modified>2024-10-31T03:05:02Z</version_modified>
<xml_checksum>15BF4E57</xml_checksum>
<class_name>ReportUtilityBills</class_name>
<display_name>Utility Bills Report</display_name>
Expand Down Expand Up @@ -360,7 +360,7 @@
<filename>test_report_utility_bills.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>B5EF620B</checksum>
<checksum>1D59A593</checksum>
</file>
</files>
</measure>
24 changes: 12 additions & 12 deletions ReportUtilityBills/tests/test_report_utility_bills.rb
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ def test_auto_marginal_rate
# Check that we can successfully look up "auto" rates for every state and every fuel type.
Constants::StateCodesMap.keys.each do |state_code|
fuel_types.each do |fuel_type|
flat_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, state_code, fuel_type, 1) # fixed_charge > 0 ensures marginal_rate != average_rate
refute_nil(flat_rate)
marginal_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, state_code, fuel_type, 1) # fixed_charge > 0 ensures marginal_rate != average_rate
refute_nil(marginal_rate)
if [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas].include? fuel_type
assert_operator(flat_rate, :<, average_rate)
assert_operator(marginal_rate, :<, average_rate)
else
assert_nil(average_rate)
end
Expand All @@ -300,10 +300,10 @@ def test_auto_marginal_rate

# Check that we can successfully look up "auto" rates for the US too.
fuel_types.each do |fuel_type|
flat_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, 'US', fuel_type, 1) # fixed_charge > 0 ensures marginal_rate != average_rate
refute_nil(flat_rate)
marginal_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, 'US', fuel_type, 1) # fixed_charge > 0 ensures marginal_rate != average_rate
refute_nil(marginal_rate)
if [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas].include? fuel_type
assert_operator(flat_rate, :<, average_rate)
assert_operator(marginal_rate, :<, average_rate)
else
assert_nil(average_rate)
end
Expand All @@ -322,10 +322,10 @@ def test_specified_marginal_rate
# Check that we can successfully provide rates for every state and every fuel type.
Constants::StateCodesMap.keys.each do |state_code|
fuel_types.each do |fuel_type|
flat_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, state_code, fuel_type, 1, marginal_rate) # fixed_charge > 0 ensures marginal_rate != average_rate
assert_equal(flat_rate, marginal_rate)
marginal_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, state_code, fuel_type, 1, marginal_rate) # fixed_charge > 0 ensures marginal_rate != average_rate
assert_equal(marginal_rate, marginal_rate)
if [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas].include? fuel_type
assert_operator(flat_rate, :<, average_rate)
assert_operator(marginal_rate, :<, average_rate)
else
assert_nil(average_rate)
end
Expand All @@ -334,10 +334,10 @@ def test_specified_marginal_rate

# Check that we can successfully provide rates for the US too.
fuel_types.each do |fuel_type|
flat_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, 'US', fuel_type, 1, marginal_rate) # fixed_charge > 0 ensures marginal_rate != average_rate
assert_equal(flat_rate, marginal_rate)
marginal_rate, average_rate = UtilityBills.get_rates_from_eia_data(nil, 'US', fuel_type, 1, marginal_rate) # fixed_charge > 0 ensures marginal_rate != average_rate
assert_equal(marginal_rate, marginal_rate)
if [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas].include? fuel_type
assert_operator(flat_rate, :<, average_rate)
assert_operator(marginal_rate, :<, average_rate)
else
assert_nil(average_rate)
end
Expand Down
2 changes: 1 addition & 1 deletion docs/source/usage_instructions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Setup

To get started:

#. Download `OpenStudio 3.8.0 <https://github.com/NREL/OpenStudio/releases/tag/v3.8.0>`_ and install the Command Line Interface/EnergyPlus components, or use the `nrel/openstudio docker image <https://hub.docker.com/r/nrel/openstudio>`_.
#. Download `OpenStudio 3.9.0 <https://github.com/NREL/OpenStudio/releases/tag/v3.9.0>`_ and install the Command Line Interface/EnergyPlus components, or use the `nrel/openstudio docker image <https://hub.docker.com/r/nrel/openstudio>`_.
#. Download the `latest release <https://github.com/NREL/OpenStudio-HPXML/releases>`_.

Running
Expand Down
3 changes: 1 addition & 2 deletions tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2660,8 +2660,7 @@ def display_usage(command_list)
puts 'Updating measure.xmls...'
Dir['**/measure.xml'].each do |measure_xml|
measure_dir = File.dirname(measure_xml)
# Using classic to work around https://github.com/NREL/OpenStudio/issues/5045
command = "#{OpenStudio.getOpenStudioCLI} classic measure -u '#{measure_dir}'"
command = "#{OpenStudio.getOpenStudioCLI} measure -u '#{measure_dir}'"
system(command, [:out, :err] => File::NULL)
end

Expand Down
6 changes: 3 additions & 3 deletions workflow/tests/base_results/results_hers_hot_water.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Test Case,DHW Energy (therms),Recirc Pump (kWh)
L100AD-HW-01.xml,194.9,0.0
L100AD-HW-02.xml,259.5,0.0
L100AD-HW-03.xml,174.1,0.0
L100AD-HW-04.xml,251.3,0.0
L100AD-HW-04.xml,251.2,0.0
L100AD-HW-05.xml,548.5,439.6
L100AD-HW-06.xml,227.5,5.9
L100AD-HW-07.xml,206.5,0.0
L100AM-HW-01.xml,110.3,0.0
L100AM-HW-02.xml,135.7,0.0
L100AM-HW-02.xml,135.6,0.0
L100AM-HW-03.xml,90.8,0.0
L100AM-HW-04.xml,132.5,0.0
L100AM-HW-05.xml,295.8,439.6
L100AM-HW-05.xml,295.7,439.6
L100AM-HW-06.xml,122.7,5.9
L100AM-HW-07.xml,120.4,0.0
Loading