osut 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/pull_request.yml +9 -9
- data/lib/osut/utils.rb +102 -16
- data/lib/osut/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d67484d6fd3ebaad383a6c13e74bbb1e18f0aafe0f256e82b75143e8f4111b72
|
|
4
|
+
data.tar.gz: 35fb870a56b7cc8822606033e1193bc879c3accbc0075dfb60474f00ae29d0cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c98c740e66d3b860b094c45b7c8fb61d650f185b2a26cee2e994bc086a81be9356a88f78852c5a06fff40ed0e147c402f49ab09d5c9b92faa3003ff99f81372a
|
|
7
|
+
data.tar.gz: bac75a7581ff73142d09652d20993feff817e692fc59ef2cd99391bb7dd8b93e7c2e48892828b5667ed22f1c1a1b0b41dae6f3eb8631b395139ef511cfdf0e82
|
|
@@ -70,7 +70,7 @@ jobs:
|
|
|
70
70
|
docker exec -t test bundle update
|
|
71
71
|
docker exec -t test bundle exec rake
|
|
72
72
|
docker kill test
|
|
73
|
-
|
|
73
|
+
test_390x:
|
|
74
74
|
runs-on: ubuntu-22.04
|
|
75
75
|
steps:
|
|
76
76
|
- name: Check out repository
|
|
@@ -79,14 +79,14 @@ jobs:
|
|
|
79
79
|
run: |
|
|
80
80
|
echo $(pwd)
|
|
81
81
|
echo $(ls)
|
|
82
|
-
docker pull nrel/openstudio:3.
|
|
83
|
-
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.
|
|
82
|
+
docker pull nrel/openstudio:3.9.0
|
|
83
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.9.0
|
|
84
84
|
docker exec -t test pwd
|
|
85
85
|
docker exec -t test ls
|
|
86
86
|
docker exec -t test bundle update
|
|
87
87
|
docker exec -t test bundle exec rake
|
|
88
88
|
docker kill test
|
|
89
|
-
|
|
89
|
+
test_310x:
|
|
90
90
|
runs-on: ubuntu-22.04
|
|
91
91
|
steps:
|
|
92
92
|
- name: Check out repository
|
|
@@ -95,14 +95,14 @@ jobs:
|
|
|
95
95
|
run: |
|
|
96
96
|
echo $(pwd)
|
|
97
97
|
echo $(ls)
|
|
98
|
-
docker pull nrel/openstudio:3.
|
|
99
|
-
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.
|
|
98
|
+
docker pull nrel/openstudio:3.10.0
|
|
99
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.10.0
|
|
100
100
|
docker exec -t test pwd
|
|
101
101
|
docker exec -t test ls
|
|
102
102
|
docker exec -t test bundle update
|
|
103
103
|
docker exec -t test bundle exec rake
|
|
104
104
|
docker kill test
|
|
105
|
-
|
|
105
|
+
test_311x:
|
|
106
106
|
runs-on: ubuntu-22.04
|
|
107
107
|
steps:
|
|
108
108
|
- name: Check out repository
|
|
@@ -111,8 +111,8 @@ jobs:
|
|
|
111
111
|
run: |
|
|
112
112
|
echo $(pwd)
|
|
113
113
|
echo $(ls)
|
|
114
|
-
docker pull nrel/openstudio:3.
|
|
115
|
-
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.
|
|
114
|
+
docker pull nrel/openstudio:3.11.0
|
|
115
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.11.0
|
|
116
116
|
docker exec -t test pwd
|
|
117
117
|
docker exec -t test ls
|
|
118
118
|
docker exec -t test bundle update
|
data/lib/osut/utils.rb
CHANGED
|
@@ -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 [:to_sym] surface type, e.g. :roof, :wall, :partition, :ceiling
|
|
208
|
+
# @param [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
|
#
|
|
@@ -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
|
|
@@ -4825,7 +4911,7 @@ module OSut
|
|
|
4825
4911
|
end
|
|
4826
4912
|
end
|
|
4827
4913
|
|
|
4828
|
-
res = realignedFace(polyg.to_a.reverse)
|
|
4914
|
+
res = realignedFace(polyg.to_a.reverse, true)
|
|
4829
4915
|
return 0 if res[:box].nil?
|
|
4830
4916
|
|
|
4831
4917
|
# A bounded box's 'height', at its narrowest, is its 'width'.
|
|
@@ -4904,7 +4990,7 @@ module OSut
|
|
|
4904
4990
|
# to 'genAnchors'), it inherits key :out - a Hash holding (among others) a
|
|
4905
4991
|
# 'realigned' set of points (by default a 'realigned' :box). The latter is
|
|
4906
4992
|
# typically generated from an outdoor-facing roof (e.g. when called from
|
|
4907
|
-
# '
|
|
4993
|
+
# 'addSkylights'). Subsequent calls to 'genAnchors' may send (as first
|
|
4908
4994
|
# argument) a corresponding ceiling tile below (also from 'addSkylights').
|
|
4909
4995
|
# Roof vs ceiling may neither share alignment transformation nor space
|
|
4910
4996
|
# site transformation identities. All subsequent calls to 'genAnchors'
|
data/lib/osut/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: osut
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Bourgeois
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oslg
|
|
@@ -90,7 +90,7 @@ licenses:
|
|
|
90
90
|
- BSD-3-Clause
|
|
91
91
|
metadata:
|
|
92
92
|
homepage_uri: https://github.com/rd2/osut
|
|
93
|
-
source_code_uri: https://github.com/rd2/osut/tree/v0.
|
|
93
|
+
source_code_uri: https://github.com/rd2/osut/tree/v0.9.0
|
|
94
94
|
bug_tracker_uri: https://github.com/rd2/osut/issues
|
|
95
95
|
post_install_message:
|
|
96
96
|
rdoc_options: []
|