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

Replace Hard-Coded Sensible Capacity Curves with ADP/BF #1707

Merged
merged 70 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
698aaf4
Committing pseudo_code_heat_pump_sizing.txt to branch OS_ACCA_Man_S_u…
Sashadf1 Apr 2, 2024
1ac11a2
adding comment on apply_equipment_adjustments
Sashadf1 Apr 8, 2024
82e23b6
Merge remote-tracking branch 'origin/master' into acca_manual_s
Sashadf1 Apr 8, 2024
af484e8
adding explanatory comments
Sashadf1 Apr 8, 2024
49e998d
hvac_sizing.rb
Sashadf1 Apr 9, 2024
2aca92f
Committing comments for ADP/BF
Sashadf1 May 8, 2024
6861e46
Merge branch 'master' into adp_bf_method_design_shr
Sashadf1 May 8, 2024
af58345
Translating E+ coil bypass factor method to recalculate cool_cap_design
Sashadf1 May 9, 2024
c1a7827
calculating A_o_rated with correct unit conversions and methods in ps…
Sashadf1 May 10, 2024
2cdde89
renamed A_o from A_o rated because A_o is not a function of design vs…
Sashadf1 May 10, 2024
1e3ef9a
refactor add_cooling_system function variable input order convention …
Sashadf1 May 13, 2024
7905315
fixed typo in comments of CoilAoFactor method in psychrometrics.rb
Sashadf1 May 14, 2024
f9ed1b8
fixed typo in descriptive comments of psychrometrics.rb
Sashadf1 May 14, 2024
74bb5fa
removing pesky return 1.0 that shouldn't be there, preventing it from…
Sashadf1 May 14, 2024
0391906
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 May 17, 2024
85b2e27
work on implementing ADP/BF. coil a_o factor already calculated in hv…
Sashadf1 May 21, 2024
d37f8c1
using pre-existing coil ao factor stored in cooling additional proper…
Sashadf1 May 30, 2024
26a55b3
fixed unit conversion on cool_cap_rated so that Psychrometrics.rb doe…
Sashadf1 May 31, 2024
c721a01
iteration for ADP/BF
Sashadf1 Jun 11, 2024
f0d925c
more comments
Sashadf1 Jun 17, 2024
b177cb9
more work on iteration for design airflow
Sashadf1 Jun 18, 2024
1ca7c4a
finished writing code for ADP/BF implementation. ADP/BF method is a b…
Sashadf1 Jun 20, 2024
3f8f26d
confident in ADP/BF
Sashadf1 Jun 21, 2024
308c1f7
Fix error and minor refactoring.
shorowit Jun 21, 2024
8f4b83d
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Jun 21, 2024
a887009
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Jun 25, 2024
400a43f
Temporarily disable test to get CI results.
shorowit Jun 25, 2024
315916f
Latest results.
Jun 25, 2024
487c702
defined test_calculate_SHR() in hvac_sizing_test.rb
Sashadf1 Jun 25, 2024
38cb971
added files after git restore HPXMLtoOpenStudio to recover HPXMLtoOpe…
Sashadf1 Jul 10, 2024
f660286
test_error.xml running without failure. haven't inspected annual or t…
Sashadf1 Jul 11, 2024
4d5ceca
remove unit test for Psychrometrics.CalculateSHR(), since test_error.…
Sashadf1 Jul 11, 2024
83d3094
hvac_sizing.rb, measure.xml, and docs updates after running RuboCop
Sashadf1 Jul 11, 2024
f598241
correct hvac_sizing and removing duplicated HPXMLtoOpenStudio directo…
Sashadf1 Jul 11, 2024
0b0cc26
Merge branch 'master' into adp_bf_method_design_shr
joseph-robertson Jul 11, 2024
49fd105
Re-enable test, remove files.
shorowit Jul 12, 2024
1edc822
Latest results.
Jul 12, 2024
14f36eb
removing puts statements before PR review
Sashadf1 Jul 17, 2024
2de64ea
last explanatory comment before marking adp_bf_method PR for review
Sashadf1 Jul 17, 2024
ba79c8a
adp_bf_method branch up to date w/ master, merge conflicts resolved m…
Sashadf1 Jul 19, 2024
599ec24
resolved merge conflicts in measure.xml
Sashadf1 Jul 19, 2024
776661a
manually resolved merge conflicts in results.csv
Sashadf1 Jul 19, 2024
d373f6e
Latest results.
Jul 19, 2024
c07cb17
refactor to rename hvac_sizings.Design_SHR object property to local v…
Sashadf1 Jul 22, 2024
547cf7f
removing :Design_SHR property from HVACSizingValues class definition,…
Sashadf1 Jul 22, 2024
1d3a43a
changing comments on get_nominal_speed method to match remote master
Sashadf1 Jul 22, 2024
2373097
updating comments on HVACSizingValues attributes to match master. No …
Sashadf1 Jul 22, 2024
8b94164
successful? merge of latest master into adp_bf_method_design_shr to u…
Sashadf1 Jul 22, 2024
a7d7e41
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Aug 8, 2024
50bb972
Latest results.
Aug 8, 2024
ce0994b
/ \ line extension + divisor in hvac_sizing.rb
Sashadf1 Aug 19, 2024
18f106b
descriptive comments on get_hvac_size_limits
Sashadf1 Aug 19, 2024
0a7b1f3
fixes to get_hvac_size_limits to ensure adp_bf_branch runs without error
Sashadf1 Aug 19, 2024
49372e7
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Aug 21, 2024
18cf413
Latest results.
Aug 21, 2024
178f5da
addressing first Jon W. comment re adp_bf review
Sashadf1 Aug 22, 2024
0692d10
concluded merge from diverging local and origin adp_bf_branches
Sashadf1 Aug 26, 2024
cb5e1d1
adding informative messages to design airflow calculation for central…
Sashadf1 Aug 26, 2024
40f3831
adding comments re a_o_rated to address Jon Winkler review comment 2
Sashadf1 Aug 26, 2024
9c683e7
running Rubocop
Sashadf1 Aug 26, 2024
5df10eb
pulling in master after addressing adp_bf review comments
Sashadf1 Aug 26, 2024
1c418dc
succesfully ran Rubocop
Sashadf1 Aug 26, 2024
a71a116
accepting incoming master to get adp branch up to date
Sashadf1 Sep 16, 2024
4779ada
changed variable name from hvac_cooling_shr to hvac_cooling_shr_rated…
Sashadf1 Sep 17, 2024
12fee34
measure.xml updated after running RuboCop. no offenses detected, meas…
Sashadf1 Sep 17, 2024
c6435fa
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Sep 18, 2024
50c9c7d
Unrelated code cleanup
shorowit Sep 18, 2024
56a8713
Latest results.
Sep 18, 2024
5efcc61
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit Sep 20, 2024
d315784
Cleanup comments.
shorowit Sep 20, 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
46 changes: 44 additions & 2 deletions BuildResidentialHPXML/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>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>2439d1bf-b493-4236-97ab-badc6ee2b0c2</version_id>
<version_modified>2024-09-18T23:10:07Z</version_modified>
<version_id>7c042c03-f23f-43f8-aa9e-b7c404f70542</version_id>
<version_modified>2024-09-20T20:24:59Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -7455,6 +7455,48 @@
<usage_type>resource</usage_type>
<checksum>F80359E3</checksum>
</file>
<file>
<filename>extra_files/base-mf.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>06C3D0DD</checksum>
</file>
<file>
<filename>extra_files/base-mf2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>04582640</checksum>
</file>
<file>
<filename>extra_files/base-sfa.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>16ED9F15</checksum>
</file>
<file>
<filename>extra_files/base-sfa2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>1B60C132</checksum>
</file>
<file>
<filename>extra_files/base-sfa3.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>DD9CD517</checksum>
</file>
<file>
<filename>extra_files/base-sfd.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>79463062</checksum>
</file>
<file>
<filename>extra_files/base-sfd2.xml</filename>
<filetype>xml</filetype>
<usage_type>test</usage_type>
<checksum>9FC7FBA9</checksum>
</file>
<file>
<filename>test_build_residential_hpxml.rb</filename>
<filetype>rb</filetype>
Expand Down
33 changes: 16 additions & 17 deletions HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ def run(model, runner, user_arguments)

# Create OpenStudio unit model(s)
hpxml_osm_map = {}
hpxml.buildings.each_with_index do |hpxml_bldg, i|
hpxml.buildings.each do |hpxml_bldg|
# Create the model for this single unit
# If we're running a whole SFA/MF building, all the unit models will be merged later
if hpxml.buildings.size > 1
unit_model = OpenStudio::Model::Model.new
create_unit_model(hpxml, hpxml_bldg, runner, unit_model, epw_path, weather, hpxml_sch_map[hpxml_bldg], i + 1)
create_unit_model(hpxml, hpxml_bldg, runner, unit_model, epw_path, weather, hpxml_sch_map[hpxml_bldg])
hpxml_osm_map[hpxml_bldg] = unit_model
else
create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, hpxml_sch_map[hpxml_bldg], i + 1)
create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, hpxml_sch_map[hpxml_bldg])
hpxml_osm_map[hpxml_bldg] = model
end
end
Expand Down Expand Up @@ -313,19 +313,9 @@ def process_defaults_schedules_emissions_files(runner, weather, hpxml, args)
# @param epw_path [String] Path to the EPW weather file
# @param weather [WeatherFile] Weather object containing EPW information
# @param schedules_file [SchedulesFile] SchedulesFile wrapper class instance of detailed schedule files
# @param unit_num [Integer] index number corresponding to an HPXML Building object
# @return [nil]
def create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, schedules_file, unit_num)
# Here we turn off OS error-checking so that any invalid values provided
# to OS SDK methods are passed along to EnergyPlus and produce errors. If
# we didn't go this, we'd end up with successful EnergyPlus simulations that
# use the wrong (default) value unless we check the return value of *every*
# OS SDK setter method to notice there was an invalid value provided.
# See https://github.com/NREL/OpenStudio/pull/4505 for more background.
model.setStrictnessLevel('None'.to_StrictnessLevel)

# Init
init(hpxml_bldg, hpxml.header)
def create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, schedules_file)
init(model, hpxml_bldg, hpxml.header)
SimControls.apply(model, hpxml.header)
Location.apply(model, weather, hpxml_bldg, hpxml.header, epw_path)

Expand All @@ -347,7 +337,7 @@ def create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, sched
Geometry.apply_thermal_mass(model, spaces, hpxml_bldg, hpxml.header)
Geometry.set_zone_volumes(spaces, hpxml_bldg, hpxml.header)
Geometry.explode_surfaces(model, hpxml_bldg)
Geometry.apply_building_unit(model, unit_num)
Geometry.apply_building_unit(model, hpxml, hpxml_bldg)

# HVAC
airloop_map = HVAC.apply_hvac_systems(runner, model, weather, spaces, hpxml_bldg, hpxml.header, schedules_file, hvac_days)
Expand Down Expand Up @@ -380,10 +370,19 @@ def create_unit_model(hpxml, hpxml_bldg, runner, model, epw_path, weather, sched

# Miscellaneous logic that needs to occur upfront.
#
# @param model [OpenStudio::Model::Model] OpenStudio Model object
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @param hpxml_header [HPXML::Header] HPXML Header object (one per HPXML file)
# @return [nil]
def init(hpxml_bldg, hpxml_header)
def init(model, hpxml_bldg, hpxml_header)
# Here we turn off OS error-checking so that any invalid values provided
# to OS SDK methods are passed along to EnergyPlus and produce errors. If
# we didn't go this, we'd end up with successful EnergyPlus simulations that
# use the wrong (default) value unless we check the return value of *every*
# OS SDK setter method to notice there was an invalid value provided.
# See https://github.com/NREL/OpenStudio/pull/4505 for more background.
model.setStrictnessLevel('None'.to_StrictnessLevel)

# Store the fraction of windows operable before we collapse surfaces
hpxml_bldg.additional_properties.initial_frac_windows_operable = hpxml_bldg.fraction_of_windows_operable()

Expand Down
14 changes: 7 additions & 7 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>1650dfa9-50da-4856-b117-58dbffd75ff7</version_id>
<version_modified>2024-09-19T22:24:22Z</version_modified>
<version_id>3fa6e285-3db2-43a1-8e1c-66405c34438c</version_id>
<version_modified>2024-09-20T20:36:31Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -183,7 +183,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>1C013D19</checksum>
<checksum>65C907FB</checksum>
</file>
<file>
<filename>airflow.rb</filename>
Expand Down Expand Up @@ -339,7 +339,7 @@
<filename>geometry.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>095FE2B7</checksum>
<checksum>1DE39C4E</checksum>
</file>
<file>
<filename>hotwater_appliances.rb</filename>
Expand Down Expand Up @@ -387,13 +387,13 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E26C6DD2</checksum>
<checksum>D60E72E2</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0998C39D</checksum>
<checksum>9EE935C4</checksum>
</file>
<file>
<filename>internal_gains.rb</filename>
Expand Down Expand Up @@ -459,7 +459,7 @@
<filename>psychrometrics.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>86A74352</checksum>
<checksum>716C98E6</checksum>
</file>
<file>
<filename>pv.rb</filename>
Expand Down
9 changes: 6 additions & 3 deletions HPXMLtoOpenStudio/resources/geometry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1993,10 +1993,13 @@ def self.create_or_get_space(model, spaces, location, hpxml_bldg)
# Store the HPXML Building object unit number for use in reporting measure.
#
# @param model [OpenStudio::Model::Model] OpenStudio Model object
# @param unit_number [Integer] index number corresponding to an HPXML Building object
# @param hpxml [HPXML] HPXML object
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @return [nil]
def self.apply_building_unit(model, unit_num)
return if unit_num.nil?
def self.apply_building_unit(model, hpxml, hpxml_bldg)
return if hpxml.buildings.size == 1

unit_num = hpxml.buildings.index(hpxml_bldg) + 1

unit = OpenStudio::Model::BuildingUnit.new(model)
unit.additionalProperties.setFeature('unit_num', unit_num)
Expand Down
4 changes: 3 additions & 1 deletion HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module HVAC
AirSourceHeatRatedODB = 47.0 # degF, Rated outdoor drybulb for air-source systems, heating
AirSourceHeatRatedIDB = 70.0 # degF, Rated indoor drybulb for air-source systems, heating
AirSourceCoolRatedODB = 95.0 # degF, Rated outdoor drybulb for air-source systems, cooling
AirSourceCoolRatedOWB = 75.0 # degF, Rated outdoor wetbulb for air-source systems, cooling
AirSourceCoolRatedIDB = 80.0 # degF, Rated indoor drybulb for air-source systems, cooling
AirSourceCoolRatedIWB = 67.0 # degF, Rated indoor wetbulb for air-source systems, cooling
CrankcaseHeaterTemp = 50.0 # degF

Expand Down Expand Up @@ -3634,7 +3636,7 @@ def self.set_cool_rated_shrs_gross(cooling_system)
clg_ap.cool_rated_shrs_gross = [cooling_system.cooling_shr] # We don't model the fan separately, so set gross == net
else
# rated shr gross and fan speed ratios
dB_rated = 80.0 # F
dB_rated = HVAC::AirSourceCoolRatedIDB
Sashadf1 marked this conversation as resolved.
Show resolved Hide resolved
win = 0.01118470 # Humidity ratio corresponding to 80F dry bulb/67F wet bulb (from EnergyPlus)

if cooling_system.compressor_type == HPXML::HVACCompressorTypeSingleStage
Expand Down
Loading