tbd 3.4.3 → 3.4.4
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 +4 -4
- data/.github/workflows/pull_request.yml +16 -0
- data/lib/measures/tbd/measure.xml +5 -5
- data/lib/measures/tbd/resources/geo.rb +16 -13
- data/lib/measures/tbd/resources/psi.rb +3 -3
- data/lib/measures/tbd/resources/ua.rb +6 -6
- data/lib/tbd/geo.rb +16 -13
- data/lib/tbd/psi.rb +3 -3
- data/lib/tbd/ua.rb +6 -6
- data/lib/tbd/version.rb +1 -1
- data/tbd.schema.json +5 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24c3c1ce27d2513d0f1529795e7016ad07a69e3499d5e79f7164698e1a16dc48
|
4
|
+
data.tar.gz: f23f7f85a54bcc551179ba751e826dc2951520e4ad0e17eaafad8fac01cea9fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02cb220811ddcc388c7ae20d17ffc2cfc0b64322605d5c571c2fbd1e325018ec44c7801b7aa0b0d7f2481ec0f0ebee25061130ccd7814f5badf7cb3b01fce625
|
7
|
+
data.tar.gz: 7cf328dca053b90d53c05f070c36f13a7ac9b9813435276ddaf9c14a4bc24e4d287ed7ffb698a6e3f1e5a71822b0f568bfa48155053620a3297d497a4cac5c21
|
@@ -134,3 +134,19 @@ jobs:
|
|
134
134
|
docker exec -t test bundle update
|
135
135
|
docker exec -t test bundle exec rake
|
136
136
|
docker kill test
|
137
|
+
test_390x:
|
138
|
+
runs-on: ubuntu-22.04
|
139
|
+
steps:
|
140
|
+
- name: Check out repository
|
141
|
+
uses: actions/checkout@v2
|
142
|
+
- name: Run Tests
|
143
|
+
run: |
|
144
|
+
echo $(pwd)
|
145
|
+
echo $(ls)
|
146
|
+
docker pull nrel/openstudio:3.9.0
|
147
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.9.0
|
148
|
+
docker exec -t test pwd
|
149
|
+
docker exec -t test ls
|
150
|
+
docker exec -t test bundle update
|
151
|
+
docker exec -t test bundle exec rake
|
152
|
+
docker kill test
|
@@ -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>
|
7
|
-
<version_modified>2024-
|
6
|
+
<version_id>70223737-c3ea-4df0-8506-67083c92fb6e</version_id>
|
7
|
+
<version_modified>2024-11-20T20:02:15Z</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>
|
@@ -499,7 +499,7 @@
|
|
499
499
|
<filename>geo.rb</filename>
|
500
500
|
<filetype>rb</filetype>
|
501
501
|
<usage_type>resource</usage_type>
|
502
|
-
<checksum>
|
502
|
+
<checksum>9FAC0CDC</checksum>
|
503
503
|
</file>
|
504
504
|
<file>
|
505
505
|
<filename>geometry.rb</filename>
|
@@ -523,7 +523,7 @@
|
|
523
523
|
<filename>psi.rb</filename>
|
524
524
|
<filetype>rb</filetype>
|
525
525
|
<usage_type>resource</usage_type>
|
526
|
-
<checksum>
|
526
|
+
<checksum>4B7F3586</checksum>
|
527
527
|
</file>
|
528
528
|
<file>
|
529
529
|
<filename>tbd.rb</filename>
|
@@ -541,7 +541,7 @@
|
|
541
541
|
<filename>ua.rb</filename>
|
542
542
|
<filetype>rb</filetype>
|
543
543
|
<usage_type>resource</usage_type>
|
544
|
-
<checksum>
|
544
|
+
<checksum>626D3BE0</checksum>
|
545
545
|
</file>
|
546
546
|
<file>
|
547
547
|
<filename>utils.rb</filename>
|
@@ -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
|
-
|
841
|
-
|
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]
|
851
|
-
|
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 #
|
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]
|
877
|
-
walls[ii ][:kiva]
|
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?
|
@@ -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 (
|
1682
|
-
# westward of the edge are (
|
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 [
|
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
|
@@ -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
|
426
|
-
# @option s [#to_f] :cooling applicable cooling setpoint temperature in
|
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 -
|
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 >=
|
632
|
-
# bloc2: spaces/zones with HSTP <
|
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.
|
1003
|
+
report << "* TBD : v3.4.4"
|
1004
1004
|
report << "* date : #{ua[:date]}"
|
1005
1005
|
|
1006
1006
|
if lang == :en
|
data/lib/tbd/geo.rb
CHANGED
@@ -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
|
-
|
841
|
-
|
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]
|
851
|
-
|
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 #
|
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]
|
877
|
-
walls[ii ][:kiva]
|
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
@@ -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 (
|
1682
|
-
# westward of the edge are (
|
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 [
|
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
@@ -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
|
426
|
-
# @option s [#to_f] :cooling applicable cooling setpoint temperature in
|
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 -
|
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 >=
|
632
|
-
# bloc2: spaces/zones with HSTP <
|
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.
|
1003
|
+
report << "* TBD : v3.4.4"
|
1004
1004
|
report << "* date : #{ua[:date]}"
|
1005
1005
|
|
1006
1006
|
if lang == :en
|
data/lib/tbd/version.rb
CHANGED
data/tbd.schema.json
CHANGED
@@ -267,15 +267,15 @@
|
|
267
267
|
"type": "number"
|
268
268
|
},
|
269
269
|
"corner": {
|
270
|
-
"title": "Any wall corner [
|
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 [
|
274
|
+
"title": "Concave wall corner [0deg,135deg) PSI",
|
275
275
|
"type": "number"
|
276
276
|
},
|
277
277
|
"cornerconvex": {
|
278
|
-
"title": "Convex wall corner (
|
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 >=
|
658
|
+
"title": "heating setpoints >= 18C",
|
659
659
|
"type": "object",
|
660
660
|
"$ref": "#/definitions/UaBlock"
|
661
661
|
},
|
662
662
|
"bloc2": {
|
663
|
-
"title": "heating setpoints <
|
663
|
+
"title": "heating setpoints < 18C",
|
664
664
|
"type": "object",
|
665
665
|
"$ref": "#/definitions/UaBlock"
|
666
666
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tbd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Bourgeois & Dan Macumber
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: topolys
|
@@ -166,7 +166,7 @@ licenses:
|
|
166
166
|
- MIT
|
167
167
|
metadata:
|
168
168
|
homepage_uri: https://github.com/rd2/tbd
|
169
|
-
source_code_uri: https://github.com/rd2/tbd/tree/v3.4.
|
169
|
+
source_code_uri: https://github.com/rd2/tbd/tree/v3.4.4
|
170
170
|
bug_tracker_uri: https://github.com/rd2/tbd/issues
|
171
171
|
post_install_message:
|
172
172
|
rdoc_options: []
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0'
|
188
188
|
requirements: []
|
189
|
-
rubygems_version: 3.
|
189
|
+
rubygems_version: 3.4.10
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Thermal Bridging and Derating (for OpenStudio)
|