tbd 3.5.2 → 3.6.1
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/lib/measures/tbd/measure.xml +6 -6
- data/lib/measures/tbd/resources/geo.rb +27 -19
- data/lib/measures/tbd/resources/psi.rb +28 -30
- data/lib/measures/tbd/resources/ua.rb +258 -256
- data/lib/measures/tbd/resources/utils.rb +103 -17
- data/lib/tbd/geo.rb +27 -19
- data/lib/tbd/psi.rb +28 -30
- data/lib/tbd/ua.rb +258 -256
- data/lib/tbd/version.rb +1 -1
- metadata +4 -7
|
@@ -106,26 +106,28 @@ module OSut
|
|
|
106
106
|
# default inside + outside air film resistances (m2.K/W)
|
|
107
107
|
@@film = {
|
|
108
108
|
shading: 0.000, # NA
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
ceiling: 0.266, # interzone floor/ceiling
|
|
110
|
+
partition: 0.239, # interzone wall partition
|
|
111
|
+
wall: 0.150, # exposed wall
|
|
112
|
+
roof: 0.135, # exposed roof
|
|
113
|
+
floor: 0.192, # exposed floor
|
|
114
|
+
basement: 0.120, # basement wall
|
|
115
|
+
slab: 0.162, # basement slab or slab-on-grade
|
|
115
116
|
door: 0.150, # standard, 45mm insulated steel (opaque) door
|
|
116
117
|
window: 0.150, # vertical fenestration, e.g. glazed doors, windows
|
|
117
|
-
skylight: 0.
|
|
118
|
+
skylight: 0.135 # e.g. domed 4' x 4' skylight
|
|
118
119
|
}.freeze
|
|
119
120
|
|
|
120
121
|
# default (~1980s) envelope Uo (W/m2•K), based on surface type
|
|
121
122
|
@@uo = {
|
|
122
123
|
shading: nil, # N/A
|
|
124
|
+
ceiling: nil, # N/A
|
|
123
125
|
partition: nil, # N/A
|
|
124
126
|
wall: 0.384, # rated R14.8 hr•ft2F/Btu
|
|
125
127
|
roof: 0.327, # rated R17.6 hr•ft2F/Btu
|
|
126
128
|
floor: 0.317, # rated R17.9 hr•ft2F/Btu (exposed floor)
|
|
127
|
-
basement: nil,
|
|
128
|
-
slab: nil,
|
|
129
|
+
basement: nil, # N/A
|
|
130
|
+
slab: nil, # N/A
|
|
129
131
|
door: 1.800, # insulated, unglazed steel door (single layer)
|
|
130
132
|
window: 2.800, # e.g. patio doors (simple glazing)
|
|
131
133
|
skylight: 3.500 # all skylight technologies
|
|
@@ -197,6 +199,61 @@ module OSut
|
|
|
197
199
|
@@mats[:door ][:rho] = 600.000
|
|
198
200
|
@@mats[:door ][:cp ] = 1000.000
|
|
199
201
|
|
|
202
|
+
##
|
|
203
|
+
# Returns surface air film resistance(s). Surface tilt-dependent values are
|
|
204
|
+
# returned if a valid surface tilt [0, PI] is provided. Otherwise, generic
|
|
205
|
+
# tilt-independent air film resistances are returned instead.
|
|
206
|
+
#
|
|
207
|
+
# @param type [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling
|
|
208
|
+
# @param tilt [Numeric] surface tilt (in rad), optional
|
|
209
|
+
#
|
|
210
|
+
# @return [Float] surface air film resistance(s)
|
|
211
|
+
# @return [0.0] if invalid input (see logs)
|
|
212
|
+
def filmResistances(type = :wall, tilt = 2 * Math::PI)
|
|
213
|
+
mth = "OSut::#{__callee__}"
|
|
214
|
+
|
|
215
|
+
unless tilt.is_a?(Numeric)
|
|
216
|
+
return mismatch("tilt", tilt, Float, mth, DBG, 0.0)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
unless type.respond_to?(:to_sym)
|
|
220
|
+
return mismatch("type", type, Symbol, mth, DBG, 0.0)
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
type = type.to_s.downcase.to_sym
|
|
224
|
+
|
|
225
|
+
unless @@film.key?(type)
|
|
226
|
+
return invalid("type", mth, 1, DBG, 0.0)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Generic, tilt-independent values.
|
|
230
|
+
r = @@film[type]
|
|
231
|
+
return r if type == :shading
|
|
232
|
+
|
|
233
|
+
# Valid tilt?
|
|
234
|
+
if tilt.between?(0, Math::PI)
|
|
235
|
+
r = OpenStudio::Model::PlanarSurface.stillAirFilmResistance(tilt)
|
|
236
|
+
return r if type == :basement || type == :slab
|
|
237
|
+
|
|
238
|
+
if type == :ceiling || type == :partition
|
|
239
|
+
# Interzone. Fetch reciprocal tilt, e.g. if tilt == 0°, tiltx = 180°
|
|
240
|
+
tiltx = tilt + Math::PI
|
|
241
|
+
|
|
242
|
+
# Assuming tilt is contrained [0°, 180°] - constrain tiltx [0° 180°]:
|
|
243
|
+
# e.g. tiltx == 210° if tilt == 30°, so convert tiltx to 150°
|
|
244
|
+
# e.g. tiltx == 330° if tilt == 150°, so convert tiltx to 30°
|
|
245
|
+
# e.g. tiltx == 275° if tilt == 95°, so convert tiltx to 85°
|
|
246
|
+
tiltx = Math::PI - tilt if tiltx > Math::PI
|
|
247
|
+
|
|
248
|
+
r += OpenStudio::Model::PlanarSurface.stillAirFilmResistance(tiltx)
|
|
249
|
+
else
|
|
250
|
+
r += 0.03 # "MOVINGAIR_15MPH"
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
r
|
|
255
|
+
end
|
|
256
|
+
|
|
200
257
|
##
|
|
201
258
|
# Validates if every material in a layered construction is standard & opaque.
|
|
202
259
|
#
|
|
@@ -470,7 +527,7 @@ module OSut
|
|
|
470
527
|
##
|
|
471
528
|
# Resets a construction's Uo factor by adjusting its insulating layer
|
|
472
529
|
# thermal conductivity, then if needed its thickness (or its RSi value if
|
|
473
|
-
# massless). Unless material
|
|
530
|
+
# massless). Unless material uniqueness is requested, a matching material is
|
|
474
531
|
# recovered instead of instantiating a new one. The latter is renamed
|
|
475
532
|
# according to its adjusted conductivity/thickness (or RSi value).
|
|
476
533
|
#
|
|
@@ -530,7 +587,7 @@ module OSut
|
|
|
530
587
|
mt.setName(id)
|
|
531
588
|
|
|
532
589
|
unless mt.setThermalResistance(r)
|
|
533
|
-
return invalid("Failed #{id}: RSi#{r.round(2)}", mth)
|
|
590
|
+
return invalid("Failed #{id}: RSi#{r.round(2)}", mth, 0, DBG, 0.0)
|
|
534
591
|
end
|
|
535
592
|
|
|
536
593
|
lc.setLayer(index, mt)
|
|
@@ -564,11 +621,11 @@ module OSut
|
|
|
564
621
|
mt.setName(id)
|
|
565
622
|
|
|
566
623
|
unless mt.setThermalConductivity(k)
|
|
567
|
-
return invalid("Failed #{id}: K#{k.round(3)}", mth)
|
|
624
|
+
return invalid("Failed #{id}: K#{k.round(3)}", mth, 0, DBG, 0.0)
|
|
568
625
|
end
|
|
569
626
|
|
|
570
627
|
unless mt.setThickness(d)
|
|
571
|
-
return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth)
|
|
628
|
+
return invalid("Failed #{id}: #{(d*1000).to_i}mm", mth, 0, DBG, 0.0)
|
|
572
629
|
end
|
|
573
630
|
|
|
574
631
|
lc.setLayer(index, mt)
|
|
@@ -600,10 +657,6 @@ module OSut
|
|
|
600
657
|
return mismatch("model", model, cl1, mth) unless model.is_a?(cl1)
|
|
601
658
|
return mismatch("specs", specs, cl2, mth) unless specs.is_a?(cl2)
|
|
602
659
|
|
|
603
|
-
specs[:id] = "" unless specs.key?(:id)
|
|
604
|
-
id = trim(specs[:id])
|
|
605
|
-
id = "OSut:CON:#{specs[:type]}" if id.empty?
|
|
606
|
-
|
|
607
660
|
if specs.key?(:type)
|
|
608
661
|
unless @@uo.keys.include?(specs[:type])
|
|
609
662
|
return invalid("surface type", mth, 2, ERR)
|
|
@@ -612,6 +665,10 @@ module OSut
|
|
|
612
665
|
specs[:type] = :wall
|
|
613
666
|
end
|
|
614
667
|
|
|
668
|
+
specs[:id] = "" unless specs.key?(:id)
|
|
669
|
+
id = trim(specs[:id])
|
|
670
|
+
id = "OSut:CON:#{specs[:type]}" if id.empty?
|
|
671
|
+
|
|
615
672
|
specs[:uo] = @@uo[ specs[:type] ] unless specs.key?(:uo) # can be nil
|
|
616
673
|
u = specs[:uo]
|
|
617
674
|
|
|
@@ -652,6 +709,35 @@ module OSut
|
|
|
652
709
|
a[:compo][:mat] = @@mats[mt]
|
|
653
710
|
a[:compo][:d ] = d
|
|
654
711
|
a[:compo][:id ] = "OSut:#{mt}:#{format('%03d', d*1000)[-3..-1]}"
|
|
712
|
+
when :ceiling
|
|
713
|
+
unless specs[:clad] == :none
|
|
714
|
+
mt = :concrete
|
|
715
|
+
mt = :material if specs[:clad] == :light
|
|
716
|
+
d = 0.015
|
|
717
|
+
d = 0.100 if specs[:clad] == :medium
|
|
718
|
+
d = 0.200 if specs[:clad] == :heavy
|
|
719
|
+
a[:clad][:mat] = @@mats[mt]
|
|
720
|
+
a[:clad][:d ] = d
|
|
721
|
+
a[:clad][:id ] = "OSut:#{mt}:#{format('%03d', d*1000)[-3..-1]}"
|
|
722
|
+
end
|
|
723
|
+
|
|
724
|
+
mt = :mineral
|
|
725
|
+
mt = :polyiso if specs[:frame] == :medium
|
|
726
|
+
mt = :cellulose if specs[:frame] == :heavy
|
|
727
|
+
mt = :material unless u
|
|
728
|
+
d = 0.100
|
|
729
|
+
d = 0.015 unless u
|
|
730
|
+
a[:compo][:mat] = @@mats[mt]
|
|
731
|
+
a[:compo][:d ] = d
|
|
732
|
+
a[:compo][:id ] = "OSut:#{mt}:#{format('%03d', d*1000)[-3..-1]}"
|
|
733
|
+
|
|
734
|
+
unless specs[:finish] == :none
|
|
735
|
+
mt = :material
|
|
736
|
+
d = 0.015
|
|
737
|
+
a[:finish][:mat] = @@mats[mt]
|
|
738
|
+
a[:finish][:d ] = d
|
|
739
|
+
a[:finish][:id ] = "OSut:#{mt}:#{format('%03d', d*1000)[-3..-1]}"
|
|
740
|
+
end
|
|
655
741
|
when :partition
|
|
656
742
|
unless specs[:clad] == :none
|
|
657
743
|
d = 0.015
|
data/lib/tbd/geo.rb
CHANGED
|
@@ -38,7 +38,6 @@ module TBD
|
|
|
38
38
|
a = false
|
|
39
39
|
return mismatch("e1", e1, Hash, mth, DBG, a) unless e1.is_a?(Hash)
|
|
40
40
|
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)
|
|
41
|
-
return mismatch("e2", e2, Hash, mth, DBG, a) unless e2.is_a?(Hash)
|
|
42
41
|
|
|
43
42
|
return hashkey("e1", e1, :v0, mth, DBG, a) unless e1.key?(:v0)
|
|
44
43
|
return hashkey("e1", e1, :v1, mth, DBG, a) unless e1.key?(:v1)
|
|
@@ -299,14 +298,16 @@ module TBD
|
|
|
299
298
|
return invalid("#{nom} normal", mth, 0, ERR) unless n
|
|
300
299
|
|
|
301
300
|
type = surface.surfaceType.downcase
|
|
302
|
-
facing = surface.outsideBoundaryCondition
|
|
301
|
+
facing = surface.outsideBoundaryCondition.downcase
|
|
302
|
+
interz = false
|
|
303
303
|
setpts = setpoints(space)
|
|
304
304
|
|
|
305
|
-
if facing
|
|
306
|
-
|
|
307
|
-
return invalid("#{nom}: adjacent surface", mth, 0, ERR) if empty
|
|
305
|
+
if facing == "surface"
|
|
306
|
+
adj = surface.adjacentSurface
|
|
307
|
+
return invalid("#{nom}: adjacent surface", mth, 0, ERR) if adj.empty?
|
|
308
308
|
|
|
309
|
-
facing =
|
|
309
|
+
facing = adj.get.nameString
|
|
310
|
+
interz = true
|
|
310
311
|
end
|
|
311
312
|
|
|
312
313
|
unless surface.construction.empty?
|
|
@@ -315,8 +316,9 @@ module TBD
|
|
|
315
316
|
unless lc.empty?
|
|
316
317
|
lc = lc.get
|
|
317
318
|
lyr = insulatingLayer(lc)
|
|
319
|
+
idx = lyr[:index]
|
|
318
320
|
|
|
319
|
-
if
|
|
321
|
+
if idx.is_a?(Integer) && idx.between?(0, lc.numLayers - 1)
|
|
320
322
|
surf[:construction] = lc
|
|
321
323
|
# index: ... of layer/material (to derate) within construction
|
|
322
324
|
# ltype: either :massless (RSi) or :standard (k + d)
|
|
@@ -358,8 +360,14 @@ module TBD
|
|
|
358
360
|
surf[:story ] = story.get unless story.empty?
|
|
359
361
|
surf[:n ] = n
|
|
360
362
|
surf[:gross ] = surface.grossArea
|
|
361
|
-
surf[:filmRSI ] = surface.filmResistance
|
|
362
363
|
surf[:spandrel ] = spandrel?(surface)
|
|
364
|
+
surf[:filmRSI ] = surface.filmResistance
|
|
365
|
+
|
|
366
|
+
if interz
|
|
367
|
+
typ = :ceiling # interzone roof or ceiling
|
|
368
|
+
typ = :partition if surf[:type] == :wall
|
|
369
|
+
surf[:filmRSI] = TBD.filmResistances(typ, surface.tilt)
|
|
370
|
+
end
|
|
363
371
|
|
|
364
372
|
surface.subSurfaces.sort_by { |s| s.nameString }.each do |s|
|
|
365
373
|
next if poly(s).empty?
|
|
@@ -508,7 +516,7 @@ module TBD
|
|
|
508
516
|
end
|
|
509
517
|
|
|
510
518
|
unless u.is_a?(Numeric)
|
|
511
|
-
r = rsi(c,
|
|
519
|
+
r = rsi(c, surf[:filmRSI])
|
|
512
520
|
|
|
513
521
|
if r < TOL
|
|
514
522
|
log(ERR, "Skipping '#{id}': U-factor unavailable (#{mth})")
|
|
@@ -635,8 +643,8 @@ module TBD
|
|
|
635
643
|
|
|
636
644
|
valid1 = s1[:angle].is_a?(Numeric)
|
|
637
645
|
valid2 = s2[:angle].is_a?(Numeric)
|
|
638
|
-
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
|
|
639
|
-
return mismatch("
|
|
646
|
+
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
|
|
647
|
+
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2
|
|
640
648
|
|
|
641
649
|
angle = 0
|
|
642
650
|
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
|
|
@@ -678,8 +686,8 @@ module TBD
|
|
|
678
686
|
|
|
679
687
|
valid1 = s1[:angle].is_a?(Numeric)
|
|
680
688
|
valid2 = s2[:angle].is_a?(Numeric)
|
|
681
|
-
return mismatch("s1 angle", s1[:angle], Numeric, DBG, false) unless valid1
|
|
682
|
-
return mismatch("
|
|
689
|
+
return mismatch("s1 angle", s1[:angle], Numeric, mth, DBG, false) unless valid1
|
|
690
|
+
return mismatch("s2 angle", s2[:angle], Numeric, mth, DBG, false) unless valid2
|
|
683
691
|
|
|
684
692
|
angle = 0
|
|
685
693
|
angle = s2[:angle] - s1[:angle] if s2[:angle] > s1[:angle]
|
|
@@ -752,8 +760,8 @@ module TBD
|
|
|
752
760
|
# boundary conditions.
|
|
753
761
|
#
|
|
754
762
|
# @param model [OpenStudio::Model::Model] a model
|
|
755
|
-
# @param floors [Hash] TBD floors
|
|
756
763
|
# @param walls [Hash] TBD walls
|
|
764
|
+
# @param floors [Hash] TBD floors
|
|
757
765
|
# @param edges [Hash] TBD edges (many linking floors & walls
|
|
758
766
|
#
|
|
759
767
|
# @return [Bool] true if Kiva foundations are successfully generated
|
|
@@ -831,7 +839,7 @@ module TBD
|
|
|
831
839
|
edge[:surfaces].keys.each do |id|
|
|
832
840
|
next unless floors.key?(id)
|
|
833
841
|
|
|
834
|
-
next unless floors[id][:boundary]
|
|
842
|
+
next unless floors[id][:boundary] == "foundation"
|
|
835
843
|
next if floors[id].key?(:kiva)
|
|
836
844
|
|
|
837
845
|
# Initially set as slab-on-grade. Track 'exposed foundation perimeter'.
|
|
@@ -845,7 +853,7 @@ module TBD
|
|
|
845
853
|
edge[:surfaces].keys.each do |i|
|
|
846
854
|
next if i == id
|
|
847
855
|
next unless walls.key?(i)
|
|
848
|
-
next unless walls[i][:boundary]
|
|
856
|
+
next unless walls[i][:boundary] == "foundation"
|
|
849
857
|
next if walls[i].key?(:kiva)
|
|
850
858
|
|
|
851
859
|
floors[id][:kiva ] = :basement
|
|
@@ -857,7 +865,7 @@ module TBD
|
|
|
857
865
|
edge[:surfaces].keys.each do |i|
|
|
858
866
|
next if i == id
|
|
859
867
|
next unless walls.key?(i)
|
|
860
|
-
next unless walls[i][:boundary]
|
|
868
|
+
next unless walls[i][:boundary] == "outdoors"
|
|
861
869
|
|
|
862
870
|
floors[id][:exposed] += edge[:length]
|
|
863
871
|
end
|
|
@@ -872,7 +880,7 @@ module TBD
|
|
|
872
880
|
e[:surfaces].keys.each do |ii|
|
|
873
881
|
next if i == ii
|
|
874
882
|
next unless walls.key?(ii)
|
|
875
|
-
next unless walls[ii][:boundary]
|
|
883
|
+
next unless walls[ii][:boundary] == "foundation"
|
|
876
884
|
next if walls[ii].key?(:kiva)
|
|
877
885
|
|
|
878
886
|
floors[id][:kiva ] = :basement
|
|
@@ -883,7 +891,7 @@ module TBD
|
|
|
883
891
|
e[:surfaces].keys.each do |ii|
|
|
884
892
|
next if i == ii
|
|
885
893
|
next unless walls.key?(ii)
|
|
886
|
-
next unless walls[ii][:boundary]
|
|
894
|
+
next unless walls[ii][:boundary] == "outdoors"
|
|
887
895
|
|
|
888
896
|
floors[id][:exposed] += e[:length]
|
|
889
897
|
end
|
data/lib/tbd/psi.rb
CHANGED
|
@@ -542,7 +542,7 @@ module TBD
|
|
|
542
542
|
h[:partyconcave ] = @set[id].key?(:partyconcave)
|
|
543
543
|
h[:partyconvex ] = @set[id].key?(:partyconvex)
|
|
544
544
|
h[:parapet ] = @set[id].key?(:parapet)
|
|
545
|
-
h[:
|
|
545
|
+
h[:parapetconcave ] = @set[id].key?(:parapetconcave)
|
|
546
546
|
h[:parapetconvex ] = @set[id].key?(:parapetconvex)
|
|
547
547
|
h[:roof ] = @set[id].key?(:roof)
|
|
548
548
|
h[:roofconcave ] = @set[id].key?(:roofconcave)
|
|
@@ -557,10 +557,10 @@ module TBD
|
|
|
557
557
|
h[:balconyconcave ] = @set[id].key?(:balconyconcave)
|
|
558
558
|
h[:balconyconvex ] = @set[id].key?(:balconyconvex)
|
|
559
559
|
h[:balconysill ] = @set[id].key?(:balconysill)
|
|
560
|
-
h[:balconysillconcave ] = @set[id].key?(:
|
|
560
|
+
h[:balconysillconcave ] = @set[id].key?(:balconysillconcave)
|
|
561
561
|
h[:balconysillconvex ] = @set[id].key?(:balconysillconvex)
|
|
562
562
|
h[:balconydoorsill ] = @set[id].key?(:balconydoorsill)
|
|
563
|
-
h[:balconydoorsillconcave] = @set[id].key?(:
|
|
563
|
+
h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconcave)
|
|
564
564
|
h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex)
|
|
565
565
|
h[:rimjoist ] = @set[id].key?(:rimjoist)
|
|
566
566
|
h[:rimjoistconcave ] = @set[id].key?(:rimjoistconcave)
|
|
@@ -572,10 +572,10 @@ module TBD
|
|
|
572
572
|
v[:head ] = 0; v[:headconcave ] = 0; v[:headconvex ] = 0
|
|
573
573
|
v[:sill ] = 0; v[:sillconcave ] = 0; v[:sillconvex ] = 0
|
|
574
574
|
v[:jamb ] = 0; v[:jambconcave ] = 0; v[:jambconvex ] = 0
|
|
575
|
-
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:
|
|
575
|
+
v[:doorhead ] = 0; v[:doorheadconcave ] = 0; v[:doorheadconvex ] = 0
|
|
576
576
|
v[:doorsill ] = 0; v[:doorsillconcave ] = 0; v[:doorsillconvex ] = 0
|
|
577
577
|
v[:doorjamb ] = 0; v[:doorjambconcave ] = 0; v[:doorjambconvex ] = 0
|
|
578
|
-
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:
|
|
578
|
+
v[:skylighthead ] = 0; v[:skylightheadconcave ] = 0; v[:skylightheadconvex ] = 0
|
|
579
579
|
v[:skylightsill ] = 0; v[:skylightsillconcave ] = 0; v[:skylightsillconvex ] = 0
|
|
580
580
|
v[:skylightjamb ] = 0; v[:skylightjambconcave ] = 0; v[:skylightjambconvex ] = 0
|
|
581
581
|
v[:spandrel ] = 0; v[:spandrelconcave ] = 0; v[:spandrelconvex ] = 0
|
|
@@ -712,7 +712,7 @@ module TBD
|
|
|
712
712
|
v[:roofconcave ] = @set[id][:parapet ] if h[:parapet ]
|
|
713
713
|
v[:roofconvex ] = @set[id][:parapet ] if h[:parapet ]
|
|
714
714
|
v[:roofconcave ] = @set[id][:parapetconcave ] if h[:parapetconcave ]
|
|
715
|
-
v[:roofconvex ] = @set[id][:
|
|
715
|
+
v[:roofconvex ] = @set[id][:parapetconvex ] if h[:parapetconvex ]
|
|
716
716
|
v[:roof ] = @set[id][:roof ] if h[:roof ]
|
|
717
717
|
v[:roofconcave ] = @set[id][:roof ] if h[:roof ]
|
|
718
718
|
v[:roofconvex ] = @set[id][:roof ] if h[:roof ]
|
|
@@ -758,12 +758,12 @@ module TBD
|
|
|
758
758
|
v[:balconysillconcave ] = @set[id][:balcony ] if h[:balcony ]
|
|
759
759
|
v[:balconysillconvex ] = @set[id][:balcony ] if h[:balcony ]
|
|
760
760
|
v[:balconysillconcave ] = @set[id][:balconyconcave ] if h[:balconyconcave ]
|
|
761
|
-
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:
|
|
761
|
+
v[:balconysillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
|
|
762
762
|
v[:balconydoorsill ] = @set[id][:balcony ] if h[:balcony ]
|
|
763
763
|
v[:balconydoorsillconcave] = @set[id][:balcony ] if h[:balcony ]
|
|
764
764
|
v[:balconydoorsillconvex ] = @set[id][:balcony ] if h[:balcony ]
|
|
765
765
|
v[:balconydoorsillconcave] = @set[id][:balconyconcave ] if h[:balconyconcave ]
|
|
766
|
-
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:
|
|
766
|
+
v[:balconydoorsillconvex ] = @set[id][:balconyconvex ] if h[:balconyconvex ]
|
|
767
767
|
v[:balconysill ] = @set[id][:balconysill ] if h[:balconysill ]
|
|
768
768
|
v[:balconysillconcave ] = @set[id][:balconysill ] if h[:balconysill ]
|
|
769
769
|
v[:balconysillconvex ] = @set[id][:balconysill ] if h[:balconysill ]
|
|
@@ -786,10 +786,10 @@ module TBD
|
|
|
786
786
|
v[:rimjoistconvex ] = @set[id][:rimjoistconvex ] if h[:rimjoistconvex ]
|
|
787
787
|
|
|
788
788
|
max = [v[:parapetconcave], v[:parapetconvex]].max
|
|
789
|
-
v[:parapet] = max unless
|
|
789
|
+
v[:parapet] = max unless h[:parapet]
|
|
790
790
|
|
|
791
791
|
max = [v[:roofconcave], v[:roofconvex]].max
|
|
792
|
-
v[:roof] = max unless
|
|
792
|
+
v[:roof] = max unless h[:roof]
|
|
793
793
|
|
|
794
794
|
@val[id] = v
|
|
795
795
|
|
|
@@ -982,7 +982,7 @@ module TBD
|
|
|
982
982
|
mth = "TBD::#{__callee__}"
|
|
983
983
|
sh = { has: {}, val: {} }
|
|
984
984
|
id = trim(id)
|
|
985
|
-
return mismatch("set ID", id, String, mth, ERR,
|
|
985
|
+
return mismatch("set ID", id, String, mth, ERR, sh) if id.empty?
|
|
986
986
|
return hashkey(id, @set , id, mth, ERR, sh) unless @set.key?(id)
|
|
987
987
|
return hashkey(id, @has , id, mth, ERR, sh) unless @has.key?(id)
|
|
988
988
|
return hashkey(id, @val , id, mth, ERR, sh) unless @val.key?(id)
|
|
@@ -1424,8 +1424,10 @@ module TBD
|
|
|
1424
1424
|
m = m.clone(model).to_MasslessOpaqueMaterial.get
|
|
1425
1425
|
m.setName("#{id} #{up}m tbd")
|
|
1426
1426
|
|
|
1427
|
-
|
|
1428
|
-
|
|
1427
|
+
if de_r < RMIN
|
|
1428
|
+
de_r = RMIN
|
|
1429
|
+
loss = (de_u - 1 / de_r) * net
|
|
1430
|
+
end
|
|
1429
1431
|
|
|
1430
1432
|
unless m.setThermalResistance(de_r)
|
|
1431
1433
|
return invalid("Can't derate #{id}: RSi#{de_r.round(2)}", mth)
|
|
@@ -1555,7 +1557,7 @@ module TBD
|
|
|
1555
1557
|
next unless surface[:conditioned]
|
|
1556
1558
|
next if surface[:ground ]
|
|
1557
1559
|
|
|
1558
|
-
unless surface[:boundary]
|
|
1560
|
+
unless surface[:boundary] == "outdoors"
|
|
1559
1561
|
next unless tbd[:surfaces].key?(surface[:boundary])
|
|
1560
1562
|
next if tbd[:surfaces][surface[:boundary]][:conditioned]
|
|
1561
1563
|
end
|
|
@@ -1734,9 +1736,9 @@ module TBD
|
|
|
1734
1736
|
next unless point_V_mag > TOL
|
|
1735
1737
|
next unless point_V_mag > farthest_mag
|
|
1736
1738
|
|
|
1737
|
-
farthest
|
|
1738
|
-
farthest_V
|
|
1739
|
-
|
|
1739
|
+
farthest = point
|
|
1740
|
+
farthest_V = origin_point_V
|
|
1741
|
+
farthest_mag = point_V_mag
|
|
1740
1742
|
end
|
|
1741
1743
|
|
|
1742
1744
|
angle = reference_V.angle(farthest_V)
|
|
@@ -2202,7 +2204,7 @@ module TBD
|
|
|
2202
2204
|
next if holes.key?(i)
|
|
2203
2205
|
next if shades.key?(i)
|
|
2204
2206
|
|
|
2205
|
-
facing = tbd[:surfaces][i][:boundary]
|
|
2207
|
+
facing = tbd[:surfaces][i][:boundary]
|
|
2206
2208
|
next unless facing == "othersidecoefficients"
|
|
2207
2209
|
|
|
2208
2210
|
s1 = edge[:surfaces][id]
|
|
@@ -2971,6 +2973,7 @@ module TBD
|
|
|
2971
2973
|
# derate a construction/material pair having " tbd" in their OpenStudio name.
|
|
2972
2974
|
tbd[:surfaces].each do |id, surface|
|
|
2973
2975
|
next unless surface.key?(:construction)
|
|
2976
|
+
next unless surface.key?(:filmRSI)
|
|
2974
2977
|
next unless surface.key?(:index)
|
|
2975
2978
|
next unless surface.key?(:ltype)
|
|
2976
2979
|
next unless surface.key?(:r)
|
|
@@ -2981,8 +2984,7 @@ module TBD
|
|
|
2981
2984
|
s = model.getSurfaceByName(id)
|
|
2982
2985
|
next if s.empty?
|
|
2983
2986
|
|
|
2984
|
-
s
|
|
2985
|
-
|
|
2987
|
+
s = s.get
|
|
2986
2988
|
index = surface[:index ]
|
|
2987
2989
|
current_c = surface[:construction]
|
|
2988
2990
|
c = current_c.clone(model).to_LayeredConstruction.get
|
|
@@ -2995,7 +2997,7 @@ module TBD
|
|
|
2995
2997
|
if m
|
|
2996
2998
|
c.setLayer(index, m)
|
|
2997
2999
|
c.setName("#{id} c tbd")
|
|
2998
|
-
current_R = rsi(current_c,
|
|
3000
|
+
current_R = rsi(current_c, surface[:filmRSI])
|
|
2999
3001
|
|
|
3000
3002
|
# In principle, the derated "ratio" could be calculated simply by
|
|
3001
3003
|
# accessing a surface's uFactor. Yet air layers within constructions
|
|
@@ -3035,7 +3037,7 @@ module TBD
|
|
|
3035
3037
|
|
|
3036
3038
|
# Compute updated RSi value from layers.
|
|
3037
3039
|
updated_c = s.construction.get.to_LayeredConstruction.get
|
|
3038
|
-
updated_R = rsi(updated_c,
|
|
3040
|
+
updated_R = rsi(updated_c, surface[:filmRSI])
|
|
3039
3041
|
ratio = -(current_R - updated_R) * 100 / current_R
|
|
3040
3042
|
|
|
3041
3043
|
surface[:ratio] = ratio if ratio.abs > TOL
|
|
@@ -3047,14 +3049,10 @@ module TBD
|
|
|
3047
3049
|
tbd[:surfaces].each do |id, surface|
|
|
3048
3050
|
next unless surface[:deratable]
|
|
3049
3051
|
next unless surface.key?(:construction)
|
|
3052
|
+
next unless surface.key?(:filmRSI)
|
|
3050
3053
|
next if surface.key?(:u)
|
|
3051
3054
|
|
|
3052
|
-
|
|
3053
|
-
msg = "Skipping missing surface '#{id}' (#{mth})"
|
|
3054
|
-
log(ERR, msg) if s.empty?
|
|
3055
|
-
next if s.empty?
|
|
3056
|
-
|
|
3057
|
-
surface[:u] = 1.0 / rsi(surface[:construction], s.get.filmResistance)
|
|
3055
|
+
surface[:u] = 1.0 / rsi(surface[:construction], surface[:filmRSI])
|
|
3058
3056
|
end
|
|
3059
3057
|
|
|
3060
3058
|
json[:io][:edges] = []
|
|
@@ -3204,8 +3202,8 @@ module TBD
|
|
|
3204
3202
|
|
|
3205
3203
|
uo = format("%.3f", g[:uo])
|
|
3206
3204
|
ut = format("%.3f", g[:ut])
|
|
3207
|
-
output = "An
|
|
3208
|
-
"
|
|
3205
|
+
output = "An area-weighted #{label.to_s} Uo of #{uo} W/m2•K is " \
|
|
3206
|
+
"required to meet an overall Ut of #{ut} W/m2•K for #{g[:op]}"
|
|
3209
3207
|
u_t << output
|
|
3210
3208
|
runner.registerInfo(output)
|
|
3211
3209
|
end
|