Skip to content

Commit 8c4a723

Browse files
authored
Merge pull request #123 from rd2/osut
Pulls OSut v0.8.1 patch
2 parents 7bcd5a1 + d82c8b9 commit 8c4a723

16 files changed

Lines changed: 31 additions & 52 deletions

File tree

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/measure.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/measure.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>tbd_measure</name>
55
<uid>8890787b-8c25-4dc8-8641-b6be1b6c2357</uid>
6-
<version_id>0e1528a0-a176-4d46-82d9-d2da40c0abd7</version_id>
7-
<version_modified>2025-09-11T11:27:14Z</version_modified>
6+
<version_id>8649cb7e-2e58-4a6d-ba67-911b6e0a41a6</version_id>
7+
<version_modified>2026-01-04T12:08:45Z</version_modified>
88
<xml_checksum>99772807</xml_checksum>
99
<class_name>TBDMeasure</class_name>
1010
<display_name>Thermal Bridging and Derating - TBD</display_name>
@@ -464,7 +464,7 @@
464464
<filename>LICENSE.md</filename>
465465
<filetype>md</filetype>
466466
<usage_type>license</usage_type>
467-
<checksum>3EBCA5DB</checksum>
467+
<checksum>98D54646</checksum>
468468
</file>
469469
<file>
470470
<filename>README.md</filename>
@@ -493,13 +493,13 @@
493493
<filename>measure.rb</filename>
494494
<filetype>rb</filetype>
495495
<usage_type>script</usage_type>
496-
<checksum>3FBDA0C2</checksum>
496+
<checksum>489D7CFA</checksum>
497497
</file>
498498
<file>
499499
<filename>geo.rb</filename>
500500
<filetype>rb</filetype>
501501
<usage_type>resource</usage_type>
502-
<checksum>5AB24CFB</checksum>
502+
<checksum>9CA80CEB</checksum>
503503
</file>
504504
<file>
505505
<filename>geometry.rb</filename>
@@ -523,13 +523,13 @@
523523
<filename>psi.rb</filename>
524524
<filetype>rb</filetype>
525525
<usage_type>resource</usage_type>
526-
<checksum>29905280</checksum>
526+
<checksum>B9FB5E02</checksum>
527527
</file>
528528
<file>
529529
<filename>tbd.rb</filename>
530530
<filetype>rb</filetype>
531531
<usage_type>resource</usage_type>
532-
<checksum>9E26251E</checksum>
532+
<checksum>3919B9B0</checksum>
533533
</file>
534534
<file>
535535
<filename>transformation.rb</filename>
@@ -541,13 +541,13 @@
541541
<filename>ua.rb</filename>
542542
<filetype>rb</filetype>
543543
<usage_type>resource</usage_type>
544-
<checksum>0CC24D82</checksum>
544+
<checksum>69C2A886</checksum>
545545
</file>
546546
<file>
547547
<filename>utils.rb</filename>
548548
<filetype>rb</filetype>
549549
<usage_type>resource</usage_type>
550-
<checksum>6940D006</checksum>
550+
<checksum>BDF50D67</checksum>
551551
</file>
552552
<file>
553553
<filename>version.rb</filename>
@@ -565,7 +565,7 @@
565565
<filename>tbd_tests.rb</filename>
566566
<filetype>rb</filetype>
567567
<usage_type>test</usage_type>
568-
<checksum>9C76CD98</checksum>
568+
<checksum>90CE962F</checksum>
569569
</file>
570570
</files>
571571
</measure>

lib/measures/tbd/resources/geo.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/resources/psi.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/resources/tbd.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

lib/measures/tbd/resources/ua.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal
@@ -1000,7 +1000,7 @@ def ua_md(ua = {}, lang = :en)
10001000
model = "* modèle : #{ua[:file]}" if ua.key?(:file) && lang == :fr
10011001
model += " (v#{ua[:version]})" if ua.key?(:version)
10021002
report << model unless model.empty?
1003-
report << "* TBD : v3.5.0"
1003+
report << "* TBD : v3.5.1"
10041004
report << "* date : #{ua[:date]}"
10051005

10061006
if lang == :en

lib/measures/tbd/resources/utils.rb

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BSD 3-Clause License
22
#
3-
# Copyright (c) 2022-2025, Denis Bourgeois
3+
# Copyright (c) 2022-2026, Denis Bourgeois
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -530,7 +530,7 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false)
530530
mt.setName(id)
531531

532532
unless mt.setThermalResistance(r)
533-
return invalid("Failed #{id}: RSi#{de_r.round(2)}", mth)
533+
return invalid("Failed #{id}: RSi#{r.round(2)}", mth)
534534
end
535535

536536
lc.setLayer(index, mt)
@@ -546,7 +546,7 @@ def resetUo(lc = nil, film = nil, index = nil, uo = nil, uniq = false)
546546
k = (m.thickness / (r + dR)).clamp(KMIN, KMAX)
547547
d = (k * (r + dR)).clamp(DMIN, DMAX)
548548
r = d / k
549-
id = "OSUT:K#{format('%4.3f', k)}:#{format('%03d', d*1000)[-3..-1]}"
549+
id = "OSut:K#{format('%4.3f', k)}:#{format('%03d', d*1000)[-3..-1]}"
550550
mt = lc.model.getStandardOpaqueMaterialByName(id)
551551

552552
# Existing material?
@@ -928,7 +928,6 @@ def genConstruction(model = nil, specs = {})
928928
if u and a[:glazing].empty?
929929
ro = 1 / u - film
930930

931-
932931
if ro > RMIN
933932
if specs[:type] == :door # 1x layer, adjust conductivity
934933
layer = c.getLayer(0).to_StandardOpaqueMaterial
@@ -944,27 +943,7 @@ def genConstruction(model = nil, specs = {})
944943
return invalid("#{id} construction", mth, 0) if lyr[:r ].to_i.zero?
945944

946945
index = lyr[:index]
947-
layer = c.getLayer(index).to_StandardOpaqueMaterial
948-
return invalid("#{id} material @#{index}", mth, 0) if layer.empty?
949-
950-
layer = layer.get
951-
952-
k = (layer.thickness / (ro - rsi(c) + lyr[:r])).clamp(KMIN, KMAX)
953-
d = (k * (ro - rsi(c) + lyr[:r])).clamp(DMIN, DMAX)
954-
955-
nom = "OSut:"
956-
nom += layer.nameString.gsub(/[^a-z]/i, "").gsub("OSut", "")
957-
nom += ":K#{format('%4.3f', k)}:#{format('%03d', d*1000)[-3..-1]}"
958-
959-
lyr = model.getStandardOpaqueMaterialByName(nom)
960-
961-
if lyr.empty?
962-
layer.setName(nom)
963-
layer.setConductivity(k)
964-
layer.setThickness(d)
965-
else
966-
c.setLayer(index, lyr.get)
967-
end
946+
resetUo(c, film, index, u)
968947
end
969948
end
970949
end

lib/measures/tbd/tests/tbd_tests.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (c) 2020-2025 Denis Bourgeois & Dan Macumber
3+
# Copyright (c) 2020-2026 Denis Bourgeois & Dan Macumber
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)