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

G function library #1412

Merged
merged 53 commits into from
Jul 27, 2023
Merged

G function library #1412

merged 53 commits into from
Jul 27, 2023

Conversation

joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Jun 15, 2023

Pull Request Description

Addresses #1202.

Add:

  • new download_g_functions to tasks.rb for fetching G-Function Library 1.0.zip from the Geothermal Data Repository (GDR)
  • new HPXMLtoOpenStudio/resources/g_functions/util.rb with process_g_functions method for "downselecting" contents of borehole configuration json files

Update:

  • bore_spacing default value in hpxml_defaults.rb from 20.0 ft to 16.4 ft (i.e., 5 m)
  • gshp_gfnc_coeff method in hvac_sizing.rb to use data from G function library json files

Checklist for testing g-function linear interpolation:

  • Update the process_g_functions method in HPXMLtoOpenStudio/resources/g_functions/util.rb to not exclude the test case (i.e., rectangular 5x8 configuration) spelled out in the "Interpolation Methodology" section of the documentation (LibraryOverview_v11.1.pdf)
  • Run tasks.rb with download_g_functions argument to populate new json files that include the configuration to test against
  • Open hpxml_inputs.json and add new sample file entries (see BuildResidentialHPXML measure for geothermal_loop_xxx arguments)
  • Run tasks.rb with update_hpxmls to get new sample file(s)
  • Run workflow/run_simulation.rb with new sample file(s) as arguments, and print debug statements in hvac_sizing.rb
  • Compare printed debug statements against corrected g-function values in the documentation
  • Formally implement some of these tests in HPXMLtoOpenStudio test files (a first cut here)

Questions:

  • Do we need to put lower and upper bounds on bore_depth? The json files have g functions for bore depths ranging from 24 m to 384 m. Update: I use a fail statement on any bore_depth outside of the 24 to 384 m range.

Checklist

PR Author: Check these when they're done. Not all may apply. strikethrough and check any that do not apply.

PR Reviewer: Verify each has been completed.

  • Schematron validator (EPvalidator.xml) has been updated
  • Sample files have been added/updated (via tasks.rb)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests and/or workflow/tests/hpxml_translator_test.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

@joseph-robertson joseph-robertson self-assigned this Jun 15, 2023
@shorowit shorowit added the enhancement New feature or request label Jun 20, 2023
@prsh5175
Copy link
Collaborator

I'll be dropping updates on JSON file parsing from the g-function library here since it is related, if that's OK.

@prsh5175
Copy link
Collaborator

prsh5175 commented Jun 21, 2023

Saving the parsed JSONs here. Please take a look at the ones created and let me know if there are any comments.

Copy link
Collaborator

@prsh5175 prsh5175 left a comment

Choose a reason for hiding this comment

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

All other configurations catch JSON subsets accurately, but 'LopU' seems to have some missing still. Check 'M_N visualizations' sheet here.

@joseph-robertson joseph-robertson marked this pull request as ready for review July 27, 2023 18:17
@joseph-robertson joseph-robertson merged commit 29c5dc1 into geothermal_loop Jul 27, 2023
@joseph-robertson joseph-robertson deleted the g_function_library branch July 27, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants