tbd 3.4.3 → 3.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4edf2565b741a5d272169d616339e9f86e4651402ea9ca160f2db30fc38b07f
4
- data.tar.gz: 6320eaf03d3f60c178bc05c4e53d84c42b678dc757590428306b23bf0f6d9b83
3
+ metadata.gz: '088489dd7b5163709bef87c140b053593cca33f27fff736a553ec2c734ace460'
4
+ data.tar.gz: 0e5a5ed2af0d1d4c9d0b50d625147bd519b5944b923ae12d0ef414d88818c0a9
5
5
  SHA512:
6
- metadata.gz: 9972bcf05ee6a42900b8153fd71acb3232a3b00e0cd95c87ffefac1ec982777fa4292fca3361d70ad6a7e4f46cfdca1f1e77879a1677eb75be946bbb4827fe9c
7
- data.tar.gz: 76c04922cf93a8252b2d08e1d14582152d2d43a71ec99099e63467eb4b761602824d62c8e931d49ecd4f7eaa7a6f518a6d6e10bb0375bf56cebed1eef4a38c26
6
+ metadata.gz: 708b50fde62e4990344e51eb46390607ee193338d59e3539c61f80fd53850acfb37dc6659bfe77ef23a3820f1339266fa02425ad719f9f940b948b6564bc6d22
7
+ data.tar.gz: 69c846ef8d3663436b726566dfc3b78e44e6a9ba30431d00b724c6c5778150a8e6b950abdbf18af6bf5e8ed0276d0fa008e683f1c6ee3656c2ca6436c0c74af3
@@ -6,22 +6,6 @@ on:
6
6
  - develop
7
7
 
8
8
  jobs:
9
- test_300x:
10
- runs-on: ubuntu-22.04
11
- steps:
12
- - name: Check out repository
13
- uses: actions/checkout@v2
14
- - name: Run Tests
15
- run: |
16
- echo $(pwd)
17
- echo $(ls)
18
- docker pull nrel/openstudio:3.0.0
19
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.0.0
20
- docker exec -t test pwd
21
- docker exec -t test ls
22
- docker exec -t test bundle update
23
- docker exec -t test bundle exec rake
24
- docker kill test
25
9
  test_321x:
26
10
  runs-on: ubuntu-22.04
27
11
  steps:
@@ -38,7 +22,7 @@ jobs:
38
22
  docker exec -t test bundle update
39
23
  docker exec -t test bundle exec rake
40
24
  docker kill test
41
- test_330x:
25
+ test_351x:
42
26
  runs-on: ubuntu-22.04
43
27
  steps:
44
28
  - name: Check out repository
@@ -47,14 +31,14 @@ jobs:
47
31
  run: |
48
32
  echo $(pwd)
49
33
  echo $(ls)
50
- docker pull nrel/openstudio:3.3.0
51
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.3.0
34
+ docker pull nrel/openstudio:3.5.1
35
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.5.1
52
36
  docker exec -t test pwd
53
37
  docker exec -t test ls
54
38
  docker exec -t test bundle update
55
39
  docker exec -t test bundle exec rake
56
40
  docker kill test
57
- test_340x:
41
+ test_361x:
58
42
  runs-on: ubuntu-22.04
59
43
  steps:
60
44
  - name: Check out repository
@@ -63,14 +47,14 @@ jobs:
63
47
  run: |
64
48
  echo $(pwd)
65
49
  echo $(ls)
66
- docker pull nrel/openstudio:3.4.0
67
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.4.0
50
+ docker pull nrel/openstudio:3.6.1
51
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.6.1
68
52
  docker exec -t test pwd
69
53
  docker exec -t test ls
70
54
  docker exec -t test bundle update
71
55
  docker exec -t test bundle exec rake
72
56
  docker kill test
73
- test_351x:
57
+ test_370x:
74
58
  runs-on: ubuntu-22.04
75
59
  steps:
76
60
  - name: Check out repository
@@ -79,14 +63,14 @@ jobs:
79
63
  run: |
80
64
  echo $(pwd)
81
65
  echo $(ls)
82
- docker pull nrel/openstudio:3.5.1
83
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.5.1
66
+ docker pull nrel/openstudio:3.7.0
67
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.7.0
84
68
  docker exec -t test pwd
85
69
  docker exec -t test ls
86
70
  docker exec -t test bundle update
87
71
  docker exec -t test bundle exec rake
88
72
  docker kill test
89
- test_361x:
73
+ test_380x:
90
74
  runs-on: ubuntu-22.04
91
75
  steps:
92
76
  - name: Check out repository
@@ -95,14 +79,14 @@ jobs:
95
79
  run: |
96
80
  echo $(pwd)
97
81
  echo $(ls)
98
- docker pull nrel/openstudio:3.6.1
99
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.6.1
82
+ docker pull nrel/openstudio:3.8.0
83
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.8.0
100
84
  docker exec -t test pwd
101
85
  docker exec -t test ls
102
86
  docker exec -t test bundle update
103
87
  docker exec -t test bundle exec rake
104
88
  docker kill test
105
- test_370x:
89
+ test_390x:
106
90
  runs-on: ubuntu-22.04
107
91
  steps:
108
92
  - name: Check out repository
@@ -111,14 +95,14 @@ jobs:
111
95
  run: |
112
96
  echo $(pwd)
113
97
  echo $(ls)
114
- docker pull nrel/openstudio:3.7.0
115
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.7.0
98
+ docker pull nrel/openstudio:3.9.0
99
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.9.0
116
100
  docker exec -t test pwd
117
101
  docker exec -t test ls
118
102
  docker exec -t test bundle update
119
103
  docker exec -t test bundle exec rake
120
104
  docker kill test
121
- test_380x:
105
+ test_3100x:
122
106
  runs-on: ubuntu-22.04
123
107
  steps:
124
108
  - name: Check out repository
@@ -127,8 +111,8 @@ jobs:
127
111
  run: |
128
112
  echo $(pwd)
129
113
  echo $(ls)
130
- docker pull nrel/openstudio:3.8.0
131
- docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.8.0
114
+ docker pull nrel/openstudio:3.10.0
115
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.10.0
132
116
  docker exec -t test pwd
133
117
  docker exec -t test ls
134
118
  docker exec -t test bundle update
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2024 Denis Bourgeois & Dan Macumber
3
+ Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -5,13 +5,11 @@ An [OpenStudio Measure](https://nrel.github.io/OpenStudio-user-documentation/ref
5
5
  ## Guide & Downloads
6
6
 
7
7
  Building professionals and energy modellers are encouraged to first consult the online [Guide](https://rd2.github.io/tbd/) - it provides an overview of the underlying theory, references, suggested OpenStudio workflows, etc. Users can download the latest _TBD_ version directly from the Guide itself, or under [releases](https://github.com/rd2/tbd/releases), or via NREL's [BCL](https://bcl.nrel.gov) (search for "bridging" or "rd2"). Questions can be posted on [UnmetHours](https://unmethours.com) - a very useful online resource for OpenStudio users. TBD is also available as a Ruby gem - add:
8
-
9
8
  ```
10
9
  gem "tbd", git: "https://github.com/rd2/tbd", branch: "master"
11
10
  ```
12
11
 
13
- ... in a v2.1 [bundled](https://bundler.io) _Measure_ development environment "Gemfile" (or preferably as a _gemspec_ dependency), and then run:
14
-
12
+ ... in a [bundled](https://bundler.io) _Measure_ development environment "Gemfile" (or preferably as a _gemspec_ dependency), and then run:
15
13
  ```
16
14
  bundle install (or 'bundle update')
17
15
  ```
@@ -24,11 +22,11 @@ Bugs or new feature requests for _TBD_ should be submitted [here](https://github
24
22
 
25
23
  The installation and testing instructions in this section are for developers interested in exploring/tweaking a cloned/forked version of the source code. In an effort to _lighten_ TBD as a Ruby gem, only the most basic tests are deployed in this repository. More detailed tests are housed in a dedicated TBD [testing](https://github.com/rd2/tbd_tests) repo.
26
24
 
27
- TBD is systematically tested against updated OpenStudio versions (since v3.0.0). The following instructions refer to OpenStudio v3.6.1 (requiring Ruby v2.7.2), strictly as an example. Adapt the instructions for more recent versions - see OpenStudio's [compatibility matrix](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix).
25
+ TBD is systematically tested against updated OpenStudio versions (since v3.0.0). The following instructions refer to OpenStudio v3.8.0, which requires Ruby v3.2.2. Earlier OpenStudio versions require Ruby v2.7.2. Adapt instructions for older (or newer) versions - see OpenStudio's [compatibility matrix](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix).
28
26
 
29
27
  ### Windows Installation
30
28
 
31
- Either install Ruby using the [RubyInstaller](https://rubyinstaller.org/downloads/archives/) for [Ruby 2.7.2 (x64)](https://github.com/oneclick/rubyinstaller2/releases/tag/RubyInstaller-2.7.2-1/rubyinstaller-2.7.2-1-x64.exe), or preferably under [WSL2](https://gist.github.com/brgix/0d968d8f32c41f13300dc6769414df79). Run the following steps if going down the _RubyInstaller_ route. From the command line, check that the ruby installation returns the correct Ruby version:
29
+ Either install Ruby using the [RubyInstaller](https://rubyinstaller.org/downloads/archives/) for [Ruby 3.2.2 (x64)](https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.2.2-1/rubyinstaller-3.2.2-1-x64.exe), or preferably under a [WSL2](https://gist.github.com/brgix/0d968d8f32c41f13300dc6769414df79) environment. Run the following steps if going down the _RubyInstaller_ route. From the command line, check that the ruby installation returns the correct Ruby version:
32
30
  ```
33
31
  ruby -v
34
32
  ```
@@ -39,12 +37,11 @@ bundler -v
39
37
  gem install bundler -v 2.1
40
38
  ```
41
39
 
42
- Install the OpenStudio SDK [3.6.1](https://github.com/NREL/OpenStudio/releases/tag/v3.6.1), or the OpenStudio Application [1.6.0](https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.6.0).
43
-
44
- Create a new file ```C:\Ruby27-x64\lib\ruby\site_ruby\openstudio.rb``` (path may be different depending on the environment), and edit it so it _points_ to your new OpenStudio installation:
40
+ Install OpenStudio [3.10.0](https://github.com/NREL/OpenStudio/releases/tag/v3.10.0), or the OpenStudioApplication [1.10.0](https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.10.0).
45
41
 
42
+ Create a new file ```C:\Ruby32-x64\lib\ruby\site_ruby\openstudio.rb``` (path may be different depending on the environment), and edit it so it _points_ to your new OpenStudio installation:
46
43
  ```
47
- require 'C:\openstudio-3.6.1\Ruby\openstudio.rb'
44
+ require 'C:\openstudio-3.10.0\Ruby\openstudio.rb'
48
45
  ```
49
46
 
50
47
  Verify your OpenStudio and Ruby configuration:
@@ -54,65 +51,62 @@ ruby -e "require 'openstudio'" -e "puts OpenStudio::Model::Model.new"
54
51
 
55
52
  ### MacOS Installation
56
53
 
57
- MacOS already comes with Ruby, but likely not the right Ruby version for the desired OpenStudio measure development [environment](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix). Instructions here show how to install Ruby v2.7.2 alongside MacOS's own Ruby version. Although no longer officially supported, instructions for an OpenStudio v2.9.1 setup is described [here](https://github.com/rd2/tbd/blob/master/v291_MacOS.md).
54
+ MacOS already comes with Ruby, but likely not the right Ruby version for the desired OpenStudio measure development [environment](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix). Instructions here show how to install Ruby v3.2.2 alongside MacOS's own Ruby version. Although no longer officially supported, instructions for an OpenStudio v2.9.1 setup is described [here](https://github.com/rd2/tbd/blob/master/v291_MacOS.md).
58
55
 
59
56
  From a Terminal, install [Homebrew](https://brew.sh/index) - nice for package distribution and management. Using Homebrew, install _rbenv_ (which allows users to manage multiple Ruby versions) and finally Ruby:
60
-
61
57
  ```
62
58
  brew install rbenv
63
59
  rbenv init
64
- rbenv install 2.7.2
65
- ```
66
- Install [bundler](https://bundler.io) (if not already installed), great for managing Ruby gems and dependencies:
67
-
68
- ```
69
- bundler -v
70
- gem install bundler -v 2.1
60
+ rbenv install 3.2.2
71
61
  ```
72
62
 
73
63
  In the Terminal, check the Ruby version:
74
-
75
64
  ```
76
65
  ruby -v
77
66
  ```
78
67
 
79
- ... should still report the current Ruby version used by MacOS. To ensure the right version is used for developing OpenStudio Measures, instruct _rbenv_ to switch Ruby version _locally_ within a user’s chosen directory (e.g. "sandbox361"):
80
-
68
+ ... should still report the current Ruby version used by MacOS. To ensure the right version is used for developing OpenStudio Measures, instruct _rbenv_ to switch Ruby version _locally_ within a user’s chosen directory (e.g. "sandbox380"):
81
69
  ```
82
- mkdir ~/Documents/sandbox361
83
- cd ~/Documents/sandbox361
84
- rbenv local 2.7.2
70
+ mkdir ~/Documents/sandbox380
71
+ cd ~/Documents/sandbox380
72
+ rbenv local 3.2.2
85
73
  ruby -v
86
74
  ```
87
- … should report the desired _local_ Ruby version, to be used by default for anything under the "sandbox361" directory tree. To ensure both Ruby versions are operational and safe, run the following checkup twice - once from a user’s home (or ~/), then from within e.g. "sandbox361":
88
75
 
76
+ … should now report the desired _local_ Ruby version, to be used by default for anything under the "sandbox380" directory tree. To ensure both Ruby versions are operational and safe, run the following checkup twice - once from a user’s home (or ~/), then from within e.g. "sandbox380":
89
77
  ```
90
78
  cd ~/
91
79
  ruby -ropen-uri -e 'eval URI.open("https://git.io/vQhWq").read'
92
- cd ~/Documents/sandbox361
80
+ cd ~/Documents/sandbox380
93
81
  ruby -ropen-uri -e 'eval URI.open("https://git.io/vQhWq").read'
94
82
  ```
95
83
 
96
84
  If successful, one should get a ```Hooray!``` from both Ruby versions confirming valid communication with [Rubygems](https://rubygems.org/).
97
85
 
98
- Install the OpenStudio SDK [3.6.1](https://github.com/NREL/OpenStudio/releases/tag/v3.6.1), or the OpenStudio Application [1.6.0](https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.6.0).
86
+ [Bundler](https://bundler.io) is also required for managing Ruby gems and dependencies. With _rbenv_, the right _Bundler_ version should have been installed. If for whatever reason it wasn't installed:
87
+ ```
88
+ bundler -v
89
+ gem install bundler -v 2.4.10
90
+ ```
99
91
 
100
- Create a new file ```~/.rbenv/versions/2.7.2/lib/ruby/site_ruby/openstudio.rb``` (path may be different depending on the environment), and edit it so it _points_ to your new OpenStudio installation:
92
+ Install OpenStudio [3.10.0](https://github.com/NREL/OpenStudio/releases/tag/v3.10.0), or the OpenStudio Application [1.10.0](https://github.com/openstudiocoalition/OpenStudioApplication/releases/tag/v1.10.0).
101
93
 
94
+ Create a new file ```~/.rbenv/versions/3.2.2/lib/ruby/site_ruby/openstudio.rb``` (path may be different depending on the environment), and edit it so it _points_ to your new OpenStudio installation:
102
95
  ```
103
- require '/Applications/OpenStudio-3.6.1/Ruby/openstudio.rb'
96
+ require '/Applications/OpenStudio-3.10.0/Ruby/openstudio.rb'
104
97
  ```
105
98
 
106
99
  Verify your local OpenStudio and Ruby configuration:
107
-
108
100
  ```
109
- cd ~/Documents/sandbox361
101
+ cd ~/Documents/sandbox310
110
102
  ruby -e "require 'openstudio'" -e "puts OpenStudio::Model::Model.new"
111
103
  ```
112
104
 
105
+ Make sure you have latest version of _git_ (e.g. through Homebrew).
106
+
113
107
  ## Clone TBD
114
108
 
115
- Once done with either the Windows or MacOS setup, install the latest version of _git_ (e.g. through Homebrew), then ```git clone``` the TBD repo, e.g. under "sandbox361". Run the basic tests below to ensure the measure operates as expected.
109
+ Once done with either the Windows or MacOS setup, ```git clone``` the TBD repo, e.g. under "sandbox380". Run the basic tests below to ensure the measure operates as expected.
116
110
 
117
111
  ## Complete list of test commands
118
112
 
@@ -127,14 +121,14 @@ bundle exec rake
127
121
 
128
122
  Install [Docker](https://docs.docker.com/desktop/#download-and-install).
129
123
 
130
- Pull the OpenStudio v3.6.1 Docker image:
124
+ Pull the OpenStudio v3.10.0 Docker image:
131
125
  ```
132
- docker pull nrel/openstudio:3.6.1
126
+ docker pull nrel/openstudio:3.10.0
133
127
  ```
134
128
 
135
129
  In the root repository:
136
130
  ```
137
- docker run --name test --rm -d -t -v ${PWD}:/work -w /work nrel/openstudio:3.6.1
131
+ docker run --name test --rm -d -t -v ${PWD}:/work -w /work nrel/openstudio:3.10.0
138
132
  docker exec -t test bundle update
139
133
  docker exec -t test bundle exec rake
140
134
  docker kill test
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2024 Denis Bourgeois & Dan Macumber
3
+ Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
  #
3
- # Copyright (c) 2020-2024 Denis Bourgeois & Dan Macumber
3
+ # Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -3,8 +3,8 @@
3
3
  <schema_version>3.1</schema_version>
4
4
  <name>tbd_measure</name>
5
5
  <uid>8890787b-8c25-4dc8-8641-b6be1b6c2357</uid>
6
- <version_id>12467d7f-9058-4028-b6f8-0448e81b7fef</version_id>
7
- <version_modified>2024-10-15T18:51:39Z</version_modified>
6
+ <version_id>7a2d773a-7a50-4c69-aa1f-93ed796e9ace</version_id>
7
+ <version_modified>2025-08-15T13:39:31Z</version_modified>
8
8
  <xml_checksum>99772807</xml_checksum>
9
9
  <class_name>TBDMeasure</class_name>
10
10
  <display_name>Thermal Bridging and Derating - TBD</display_name>
@@ -464,7 +464,7 @@
464
464
  <filename>LICENSE.md</filename>
465
465
  <filetype>md</filetype>
466
466
  <usage_type>license</usage_type>
467
- <checksum>5C9BFB50</checksum>
467
+ <checksum>3EBCA5DB</checksum>
468
468
  </file>
469
469
  <file>
470
470
  <filename>README.md</filename>
@@ -493,13 +493,13 @@
493
493
  <filename>measure.rb</filename>
494
494
  <filetype>rb</filetype>
495
495
  <usage_type>script</usage_type>
496
- <checksum>A472E915</checksum>
496
+ <checksum>3FBDA0C2</checksum>
497
497
  </file>
498
498
  <file>
499
499
  <filename>geo.rb</filename>
500
500
  <filetype>rb</filetype>
501
501
  <usage_type>resource</usage_type>
502
- <checksum>6C7ACC99</checksum>
502
+ <checksum>EF3BA8F7</checksum>
503
503
  </file>
504
504
  <file>
505
505
  <filename>geometry.rb</filename>
@@ -517,19 +517,19 @@
517
517
  <filename>oslog.rb</filename>
518
518
  <filetype>rb</filetype>
519
519
  <usage_type>resource</usage_type>
520
- <checksum>8CD57B9A</checksum>
520
+ <checksum>586805C4</checksum>
521
521
  </file>
522
522
  <file>
523
523
  <filename>psi.rb</filename>
524
524
  <filetype>rb</filetype>
525
525
  <usage_type>resource</usage_type>
526
- <checksum>25CD6251</checksum>
526
+ <checksum>71AED953</checksum>
527
527
  </file>
528
528
  <file>
529
529
  <filename>tbd.rb</filename>
530
530
  <filetype>rb</filetype>
531
531
  <usage_type>resource</usage_type>
532
- <checksum>FCCCAE84</checksum>
532
+ <checksum>9E26251E</checksum>
533
533
  </file>
534
534
  <file>
535
535
  <filename>transformation.rb</filename>
@@ -541,13 +541,13 @@
541
541
  <filename>ua.rb</filename>
542
542
  <filetype>rb</filetype>
543
543
  <usage_type>resource</usage_type>
544
- <checksum>013BA732</checksum>
544
+ <checksum>022F6D10</checksum>
545
545
  </file>
546
546
  <file>
547
547
  <filename>utils.rb</filename>
548
548
  <filetype>rb</filetype>
549
549
  <usage_type>resource</usage_type>
550
- <checksum>CBC3935D</checksum>
550
+ <checksum>3CD8019A</checksum>
551
551
  </file>
552
552
  <file>
553
553
  <filename>version.rb</filename>
@@ -565,7 +565,7 @@
565
565
  <filename>tbd_tests.rb</filename>
566
566
  <filetype>rb</filetype>
567
567
  <usage_type>test</usage_type>
568
- <checksum>2ECE06CA</checksum>
568
+ <checksum>9C76CD98</checksum>
569
569
  </file>
570
570
  </files>
571
571
  </measure>
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
  #
3
- # Copyright (c) 2020-2024 Denis Bourgeois & Dan Macumber
3
+ # Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -722,15 +722,10 @@ module TBD
722
722
  kva = true unless surface.surfacePropertyExposedFoundationPerimeter.empty?
723
723
  surface.resetAdjacentFoundation
724
724
  surface.resetSurfacePropertyExposedFoundationPerimeter
725
- next unless surface.isGroundSurface
726
725
  next if surface.outsideBoundaryCondition.capitalize == boundary
726
+ next unless surface.outsideBoundaryCondition.capitalize == "Foundation"
727
727
 
728
- lc = surface.construction.empty? ? nil : surface.construction.get
729
728
  surface.setOutsideBoundaryCondition(boundary)
730
- next if boundary == "Ground"
731
- next if lc.nil?
732
-
733
- surface.setConstruction(lc) if surface.construction.empty?
734
729
  end
735
730
 
736
731
  perimeters = model.getSurfacePropertyExposedFoundationPerimeters
@@ -834,11 +829,16 @@ module TBD
834
829
  edges.each do |code1, edge|
835
830
  edge[:surfaces].keys.each do |id|
836
831
  next unless floors.key?(id)
832
+
837
833
  next unless floors[id][:boundary].downcase == "foundation"
838
834
  next if floors[id].key?(:kiva)
839
835
 
840
- floors[id][:kiva ] = :slab # initially slabs-on-grade
841
- floors[id][:exposed] = 0.0 # slab-on-grade or walkout perimeter
836
+ # Initially set as slab-on-grade. Track 'exposed foundation perimeter'.
837
+ # - outdoor wall/slab-on-grade edge lengths
838
+ # - outdoor wall/basement slab walkout edge lengths
839
+ # - basement wall/basement slab edge lengths
840
+ floors[id][:kiva ] = :slab
841
+ floors[id][:exposed] = 0.0
842
842
 
843
843
  # Loop around current edge.
844
844
  edge[:surfaces].keys.each do |i|
@@ -847,8 +847,9 @@ module TBD
847
847
  next unless walls[i][:boundary].downcase == "foundation"
848
848
  next if walls[i].key?(:kiva)
849
849
 
850
- floors[id][:kiva] = :basement
851
- walls[i ][:kiva] = id
850
+ floors[id][:kiva ] = :basement
851
+ floors[id][:exposed] += edge[:length]
852
+ walls[i ][:kiva ] = id
852
853
  end
853
854
 
854
855
  # Loop around current edge.
@@ -862,7 +863,7 @@ module TBD
862
863
 
863
864
  # Loop around other floor edges.
864
865
  edges.each do |code2, e|
865
- next if code1 == code2 # skip - same edge
866
+ next if code1 == code2 # skip - same edge
866
867
 
867
868
  e[:surfaces].keys.each do |i|
868
869
  next unless i == id # good - same floor
@@ -873,8 +874,9 @@ module TBD
873
874
  next unless walls[ii][:boundary].downcase == "foundation"
874
875
  next if walls[ii].key?(:kiva)
875
876
 
876
- floors[id][:kiva] = :basement
877
- walls[ii ][:kiva] = id
877
+ floors[id][:kiva ] = :basement
878
+ walls[ii ][:kiva ] = id
879
+ floors[id][:exposed] += e[:length]
878
880
  end
879
881
 
880
882
  e[:surfaces].keys.each do |ii|
@@ -889,6 +891,7 @@ module TBD
889
891
 
890
892
  foundation = OpenStudio::Model::FoundationKiva.new(model)
891
893
  foundation.setName("KIVA Foundation Floor #{id}")
894
+
892
895
  floor = model.getSurfaceByName(id)
893
896
  kiva = false if floor.empty?
894
897
  next if floor.empty?