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.
@@ -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/lib/tbd/geo.rb 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
@@ -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?
data/lib/tbd/psi.rb 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
@@ -1678,8 +1678,8 @@ module TBD
1678
1678
  # around edge with respect to a reference vector (perpendicular to the
1679
1679
  # edge), +clockwise as one is looking in the opposite position of the edge
1680
1680
  # vector. For instance, a vertical edge has a reference vector pointing
1681
- # North - surfaces eastward of the edge are (0°,180°], while surfaces
1682
- # westward of the edge are (180°,360°].
1681
+ # North - surfaces eastward of the edge are (0deg,180deg], while surfaces
1682
+ # westward of the edge are (180deg,360deg].
1683
1683
  #
1684
1684
  # Much of the following code is of a topological nature, and should ideally
1685
1685
  # (or eventually) become available functionality offered by Topolys. Topolys
@@ -1741,7 +1741,7 @@ module TBD
1741
1741
 
1742
1742
  angle = reference_V.angle(farthest_V)
1743
1743
  angle = 0 if angle.nil?
1744
- adjust = false # adjust angle [180°, 360°] if necessary
1744
+ adjust = false # adjust angle [180deg, 360deg] if necessary
1745
1745
 
1746
1746
  if vertical
1747
1747
  adjust = true if east.dot(farthest_V) < -TOL
data/lib/tbd/ua.rb 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
@@ -422,8 +422,8 @@ module TBD
422
422
  # @param [Hash] s TBD surfaces (keys: Openstudio surface names)
423
423
  # @option s [Bool] :deratable whether surface is deratable, s[][:deratable]
424
424
  # @option s [:wall, :ceiling, :floor] :type TBD surface type
425
- # @option s [#to_f] :heating applicable heating setpoint temperature in °C
426
- # @option s [#to_f] :cooling applicable cooling setpoint temperature in °C
425
+ # @option s [#to_f] :heating applicable heating setpoint temperature in C
426
+ # @option s [#to_f] :cooling applicable cooling setpoint temperature in C
427
427
  # @option s [Hash] :windows TBD surface-specific windows e.g. s[][:windows]
428
428
  # @option s [Hash] :doors TBD surface-specific doors
429
429
  # @option s [Hash] :skylights TBD surface-specific skylights
@@ -466,7 +466,7 @@ module TBD
466
466
  ref = 1 / 5.46
467
467
  ref = 1 / 3.60 if surface[:type] == :wall
468
468
 
469
- # Adjust for lower heating setpoint (assumes -25°C design conditions).
469
+ # Adjust for lower heating setpoint (assumes -25C design conditions).
470
470
  ref *= 43 / (heating + 25) if heating < 18 && cooling > 40
471
471
 
472
472
  surface[:ref] = ref
@@ -628,8 +628,8 @@ module TBD
628
628
  end
629
629
 
630
630
  # Set up 2x heating setpoint (HSTP) "blocks" (or bins):
631
- # bloc1: spaces/zones with HSTP >= 18°C
632
- # bloc2: spaces/zones with HSTP < 18°C
631
+ # bloc1: spaces/zones with HSTP >= 18C
632
+ # bloc2: spaces/zones with HSTP < 18C
633
633
  # (ref: 2021 Quebec energy code 3.3. UA' trade-off methodology)
634
634
  # (... can be extended in the future to cover other standards)
635
635
  #
@@ -1000,7 +1000,7 @@ module TBD
1000
1000
  model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr
1001
1001
  model += " (v#{ua[:version]})" if ua.key?(:version)
1002
1002
  report << model unless model.empty?
1003
- report << "* TBD : v3.4.3"
1003
+ report << "* TBD : v3.4.5"
1004
1004
  report << "* date : #{ua[:date]}"
1005
1005
 
1006
1006
  if lang == :en
data/lib/tbd/version.rb 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
@@ -21,5 +21,5 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  module TBD
24
- VERSION = "3.4.3".freeze # TBD release version
24
+ VERSION = "3.4.5".freeze
25
25
  end
data/lib/tbd.rb 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/tbd.gemspec CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.metadata = {}
30
30
 
31
31
  s.add_dependency "topolys", "~> 0"
32
- s.add_dependency "osut", "~> 0"
32
+ s.add_dependency "osut", "~> 0.7.0"
33
33
  s.add_dependency "json-schema", "~> 4"
34
34
 
35
35
  s.add_development_dependency "bundler", "~> 2.1"
data/tbd.schema.json CHANGED
@@ -267,15 +267,15 @@
267
267
  "type": "number"
268
268
  },
269
269
  "corner": {
270
- "title": "Any wall corner [0°,135°) or (225°,360°] PSI",
270
+ "title": "Any wall corner [0deg,135deg) or (225deg,360deg] PSI",
271
271
  "type": "number"
272
272
  },
273
273
  "cornerconcave": {
274
- "title": "Concave wall corner [0°,135°) PSI",
274
+ "title": "Concave wall corner [0deg,135deg) PSI",
275
275
  "type": "number"
276
276
  },
277
277
  "cornerconvex": {
278
- "title": "Convex wall corner (225°,360°] PSI",
278
+ "title": "Convex wall corner (225deg,360deg] PSI",
279
279
  "type": "number"
280
280
  },
281
281
  "balcony": {
@@ -655,12 +655,12 @@
655
655
  "type": "object",
656
656
  "properties": {
657
657
  "bloc1": {
658
- "title": "heating setpoints >= 18°C",
658
+ "title": "heating setpoints >= 18C",
659
659
  "type": "object",
660
660
  "$ref": "#/definitions/UaBlock"
661
661
  },
662
662
  "bloc2": {
663
- "title": "heating setpoints < 18°C",
663
+ "title": "heating setpoints < 18C",
664
664
  "type": "object",
665
665
  "$ref": "#/definitions/UaBlock"
666
666
  }
data/v291_MacOS.md CHANGED
@@ -1,15 +1,14 @@
1
1
  _We reiterate that building professionals and energy modellers 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"). Those instead interested in exploring/tweaking the source code (cloned or forked versions of TBD) can follow the Windows or MacOS Ruby setup described in TBD's [README](https://github.com/rd2/tbd#readme)._
2
2
 
3
- _The MacOS instructions below specifically target (older) Ruby v2.2.5 environments, needed for developing OpenStudio [v2.9.1](https://github.com/NREL/OpenStudio/releases/tag/v2.9.1) measures - the most up-to-date version that remains [compatible](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix) with [SketchUp Make 2017](https://help.sketchup.com/en/downloading-older-versions). More recent OpenStudio versions (e.g. v3.6.1) can - to a large degree - safely translate older .osm files. Although TBD (and Topolys) are systematically tested against updated OpenStudio versions (v2.9.1 onwards), the following Ruby v2.2.5 setup is no longer tested or maintained. Nonetheless, it may be of some help for the more adventurous of you._
3
+ _The MacOS instructions below specifically target (older) Ruby v2.2.5 environments, needed for developing OpenStudio [v2.9.1](https://github.com/NREL/OpenStudio/releases/tag/v2.9.1) measures - the most up-to-date version that remains [compatible](https://github.com/NREL/OpenStudio/wiki/OpenStudio-SDK-Version-Compatibility-Matrix) with [SketchUp Make 2017](https://help.sketchup.com/en/downloading-older-versions). More recent OpenStudio versions (e.g. v3.8.0) can - to a large degree - safely translate older .osm files. Although TBD (and Topolys) are systematically tested against updated OpenStudio versions (v2.9.1 onwards), the following Ruby v2.2.5 setup is no longer tested or maintained. Nonetheless, it may be of some help for the more adventurous of you._
4
4
 
5
5
 
6
6
  ## v2.9.1 MacOS Instructions
7
7
  _tested Catalina 10.15.4 up to Big Sur 11.4_
8
8
 
9
- OpenStudio v2.9.1 measures require Ruby v2.2.5, which is several iterations behind the default Ruby v2.6 version available on any recently-purchased Mac. Although it is common to develop/test using more than one Ruby version, some effort is nonetheless required for older vintages: v2.2.5 is no longer officially supported, it requires the deprecated OpenSSL-1.0 (not 1.1), etc. To help Mac users (and potentially Linux users as well), the following steps are recommended (although architecture-specific tweaks may be required).
9
+ OpenStudio v2.9.1 measures require Ruby v2.2.5, which is several iterations behind the default Ruby v2.6 version available on any recently-purchased Mac. Although it is common to develop/test using more than one Ruby version, some effort is nonetheless required for older vintages: v2.2.5 is way past its shelf-life, it requires the deprecated OpenSSL-1.0 (not 1.1), etc. To help Mac users (and potentially Linux users as well), the following steps are recommended (although architecture-specific tweaks may be required).
10
10
 
11
11
  From a Terminal, install [Homebrew](https://brew.sh/index) - nice for package distribution and management. With a few tweaks, it will handle most package downloads, dependencies, etc. Using Homebrew, install OpenSSL-1.0, and then _rbenv_ (which allows users to manage multiple Ruby versions). One way of doing it:
12
-
13
12
  ```
14
13
  brew install rbenv/tap/openssl@1.0
15
14
  ```
@@ -17,7 +16,6 @@ brew install rbenv/tap/openssl@1.0
17
16
  By _tapping_, Homebrew provides a way to access third-party repositories that are no longer officially supported by Homebrew, like Ruby v2.2.5 and OpenSSL-1.0. The above instruction tells Homebrew to install compatible versions of OpenSSL-1.0 with _rbenv_ (e.g. 1.0.2t, 1.0.2u).
18
17
 
19
18
  Next, ensure that Homebrew and _rbenv_ use OpenSSL-1.0 for future, local Ruby development. Edit (or create) a user’s local _~/.zshrc_ file (instructions here are provided for _zsh_, the default macOS Terminal shell interface - _bash_ users: adapt!), by pasting-in the following:
20
-
21
19
  ```
22
20
  eval "$(rbenv init - zsh)"
23
21
  export PATH="/usr/local/opt/openssl@1.0/bin:$PATH"
@@ -28,48 +26,29 @@ export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.0)"
28
26
  ```
29
27
 
30
28
  There’s probably more there than necessary, but it should do the trick for the next few steps, and/or for future work. Quit the Terminal and start a new one, or simply _source_ the zshrc file:
31
-
32
29
  ```
33
30
  source ~/.zshrc
34
31
  ```
35
32
 
36
33
  Make sure the right OpenSSL version is recognized, and then instruct Homebrew to switch over to it:
37
-
38
34
  ```
39
35
  openssl version
40
36
  brew switch openssl 1.0.2t
41
37
  ```
42
38
 
43
39
  … or whatever Openssl 1.0 version was installed, e.g. 1.0.2u. Then install _ruby-build_, _rbenv_ and finally Ruby v2.2.5:
44
-
45
40
  ```
46
41
  brew install ruby-build
47
42
  brew install rbenv
48
43
  rbenv install 2.2.5
49
44
  ```
50
45
 
51
- Install a compatible version of [bundler](https://bundler.io), great for managing Ruby gems and dependencies:
52
-
53
- ```
54
- gem install bundler -v 1.17.3
55
- ```
56
- In some cases, (temporarily) switching over to an insecure ```http``` connection to rubygems.org (instead of the default ```https```) may be required:
57
- ```
58
- gem source -r https://rubygems.org/
59
- gem source -a http://rubygems.org/
60
- gem install bundler -v 1.17.3
61
- gem source -r http://rubygems.org/
62
- gem source -a https://rubygems.org/
63
- ```
64
-
65
46
  In the Terminal, check the Ruby version:
66
-
67
47
  ```
68
48
  ruby -v
69
49
  ```
70
50
 
71
51
  ... should still report the current Ruby version used by macOS (e.g. ```system``` or ```2.6```). To ensure Ruby v2.2.5 is used for developing OpenStudio v2.9.1-compatible measures, instruct _rbenv_ to use Ruby v2.2.5 _locally_ within a user’s chosen directory (e.g. "sandbox291"):
72
-
73
52
  ```
74
53
  mkdir ~/Documents/sandbox291
75
54
  cd ~/Documents/sandbox291
@@ -78,7 +57,6 @@ ruby -v
78
57
  ```
79
58
 
80
59
  … should now report ```2.2.5``` as the local Ruby version, to be used by default for anything under the "sandbox291" 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., "sandbox291":
81
-
82
60
  ```
83
61
  cd ~/
84
62
  ruby -ropen-uri -e 'eval open("https://git.io/vQhWq").read'
@@ -88,21 +66,34 @@ ruby -ropen-uri -e 'eval open("https://git.io/vQhWq").read'
88
66
 
89
67
  If successful, one should get a ```Hooray!``` from both Ruby versions confirming valid communication with [Rubygems](https://rubygems.org/), yet with their specific RubyGems and OpenSSL versions, as well as their own SSL certificates.
90
68
 
91
- Install OpenStudio [v2.9.1](https://github.com/NREL/OpenStudio/releases/tag/v2.9.1).
69
+ [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:
70
+ ```
71
+ bundler -v
72
+ gem install bundler -v 1.17.3
73
+ ```
74
+
75
+ In some cases, (temporarily) switching over to an insecure ```http``` connection to rubygems.org (instead of the default ```https```) may be required:
76
+ ```
77
+ gem source -r https://rubygems.org/
78
+ gem source -a http://rubygems.org/
79
+ gem install bundler -v 1.17.3
80
+ gem source -r http://rubygems.org/
81
+ gem source -a https://rubygems.org/
82
+ ```
92
83
 
93
- Then create the file _~/.rbenv/versions/2.2.5/lib/ruby/site_ruby/openstudio.rb_, and edit it so it _points_ to your new OpenStudio installation:
84
+ Install OpenStudio [v2.9.1](https://github.com/NREL/OpenStudio/releases/tag/v2.9.1).
94
85
 
86
+ Create a new file ```~/.rbenv/versions/2.2.5/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:
95
87
  ```
96
88
  require '/Applications/OpenStudio-2.9.1/Ruby/openstudio.rb'
97
89
  ```
98
90
 
99
91
  Verify your local OpenStudio and Ruby configuration:
100
-
101
92
  ```
102
93
  cd ~/Documents/sandbox291
103
94
  ruby -e "require 'openstudio'" -e "puts OpenStudio::Model::Model.new"
104
95
  ```
105
96
 
106
- Install the latest version of _git_ (e.g. through Homebrew), and ```git clone``` the TBD measure under e.g., "sandbox291".
97
+ Make sure you have latest version of _git_ (e.g. through Homebrew), then ```git clone``` the TBD measure under e.g., "sandbox291".
107
98
 
108
99
  Run the basic [tests](https://github.com/rd2/tbd#complete-list-of-test-commands) to ensure the measure operates as expected.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tbd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.3
4
+ version: 3.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Bourgeois & Dan Macumber
8
- autorequire:
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2024-10-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: topolys
@@ -30,14 +29,14 @@ dependencies:
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
- version: '0'
32
+ version: 0.7.0
34
33
  type: :runtime
35
34
  prerelease: false
36
35
  version_requirements: !ruby/object:Gem::Requirement
37
36
  requirements:
38
37
  - - "~>"
39
38
  - !ruby/object:Gem::Version
40
- version: '0'
39
+ version: 0.7.0
41
40
  - !ruby/object:Gem::Dependency
42
41
  name: json-schema
43
42
  requirement: !ruby/object:Gem::Requirement
@@ -166,9 +165,8 @@ licenses:
166
165
  - MIT
167
166
  metadata:
168
167
  homepage_uri: https://github.com/rd2/tbd
169
- source_code_uri: https://github.com/rd2/tbd/tree/v3.4.3
168
+ source_code_uri: https://github.com/rd2/tbd/tree/v3.4.5
170
169
  bug_tracker_uri: https://github.com/rd2/tbd/issues
171
- post_install_message:
172
170
  rdoc_options: []
173
171
  require_paths:
174
172
  - lib
@@ -186,8 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
184
  - !ruby/object:Gem::Version
187
185
  version: '0'
188
186
  requirements: []
189
- rubygems_version: 3.3.15
190
- signing_key:
187
+ rubygems_version: 3.7.1
191
188
  specification_version: 4
192
189
  summary: Thermal Bridging and Derating (for OpenStudio)
193
190
  test_files: []