honeybee-schema 1.59.1__py3-none-any.whl

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.
Files changed (57) hide show
  1. honeybee_schema/__init__.py +1 -0
  2. honeybee_schema/__main__.py +4 -0
  3. honeybee_schema/_base.py +42 -0
  4. honeybee_schema/altnumber.py +18 -0
  5. honeybee_schema/boundarycondition.py +81 -0
  6. honeybee_schema/cli.py +115 -0
  7. honeybee_schema/comparison.py +208 -0
  8. honeybee_schema/doe2/__init__.py +0 -0
  9. honeybee_schema/doe2/properties.py +75 -0
  10. honeybee_schema/energy/__init__.py +0 -0
  11. honeybee_schema/energy/_base.py +64 -0
  12. honeybee_schema/energy/construction.py +324 -0
  13. honeybee_schema/energy/constructionset.py +359 -0
  14. honeybee_schema/energy/daylight.py +62 -0
  15. honeybee_schema/energy/designday.py +212 -0
  16. honeybee_schema/energy/generator.py +140 -0
  17. honeybee_schema/energy/global_constructionset.py +129 -0
  18. honeybee_schema/energy/hvac/__init__.py +0 -0
  19. honeybee_schema/energy/hvac/_template.py +38 -0
  20. honeybee_schema/energy/hvac/allair.py +257 -0
  21. honeybee_schema/energy/hvac/detailed.py +20 -0
  22. honeybee_schema/energy/hvac/doas.py +248 -0
  23. honeybee_schema/energy/hvac/heatcool.py +309 -0
  24. honeybee_schema/energy/hvac/idealair.py +107 -0
  25. honeybee_schema/energy/internalmass.py +25 -0
  26. honeybee_schema/energy/load.py +627 -0
  27. honeybee_schema/energy/material.py +949 -0
  28. honeybee_schema/energy/programtype.py +117 -0
  29. honeybee_schema/energy/properties.py +382 -0
  30. honeybee_schema/energy/schedule.py +350 -0
  31. honeybee_schema/energy/shw.py +53 -0
  32. honeybee_schema/energy/simulation.py +440 -0
  33. honeybee_schema/energy/ventcool.py +337 -0
  34. honeybee_schema/geometry.py +161 -0
  35. honeybee_schema/model.py +473 -0
  36. honeybee_schema/projectinfo.py +94 -0
  37. honeybee_schema/radiance/__init__.py +0 -0
  38. honeybee_schema/radiance/_base.py +22 -0
  39. honeybee_schema/radiance/asset.py +191 -0
  40. honeybee_schema/radiance/global_modifierset.py +92 -0
  41. honeybee_schema/radiance/modifier.py +373 -0
  42. honeybee_schema/radiance/modifierset.py +296 -0
  43. honeybee_schema/radiance/properties.py +149 -0
  44. honeybee_schema/radiance/state.py +69 -0
  45. honeybee_schema/updater/__init__.py +0 -0
  46. honeybee_schema/updater/version_1_39_12.py +14 -0
  47. honeybee_schema/updater/version_1_40_1.py +153 -0
  48. honeybee_schema/updater/version_1_43_1.py +18 -0
  49. honeybee_schema/updater/version_1_43_2.py +12 -0
  50. honeybee_schema/updater/version_1_43_5.py +11 -0
  51. honeybee_schema/validation.py +205 -0
  52. honeybee_schema-1.59.1.dist-info/METADATA +108 -0
  53. honeybee_schema-1.59.1.dist-info/RECORD +57 -0
  54. honeybee_schema-1.59.1.dist-info/WHEEL +5 -0
  55. honeybee_schema-1.59.1.dist-info/entry_points.txt +2 -0
  56. honeybee_schema-1.59.1.dist-info/licenses/LICENSE +23 -0
  57. honeybee_schema-1.59.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,440 @@
1
+ """Simulation Parameter Schema"""
2
+ from pydantic import Field, validator, root_validator, constr, conlist
3
+ from typing import List
4
+ from enum import Enum
5
+
6
+ from .._base import NoExtraBaseModel
7
+ from ._base import DatedBaseModel
8
+ from .designday import DesignDay
9
+
10
+
11
+ class ReportingFrequency(str, Enum):
12
+ timestep = 'Timestep'
13
+ hourly = 'Hourly'
14
+ daily = 'Daily'
15
+ monthly = 'Monthly'
16
+ annual = 'Annual'
17
+
18
+
19
+ class SimulationOutput(NoExtraBaseModel):
20
+ """Lists the outputs to report from the simulation and their format."""
21
+
22
+ type: constr(regex='^SimulationOutput$') = 'SimulationOutput'
23
+
24
+ reporting_frequency: ReportingFrequency = ReportingFrequency.hourly
25
+
26
+ outputs: List[str] = Field(
27
+ default=None,
28
+ description='A list of EnergyPlus output names as strings, which are requested '
29
+ 'from the simulation.'
30
+ )
31
+
32
+ summary_reports: List[str] = Field(
33
+ default=None,
34
+ description='A list of EnergyPlus summary report names as strings.'
35
+ )
36
+
37
+ unmet_setpoint_tolerance: float = Field(
38
+ 1.11,
39
+ ge=0,
40
+ le=10,
41
+ description='A number in degrees Celsius for the difference that '
42
+ 'the zone conditions must be from the thermostat setpoint in order '
43
+ 'for the setpoint to be considered unmet. This will affect how unmet '
44
+ 'hours are reported in the output. ASHRAE 90.1 uses a tolerance of '
45
+ '1.11C, which is equivalent to 1.8F.'
46
+ )
47
+
48
+
49
+ class SimulationControl(NoExtraBaseModel):
50
+ """Used to specify which types of calculations to run."""
51
+
52
+ type: constr(regex='^SimulationControl$') = 'SimulationControl'
53
+
54
+ do_zone_sizing: bool = Field(
55
+ default=True,
56
+ description='Boolean for whether the zone sizing calculation should be run.'
57
+ )
58
+
59
+ do_system_sizing: bool = Field(
60
+ default=True,
61
+ description='Boolean for whether the system sizing calculation should be run.'
62
+ )
63
+
64
+ do_plant_sizing: bool = Field(
65
+ default=True,
66
+ description='Boolean for whether the plant sizing calculation should be run.'
67
+ )
68
+
69
+ run_for_run_periods: bool = Field(
70
+ default=True,
71
+ description='Boolean for whether the simulation should be run for the '
72
+ 'sizing periods.'
73
+ )
74
+
75
+ run_for_sizing_periods: bool = Field(
76
+ default=False,
77
+ description='Boolean for whether the simulation should be run for the '
78
+ 'run periods.'
79
+ )
80
+
81
+
82
+ class SolarDistribution(str, Enum):
83
+ minimal_shadowing = 'MinimalShadowing'
84
+ full_exterior = 'FullExterior'
85
+ full_interior_and_exterior = 'FullInteriorAndExterior'
86
+ full_exterior_with_reflection = 'FullExteriorWithReflections'
87
+ full_interior_and_exterior_with_reflections = \
88
+ 'FullInteriorAndExteriorWithReflections'
89
+
90
+
91
+ class CalculationMethod(str, Enum):
92
+ polygon_clipping = 'PolygonClipping'
93
+ pixel_counting = 'PixelCounting'
94
+
95
+
96
+ class CalculationUpdateMethod(str, Enum):
97
+ periodic = 'Periodic'
98
+ timestep = 'Timestep'
99
+
100
+
101
+ class ShadowCalculation(NoExtraBaseModel):
102
+ """Used to describe settings for EnergyPlus shadow calculation."""
103
+
104
+ type: constr(regex='^ShadowCalculation$') = 'ShadowCalculation'
105
+
106
+ solar_distribution: SolarDistribution = \
107
+ SolarDistribution.full_exterior_with_reflection
108
+
109
+ calculation_method: CalculationMethod = Field(
110
+ CalculationMethod.polygon_clipping,
111
+ description='Text noting whether CPU-based polygon clipping method or'
112
+ 'GPU-based pixel counting method should be used. For low numbers of shading'
113
+ 'surfaces (less than ~200), PolygonClipping requires less runtime than'
114
+ 'PixelCounting. However, PixelCounting runtime scales significantly'
115
+ 'better at higher numbers of shading surfaces. PixelCounting also has'
116
+ 'no limitations related to zone concavity when used with any'
117
+ '“FullInterior” solar distribution options.'
118
+ )
119
+
120
+ calculation_update_method: CalculationUpdateMethod = Field(
121
+ CalculationUpdateMethod.periodic,
122
+ description='Text describing how often the solar and shading calculations '
123
+ 'are updated with respect to the flow of time in the simulation.'
124
+ )
125
+
126
+ calculation_frequency: int = Field(
127
+ 30,
128
+ ge=1,
129
+ description='Integer for the number of days in each period for which a '
130
+ 'unique shadow calculation will be performed. This field is only used '
131
+ 'if the Periodic calculation_method is used.'
132
+ )
133
+
134
+ maximum_figures: int = Field(
135
+ 15000,
136
+ ge=200,
137
+ description='Number of allowable figures in shadow overlap calculations.'
138
+ )
139
+
140
+
141
+ class DaysOfWeek(str, Enum):
142
+ sunday = 'Sunday'
143
+ monday = 'Monday'
144
+ tuesday = 'Tuesday'
145
+ wednesday = 'Wednesday'
146
+ thursday = 'Thursday'
147
+ friday = 'Friday'
148
+ saturday = 'Saturday'
149
+
150
+
151
+ class DaylightSavingTime(DatedBaseModel):
152
+ """Used to describe the daylight savings time for the simulation."""
153
+
154
+ type: constr(regex='^DaylightSavingTime$') = 'DaylightSavingTime'
155
+
156
+ start_date: List[int] = Field(
157
+ [3, 12],
158
+ min_items=2,
159
+ max_items=3,
160
+ description='A list of two integers for [month, day], representing the date '
161
+ 'for the start of daylight savings time. Default: 12 Mar (daylight savings '
162
+ 'in the US in 2017).'
163
+ )
164
+
165
+ @validator('start_date')
166
+ def check_start_date(cls, v):
167
+ return cls.check_date(v)
168
+
169
+ end_date: List[int] = Field(
170
+ [11, 5],
171
+ min_items=2,
172
+ max_items=3,
173
+ description='A list of two integers for [month, day], representing the date '
174
+ 'for the end of daylight savings time. Default: 5 Nov (daylight savings '
175
+ 'in the US in 2017).'
176
+ )
177
+
178
+ @validator('end_date')
179
+ def check_end_date(cls, v):
180
+ return cls.check_date(v)
181
+
182
+
183
+ class RunPeriod(DatedBaseModel):
184
+ """Used to describe the time period over which to run the simulation."""
185
+
186
+ type: constr(regex='^RunPeriod$') = 'RunPeriod'
187
+
188
+ start_date: List[int] = Field(
189
+ [1, 1],
190
+ min_items=2,
191
+ max_items=2,
192
+ description='A list of two integers for [month, day], representing the date '
193
+ 'for the start of the run period. Must be before the end date.'
194
+ )
195
+
196
+ end_date: List[int] = Field(
197
+ [12, 31],
198
+ min_items=2,
199
+ max_items=2,
200
+ description='A list of two integers for [month, day], representing the date '
201
+ 'for the end of the run period. Must be after the start date.'
202
+ )
203
+
204
+ start_day_of_week: DaysOfWeek = Field(
205
+ default=DaysOfWeek.sunday,
206
+ description='Text for the day of the week on which the simulation starts.'
207
+ )
208
+
209
+ holidays: List[conlist(int, min_items=2, max_items=2)] = Field(
210
+ default=None,
211
+ description='A list of lists where each sub-list consists of two integers '
212
+ 'for [month, day], representing a date which is a holiday within the '
213
+ 'simulation. If None, no holidays are applied.'
214
+ )
215
+
216
+ daylight_saving_time: DaylightSavingTime = Field(
217
+ default=None,
218
+ description='A DaylightSavingTime to dictate the start and end dates '
219
+ 'of daylight saving time. If None, no daylight saving time is applied '
220
+ 'to the simulation.'
221
+ )
222
+
223
+ leap_year: bool = Field(
224
+ default=False,
225
+ description='Boolean noting whether the simulation will be run for a leap year.'
226
+ )
227
+
228
+ @root_validator
229
+ def check_dates(cls, values):
230
+ """Check that all of the input dates are valid."""
231
+ start_date = values.get('start_date')
232
+ end_date = values.get('end_date')
233
+ holidays = values.get('holidays')
234
+ leap_year = values.get('leap_year')
235
+ cls.check_date(start_date, leap_year)
236
+ cls.check_date(end_date, leap_year)
237
+ if holidays is not None:
238
+ for hol in holidays:
239
+ cls.check_date(hol, leap_year)
240
+ return values
241
+
242
+
243
+ class EfficiencyStandards(str, Enum):
244
+ ashrae_2019 = 'ASHRAE_2019'
245
+ ashrae_2016 = 'ASHRAE_2016'
246
+ ashrae_2013 = 'ASHRAE_2013'
247
+ ashrae_2010 = 'ASHRAE_2010'
248
+ ashrae_2007 = 'ASHRAE_2007'
249
+ ashrae_2004 = 'ASHRAE_2004'
250
+ doe_ref_1980_2004 = 'DOE_Ref_1980_2004'
251
+ doe_ref_pre_1980 = 'DOE_Ref_Pre_1980'
252
+
253
+
254
+ class ClimateZones(str, Enum):
255
+ zone_0A = '0A'
256
+ zone_1A = '1A'
257
+ zone_2A = '2A'
258
+ zone_3A = '3A'
259
+ zone_4A = '4A'
260
+ zone_5A = '5A'
261
+ zone_6A = '6A'
262
+ zone_0B = '0B'
263
+ zone_1B = '1B'
264
+ zone_2B = '2B'
265
+ zone_3B = '3B'
266
+ zone_4B = '4B'
267
+ zone_5B = '5B'
268
+ zone_6B = '6B'
269
+ zone_3C = '3C'
270
+ zone_4C = '4C'
271
+ zone_5C = '5C'
272
+ zone_7 = '7'
273
+ zone_8 = '8'
274
+
275
+
276
+ class BuildingTypes(str, Enum):
277
+ Residential = 'Residential'
278
+ NonResidential = 'NonResidential'
279
+ MidriseApartment = 'MidriseApartment'
280
+ HighriseApartment = 'HighriseApartment'
281
+ LargeOffice = 'LargeOffice'
282
+ MediumOffice = 'MediumOffice'
283
+ SmallOffice = 'SmallOffice'
284
+ Retail = 'Retail'
285
+ StripMall = 'StripMall'
286
+ PrimarySchool = 'PrimarySchool'
287
+ SecondarySchool = 'SecondarySchool'
288
+ SmallHotel = 'SmallHotel'
289
+ LargeHotel = 'LargeHotel'
290
+ Hospital = 'Hospital'
291
+ Outpatient = 'Outpatient'
292
+ Warehouse = 'Warehouse'
293
+ SuperMarket = 'SuperMarket'
294
+ FullServiceRestaurant = 'FullServiceRestaurant'
295
+ QuickServiceRestaurant = 'QuickServiceRestaurant'
296
+ Laboratory = 'Laboratory'
297
+ Courthouse = 'Courthouse'
298
+
299
+
300
+ class SizingParameter(NoExtraBaseModel):
301
+ """Used to specify heating and cooling sizing criteria and safety factors."""
302
+
303
+ type: constr(regex='^SizingParameter$') = 'SizingParameter'
304
+
305
+ design_days: List[DesignDay] = Field(
306
+ default=None,
307
+ description='A list of DesignDays that represent the criteria for which '
308
+ 'the HVAC systems will be sized.'
309
+ )
310
+
311
+ heating_factor: float = Field(
312
+ 1.25,
313
+ gt=0,
314
+ description='A number that will be multiplied by the peak heating load'
315
+ ' for each zone in order to size the heating system.'
316
+ )
317
+
318
+ cooling_factor: float = Field(
319
+ 1.15,
320
+ gt=0,
321
+ description='A number that will be multiplied by the peak cooling load'
322
+ ' for each zone in order to size the heating system.'
323
+ )
324
+
325
+ efficiency_standard: EfficiencyStandards = Field(
326
+ default=None,
327
+ description='Text to specify the efficiency standard, which will '
328
+ 'automatically set the efficiencies of all HVAC equipment when provided. '
329
+ 'Note that providing a standard here will cause the OpenStudio translation '
330
+ 'process to perform an additional sizing calculation with EnergyPlus, '
331
+ 'which is needed since the default efficiencies of equipment vary depending '
332
+ 'on their size. THIS WILL SIGNIFICANTLY INCREASE TRANSLATION TIME TO '
333
+ 'OPENSTUDIO. However, it is often worthwhile when the goal is to match the '
334
+ 'HVAC specification with a particular standard.'
335
+ )
336
+
337
+ climate_zone: ClimateZones = Field(
338
+ default=None,
339
+ description='Text indicating the ASHRAE climate zone to be used with the '
340
+ 'efficiency_standard. When unspecified, the climate zone will be inferred from '
341
+ 'the design days on this sizing parameter object.'
342
+ )
343
+
344
+ building_type: str = Field(
345
+ default=None,
346
+ description='Text for the building type to be used in the efficiency_standard. '
347
+ 'If the type is not recognized or is None, it will be assumed that the building '
348
+ 'is a generic NonResidential. The following have specified systems per the '
349
+ 'standard: Residential, NonResidential, MidriseApartment, HighriseApartment, '
350
+ 'LargeOffice, MediumOffice, SmallOffice, Retail, StripMall, '
351
+ 'PrimarySchool, SecondarySchool, SmallHotel, LargeHotel, Hospital, Outpatient, '
352
+ 'Warehouse, SuperMarket, FullServiceRestaurant, QuickServiceRestaurant, '
353
+ 'Laboratory, Courthouse.'
354
+ )
355
+
356
+ bypass_efficiency_sizing: bool = Field(
357
+ default=False,
358
+ description='A boolean to indicate whether the efficiency standard should '
359
+ 'trigger an sizing run that sets the efficiencies of all HVAC equipment in '
360
+ 'the Model (False) or the standard should only be written into the OSM and '
361
+ 'the sizing run should be bypassed (True). Bypassing the sizing run is useful '
362
+ 'when you only want to check that the overall HVAC system architecture is '
363
+ 'correct and you do not want to wait the extra time that it takes to run the '
364
+ 'sizing calculation.'
365
+ )
366
+
367
+
368
+ class TerrianTypes(str, Enum):
369
+ ocean = 'Ocean'
370
+ country = 'Country'
371
+ suburbs = 'Suburbs'
372
+ urban = 'Urban'
373
+ city = 'City'
374
+
375
+
376
+ class SimulationParameter(NoExtraBaseModel):
377
+ """The complete set of EnergyPlus Simulation Settings."""
378
+
379
+ type: constr(regex='^SimulationParameter$') = 'SimulationParameter'
380
+
381
+ output: SimulationOutput = Field(
382
+ default=None,
383
+ description='A SimulationOutput that lists the desired outputs from the '
384
+ 'simulation and the format in which to report them.'
385
+ )
386
+
387
+ run_period: RunPeriod = Field(
388
+ default=None,
389
+ description='A RunPeriod to describe the time period over which to '
390
+ 'run the simulation.'
391
+ )
392
+
393
+ timestep: int = Field(
394
+ default=6,
395
+ ge=1,
396
+ le=60,
397
+ description='An integer for the number of timesteps per hour at which the '
398
+ 'energy calculation will be run.'
399
+ )
400
+
401
+ @validator('timestep')
402
+ def check_timestep(cls, v):
403
+ valid_timesteps = (1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60)
404
+ assert v in valid_timesteps, \
405
+ '"{}" is not a valid timestep. Choose from {}'.format(v, valid_timesteps)
406
+
407
+ simulation_control: SimulationControl = Field(
408
+ default=None,
409
+ description='A SimulationControl object that describes which types of '
410
+ 'calculations to run.'
411
+ )
412
+
413
+ shadow_calculation: ShadowCalculation = Field(
414
+ default=None,
415
+ description='A ShadowCalculation object describing settings for the '
416
+ 'EnergyPlus Shadow Calculation.'
417
+ )
418
+
419
+ sizing_parameter: SizingParameter = Field(
420
+ default=None,
421
+ description='A SizingParameter object with criteria for sizing the '
422
+ 'heating and cooling system.'
423
+ )
424
+
425
+ north_angle: float = Field(
426
+ default=0,
427
+ ge=-360,
428
+ le=360,
429
+ description='A number between -360 and 360 for the north direction in degrees.'
430
+ 'This is the counterclockwise difference between the North and the '
431
+ 'positive Y-axis. 90 is West and 270 is East. Note that this '
432
+ 'is different than the convention used in EnergyPlus, which uses '
433
+ 'clockwise difference instead of counterclockwise difference.'
434
+ )
435
+
436
+ terrain_type: TerrianTypes = Field(
437
+ default=TerrianTypes.city,
438
+ description='Text for the terrain in which the model sits. This is used '
439
+ 'to determine the wind profile over the height of the rooms.'
440
+ )