Class: TBD::PSI

Inherits:
Object
  • Object
show all
Extended by:
OSut
Defined in:
lib/tbd/psi.rb

Overview

Library of linear thermal bridges (e.g. corners, balconies). Each key:value entry requires a unique identifier e.g. “poor (BETBG)” and a (partial or complete) set of PSI-factors in W/K per linear meter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePSI

Constructs a new PSI library (with defaults)



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
# File 'lib/tbd/psi.rb', line 125

def initialize
  @set = {}
  @has = {}
  @val = {}

  # The following are built-in PSI-factor sets, more often predefined sets
  # published in guides or energy codes. Users may append new sets,
  # preferably through a TBD JSON input file. Units are in W/K per meter.
  #
  # The provided "spandrel" sets are suitable for early design.
  #
  # Convex vs concave PSI adjustments may be warranted if there is a
  # mismatch between dimensioning conventions (interior vs exterior) used
  # for the OpenStudio model vs published PSI data. For instance, the BETBG
  # data reflects an interior dimensioning convention, while ISO 14683
  # reports PSI-factors for both conventions. The following may be used
  # (with caution) to adjust BETBG PSI-factors for convex corners when
  # using outside dimensions for an OpenStudio model.
  #
  # PSIe = PSIi + U * 2(Li-Le), where:
  #   PSIe = adjusted PSI W/K per m
  #   PSIi = initial published PSI, in W/K per m
  #      U = average clear field U-factor of adjacent walls, in W/m2•K
  #     Li = 'interior corner to edge' length of "zone of influence", in m
  #     Le = 'exterior corner to edge' length of "zone of influence", in m
  #
  #  Li-Le = wall thickness e.g., -0.25m (negative here as Li < Le)

  # Based on INTERIOR dimensioning (p.15 BETBG).
  @set["poor (BETBG)"] =
  {
    rimjoist:        1.000000, # re: BETBG
    parapet:         0.800000, # re: BETBG
    roof:            0.800000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.500000, # re: BETBG
    door:            0.500000, # inferred, same as (vertical) fenestration
    skylight:        0.500000, # inferred, same as (vertical) fenestration
    spandrel:        0.155000, # Detail 5.4.4
    corner:          0.850000, # re: BETBG
    balcony:         1.000000, # re: BETBG
    balconysill:     1.000000, # same as balcony
    balconydoorsill: 1.000000, # same as balconysill
    party:           0.850000, # re: BETBG
    grade:           0.850000, # re: BETBG
    joint:           0.300000, # re: BETBG
    transition:      0.000000  # defaults to 0
  }.freeze

  # Based on INTERIOR dimensioning (p.15 BETBG).
  @set["regular (BETBG)"] =
  {
    rimjoist:        0.500000, # re: BETBG
    parapet:         0.450000, # re: BETBG
    roof:            0.450000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.350000, # re: BETBG
    door:            0.350000, # inferred, same as (vertical) fenestration
    skylight:        0.350000, # inferred, same as (vertical) fenestration
    spandrel:        0.155000, # Detail 5.4.4
    corner:          0.450000, # re: BETBG
    balcony:         0.500000, # re: BETBG
    balconysill:     0.500000, # same as balcony
    balconydoorsill: 0.500000, # same as balconysill
    party:           0.450000, # re: BETBG
    grade:           0.450000, # re: BETBG
    joint:           0.200000, # re: BETBG
    transition:      0.000000  # defaults to 0
  }.freeze

  # Based on INTERIOR dimensioning (p.15 BETBG).
  @set["efficient (BETBG)"] =
  {
    rimjoist:        0.200000, # re: BETBG
    parapet:         0.200000, # re: BETBG
    roof:            0.200000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.199999, # re: BETBG
    door:            0.199999, # inferred, same as (vertical) fenestration
    skylight:        0.199999, # inferred, same as (vertical) fenestration
    spandrel:        0.155000, # Detail 5.4.4
    corner:          0.200000, # re: BETBG
    balcony:         0.200000, # re: BETBG
    balconysill:     0.200000, # same as balcony
    balconydoorsill: 0.200000, # same as balconysill
    party:           0.200000, # re: BETBG
    grade:           0.200000, # re: BETBG
    joint:           0.100000, # re: BETBG
    transition:      0.000000  # defaults to 0
  }.freeze

  # "Conventional", closer to window wall spandrels.
  @set["spandrel (BETBG)"] =
  {
    rimjoist:        0.615000, # Detail 1.2.1
    parapet:         1.000000, # Detail 1.3.2
    roof:            1.000000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.000000, # inferred, generally part of clear-field RSi
    door:            0.000000, # inferred, generally part of clear-field RSi
    skylight:        0.350000, # same as "regular (BETBG)"
    spandrel:        0.155000, # Detail 5.4.4
    corner:          0.425000, # Detail 1.4.1
    balcony:         1.110000, # Detail 8.1.9/9.1.6
    balconysill:     1.110000, # same as balcony
    balconydoorsill: 1.110000, # same as balconysill
    party:           0.990000, # inferred, similar to parapet/balcony
    grade:           0.880000, # Detail 2.5.1
    joint:           0.500000, # Detail 3.3.2
    transition:      0.000000  # defaults to 0
  }.freeze

  # "GoodHigh performance" curtainwall spandrels.
  @set["spandrel HP (BETBG)"] =
  {
    rimjoist:        0.170000, # Detail 1.2.7
    parapet:         0.660000, # Detail 1.3.2
    roof:            0.660000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.000000, # inferred, generally part of clear-field RSi
    door:            0.000000, # inferred, generally part of clear-field RSi
    skylight:        0.350000, # same as "regular (BETBG)"
    spandrel:        0.155000, # Detail 5.4.4
    corner:          0.200000, # Detail 1.4.2
    balcony:         0.400000, # Detail 9.1.15
    balconysill:     0.400000, # same as balcony
    balconydoorsill: 0.400000, # same as balconysill
    party:           0.500000, # inferred, similar to parapet/balcony
    grade:           0.880000, # Detail 2.5.1
    joint:           0.140000, # Detail 7.4.2
    transition:      0.000000  # defaults to 0
  }.freeze

  # CCQ, Chapitre I1, code-compliant defaults.
  @set["code (Quebec)"] =
  {
    rimjoist:        0.300000, # re I1
    parapet:         0.325000, # re I1
    roof:            0.325000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.200000, # re I1
    door:            0.200000, # re I1
    skylight:        0.200000, # re I1
    spandrel:        0.155000, # BETBG Detail 5.4.4 (same as uncompliant)
    corner:          0.300000, # inferred from description, not explicitely set
    balcony:         0.500000, # re I1
    balconysill:     0.500000, # same as balcony
    balconydoorsill: 0.500000, # same as balconysill
    party:           0.450000, # re I1
    grade:           0.450000, # re I1
    joint:           0.200000, # re I1
    transition:      0.000000  # defaults to 0
  }.freeze

  # CCQ, Chapitre I1, non-code-compliant defaults.
  @set["uncompliant (Quebec)"] =
  {
    rimjoist:        0.850000, # re I1
    parapet:         0.800000, # re I1
    roof:            0.800000, # same as parapet
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.500000, # re I1
    door:            0.500000, # re I1
    skylight:        0.500000, # re I1
    spandrel:        0.155000, # BETBG Detail 5.4.4 (same as compliant)
    corner:          0.850000, # inferred from description, not explicitely set
    balcony:         1.000000, # re I1
    balconysill:     1.000000, # same as balcony
    balconydoorsill: 1.000000, # same as balconysill
    party:           0.850000, # re I1
    grade:           0.850000, # re I1
    joint:           0.500000, # re I1
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "default" steel-framed and metal buildings.
  @set["90.1.22|steel.m|default"] =
  {
    rimjoist:        0.307000, # "intermediate floor to wall intersection"
    parapet:         0.260000, # "parapet" edge
    roof:            0.020000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.194000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000001, # (unspecified, defaults to 0)
    corner:          0.000002, # (unspecified, defaults to 0)
    balcony:         0.307000, # "intermediate floor balcony/overhang" edge
    balconysill:     0.307000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.307000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.376000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "unmitigated" steel-framed and metal buildings.
  @set["90.1.22|steel.m|unmitigated"] =
  {
    rimjoist:        0.842000, # "intermediate floor to wall intersection"
    parapet:         0.500000, # "parapet" edge
    roof:            0.650000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.505000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000001, # (unspecified, defaults to 0)
    corner:          0.000002, # (unspecified, defaults to 0)
    balcony:         0.842000, # "intermediate floor balcony/overhang" edge
    balconysill:     1.686000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.842000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.554000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "default" exterior/integral mass walls.
  @set["90.1.22|mass.ex|default"] =
  {
    rimjoist:        0.205000, # "intermediate floor to wall intersection"
    parapet:         0.217000, # "parapet" edge
    roof:            0.150000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.226000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000001, # (unspecified, defaults to 0)
    corner:          0.000002, # (unspecified, defaults to 0)
    balcony:         0.205000, # "intermediate floor balcony/overhang" edge
    balconysill:     0.307000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.205000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.322000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "unmitigated" exterior/integral mass walls.
  @set["90.1.22|mass.ex|unmitigated"] =
  {
    rimjoist:        0.824000, # "intermediate floor to wall intersection"
    parapet:         0.412000, # "parapet" edge
    roof:            0.750000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.325000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000001, # (unspecified, defaults to 0)
    corner:          0.000002, # (unspecified, defaults to 0)
    balcony:         0.824000, # "intermediate floor balcony/overhang" edge
    balconysill:     1.686000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.824000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.476000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "default" interior mass walls.
  @set["90.1.22|mass.in|default"] =
  {
    rimjoist:        0.495000, # "intermediate floor to wall intersection"
    parapet:         0.393000, # "parapet" edge
    roof:            0.150000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.143000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000000, # (unspecified, defaults to 0)
    corner:          0.000001, # (unspecified, defaults to 0)
    balcony:         0.495000, # "intermediate floor balcony/overhang" edge
    balconysill:     0.307000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.495000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.322000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "unmitigated" interior mass walls.
  @set["90.1.22|mass.in|unmitigated"] =
  {
    rimjoist:        0.824000, # "intermediate floor to wall intersection"
    parapet:         0.884000, # "parapet" edge
    roof:            0.750000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.543000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000000, # (unspecified, defaults to 0)
    corner:          0.000001, # (unspecified, defaults to 0)
    balcony:         0.824000, # "intermediate floor balcony/overhang" edge
    balconysill:     1.686000, # "intermediate floor balcony" edge (when sill)
    balconydoorsill: 0.824000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.476000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "default" wood-framed (and other) walls.
  @set["90.1.22|wood.fr|default"] =
  {
    rimjoist:        0.084000, # "intermediate floor to wall intersection"
    parapet:         0.056000, # "parapet" edge
    roof:            0.020000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.171000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000000, # (unspecified, defaults to 0)
    corner:          0.000001, # (unspecified, defaults to 0)
    balcony:         0.084000, # "intermediate floor balcony/overhang" edge
    balconysill:     0.171001, # same as :fenestration
    balconydoorsill: 0.084000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.074000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  # ASHRAE 90.1 2022 (A10) "unmitigated" wood-framed (and other) walls.
  @set["90.1.22|wood.fr|unmitigated"] =
  {
    rimjoist:        0.582000, # "intermediate floor to wall intersection"
    parapet:         0.056000, # "parapet" edge
    roof:            0.150000, # (non-parapet) "roof" edge
    ceiling:         0.000000, # e.g. suspended ceiling tiles
    fenestration:    0.260000, # "wall to vertical fenestration intersection"
    door:            0.000000, # (unspecified, defaults to 0)
    skylight:        0.000000, # (unspecified, defaults to 0)
    spandrel:        0.000000, # (unspecified, defaults to 0)
    corner:          0.000001, # (unspecified, defaults to 0)
    balcony:         0.582000, # same as :rimjoist
    balconysill:     0.582000, # same as :rimjoist
    balconydoorsill: 0.582000, # same as balcony
    party:           0.000001, # (unspecified, defaults to 0)
    grade:           0.000001, # (unspecified, defaults to 0)
    joint:           0.322000, # placeholder for "cladding support"
    transition:      0.000000  # defaults to 0
  }.freeze

  @set["(non thermal bridging)"] =
  {
    rimjoist:        0.000000, # defaults to 0
    parapet:         0.000000, # defaults to 0
    roof:            0.000000, # defaults to 0
    ceiling:         0.000000, # defaults to 0
    fenestration:    0.000000, # defaults to 0
    door:            0.000000, # defaults to 0
    skylight:        0.000000, # defaults to 0
    spandrel:        0.000000, # defaults to 0
    corner:          0.000000, # defaults to 0
    balcony:         0.000000, # defaults to 0
    balconysill:     0.000000, # defaults to 0
    balconydoorsill: 0.000000, # defaults to 0
    party:           0.000000, # defaults to 0
    grade:           0.000000, # defaults to 0
    joint:           0.000000, # defaults to 0
    transition:      0.000000  # defaults to 0
  }.freeze

  @set.keys.each { |k| self.gen(k) }
end

Instance Attribute Details

#hasHash (readonly)

Returns shorthand listing of PSI types in a set.

Returns:

  • (Hash)

    shorthand listing of PSI types in a set



118
119
120
# File 'lib/tbd/psi.rb', line 118

def has
  @has
end

#setHash (readonly)

Returns PSI set.

Returns:

  • (Hash)

    PSI set



115
116
117
# File 'lib/tbd/psi.rb', line 115

def set
  @set
end

#valHash (readonly)

Returns shorthand listing of PSI-factors in a set.

Returns:

  • (Hash)

    shorthand listing of PSI-factors in a set



121
122
123
# File 'lib/tbd/psi.rb', line 121

def val
  @val
end

Instance Method Details

#append(set = {}) ⇒ Bool, false

Appends a new PSI set.

Parameters:

  • set (Hash) (defaults to: {})

    a new PSI set

Options Hash (set):

  • :id (#to_s)

    PSI set identifier

  • :rimjoist (#to_f)

    intermediate floor-to-wall intersection

  • :rimjoistconcave (#to_f)

    basilaire variant

  • :rimjoistconvex (#to_f)

    cantilever variant

  • :parapet (#to_f)

    roof-to-wall intersection

  • :parapetconcave (#to_f)

    basilaire variant

  • :parapetconvex (#to_f)

    typical

  • :roof (#to_f)

    roof-to-wall intersection

  • :roofconcave (#to_f)

    basilaire variant

  • :roofconvex (#to_f)

    typical

  • :ceiling (#to_f)

    intermediate (uninsulated) ceiling perimeter

  • :ceilingconcave (#to_f)

    cantilever variant

  • :ceilingconvex (#to_f)

    colonnade variant

  • :fenestration (#to_f)

    head/sill/jamb interface

  • :head (#to_f) — default: fenestrated

    header interface

  • :headconcave (#to_f) — default: fenestrated

    basilaire variant

  • :headconvex (#to_f) — default: fenestrated

    parapet variant

  • :sill (#to_f) — default: fenestrated

    threshold/sill interface

  • :sillconcave (#to_f) — default: fenestrated

    basilaire variant

  • :sillconvex (#to_f) — default: fenestrated

    cantilever variant

  • :jamb (#to_f) — default: fenestrated

    side jamb interface

  • :jambconcave (#to_f) — default: fenestrated

    interior corner variant

  • :jambconvex (#to_f) — default: fenestrated

    exterior corner variant

  • :door (#to_f) — default: opaque

    head/sill/jamb interface

  • :doorhead (#to_f) — default: opaque

    header interface

  • :doorheadconcave (#to_f) — default: opaque

    basilaire variant

  • :doorheadconvex (#to_f) — default: opaque

    parapet variant

  • :doorsill (#to_f) — default: opaque

    threshold interface

  • :doorsillconcave (#to_f) — default: opaque

    basilaire variant

  • :doorsillconvex (#to_f) — default: opaque

    cantilever variant

  • :doorjamb (#to_f) — default: opaque

    side jamb interface

  • :doorjambconcave (#to_f) — default: opaque

    interior corner variant

  • :doorjambconvex (#to_f) — default: opaque

    exterior corner variant

  • :skylight (#to_f)

    to roof interface

  • :skylighthead (#to_f)

    header interface

  • :skylightheadconcave (#to_f)

    basilaire variant

  • :skylightheadconvex (#to_f)

    parapet variant

  • :skylightsill (#to_f)

    sill interface

  • :skylightsillconcave (#to_f)

    basilaire variant

  • :skylightsillconvex (#to_f)

    cantilever variant

  • :skylightjamb (#to_f)

    side jamb interface

  • :skylightjambconcave (#to_f) — default: opaque

    interior corner variant

  • :skylightjambconvex (#to_f) — default: opaque

    parapet variant

  • :spandrel (#to_f)

    spandrel/other interface

  • :spandrelconcave (#to_f)

    interior corner variant

  • :spandrelconvex (#to_f)

    exterior corner variant

  • :corner (#to_f)

    corner intersection

  • :cornerconcave (#to_f)

    interior corner variant

  • :cornerconvex (#to_f)

    exterior corner variant

  • :balcony (#to_f)

    intermediate floor-balcony intersection

  • :balconyconcave (#to_f)

    basilaire variant

  • :balconyconvex (#to_f)

    cantilever variant

  • :balconysill (#to_f)

    intermediate floor-balcony-fenestration intersection

  • :balconysilloncave (#to_f)

    basilaire variant

  • :balconysillconvex (#to_f)

    cantilever variant

  • :balconydoorsill (#to_f)

    intermediate floor-balcony-door intersection

  • :balconydoorsilloncave (#to_f)

    basilaire variant

  • :balconydoorsillconvex (#to_f)

    cantilever variant

  • :party (#to_f)

    demising surface intersection

  • :partyconcave (#to_f)

    interior corner or basilaire variant

  • :partyconvex (#to_f)

    exterior corner or cantilever variant

  • :grade (#to_f)

    foundation wall or slab-on-grade intersection

  • :gradeconcave (#to_f)

    cantilever variant

  • :gradeconvex (#to_f)

    basilaire variant

  • :joint (#to_f)

    strong ~coplanar joint

  • :transition (#to_f)

    mild ~coplanar transition

Returns:

  • (Bool)

    whether PSI set is successfully appended

  • (false)

    if invalid input (see logs)



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
# File 'lib/tbd/psi.rb', line 872

def append(set = {})
  mth = "TBD::#{__callee__}"
  a   = false
  s   = {}
  return mismatch("set"  , set, Hash, mth, DBG, a) unless set.is_a?(Hash)
  return hashkey("set id", set, :id , mth, DBG, a) unless set.key?(:id)

  id = trim(set[:id])
  return mismatch("set ID", set[:id], String, mth, ERR, a) if id.empty?

  if @set.key?(id)
    log(ERR, "'#{id}': existing PSI set (#{mth})")
    return a
  end

  # Most PSI types have concave and convex variants, depending on the polar
  # position of deratable surfaces about an edge-as-thermal-bridge. One
  # exception is :fenestration, which TBD later breaks down into :head,
  # :sill or :jamb edge types. Another exception is a :joint edge: a PSI
  # type that is not autoassigned to an edge (i.e., only via a TBD JSON
  # input file). Finally, transitions are autoassigned by TBD when an edge
  # is "flat", i.e, no noticeable polar angle difference between surfaces.
  s[:rimjoist              ] = set[:rimjoist              ] if set.key?(:rimjoist)
  s[:rimjoistconcave       ] = set[:rimjoistconcave       ] if set.key?(:rimjoistconcave)
  s[:rimjoistconvex        ] = set[:rimjoistconvex        ] if set.key?(:rimjoistconvex)
  s[:parapet               ] = set[:parapet               ] if set.key?(:parapet)
  s[:parapetconcave        ] = set[:parapetconcave        ] if set.key?(:parapetconcave)
  s[:parapetconvex         ] = set[:parapetconvex         ] if set.key?(:parapetconvex)
  s[:roof                  ] = set[:roof                  ] if set.key?(:roof)
  s[:roofconcave           ] = set[:roofconcave           ] if set.key?(:roofconcave)
  s[:roofconvex            ] = set[:roofconvex            ] if set.key?(:roofconvex)
  s[:ceiling               ] = set[:ceiling               ] if set.key?(:ceiling)
  s[:ceilingconcave        ] = set[:ceilingconcave        ] if set.key?(:ceilingconcave)
  s[:ceilingconvex         ] = set[:ceilingconvex         ] if set.key?(:ceilingconvex)
  s[:fenestration          ] = set[:fenestration          ] if set.key?(:fenestration)
  s[:head                  ] = set[:head                  ] if set.key?(:head)
  s[:headconcave           ] = set[:headconcave           ] if set.key?(:headconcave)
  s[:headconvex            ] = set[:headconvex            ] if set.key?(:headconvex)
  s[:sill                  ] = set[:sill                  ] if set.key?(:sill)
  s[:sillconcave           ] = set[:sillconcave           ] if set.key?(:sillconcave)
  s[:sillconvex            ] = set[:sillconvex            ] if set.key?(:sillconvex)
  s[:jamb                  ] = set[:jamb                  ] if set.key?(:jamb)
  s[:jambconcave           ] = set[:jambconcave           ] if set.key?(:jambconcave)
  s[:jambconvex            ] = set[:jambconvex            ] if set.key?(:jambconvex)
  s[:door                  ] = set[:door                  ] if set.key?(:door)
  s[:doorhead              ] = set[:doorhead              ] if set.key?(:doorhead)
  s[:doorheadconcave       ] = set[:doorheadconcave       ] if set.key?(:doorheadconcave)
  s[:doorheadconvex        ] = set[:doorheadconvex        ] if set.key?(:doorheadconvex)
  s[:doorsill              ] = set[:doorsill              ] if set.key?(:doorsill)
  s[:doorsillconcave       ] = set[:doorsillconcave       ] if set.key?(:doorsillconcave)
  s[:doorsillconvex        ] = set[:doorsillconvex        ] if set.key?(:doorsillconvex)
  s[:doorjamb              ] = set[:doorjamb              ] if set.key?(:doorjamb)
  s[:doorjambconcave       ] = set[:doorjambconcave       ] if set.key?(:doorjambconcave)
  s[:doorjambconvex        ] = set[:doorjambconvex        ] if set.key?(:doorjambconvex)
  s[:skylight              ] = set[:skylight              ] if set.key?(:skylight)
  s[:skylighthead          ] = set[:skylighthead          ] if set.key?(:skylighthead)
  s[:skylightheadconcave   ] = set[:skylightheadconcave   ] if set.key?(:skylightheadconcave)
  s[:skylightheadconvex    ] = set[:skylightheadconvex    ] if set.key?(:skylightheadconvex)
  s[:skylightsill          ] = set[:skylightsill          ] if set.key?(:skylightsill)
  s[:skylightsillconcave   ] = set[:skylightsillconcave   ] if set.key?(:skylightsillconcave)
  s[:skylightsillconvex    ] = set[:skylightsillconvex    ] if set.key?(:skylightsillconvex)
  s[:skylightjamb          ] = set[:skylightjamb          ] if set.key?(:skylightjamb)
  s[:skylightjambconcave   ] = set[:skylightjambconcave   ] if set.key?(:skylightjambconcave)
  s[:skylightjambconvex    ] = set[:skylightjambconvex    ] if set.key?(:skylightjambconvex)
  s[:spandrel              ] = set[:spandrel              ] if set.key?(:spandrel)
  s[:spandrelconcave       ] = set[:spandrelconcave       ] if set.key?(:spandrelconcave)
  s[:spandrelconvex        ] = set[:spandrelconvex        ] if set.key?(:spandrelconvex)
  s[:corner                ] = set[:corner                ] if set.key?(:corner)
  s[:cornerconcave         ] = set[:cornerconcave         ] if set.key?(:cornerconcave)
  s[:cornerconvex          ] = set[:cornerconvex          ] if set.key?(:cornerconvex)
  s[:balcony               ] = set[:balcony               ] if set.key?(:balcony)
  s[:balconyconcave        ] = set[:balconyconcave        ] if set.key?(:balconyconcave)
  s[:balconyconvex         ] = set[:balconyconvex         ] if set.key?(:balconyconvex)
  s[:balconysill           ] = set[:balconysill           ] if set.key?(:balconysill)
  s[:balconysillconcave    ] = set[:balconysillconcave    ] if set.key?(:balconysillconcave)
  s[:balconysillconvex     ] = set[:balconysillconvex     ] if set.key?(:balconysillconvex)
  s[:balconydoorsill       ] = set[:balconydoorsill       ] if set.key?(:balconydoorsill)
  s[:balconydoorsillconcave] = set[:balconydoorsillconcave] if set.key?(:balconydoorsillconcave)
  s[:balconydoorsillconvex ] = set[:balconydoorsillconvex ] if set.key?(:balconydoorsillconvex)
  s[:party                 ] = set[:party                 ] if set.key?(:party)
  s[:partyconcave          ] = set[:partyconcave          ] if set.key?(:partyconcave)
  s[:partyconvex           ] = set[:partyconvex           ] if set.key?(:partyconvex)
  s[:grade                 ] = set[:grade                 ] if set.key?(:grade)
  s[:gradeconcave          ] = set[:gradeconcave          ] if set.key?(:gradeconcave)
  s[:gradeconvex           ] = set[:gradeconvex           ] if set.key?(:gradeconvex)
  s[:joint                 ] = set[:joint                 ] if set.key?(:joint)
  s[:transition            ] = set[:transition            ] if set.key?(:transition)

  s[:joint                 ] = 0.000  unless set.key?(:joint)
  s[:transition            ] = 0.000  unless set.key?(:transition)
  s[:ceiling               ] = 0.000  unless set.key?(:ceiling)

  @set[id] = s
  self.gen(id)

  true
end

#complete?(id = "") ⇒ Bool, false

Validates whether a given PSI set has a complete list of PSI type:values.

Parameters:

  • id (#to_s) (defaults to: "")

    PSI set identifier

Returns:

  • (Bool)

    whether provided PSI set is held in memory and is complete

  • (false)

    if invalid input (see logs)



1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
# File 'lib/tbd/psi.rb', line 1003

def complete?(id = "")
  mth = "TBD::#{__callee__}"
  a   = false
  id  = trim(id)
  return mismatch("set ID", id, String, mth, ERR, a)     if id.empty?
  return hashkey(id, @set , id,         mth, ERR, a) unless @set.key?(id)
  return hashkey(id, @has , id,         mth, ERR, a) unless @has.key?(id)
  return hashkey(id, @val , id,         mth, ERR, a) unless @val.key?(id)

  holes = []
  holes << :head       if @has[id][:head          ]
  holes << :sill       if @has[id][:sill          ]
  holes << :jamb       if @has[id][:jamb          ]
  ok = holes.size == 3
  ok = true            if @has[id][:fenestration  ]
  return false     unless ok

  corners = []
  corners << :concave  if @has[id][:cornerconcave ]
  corners << :convex   if @has[id][:cornerconvex  ]
  ok = corners.size == 2
  ok = true            if @has[id][:corner        ]
  return false     unless ok

  parapets = []
  roofs    = []
  parapets << :concave if @has[id][:parapetconcave]
  parapets << :convex  if @has[id][:parapetconvex ]
  roofs    << :concave if @has[id][:roofconcave   ]
  parapets << :convex  if @has[id][:roofconvex    ]
  ok = parapets.size == 2 || roofs.size == 2
  ok = true            if @has[id][:parapet       ]
  ok = true            if @has[id][:roof          ]
  return false     unless ok
  return false     unless @has[id][:party         ]
  return false     unless @has[id][:grade         ]
  return false     unless @has[id][:balcony       ]
  return false     unless @has[id][:rimjoist      ]

  ok
end

#gen(id = "") ⇒ Bool, false

Generates PSI set shorthand listings.

Parameters:

  • id (defaults to: "")

    PSI set identifier

Returns:

  • (Bool)

    whether successful in generating PSI set shorthands

  • (false)

    if invalid input (see logs)



498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/tbd/psi.rb', line 498

def gen(id = "")
  mth = "TBD::#{__callee__}"
  return hashkey(id, @set, id, mth, ERR, false) unless @set.key?(id)

  h                          = {} # true/false if PSI set has PSI type
  h[:joint                 ] = @set[id].key?(:joint)
  h[:transition            ] = @set[id].key?(:transition)
  h[:fenestration          ] = @set[id].key?(:fenestration)
  h[:head                  ] = @set[id].key?(:head)
  h[:headconcave           ] = @set[id].key?(:headconcave)
  h[:headconvex            ] = @set[id].key?(:headconvex)
  h[:sill                  ] = @set[id].key?(:sill)
  h[:sillconcave           ] = @set[id].key?(:sillconcave)
  h[:sillconvex            ] = @set[id].key?(:sillconvex)
  h[:jamb                  ] = @set[id].key?(:jamb)
  h[:jambconcave           ] = @set[id].key?(:jambconcave)
  h[:jambconvex            ] = @set[id].key?(:jambconvex)
  h[:door                  ] = @set[id].key?(:door)
  h[:doorhead              ] = @set[id].key?(:doorhead)
  h[:doorheadconcave       ] = @set[id].key?(:doorheadconcave)
  h[:doorheadconvex        ] = @set[id].key?(:doorheadconvex)
  h[:doorsill              ] = @set[id].key?(:doorsill)
  h[:doorsillconcave       ] = @set[id].key?(:doorsillconcave)
  h[:doorsillconvex        ] = @set[id].key?(:doorsillconvex)
  h[:doorjamb              ] = @set[id].key?(:doorjamb)
  h[:doorjambconcave       ] = @set[id].key?(:doorjambconcave)
  h[:doorjambconvex        ] = @set[id].key?(:doorjambconvex)
  h[:skylight              ] = @set[id].key?(:skylight)
  h[:skylighthead          ] = @set[id].key?(:skylighthead)
  h[:skylightheadconcave   ] = @set[id].key?(:skylightheadconcave)
  h[:skylightheadconvex    ] = @set[id].key?(:skylightheadconvex)
  h[:skylightsill          ] = @set[id].key?(:skylightsill)
  h[:skylightsillconcave   ] = @set[id].key?(:skylightsillconcave)
  h[:skylightsillconvex    ] = @set[id].key?(:skylightsillconvex)
  h[:skylightjamb          ] = @set[id].key?(:skylightjamb)
  h[:skylightjambconcave   ] = @set[id].key?(:skylightjambconcave)
  h[:skylightjambconvex    ] = @set[id].key?(:skylightjambconvex)
  h[:spandrel              ] = @set[id].key?(:spandrel)
  h[:spandrelconcave       ] = @set[id].key?(:spandrelconcave)
  h[:spandrelconvex        ] = @set[id].key?(:spandrelconvex)
  h[:corner                ] = @set[id].key?(:corner)
  h[:cornerconcave         ] = @set[id].key?(:cornerconcave)
  h[:cornerconvex          ] = @set[id].key?(:cornerconvex)
  h[:party                 ] = @set[id].key?(:party)
  h[:partyconcave          ] = @set[id].key?(:partyconcave)
  h[:partyconvex           ] = @set[id].key?(:partyconvex)
  h[:parapet               ] = @set[id].key?(:parapet)
  h[:partyconcave          ] = @set[id].key?(:parapetconcave)
  h[:parapetconvex         ] = @set[id].key?(:parapetconvex)
  h[:roof                  ] = @set[id].key?(:roof)
  h[:roofconcave           ] = @set[id].key?(:roofconcave)
  h[:roofconvex            ] = @set[id].key?(:roofconvex)
  h[:ceiling               ] = @set[id].key?(:ceiling)
  h[:ceilingconcave        ] = @set[id].key?(:ceilingconcave)
  h[:ceilingconvex         ] = @set[id].key?(:ceilingconvex)
  h[:grade                 ] = @set[id].key?(:grade)
  h[:gradeconcave          ] = @set[id].key?(:gradeconcave)
  h[:gradeconvex           ] = @set[id].key?(:gradeconvex)
  h[:balcony               ] = @set[id].key?(:balcony)
  h[:balconyconcave        ] = @set[id].key?(:balconyconcave)
  h[:balconyconvex         ] = @set[id].key?(:balconyconvex)
  h[:balconysill           ] = @set[id].key?(:balconysill)
  h[:balconysillconcave    ] = @set[id].key?(:balconysillconvex)
  h[:balconysillconvex     ] = @set[id].key?(:balconysillconvex)
  h[:balconydoorsill       ] = @set[id].key?(:balconydoorsill)
  h[:balconydoorsillconcave] = @set[id].key?(:balconydoorsillconvex)
  h[:balconydoorsillconvex ] = @set[id].key?(:balconydoorsillconvex)
  h[:rimjoist              ] = @set[id].key?(:rimjoist)
  h[:rimjoistconcave       ] = @set[id].key?(:rimjoistconcave)
  h[:rimjoistconvex        ] = @set[id].key?(:rimjoistconvex)
  @has[id]                   = h

  v                   = {} # PSI-value (W/K per linear meter)
  v[:door           ] = 0; v[:fenestration          ] = 0; v[:skylight             ] = 0
  v[:head           ] = 0; v[:headconcave           ] = 0; v[:headconvex           ] = 0
  v[:sill           ] = 0; v[:sillconcave           ] = 0; v[:sillconvex           ] = 0
  v[:jamb           ] = 0; v[:jambconcave           ] = 0; v[:jambconvex           ] = 0
  v[:doorhead       ] = 0; v[:doorheadconcave       ] = 0; v[:doorconvex           ] = 0
  v[:doorsill       ] = 0; v[:doorsillconcave       ] = 0; v[:doorsillconvex       ] = 0
  v[:doorjamb       ] = 0; v[:doorjambconcave       ] = 0; v[:doorjambconvex       ] = 0
  v[:skylighthead   ] = 0; v[:skylightheadconcave   ] = 0; v[:skylightconvex       ] = 0
  v[:skylightsill   ] = 0; v[:skylightsillconcave   ] = 0; v[:skylightsillconvex   ] = 0
  v[:skylightjamb   ] = 0; v[:skylightjambconcave   ] = 0; v[:skylightjambconvex   ] = 0
  v[:spandrel       ] = 0; v[:spandrelconcave       ] = 0; v[:spandrelconvex       ] = 0
  v[:corner         ] = 0; v[:cornerconcave         ] = 0; v[:cornerconvex         ] = 0
  v[:parapet        ] = 0; v[:parapetconcave        ] = 0; v[:parapetconvex        ] = 0
  v[:roof           ] = 0; v[:roofconcave           ] = 0; v[:roofconvex           ] = 0
  v[:ceiling        ] = 0; v[:ceilingconcave        ] = 0; v[:ceilingconvex        ] = 0
  v[:party          ] = 0; v[:partyconcave          ] = 0; v[:partyconvex          ] = 0
  v[:grade          ] = 0; v[:gradeconcave          ] = 0; v[:gradeconvex          ] = 0
  v[:balcony        ] = 0; v[:balconyconcave        ] = 0; v[:balconyconvex        ] = 0
  v[:balconysill    ] = 0; v[:balconysillconcave    ] = 0; v[:balconysillconvex    ] = 0
  v[:balconydoorsill] = 0; v[:balconydoorsillconcave] = 0; v[:balconydoorsillconvex] = 0
  v[:rimjoist       ] = 0; v[:rimjoistconcave       ] = 0; v[:rimjoistconvex       ] = 0
  v[:joint          ] = 0; v[:transition            ] = 0

  v[:joint                 ] = @set[id][:joint                 ] if h[:joint                 ]
  v[:transition            ] = @set[id][:transition            ] if h[:transition            ]
  v[:fenestration          ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:head                  ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:headconcave           ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:headconvex            ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:sill                  ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:sillconcave           ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:sillconvex            ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:jamb                  ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:jambconcave           ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:jambconvex            ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:door                  ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorhead              ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorheadconcave       ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorheadconvex        ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorsill              ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorsillconcave       ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorsillconvex        ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorjamb              ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorjambconcave       ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:doorjambconvex        ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylight              ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylighthead          ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightheadconcave   ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightheadconvex    ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightsill          ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightsillconcave   ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightsillconvex    ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightjamb          ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightjambconcave   ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:skylightjambconvex    ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:door                  ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorhead              ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorheadconcave       ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorheadconvex        ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorsill              ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorsillconcave       ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorsillconvex        ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorjamb              ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorjambconcave       ] = @set[id][:door                  ] if h[:door                  ]
  v[:doorjambconvex        ] = @set[id][:door                  ] if h[:door                  ]
  v[:skylight              ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylighthead          ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightheadconcave   ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightheadconvex    ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightsill          ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightsillconcave   ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightsillconvex    ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightjamb          ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightjambconcave   ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:skylightjambconvex    ] = @set[id][:skylight              ] if h[:skylight              ]
  v[:head                  ] = @set[id][:head                  ] if h[:head                  ]
  v[:headconcave           ] = @set[id][:head                  ] if h[:head                  ]
  v[:headconvex            ] = @set[id][:head                  ] if h[:head                  ]
  v[:sill                  ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:sillconcave           ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:sillconvex            ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:jamb                  ] = @set[id][:jamb                  ] if h[:jamb                  ]
  v[:jambconcave           ] = @set[id][:jamb                  ] if h[:jamb                  ]
  v[:jambconvex            ] = @set[id][:jamb                  ] if h[:jamb                  ]
  v[:doorhead              ] = @set[id][:doorhead              ] if h[:doorhead              ]
  v[:doorheadconcave       ] = @set[id][:doorhead              ] if h[:doorhead              ]
  v[:doorheadconvex        ] = @set[id][:doorhead              ] if h[:doorhead              ]
  v[:doorsill              ] = @set[id][:doorsill              ] if h[:doorsill              ]
  v[:doorsillconcave       ] = @set[id][:doorsill              ] if h[:doorsill              ]
  v[:doorsillconvex        ] = @set[id][:doorsill              ] if h[:doorsill              ]
  v[:doorjamb              ] = @set[id][:doorjamb              ] if h[:doorjamb              ]
  v[:doorjambconcave       ] = @set[id][:doorjamb              ] if h[:doorjamb              ]
  v[:doorjambconvex        ] = @set[id][:doorjamb              ] if h[:doorjamb              ]
  v[:skylighthead          ] = @set[id][:skylighthead          ] if h[:skylighthead          ]
  v[:skylightheadconcave   ] = @set[id][:skylighthead          ] if h[:skylighthead          ]
  v[:skylightheadconvex    ] = @set[id][:skylighthead          ] if h[:skylighthead          ]
  v[:skylightsill          ] = @set[id][:skylightsill          ] if h[:skylightsill          ]
  v[:skylightsillconcave   ] = @set[id][:skylightsill          ] if h[:skylightsill          ]
  v[:skylightsillconvex    ] = @set[id][:skylightsill          ] if h[:skylightsill          ]
  v[:skylightjamb          ] = @set[id][:skylightjamb          ] if h[:skylightjamb          ]
  v[:skylightjambconcave   ] = @set[id][:skylightjamb          ] if h[:skylightjamb          ]
  v[:skylightjambconvex    ] = @set[id][:skylightjamb          ] if h[:skylightjamb          ]
  v[:headconcave           ] = @set[id][:headconcave           ] if h[:headconcave           ]
  v[:headconvex            ] = @set[id][:headconvex            ] if h[:headconvex            ]
  v[:sillconcave           ] = @set[id][:sillconcave           ] if h[:sillconcave           ]
  v[:sillconvex            ] = @set[id][:sillconvex            ] if h[:sillconvex            ]
  v[:jambconcave           ] = @set[id][:jambconcave           ] if h[:jambconcave           ]
  v[:jambconvex            ] = @set[id][:jambconvex            ] if h[:jambconvex            ]
  v[:doorheadconcave       ] = @set[id][:doorheadconcave       ] if h[:doorheadconcave       ]
  v[:doorheadconvex        ] = @set[id][:doorheadconvex        ] if h[:doorheadconvex        ]
  v[:doorsillconcave       ] = @set[id][:doorsillconcave       ] if h[:doorsillconcave       ]
  v[:doorsillconvex        ] = @set[id][:doorsillconvex        ] if h[:doorsillconvex        ]
  v[:doorjambconcave       ] = @set[id][:doorjambconcave       ] if h[:doorjambconcave       ]
  v[:doorjambconvex        ] = @set[id][:doorjambconvex        ] if h[:doorjambconvex        ]
  v[:skylightheadconcave   ] = @set[id][:skylightheadconcave   ] if h[:skylightheadconcave   ]
  v[:skylightheadconvex    ] = @set[id][:skylightheadconvex    ] if h[:skylightheadconvex    ]
  v[:skylightsillconcave   ] = @set[id][:skylightsillconcave   ] if h[:skylightsillconcave   ]
  v[:skylightsillconvex    ] = @set[id][:skylightsillconvex    ] if h[:skylightsillconvex    ]
  v[:skylightjambconcave   ] = @set[id][:skylightjambconcave   ] if h[:skylightjambconcave   ]
  v[:skylightjambconvex    ] = @set[id][:skylightjambconvex    ] if h[:skylightjambconvex    ]
  v[:spandrel              ] = @set[id][:spandrel              ] if h[:spandrel              ]
  v[:spandrelconcave       ] = @set[id][:spandrel              ] if h[:spandrel              ]
  v[:spandrelconvex        ] = @set[id][:spandrel              ] if h[:spandrel              ]
  v[:spandrelconcave       ] = @set[id][:spandrelconcave       ] if h[:spandrelconcave       ]
  v[:spandrelconvex        ] = @set[id][:spandrelconvex        ] if h[:spandrelconvex        ]
  v[:corner                ] = @set[id][:corner                ] if h[:corner                ]
  v[:cornerconcave         ] = @set[id][:corner                ] if h[:corner                ]
  v[:cornerconvex          ] = @set[id][:corner                ] if h[:corner                ]
  v[:cornerconcave         ] = @set[id][:cornerconcave         ] if h[:cornerconcave         ]
  v[:cornerconvex          ] = @set[id][:cornerconvex          ] if h[:cornerconvex          ]
  v[:parapet               ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:parapetconcave        ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:parapetconvex         ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:parapetconcave        ] = @set[id][:roofconcave           ] if h[:roofconcave           ]
  v[:parapetconvex         ] = @set[id][:roofconvex            ] if h[:roofconvex            ]
  v[:parapet               ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:parapetconcave        ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:parapetconvex         ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:parapetconcave        ] = @set[id][:parapetconcave        ] if h[:parapetconcave        ]
  v[:parapetconvex         ] = @set[id][:parapetconvex         ] if h[:parapetconvex         ]
  v[:roof                  ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:roofconcave           ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:roofconvex            ] = @set[id][:parapet               ] if h[:parapet               ]
  v[:roofconcave           ] = @set[id][:parapetconcave        ] if h[:parapetconcave        ]
  v[:roofconvex            ] = @set[id][:parapetxonvex         ] if h[:parapetconvex         ]
  v[:roof                  ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:roofconcave           ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:roofconvex            ] = @set[id][:roof                  ] if h[:roof                  ]
  v[:roofconcave           ] = @set[id][:roofconcave           ] if h[:roofconcave           ]
  v[:roofconvex            ] = @set[id][:roofconvex            ] if h[:roofconvex            ]
  v[:ceiling               ] = @set[id][:ceiling               ] if h[:ceiling               ]
  v[:ceilingconcave        ] = @set[id][:ceiling               ] if h[:ceiling               ]
  v[:ceilingconvex         ] = @set[id][:ceiling               ] if h[:ceiling               ]
  v[:ceilingconcave        ] = @set[id][:ceilingconcave        ] if h[:ceilingconcave        ]
  v[:ceilingconvex         ] = @set[id][:ceilingconvex         ] if h[:ceilingconvex         ]
  v[:party                 ] = @set[id][:party                 ] if h[:party                 ]
  v[:partyconcave          ] = @set[id][:party                 ] if h[:party                 ]
  v[:partyconvex           ] = @set[id][:party                 ] if h[:party                 ]
  v[:partyconcave          ] = @set[id][:partyconcave          ] if h[:partyconcave          ]
  v[:partyconvex           ] = @set[id][:partyconvex           ] if h[:partyconvex           ]
  v[:grade                 ] = @set[id][:grade                 ] if h[:grade                 ]
  v[:gradeconcave          ] = @set[id][:grade                 ] if h[:grade                 ]
  v[:gradeconvex           ] = @set[id][:grade                 ] if h[:grade                 ]
  v[:gradeconcave          ] = @set[id][:gradeconcave          ] if h[:gradeconcave          ]
  v[:gradeconvex           ] = @set[id][:gradeconvex           ] if h[:gradeconvex           ]
  v[:balcony               ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconyconcave        ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconyconvex         ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconyconcave        ] = @set[id][:balconyconcave        ] if h[:balconyconcave        ]
  v[:balconyconvex         ] = @set[id][:balconyconvex         ] if h[:balconyconvex         ]
  v[:balconysill           ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconysillconcave    ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconysillconvex     ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconydoorsill       ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconydoorsillconcave] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconydoorsillconvex ] = @set[id][:fenestration          ] if h[:fenestration          ]
  v[:balconysill           ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconysillconcave    ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconysillconvex     ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconysillconcave    ] = @set[id][:sillconcave           ] if h[:sillconcave           ]
  v[:balconysillconvex     ] = @set[id][:sillconvex            ] if h[:sillconvex            ]
  v[:balconydoorsill       ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconydoorsillconcave] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconydoorsillconvex ] = @set[id][:sill                  ] if h[:sill                  ]
  v[:balconydoorsillconcave] = @set[id][:sillconcave           ] if h[:sillconcave           ]
  v[:balconydoorsillconvex ] = @set[id][:sillconvex            ] if h[:sillconvex            ]
  v[:balconysill           ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconysillconcave    ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconysillconvex     ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconysillconcave    ] = @set[id][:balconyconcave        ] if h[:balconyconcave        ]
  v[:balconysillconvex     ] = @set[id][:balconyconvex         ] if h[:balconycinvex         ]
  v[:balconydoorsill       ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconydoorsillconcave] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconydoorsillconvex ] = @set[id][:balcony               ] if h[:balcony               ]
  v[:balconydoorsillconcave] = @set[id][:balconyconcave        ] if h[:balconyconcave        ]
  v[:balconydoorsillconvex ] = @set[id][:balconyconvex         ] if h[:balconycinvex         ]
  v[:balconysill           ] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconysillconcave    ] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconysillconvex     ] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconysillconcave    ] = @set[id][:balconysillconcave    ] if h[:balconysillconcave    ]
  v[:balconysillconvex     ] = @set[id][:balconysillconvex     ] if h[:balconysillconvex     ]
  v[:balconydoorsill       ] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconydoorsillconcave] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconydoorsillconvex ] = @set[id][:balconysill           ] if h[:balconysill           ]
  v[:balconydoorsillconcave] = @set[id][:balconysillconcave    ] if h[:balconysillconcave    ]
  v[:balconydoorsillconvex ] = @set[id][:balconysillconvex     ] if h[:balconysillconvex     ]
  v[:balconydoorsill       ] = @set[id][:balconydoorsill       ] if h[:balconydoorsill       ]
  v[:balconydoorsillconcave] = @set[id][:balconydoorsill       ] if h[:balconydoorsill       ]
  v[:balconydoorsillconvex ] = @set[id][:balconydoorsill       ] if h[:balconydoorsill       ]
  v[:balconydoorsillconcave] = @set[id][:balconydoorsillconcave] if h[:balconydoorsillconcave]
  v[:balconydoorsillconvex ] = @set[id][:balconydoorsillconvex ] if h[:balconydoorsillconvex ]
  v[:rimjoist              ] = @set[id][:rimjoist              ] if h[:rimjoist              ]
  v[:rimjoistconcave       ] = @set[id][:rimjoist              ] if h[:rimjoist              ]
  v[:rimjoistconvex        ] = @set[id][:rimjoist              ] if h[:rimjoist              ]
  v[:rimjoistconcave       ] = @set[id][:rimjoistconcave       ] if h[:rimjoistconcave       ]
  v[:rimjoistconvex        ] = @set[id][:rimjoistconvex        ] if h[:rimjoistconvex        ]

  max = [v[:parapetconcave], v[:parapetconvex]].max
  v[:parapet] = max unless @has[:parapet]

  max = [v[:roofconcave], v[:roofconvex]].max
  v[:roof] = max unless @has[:roof]

  @val[id] = v

  true
end

#safe(id = "", type = nil) ⇒ Symbol?

Returns safe PSI type if missing from PSI set (based on inheritance).

Examples:

intermediate floor slab intersection

safe("90.1.22|wood.fr|unmitigated", :rimjoistconcave)

Parameters:

  • id (#to_s) (defaults to: "")

    PSI set identifier

  • type (#to_sym) (defaults to: nil)

    PSI type

Returns:

  • (Symbol)

    safe PSI type

  • (nil)

    if invalid inputs (see logs)



1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
# File 'lib/tbd/psi.rb', line 1055

def safe(id = "", type = nil)
  mth = "TBD::#{__callee__}"
  id  = trim(id)
  ck1 = id.empty?
  ck2 = type.respond_to?(:to_sym)
  return mismatch("set ID", id, String, mth)          if ck1
  return mismatch("type", type, Symbol, mth)      unless ck2
  return hashkey(id, @set,  id,         mth, ERR) unless @set.key?(id)
  return hashkey(id, @has,  id,         mth, ERR) unless @has.key?(id)

  safer = type.to_sym

  unless @has[id][safer]
    concave = safer.to_s.include?("concave")
    convex  = safer.to_s.include?("convex")
    safer   = safer.to_s.chomp("concave").to_sym if concave
    safer   = safer.to_s.chomp("convex").to_sym  if convex
  end

  unless @has[id][safer]
    safer = :fenestration if safer == :head
    safer = :fenestration if safer == :sill
    safer = :fenestration if safer == :jamb
    safer = :door         if safer == :doorhead
    safer = :door         if safer == :doorsill
    safer = :door         if safer == :doorjamb
    safer = :skylight     if safer == :skylighthead
    safer = :skylight     if safer == :skylightsill
    safer = :skylight     if safer == :skylightjamb
  end

  unless @has[id][safer]
    safer = :fenestration if safer == :skylight
    safer = :fenestration if safer == :door
  end

  return safer if @has[id][safer]

  nil
end

#shorthands(id = "") ⇒ Hash

Returns PSI set shorthands. The return Hash holds 2 keys, has: a Hash of true/false (values) for any admissible PSI type (keys), and val: a Hash of PSI-factors (values) for any admissible PSI type (keys). PSI-factors default to 0 W/K per linear meter if missing from set.

Examples:

intermediate floor slab intersection

shorthands("90.1.22|steel.m|default")

Parameters:

  • id (#to_s) (defaults to: "")

    PSI set identifier

Returns:

  • (Hash)

    has: Hash (Bool), val: Hash (PSI factors) see logs if empty



981
982
983
984
985
986
987
988
989
990
991
992
993
994
# File 'lib/tbd/psi.rb', line 981

def shorthands(id = "")
  mth = "TBD::#{__callee__}"
  sh  = { has: {}, val: {} }
  id  = trim(id)
  return mismatch("set ID", id, String, mth, ERR, a)      if id.empty?
  return hashkey(id, @set , id,         mth, ERR, sh) unless @set.key?(id)
  return hashkey(id, @has , id,         mth, ERR, sh) unless @has.key?(id)
  return hashkey(id, @val , id,         mth, ERR, sh) unless @val.key?(id)

  sh[:has] = @has[id]
  sh[:val] = @val[id]

  sh
end