honeybee-openstudio 2.36.2 → 2.37.0

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: 55bb69e179bc557b33a9dd46af6cfc606e0540a4f064bcab72e8dcfccb08a7c7
4
- data.tar.gz: bcd5e64951bffc9e97f7f897141ca0da64bf66cbf17fd1bcc4ef6267e6d20538
3
+ metadata.gz: d55f3b4e41dbed57ccc2aaad7de1254c5a02bd6e4c82c7308e615d9c449326c8
4
+ data.tar.gz: 4a2078fc0600a51f6441eed73a603b38496e4f4beae780be047f4251c274e880
5
5
  SHA512:
6
- metadata.gz: ee7ddcce1e32b9320cbe837f679849ab55f946bac44c60c6516c90b7e66280fd3472105cf6a62da71c1bd30d1e1f1311fc278233362a3a7137a7573d4b0c094c
7
- data.tar.gz: d09393f72eae2eb2048b04c21b2fbdc181b67be11e1c2d1caf8e79d844ce28183515933b6209ea3c0877de168b8eef02310f689000e385093ca1f89c0b341bf7
6
+ metadata.gz: f5f610b0d0f78fec02e2b4c7523678ca3d0b8db36872a5dd8e389dfafe2cc5ced5c7cb2cb022f33a2c062c4b6a21fb1767795688d4c333dd228e1098c446b371
7
+ data.tar.gz: 947221a88fb38a8ff3ec815c8a6073f09a2e424286ace005dbcf371f6c5c8e9777c829e6eb9a603e71469c25ec53a4846f4848cc3b675b6457ffeada5bf8971c
@@ -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.36.2'
7
+ spec.version = '2.37.0'
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
 
@@ -3,7 +3,7 @@
3
3
  "servers": [],
4
4
  "info": {
5
5
  "description": "Honeybee model schema.",
6
- "version": "1.53.4",
6
+ "version": "1.54.0",
7
7
  "title": "Honeybee Model Schema",
8
8
  "contact": {
9
9
  "name": "Ladybug Tools",
@@ -889,6 +889,11 @@
889
889
  "x-displayName": "VentilationControlType",
890
890
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/VentilationControlType\" />\n"
891
891
  },
892
+ {
893
+ "name": "ventilationfan_model",
894
+ "x-displayName": "VentilationFan",
895
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/VentilationFan\" />\n"
896
+ },
892
897
  {
893
898
  "name": "ventilationopening_model",
894
899
  "x-displayName": "VentilationOpening",
@@ -899,6 +904,11 @@
899
904
  "x-displayName": "VentilationSimulationControl",
900
905
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/VentilationSimulationControl\" />\n"
901
906
  },
907
+ {
908
+ "name": "ventilationtype_model",
909
+ "x-displayName": "VentilationType",
910
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/VentilationType\" />\n"
911
+ },
902
912
  {
903
913
  "name": "view_model",
904
914
  "x-displayName": "View",
@@ -1173,8 +1183,10 @@
1173
1183
  "ventilationabridged_model",
1174
1184
  "ventilationcontrolabridged_model",
1175
1185
  "ventilationcontroltype_model",
1186
+ "ventilationfan_model",
1176
1187
  "ventilationopening_model",
1177
1188
  "ventilationsimulationcontrol_model",
1189
+ "ventilationtype_model",
1178
1190
  "view_model",
1179
1191
  "viewtype_model",
1180
1192
  "vintages_model",
@@ -3175,6 +3187,90 @@
3175
3187
  },
3176
3188
  "additionalProperties": false
3177
3189
  },
3190
+ "VentilationType": {
3191
+ "title": "VentilationType",
3192
+ "description": "An enumeration.",
3193
+ "enum": [
3194
+ "Exhaust",
3195
+ "Intake",
3196
+ "Balanced"
3197
+ ],
3198
+ "type": "string"
3199
+ },
3200
+ "VentilationFan": {
3201
+ "title": "VentilationFan",
3202
+ "description": "Base class for all objects requiring a valid EnergyPlus identifier.",
3203
+ "type": "object",
3204
+ "properties": {
3205
+ "identifier": {
3206
+ "title": "Identifier",
3207
+ "description": "Text string for a unique object ID. This identifier remains constant as the object is mutated, copied, and serialized to different formats (eg. dict, idf, osm). This identifier is also used to reference the object across a Model. It must be < 100 characters, use only ASCII characters and exclude (, ; ! \\n \\t).",
3208
+ "maxLength": 100,
3209
+ "minLength": 1,
3210
+ "pattern": "^[^,;!\\n\\t]+$",
3211
+ "type": "string"
3212
+ },
3213
+ "flow_rate": {
3214
+ "title": "Flow Rate",
3215
+ "description": "A number for the flow rate of the fan in m3/s.",
3216
+ "exclusiveMinimum": 0,
3217
+ "type": "number",
3218
+ "format": "double"
3219
+ },
3220
+ "pressure_rise": {
3221
+ "title": "Pressure Rise",
3222
+ "description": "A number for the the pressure rise across the fan in Pascals (N/m2). This is often a function of the fan speed and the conditions in which the fan is operating since having the fan blow air through filters or narrow ducts will increase the pressure rise that is needed to deliver the input flow rate. The pressure rise plays an important role in determining the amount of energy consumed by the fan. Smaller fans like a 0.05 m3/s desk fan tend to have lower pressure rises around 60 Pa. Larger fans, such as a 6 m3/s fan used for ventilating a large room tend to have higher pressure rises around 400 Pa. The highest pressure rises are typically for large fans blowing air through ducts and filters, which can have pressure rises as high as 1000 Pa.",
3223
+ "exclusiveMinimum": 0,
3224
+ "type": "number",
3225
+ "format": "double"
3226
+ },
3227
+ "efficiency": {
3228
+ "title": "Efficiency",
3229
+ "description": "A number between 0 and 1 for the overall efficiency of the fan. Specifically, this is the ratio of the power delivered to the fluid to the electrical input power. It is the product of the fan motor efficiency and the fan impeller efficiency. Fans that have a higher blade diameter and operate at lower speeds with smaller pressure rises for their size tend to have higher efficiencies. Because motor efficiencies are typically between 0.8 and 0.9, the best overall fan efficiencies tend to be around 0.7 with most typical fan efficiencies between 0.5 and 0.7. The lowest efficiencies often happen for small fans in situations with high pressure rises for their size, which can result in efficiencies as low as 0.15.",
3230
+ "minimum": 0,
3231
+ "maximum": 1,
3232
+ "type": "number",
3233
+ "format": "double"
3234
+ },
3235
+ "display_name": {
3236
+ "title": "Display Name",
3237
+ "description": "Display name of the object with no character restrictions.",
3238
+ "type": "string"
3239
+ },
3240
+ "type": {
3241
+ "title": "Type",
3242
+ "default": "VentilationFan",
3243
+ "pattern": "^VentilationFan$",
3244
+ "type": "string",
3245
+ "readOnly": true
3246
+ },
3247
+ "ventilation_type": {
3248
+ "description": "Text to indicate the type of type of ventilation. Choose from the options below. For either Exhaust or Intake, values for fan pressure and efficiency define the fan electric consumption. For Exhaust ventilation, the conditions of the air entering the space are assumed to be equivalent to outside air conditions. For Intake and Balanced ventilation, an appropriate amount of fan heat is added to the entering air stream. For Balanced ventilation, both an intake fan and an exhaust fan are assumed to co-exist, both having the same flow rate and power consumption (using the entered values for fan pressure rise and fan total efficiency). Thus, the fan electric consumption for Balanced ventilation is twice that for the Exhaust or Intake ventilation types which employ only a single fan.",
3249
+ "default": "Balanced",
3250
+ "allOf": [
3251
+ {
3252
+ "$ref": "#/components/schemas/VentilationType"
3253
+ }
3254
+ ]
3255
+ },
3256
+ "control": {
3257
+ "title": "Control",
3258
+ "description": "A VentilationControl object that dictates the conditions under which the fan is turned on. If None, a default VentilationControl will be generated, which will keep the fan on all of the time.",
3259
+ "allOf": [
3260
+ {
3261
+ "$ref": "#/components/schemas/VentilationControlAbridged"
3262
+ }
3263
+ ]
3264
+ }
3265
+ },
3266
+ "required": [
3267
+ "identifier",
3268
+ "flow_rate",
3269
+ "pressure_rise",
3270
+ "efficiency"
3271
+ ],
3272
+ "additionalProperties": false
3273
+ },
3178
3274
  "InternalMassAbridged": {
3179
3275
  "title": "InternalMassAbridged",
3180
3276
  "description": "Base class for all objects requiring an EnergyPlus identifier and user_data.",
@@ -3474,6 +3570,14 @@
3474
3570
  }
3475
3571
  ]
3476
3572
  },
3573
+ "fans": {
3574
+ "title": "Fans",
3575
+ "description": "An optional list of VentilationFan objects for fans within the room. Note that these fans are not connected to the heating or cooling system and are meant to represent the intentional circulation of unconditioned outdoor air for the purposes of keeping a space cooler, drier or free of indoor pollutants (as in the case of kitchen or bathroom exhaust fans). For the specification of mechanical ventilation of conditioned outdoor air, the Room.ventilation property should be used and the Room should be given a HVAC that can meet this specification.",
3576
+ "type": "array",
3577
+ "items": {
3578
+ "$ref": "#/components/schemas/VentilationFan"
3579
+ }
3580
+ },
3477
3581
  "internal_masses": {
3478
3582
  "title": "Internal Masses",
3479
3583
  "description": "An optional list of of InternalMass objects for thermal mass exposed to Room air. Note that internal masses assigned this way cannot \"see\" solar radiation that may potentially hit them and, as such, caution should be taken when using this component with internal mass objects that are not always in shade. Masses are factored into the the thermal calculations of the Room by undergoing heat transfer with the indoor air.",
@@ -14519,7 +14623,7 @@
14519
14623
  "version": {
14520
14624
  "title": "Version",
14521
14625
  "description": "Text string for the current version of the schema.",
14522
- "default": "1.53.4",
14626
+ "default": "1.54.0",
14523
14627
  "pattern": "([0-9]+)\\.([0-9]+)\\.([0-9]+)",
14524
14628
  "type": "string",
14525
14629
  "readOnly": true
@@ -3,7 +3,7 @@
3
3
  "servers": [],
4
4
  "info": {
5
5
  "description": "Honeybee simulation-parameter schema.",
6
- "version": "1.40.0",
6
+ "version": "1.54.0",
7
7
  "title": "Honeybee Simulation Parameter Schema",
8
8
  "contact": {
9
9
  "name": "Ladybug Tools",
@@ -44,6 +44,11 @@
44
44
  "x-displayName": "CalculationUpdateMethod",
45
45
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/CalculationUpdateMethod\" />\n"
46
46
  },
47
+ {
48
+ "name": "climatezones_model",
49
+ "x-displayName": "ClimateZones",
50
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ClimateZones\" />\n"
51
+ },
47
52
  {
48
53
  "name": "daylightsavingtime_model",
49
54
  "x-displayName": "DaylightSavingTime",
@@ -69,6 +74,11 @@
69
74
  "x-displayName": "DryBulbCondition",
70
75
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/DryBulbCondition\" />\n"
71
76
  },
77
+ {
78
+ "name": "efficiencystandards_model",
79
+ "x-displayName": "EfficiencyStandards",
80
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/EfficiencyStandards\" />\n"
81
+ },
72
82
  {
73
83
  "name": "humiditycondition_model",
74
84
  "x-displayName": "HumidityCondition",
@@ -138,11 +148,13 @@
138
148
  "ashraetau_model",
139
149
  "calculationmethod_model",
140
150
  "calculationupdatemethod_model",
151
+ "climatezones_model",
141
152
  "daylightsavingtime_model",
142
153
  "daysofweek_model",
143
154
  "designday_model",
144
155
  "designdaytypes_model",
145
156
  "drybulbcondition_model",
157
+ "efficiencystandards_model",
146
158
  "humiditycondition_model",
147
159
  "humiditytypes_model",
148
160
  "reportingfrequency_model",
@@ -193,18 +205,6 @@
193
205
  }
194
206
  ]
195
207
  },
196
- "include_sqlite": {
197
- "title": "Include Sqlite",
198
- "description": "Boolean to note whether a SQLite report should be requested from the simulation.",
199
- "default": true,
200
- "type": "boolean"
201
- },
202
- "include_html": {
203
- "title": "Include Html",
204
- "description": "Boolean to note whether an HTML report should be requested from the simulation.",
205
- "default": true,
206
- "type": "boolean"
207
- },
208
208
  "outputs": {
209
209
  "title": "Outputs",
210
210
  "description": "A list of EnergyPlus output names as strings, which are requested from the simulation.",
@@ -220,6 +220,15 @@
220
220
  "items": {
221
221
  "type": "string"
222
222
  }
223
+ },
224
+ "unmet_setpoint_tolerance": {
225
+ "title": "Unmet Setpoint Tolerance",
226
+ "description": "A number in degrees Celsius for the difference that the zone conditions must be from the thermostat setpoint in order for the setpoint to be considered unmet. This will affect how unmet hours are reported in the output. ASHRAE 90.1 uses a tolerance of 1.11C, which is equivalent to 1.8F.",
227
+ "default": 1.11,
228
+ "minimum": 0,
229
+ "maximum": 10,
230
+ "type": "number",
231
+ "format": "double"
223
232
  }
224
233
  },
225
234
  "additionalProperties": false
@@ -813,6 +822,47 @@
813
822
  ],
814
823
  "additionalProperties": false
815
824
  },
825
+ "EfficiencyStandards": {
826
+ "title": "EfficiencyStandards",
827
+ "description": "An enumeration.",
828
+ "enum": [
829
+ "ASHRAE_2019",
830
+ "ASHRAE_2016",
831
+ "ASHRAE_2013",
832
+ "ASHRAE_2010",
833
+ "ASHRAE_2007",
834
+ "ASHRAE_2004",
835
+ "DOE_Ref_1980_2004",
836
+ "DOE_Ref_Pre_1980"
837
+ ],
838
+ "type": "string"
839
+ },
840
+ "ClimateZones": {
841
+ "title": "ClimateZones",
842
+ "description": "An enumeration.",
843
+ "enum": [
844
+ "0A",
845
+ "1A",
846
+ "2A",
847
+ "3A",
848
+ "4A",
849
+ "5A",
850
+ "6A",
851
+ "0B",
852
+ "1B",
853
+ "2B",
854
+ "3B",
855
+ "4B",
856
+ "5B",
857
+ "6B",
858
+ "3C",
859
+ "4C",
860
+ "5C",
861
+ "7",
862
+ "8"
863
+ ],
864
+ "type": "string"
865
+ },
816
866
  "SizingParameter": {
817
867
  "title": "SizingParameter",
818
868
  "description": "Used to specify heating and cooling sizing criteria and safety factors.",
@@ -848,6 +898,27 @@
848
898
  "exclusiveMinimum": 0,
849
899
  "type": "number",
850
900
  "format": "double"
901
+ },
902
+ "efficiency_standard": {
903
+ "description": "Text to specify the efficiency standard, which will automatically set the efficiencies of all HVAC equipment when provided. Note that providing a standard here will cause the OpenStudio translation process to perform an additional sizing calculation with EnergyPlus, which is needed since the default efficiencies of equipment vary depending on their size. THIS WILL SIGNIFICANTLY INCREASE TRANSLATION TIME TO OPENSTUDIO. However, it is often worthwhile when the goal is to match the HVAC specification with a particular standard.",
904
+ "allOf": [
905
+ {
906
+ "$ref": "#/components/schemas/EfficiencyStandards"
907
+ }
908
+ ]
909
+ },
910
+ "climate_zone": {
911
+ "description": "Text indicating the ASHRAE climate zone to be used with the efficiency_standard. When unspecified, the climate zone will be inferred from the design days on this sizing parameter object.",
912
+ "allOf": [
913
+ {
914
+ "$ref": "#/components/schemas/ClimateZones"
915
+ }
916
+ ]
917
+ },
918
+ "building_type": {
919
+ "title": "Building Type",
920
+ "description": "Text for the building type to be used in the efficiency_standard. If the type is not recognized or is None, it will be assumed that the building is a generic NonResidential. The following have specified systems per the standard: Residential, NonResidential, MidriseApartment, HighriseApartment, LargeOffice, MediumOffice, SmallOffice, Retail, StripMall, PrimarySchool, SecondarySchool, SmallHotel, LargeHotel, Hospital, Outpatient, Warehouse, SuperMarket, FullServiceRestaurant, QuickServiceRestaurant, Laboratory, Courthouse.",
921
+ "type": "string"
851
922
  }
852
923
  },
853
924
  "additionalProperties": false
@@ -0,0 +1,42 @@
1
+ # *******************************************************************************
2
+ # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
3
+ # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # (1) Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ #
11
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
12
+ # this list of conditions and the following disclaimer in the documentation
13
+ # and/or other materials provided with the distribution.
14
+ #
15
+ # (3) Neither the name of the copyright holder nor the names of any contributors
16
+ # may be used to endorse or promote products derived from this software without
17
+ # specific prior written permission from the respective party.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
20
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
23
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
24
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ # *******************************************************************************
31
+
32
+ require 'honeybee/model_object'
33
+
34
+ module Honeybee
35
+ class VentilationFanAbridged < ModelObject
36
+
37
+ def defaults
38
+ @@schema[:components][:schemas][:VentilationFanAbridged][:properties]
39
+ end
40
+
41
+ end #VentilationFanAbridged
42
+ end #Honeybee
data/lib/honeybee.rb CHANGED
@@ -91,6 +91,7 @@ require 'honeybee/schedule/ruleset'
91
91
 
92
92
  # import the ventilation and internal mass objects
93
93
  require 'honeybee/ventcool/control'
94
+ require 'honeybee/ventcool/fan'
94
95
  require 'honeybee/ventcool/opening'
95
96
  require 'honeybee/ventcool/simulation'
96
97
  require 'honeybee/internalmass'
@@ -435,6 +435,15 @@ module Honeybee
435
435
  end
436
436
  end
437
437
 
438
+ # assign any ventilation fan loads if specified
439
+ if @hash[:properties][:energy][:fans]
440
+ @hash[:properties][:energy][:fans].each do |fan|
441
+ hb_fan = VentilationFanAbridged.new(fan)
442
+ os_fan = hb_fan.to_openstudio(openstudio_model, os_thermal_zone)
443
+ os_fan.addToThermalZone(os_thermal_zone)
444
+ end
445
+ end
446
+
438
447
  # assign any internal masses if specified
439
448
  if @hash[:properties][:energy][:internal_masses]
440
449
  @hash[:properties][:energy][:internal_masses].each do |int_mass|
@@ -254,6 +254,12 @@ module Honeybee
254
254
  end
255
255
  end
256
256
 
257
+ # set defaults for the simulation output
258
+ os_unmet_tol = @openstudio_model.getOutputControlReportingTolerances
259
+ default_unmet_tol = out_defaults[:unmet_setpoint_tolerance][:default]
260
+ os_unmet_tol.setToleranceforTimeHeatingSetpointNotMet(default_unmet_tol)
261
+ os_unmet_tol.setToleranceforTimeCoolingSetpointNotMet(default_unmet_tol)
262
+
257
263
  # set Outputs for the simulation
258
264
  if @hash[:output]
259
265
  if @hash[:output][:outputs]
@@ -272,6 +278,11 @@ module Honeybee
272
278
  os_report.addSummaryReport(report)
273
279
  end
274
280
  end
281
+ if @hash[:output][:unmet_setpoint_tolerance]
282
+ unmet_tol = @hash[:output][:unmet_setpoint_tolerance]
283
+ os_unmet_tol.setToleranceforTimeHeatingSetpointNotMet(unmet_tol)
284
+ os_unmet_tol.setToleranceforTimeCoolingSetpointNotMet(unmet_tol)
285
+ end
275
286
  end
276
287
 
277
288
  # set defaults for the year description
@@ -0,0 +1,117 @@
1
+ # *******************************************************************************
2
+ # Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
3
+ # Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
4
+ #
5
+ # Redistribution and use in source and binary forms, with or without
6
+ # modification, are permitted provided that the following conditions are met:
7
+ #
8
+ # (1) Redistributions of source code must retain the above copyright notice,
9
+ # this list of conditions and the following disclaimer.
10
+ #
11
+ # (2) Redistributions in binary form must reproduce the above copyright notice,
12
+ # this list of conditions and the following disclaimer in the documentation
13
+ # and/or other materials provided with the distribution.
14
+ #
15
+ # (3) Neither the name of the copyright holder nor the names of any contributors
16
+ # may be used to endorse or promote products derived from this software without
17
+ # specific prior written permission from the respective party.
18
+ #
19
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
20
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
23
+ # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
24
+ # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26
+ # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
28
+ # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+ # *******************************************************************************
31
+
32
+ require 'honeybee/ventcool/fan'
33
+
34
+ require 'to_openstudio/model_object'
35
+
36
+ module Honeybee
37
+ class VentilationFanAbridged
38
+
39
+ def find_existing_openstudio_object(openstudio_model)
40
+ model_zone_vent = openstudio_model.getZoneVentilationDesignFlowRateByName(@hash[:identifier])
41
+ return model_zone_vent.get unless model_zone_vent.empty?
42
+ nil
43
+ end
44
+
45
+ def to_openstudio(openstudio_model, parent)
46
+ # create zone ventilation object and set identifier
47
+ os_zone_vent = OpenStudio::Model::ZoneVentilationDesignFlowRate.new(openstudio_model)
48
+ os_zone_vent.setName(@hash[:identifier] + '..' + parent.name.get)
49
+ unless @hash[:display_name].nil?
50
+ os_zone_vent.setDisplayName(@hash[:display_name])
51
+ end
52
+
53
+ # assign flow rate
54
+ os_zone_vent.setDesignFlowRate(@hash[:flow_rate])
55
+ os_zone_vent.setFanPressureRise(@hash[:pressure_rise])
56
+ os_zone_vent.setFanTotalEfficiency(@hash[:efficiency])
57
+
58
+ # assign the ventilation type if it exists
59
+ if @hash[:ventilation_type]
60
+ os_zone_vent.setVentilationType(@hash[:ventilation_type])
61
+ else
62
+ os_zone_vent.setVentilationType(defaults[:ventilation_type][:default])
63
+ end
64
+
65
+ # set all of the ventilation control properties
66
+ vent_control_hash = @hash[:control]
67
+ if vent_control_hash
68
+ # assign min_indoor_temperature
69
+ if vent_control_hash[:min_indoor_temperature]
70
+ os_zone_vent.setMinimumIndoorTemperature(vent_control_hash[:min_indoor_temperature])
71
+ else
72
+ os_zone_vent.setMinimumIndoorTemperature(
73
+ defaults_control[:min_indoor_temperature][:default])
74
+ end
75
+ # assign max_indoor_temperature
76
+ if vent_control_hash[:max_indoor_temperature]
77
+ os_zone_vent.setMaximumIndoorTemperature(vent_control_hash[:max_indoor_temperature])
78
+ else
79
+ os_zone_vent.setMaximumIndoorTemperature(
80
+ defaults_control[:max_indoor_temperature][:default])
81
+ end
82
+ # assign min_outdoor_temperature
83
+ if vent_control_hash[:min_outdoor_temperature]
84
+ os_zone_vent.setMinimumOutdoorTemperature(vent_control_hash[:min_outdoor_temperature])
85
+ else
86
+ os_zone_vent.setMinimumOutdoorTemperature(
87
+ defaults_control[:min_outdoor_temperature][:default])
88
+ end
89
+ # assign max_outdoor_temperature
90
+ if vent_control_hash[:max_outdoor_temperature]
91
+ os_zone_vent.setMaximumOutdoorTemperature(vent_control_hash[:max_outdoor_temperature])
92
+ else
93
+ os_zone_vent.setMaximumOutdoorTemperature(
94
+ defaults_control[:max_outdoor_temperature][:default])
95
+ end
96
+ # assign delta_temperature
97
+ if vent_control_hash[:delta_temperature]
98
+ os_zone_vent.setDeltaTemperature(vent_control_hash[:delta_temperature])
99
+ else
100
+ os_zone_vent.setDeltaTemperature(
101
+ defaults_control[:delta_temperature][:default])
102
+ end
103
+ # assign schedule if it exists
104
+ if vent_control_hash[:schedule]
105
+ vent_sch = openstudio_model.getScheduleByName(vent_control_hash[:schedule])
106
+ unless vent_sch.empty?
107
+ vent_sch_object = vent_sch.get
108
+ os_zone_vent.setOpeningAreaFractionSchedule(vent_sch_object)
109
+ end
110
+ end
111
+ end
112
+
113
+ os_zone_vent
114
+ end
115
+
116
+ end # VentilationFanAbridged
117
+ end # Honeybee
data/lib/to_openstudio.rb CHANGED
@@ -91,6 +91,7 @@ require 'to_openstudio/schedule/ruleset'
91
91
 
92
92
  # import the ventilation and internal mass objects
93
93
  require 'to_openstudio/ventcool/control'
94
+ require 'to_openstudio/ventcool/fan'
94
95
  require 'to_openstudio/ventcool/opening'
95
96
  require 'to_openstudio/ventcool/simulation'
96
97
  require 'to_openstudio/internalmass'
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.36.2
4
+ version: 2.37.0
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: 2023-11-29 00:00:00.000000000 Z
14
+ date: 2023-12-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure
@@ -174,6 +174,7 @@ files:
174
174
  - lib/honeybee/simulation/parameter_model.rb
175
175
  - lib/honeybee/simulation/simulation_output.rb
176
176
  - lib/honeybee/ventcool/control.rb
177
+ - lib/honeybee/ventcool/fan.rb
177
178
  - lib/honeybee/ventcool/opening.rb
178
179
  - lib/honeybee/ventcool/simulation.rb
179
180
  - lib/measures/.gitkeep
@@ -267,6 +268,7 @@ files:
267
268
  - lib/to_openstudio/simulation/design_day.rb
268
269
  - lib/to_openstudio/simulation/parameter_model.rb
269
270
  - lib/to_openstudio/ventcool/control.rb
271
+ - lib/to_openstudio/ventcool/fan.rb
270
272
  - lib/to_openstudio/ventcool/opening.rb
271
273
  - lib/to_openstudio/ventcool/simulation.rb
272
274
  homepage: https://github.com/ladybug-tools/honeybee-openstudio-gem