honeybee-openstudio 2.31.13 → 2.32.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ddf0d339bd4d1157383d5d16269de92cdbcc9e9f4b2b18b766f07bef02f37cd
4
- data.tar.gz: 401beed22c8c1097195c4e7312bd16eeb8e9e71233c4b4a13330c68670e64072
3
+ metadata.gz: b1a0e49c9d5045c2b09cc0f0fbe3bd964fb4251e077eb2bd27db6bedcfcf39cd
4
+ data.tar.gz: 967f9557a5238c899c9af5214158b63f4bd9dff66074cc309bb4d3f9c59ee72a
5
5
  SHA512:
6
- metadata.gz: 4660a81eeedc682ec9d04c2a29fb1ab38b68692c7dffb5133aeaed0464c9cf31f95de09b639b3f1eb9464972980215eae166e47dc806a2696d692d690e6c0675
7
- data.tar.gz: 62284552e9a5e1d6c296e0ffab568511b308b91df53936315958665d093527345a312c880d688de23e8b3dc21fd133a999d0617b1864823d8b2655d053445a34
6
+ metadata.gz: bf2aeec6148a31263db088720abf68dc914002d5fefb73c6ac24e599d79a148f763c4bda05d96eabaf9968ccb35519b707cb52febc84f3d7ffa8acb0924b27c6
7
+ data.tar.gz: 2ceb1977685d6b3b6fe4bc1edb69029906795d4a2f3541ecdb25226c3cc3068101c20b9dfa154a4795f5f490560717dad5e1230f41ff164fb235ba2415b4a353
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'honeybee-openstudio'
7
- spec.version = '2.31.13'
7
+ spec.version = '2.32.1'
8
8
  spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
9
9
  spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
10
10
 
@@ -9,7 +9,7 @@ if allow_local && File.exist?('../openstudio-common-measures-gem')
9
9
  elsif allow_local
10
10
  gem 'openstudio-common-measures', github: 'NREL/openstudio-common-measures-gem', branch: 'develop'
11
11
  else
12
- gem 'openstudio-common-measures', '~> 0.6.0'
12
+ gem 'openstudio-common-measures', '~> 0.6.1'
13
13
  end
14
14
 
15
15
  if allow_local && File.exist?('../openstudio-model-articulation-gem')
@@ -25,7 +25,7 @@ if allow_local && File.exist?('../urbanopt-geojson-gem')
25
25
  elsif allow_local
26
26
  gem 'urbanopt-geojson', github: 'URBANopt/urbanopt-geojson-gem', branch: 'develop'
27
27
  else
28
- gem 'urbanopt-geojson', '~> 0.8.0'
28
+ gem 'urbanopt-geojson', '~> 0.8.1'
29
29
  end
30
30
 
31
31
  if allow_local && File.exist?('../urbanopt-reporting-gem')
@@ -33,7 +33,7 @@ if allow_local && File.exist?('../urbanopt-reporting-gem')
33
33
  elsif allow_local
34
34
  gem 'urbanopt-reporting', github: 'URBANopt/urbanopt-reporting-gem', branch: 'develop'
35
35
  else
36
- gem 'urbanopt-reporting', '~> 0.6.0'
36
+ gem 'urbanopt-reporting', '~> 0.6.1'
37
37
  end
38
38
 
39
39
  # include the honeybee-openstudio-gem
@@ -125,6 +125,17 @@ module Honeybee
125
125
  result = {type: 'Ground'}
126
126
  elsif surface_bc == 'Adiabatic'
127
127
  result = {type: 'Adiabatic'}
128
+ elsif surface_bc == 'OtherSideCoefficients'
129
+ result = {type: 'OtherSideTemperature'}
130
+ unless surface.surfacePropertyOtherSideCoefficients.empty?
131
+ srf_prop = surface.surfacePropertyOtherSideCoefficients.get
132
+ if !srf_prop.isConstantTemperatureDefaulted
133
+ result[:temperature] = srf_prop.constantTemperature
134
+ end
135
+ unless srf_prop.combinedConvectiveRadiativeFilmCoefficient.empty?
136
+ result[:heat_transfer_coefficient] = srf_prop.combinedConvectiveRadiativeFilmCoefficient.get
137
+ end
138
+ end
128
139
  else
129
140
  sun_exposure = (surface.sunExposure == 'SunExposed')
130
141
  wind_exposure = (surface.windExposure == 'WindExposed')
@@ -103,7 +103,7 @@ module Honeybee
103
103
  end
104
104
 
105
105
  # assign the boundary condition
106
- boundary_condition = (@hash[:boundary_condition][:type])
106
+ boundary_condition = @hash[:boundary_condition][:type]
107
107
  case boundary_condition
108
108
  when 'Outdoors'
109
109
  if @hash[:boundary_condition][:sun_exposure] == false
@@ -129,9 +129,28 @@ module Honeybee
129
129
  surface = surface_object.get
130
130
  os_surface.setAdjacentSurface(surface)
131
131
  end
132
+ when 'OtherSideTemperature'
133
+ srf_prop = OpenStudio::Model::SurfacePropertyOtherSideCoefficients.new(openstudio_model)
134
+ srf_prop.setName(@hash[:identifier] + '_OtherTemp')
135
+ if @hash[:boundary_condition][:heat_transfer_coefficient].is_a? Numeric
136
+ srf_prop.setCombinedConvectiveRadiativeFilmCoefficient(
137
+ @hash[:boundary_condition][:heat_transfer_coefficient])
138
+ else
139
+ srf_prop.setCombinedConvectiveRadiativeFilmCoefficient(0)
140
+ end
141
+ if @hash[:boundary_condition][:temperature].is_a? Numeric
142
+ srf_prop.setConstantTemperature(@hash[:boundary_condition][:temperature])
143
+ srf_prop.setConstantTemperatureCoefficient(1)
144
+ srf_prop.setExternalDryBulbTemperatureCoefficient(0)
145
+ else
146
+ srf_prop.setConstantTemperatureCoefficient(0)
147
+ srf_prop.setExternalDryBulbTemperatureCoefficient(1)
148
+ end
149
+ os_surface.setSurfacePropertyOtherSideCoefficients(srf_prop)
132
150
  end
133
- unless @hash[:boundary_condition][:type] == 'Surface'
134
- os_surface.setOutsideBoundaryCondition(@hash[:boundary_condition][:type])
151
+
152
+ unless boundary_condition == 'Surface' || boundary_condition == 'OtherSideTemperature'
153
+ os_surface.setOutsideBoundaryCondition(boundary_condition)
135
154
  end
136
155
 
137
156
  # assign apertures if they exist
@@ -211,6 +211,11 @@ module Honeybee
211
211
  os_surface.setConstruction(interior_construction)
212
212
  end
213
213
  end
214
+ elsif face[:boundary_condition][:type] == 'OtherSideTemperature'
215
+ interior_construction = closest_interior_construction(openstudio_model, os_space, face[:face_type])
216
+ unless interior_construction.nil?
217
+ os_surface.setConstruction(interior_construction)
218
+ end
214
219
  end
215
220
  end
216
221
 
@@ -61,12 +61,16 @@ module Honeybee
61
61
  end
62
62
 
63
63
  # loop through day schedules and create openstudio schedule day object
64
+ day_schs = Hash.new
64
65
  def_day_id = @hash[:default_day_schedule]
65
66
  def_day_hash = nil
66
67
  @hash[:day_schedules].each do |day_schedule|
67
68
  if day_schedule[:identifier] != def_day_id
68
69
  day_schedule_new = OpenStudio::Model::ScheduleDay.new(openstudio_model)
69
- day_schedule_new.setName(day_schedule[:identifier])
70
+ exist_sch = openstudio_model.getScheduleDayByName(day_schedule[:identifier])
71
+ if exist_sch.empty? # make sure we don't overwrite an existing schedule day
72
+ day_schedule_new.setName(day_schedule[:identifier])
73
+ end
70
74
  unless @hash[:display_name].nil?
71
75
  day_schedule_new.setDisplayName(@hash[:display_name])
72
76
  end
@@ -81,53 +85,55 @@ module Honeybee
81
85
  time_until = OpenStudio::Time.new(0, times_day_new[i][0], times_day_new[i][1], 0)
82
86
  day_schedule_new.addValue(time_until, values_day_new[i])
83
87
  end
88
+ day_schs[day_schedule[:identifier]] = day_schedule_new
84
89
  else
85
90
  def_day_hash = day_schedule
86
91
  end
87
92
  end
88
93
 
94
+ # assign default day schedule
95
+ def_day_sch = os_sch_ruleset.defaultDaySchedule
96
+ exist_sch = openstudio_model.getScheduleDayByName(def_day_id)
97
+ if exist_sch.empty? # make sure we don't overwrite an existing schedule day
98
+ def_day_sch.setName(def_day_id)
99
+ end
100
+ unless sch_type_limit_obj.nil?
101
+ def_day_sch.setScheduleTypeLimits(sch_type_limit_obj)
102
+ end
103
+ values_day_new = def_day_hash[:values]
104
+ times_day_new = def_day_hash[:times]
105
+ times_day_new.delete_at(0) # Remove [0, 0] from array at index 0.
106
+ times_day_new.push([24, 0]) # Add [24, 0] at index 0
107
+ values_day_new.each_index do |i|
108
+ time_until = OpenStudio::Time.new(0, times_day_new[i][0], times_day_new[i][1], 0)
109
+ def_day_sch.addValue(time_until, values_day_new[i])
110
+ end
111
+ day_schs[def_day_id] = def_day_sch
112
+
89
113
  # assign holiday schedule
90
114
  if @hash[:holiday_schedule]
91
- holiday_schedule = openstudio_model.getScheduleDayByName(@hash[:holiday_schedule])
92
- unless holiday_schedule.empty?
93
- holiday_schedule_object = holiday_schedule.get
94
- os_sch_ruleset.setHolidaySchedule(holiday_schedule_object)
115
+ holiday_schedule = day_schs[@hash[:holiday_schedule]]
116
+ unless holiday_schedule.nil?
117
+ os_sch_ruleset.setHolidaySchedule(holiday_schedule)
95
118
  end
96
119
  end
97
120
 
98
121
  # assign summer design day schedule
99
122
  if @hash[:summer_designday_schedule]
100
- summer_design_day = openstudio_model.getScheduleDayByName(@hash[:summer_designday_schedule])
101
- unless summer_design_day.empty?
102
- summer_design_day_object = summer_design_day.get
103
- os_sch_ruleset.setSummerDesignDaySchedule(summer_design_day_object)
123
+ summer_design_day = day_schs[@hash[:summer_designday_schedule]]
124
+ unless summer_design_day.nil?
125
+ os_sch_ruleset.setSummerDesignDaySchedule(summer_design_day)
104
126
  end
105
127
  end
106
128
 
107
129
  # assign winter design day schedule
108
130
  if @hash[:winter_designday_schedule]
109
- winter_design_day = openstudio_model.getScheduleDayByName(@hash[:winter_designday_schedule])
110
- unless winter_design_day.empty?
111
- winter_design_day_object = winter_design_day.get
112
- os_sch_ruleset.setWinterDesignDaySchedule(winter_design_day_object)
131
+ winter_design_day = day_schs[@hash[:winter_designday_schedule]]
132
+ unless winter_design_day.nil?
133
+ os_sch_ruleset.setWinterDesignDaySchedule(winter_design_day)
113
134
  end
114
135
  end
115
136
 
116
- # assign default day schedule
117
- def_day_sch = os_sch_ruleset.defaultDaySchedule
118
- def_day_sch.setName(def_day_id)
119
- unless sch_type_limit_obj.nil?
120
- def_day_sch.setScheduleTypeLimits(sch_type_limit_obj)
121
- end
122
- values_day_new = def_day_hash[:values]
123
- times_day_new = def_day_hash[:times]
124
- times_day_new.delete_at(0) # Remove [0, 0] from array at index 0.
125
- times_day_new.push([24, 0]) # Add [24, 0] at index 0
126
- values_day_new.each_index do |i|
127
- time_until = OpenStudio::Time.new(0, times_day_new[i][0], times_day_new[i][1], 0)
128
- def_day_sch.addValue(time_until, values_day_new[i])
129
- end
130
-
131
137
  # assign schedule rules
132
138
  if @hash[:schedule_rules]
133
139
  @hash[:schedule_rules].each do |rule|
@@ -145,12 +151,10 @@ module Honeybee
145
151
  openstudio_schedule_rule.setStartDate(start_date)
146
152
  openstudio_schedule_rule.setEndDate(end_date)
147
153
 
148
- schedule_rule_day = openstudio_model.getScheduleDayByName(rule[:schedule_day])
149
- unless schedule_rule_day.empty?
150
- schedule_rule_day_object = schedule_rule_day.get
151
-
152
- values_day = schedule_rule_day_object.values
153
- times_day = schedule_rule_day_object.times
154
+ schedule_rule_day = day_schs[rule[:schedule_day]]
155
+ unless schedule_rule_day.nil?
156
+ values_day = schedule_rule_day.values
157
+ times_day = schedule_rule_day.times
154
158
 
155
159
  values_day.each_index do |i|
156
160
  openstudio_schedule_rule.daySchedule.addValue(times_day[i], values_day[i])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybee-openstudio
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.31.13
4
+ version: 2.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanushree Charan
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2022-08-01 00:00:00.000000000 Z
14
+ date: 2022-09-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler