honeybee-openstudio 2.37.0 → 2.38.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: d55f3b4e41dbed57ccc2aaad7de1254c5a02bd6e4c82c7308e615d9c449326c8
4
- data.tar.gz: 4a2078fc0600a51f6441eed73a603b38496e4f4beae780be047f4251c274e880
3
+ metadata.gz: d04fd58c3ab084205c76c6e4654a87cc099e3e2111c990526ab8f2fb10a8dab4
4
+ data.tar.gz: d1ce742b2bee14bde20a74a2ca0b2b993e05c1f5245f629df67acd6b56a82c17
5
5
  SHA512:
6
- metadata.gz: f5f610b0d0f78fec02e2b4c7523678ca3d0b8db36872a5dd8e389dfafe2cc5ced5c7cb2cb022f33a2c062c4b6a21fb1767795688d4c333dd228e1098c446b371
7
- data.tar.gz: 947221a88fb38a8ff3ec815c8a6073f09a2e424286ace005dbcf371f6c5c8e9777c829e6eb9a603e71469c25ec53a4846f4848cc3b675b6457ffeada5bf8971c
6
+ metadata.gz: 9cd89e0258f78ebe6ba246ea545151b49136a575ca13ef7b51b70f3be4cb65788b8a070187210c4d228c9dd71acd48a10085c78d15e42b5cfecc89f6a3f3694c
7
+ data.tar.gz: c9f8af283615b4c66ba379359545c5b41f4e0e208058b04f51d94617d0c92b31a4be740a59007d31b36d89308e9d864417e25db6b08dc583dfa2041635a0692c
@@ -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.37.0'
7
+ spec.version = '2.38.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
 
@@ -3,7 +3,7 @@
3
3
  "servers": [],
4
4
  "info": {
5
5
  "description": "Honeybee model schema.",
6
- "version": "1.54.0",
6
+ "version": "1.55.0",
7
7
  "title": "Honeybee Model Schema",
8
8
  "contact": {
9
9
  "name": "Ladybug Tools",
@@ -204,6 +204,11 @@
204
204
  "x-displayName": "ElectricEquipmentAbridged",
205
205
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ElectricEquipmentAbridged\" />\n"
206
206
  },
207
+ {
208
+ "name": "electricloadcenter_model",
209
+ "x-displayName": "ElectricLoadCenter",
210
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ElectricLoadCenter\" />\n"
211
+ },
207
212
  {
208
213
  "name": "energymaterial_model",
209
214
  "x-displayName": "EnergyMaterial",
@@ -484,11 +489,21 @@
484
489
  "x-displayName": "ModifierSetAbridged",
485
490
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModifierSetAbridged\" />\n"
486
491
  },
492
+ {
493
+ "name": "moduletype_model",
494
+ "x-displayName": "ModuleType",
495
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModuleType\" />\n"
496
+ },
487
497
  {
488
498
  "name": "moisturediffusionmodel_model",
489
499
  "x-displayName": "MoistureDiffusionModel",
490
500
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MoistureDiffusionModel\" />\n"
491
501
  },
502
+ {
503
+ "name": "mountingtype_model",
504
+ "x-displayName": "MountingType",
505
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/MountingType\" />\n"
506
+ },
492
507
  {
493
508
  "name": "nolimit_model",
494
509
  "x-displayName": "NoLimit",
@@ -544,6 +559,11 @@
544
559
  "x-displayName": "PVAVEquipmentType",
545
560
  "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PVAVEquipmentType\" />\n"
546
561
  },
562
+ {
563
+ "name": "pvproperties_model",
564
+ "x-displayName": "PVProperties",
565
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/PVProperties\" />\n"
566
+ },
547
567
  {
548
568
  "name": "people_model",
549
569
  "x-displayName": "People",
@@ -1050,6 +1070,7 @@
1050
1070
  "economizertype_model",
1051
1071
  "electricequipment_model",
1052
1072
  "electricequipmentabridged_model",
1073
+ "electricloadcenter_model",
1053
1074
  "energymaterial_model",
1054
1075
  "energymaterialnomass_model",
1055
1076
  "energymaterialvegetation_model",
@@ -1106,7 +1127,9 @@
1106
1127
  "modelradianceproperties_model",
1107
1128
  "modifierset_model",
1108
1129
  "modifiersetabridged_model",
1130
+ "moduletype_model",
1109
1131
  "moisturediffusionmodel_model",
1132
+ "mountingtype_model",
1110
1133
  "nolimit_model",
1111
1134
  "opaqueconstruction_model",
1112
1135
  "opaqueconstructionabridged_model",
@@ -1125,6 +1148,7 @@
1125
1148
  "ptacequipmenttype_model",
1126
1149
  "pvav_model",
1127
1150
  "pvavequipmenttype_model",
1151
+ "pvproperties_model",
1128
1152
  "radianceshadestateabridged_model",
1129
1153
  "radiancesubfacestateabridged_model",
1130
1154
  "radiant_model",
@@ -1495,6 +1519,104 @@
1495
1519
  },
1496
1520
  "additionalProperties": false
1497
1521
  },
1522
+ "ModuleType": {
1523
+ "title": "ModuleType",
1524
+ "description": "An enumeration.",
1525
+ "enum": [
1526
+ "Standard",
1527
+ "Premium",
1528
+ "ThinFilm"
1529
+ ],
1530
+ "type": "string"
1531
+ },
1532
+ "MountingType": {
1533
+ "title": "MountingType",
1534
+ "description": "An enumeration.",
1535
+ "enum": [
1536
+ "FixedOpenRack",
1537
+ "FixedRoofMounted",
1538
+ "OneAxis",
1539
+ "OneAxisBacktracking",
1540
+ "TwoAxis"
1541
+ ],
1542
+ "type": "string"
1543
+ },
1544
+ "PVProperties": {
1545
+ "title": "PVProperties",
1546
+ "description": "Base class for all objects requiring a valid EnergyPlus identifier.",
1547
+ "type": "object",
1548
+ "properties": {
1549
+ "identifier": {
1550
+ "title": "Identifier",
1551
+ "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).",
1552
+ "maxLength": 100,
1553
+ "minLength": 1,
1554
+ "pattern": "^[^,;!\\n\\t]+$",
1555
+ "type": "string"
1556
+ },
1557
+ "display_name": {
1558
+ "title": "Display Name",
1559
+ "description": "Display name of the object with no character restrictions.",
1560
+ "type": "string"
1561
+ },
1562
+ "type": {
1563
+ "title": "Type",
1564
+ "default": "PVProperties",
1565
+ "pattern": "^PVProperties$",
1566
+ "type": "string",
1567
+ "readOnly": true
1568
+ },
1569
+ "rated_efficiency": {
1570
+ "title": "Rated Efficiency",
1571
+ "description": "A number between 0 and 1 for the rated nameplate efficiency of the photovoltaic solar cells under standard test conditions (STC). Standard test conditions are 1,000 Watts per square meter solar irradiance, 25 degrees C cell temperature, and ASTM G173-03 standard spectrum. Nameplate efficiencies reported by manufacturers are typically under STC. Standard poly- or mono-crystalline silicon modules tend to have rated efficiencies in the range of 14-17%. Premium high efficiency mono-crystalline silicon modules with anti-reflective coatings can have efficiencies in the range of 18-20%. Thin film photovoltaic modules typically have efficiencies of 11% or less. (Default: 0.15 for standard silicon solar cells).",
1572
+ "default": 0.15,
1573
+ "exclusiveMinimum": 0,
1574
+ "exclusiveMaximum": 1,
1575
+ "type": "number",
1576
+ "format": "double"
1577
+ },
1578
+ "active_area_fraction": {
1579
+ "title": "Active Area Fraction",
1580
+ "description": "The fraction of the parent Shade geometry that is covered in active solar cells. This fraction includes the difference between the PV panel (aka. PV module) area and the active cells within the panel as well as any losses for how the (typically rectangular) panels can be arranged on the Shade geometry. When the parent Shade geometry represents just the solar panels, this fraction is typically around 0.9 given that the framing elements of the panel reduce the overall active area. (Default: 0.9, assuming parent Shade geometry represents only the PV panel geometry).",
1581
+ "default": 0.9,
1582
+ "exclusiveMinimum": 0,
1583
+ "maximum": 1,
1584
+ "type": "number",
1585
+ "format": "double"
1586
+ },
1587
+ "module_type": {
1588
+ "description": "Text to indicate the type of solar module. This is used to determine the temperature coefficients used in the simulation of the photovoltaic modules. When the rated_efficiency is between 12-18%, the Standard type is typically most appropriate. When the rated_efficiency is greater than 18%, the Premium type is likely more appropriate. When the rated_efficiency is less than 12%, this likely refers to a case where the ThinFilm module type is most appropriate.",
1589
+ "default": "Standard",
1590
+ "allOf": [
1591
+ {
1592
+ "$ref": "#/components/schemas/ModuleType"
1593
+ }
1594
+ ]
1595
+ },
1596
+ "mounting_type": {
1597
+ "description": "Text to indicate the type of mounting and/or tracking used for the photovoltaic array. Note that the OneAxis options have an axis of rotation that is determined by the azimuth of the parent Shade geometry. Also note that, in the case of one or two axis tracking, shadows on the (static) parent Shade geometry still reduce the electrical output, enabling the simulation to account for large context geometry casting shadows on the array. However, the effects of smaller detailed shading may be improperly accounted for and self shading of the dynamic panel geometry is only accounted for via the tracking_ground_coverage_ratio property on this object. FixedOpenRack refers to ground or roof mounting where the air flows freely. FixedRoofMounted refers to mounting flush with the roof with limited air flow. OneAxis refers to a fixed tilt and azimuth, which define an axis of rotation. OneAxisBacktracking is the same as OneAxis but with controls to reduce self-shade at low sun angles. TwoAxis refers to a dynamic tilt and azimuth that track the sun.",
1598
+ "default": "FixedOpenRack",
1599
+ "allOf": [
1600
+ {
1601
+ "$ref": "#/components/schemas/MountingType"
1602
+ }
1603
+ ]
1604
+ },
1605
+ "system_loss_fraction": {
1606
+ "title": "System Loss Fraction",
1607
+ "description": "A number between 0 and 1 for the fraction of the electricity output lost due to factors other than EPW weather conditions, panel efficiency/type, active area, mounting, and inverter conversion from DC to AC. Factors that should be accounted for in this input include soiling, snow, wiring losses, electrical connection losses, manufacturer defects/tolerances/mismatch in cell characteristics, losses from power grid availability, and losses due to age or light-induced degradation. Losses from these factors tend to be between 10-20% but can vary widely depending on the installation, maintenance and the grid to which the panels are connected..",
1608
+ "default": 0.14,
1609
+ "minimum": 0,
1610
+ "maximum": 1,
1611
+ "type": "number",
1612
+ "format": "double"
1613
+ }
1614
+ },
1615
+ "required": [
1616
+ "identifier"
1617
+ ],
1618
+ "additionalProperties": false
1619
+ },
1498
1620
  "ShadeEnergyPropertiesAbridged": {
1499
1621
  "title": "ShadeEnergyPropertiesAbridged",
1500
1622
  "description": "Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects.",
@@ -1520,6 +1642,15 @@
1520
1642
  "maxLength": 100,
1521
1643
  "minLength": 1,
1522
1644
  "type": "string"
1645
+ },
1646
+ "pv_properties": {
1647
+ "title": "Pv Properties",
1648
+ "description": "An optional PVProperties object to specify photovoltaic behavior of the Shade. If None, the Shade will have no Photovoltaic properties. Note that the normal of the Shade is important in determining the performance of the shade as a PV geometry.",
1649
+ "allOf": [
1650
+ {
1651
+ "$ref": "#/components/schemas/PVProperties"
1652
+ }
1653
+ ]
1523
1654
  }
1524
1655
  },
1525
1656
  "additionalProperties": false
@@ -10841,6 +10972,38 @@
10841
10972
  },
10842
10973
  "additionalProperties": false
10843
10974
  },
10975
+ "ElectricLoadCenter": {
10976
+ "title": "ElectricLoadCenter",
10977
+ "description": "Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects.",
10978
+ "type": "object",
10979
+ "properties": {
10980
+ "type": {
10981
+ "title": "Type",
10982
+ "default": "ElectricLoadCenter",
10983
+ "pattern": "^ElectricLoadCenter$",
10984
+ "type": "string",
10985
+ "readOnly": true
10986
+ },
10987
+ "inverter_efficiency": {
10988
+ "title": "Inverter Efficiency",
10989
+ "description": "A number between 0 and 1 for the load center inverter nominal rated DC-to-AC conversion efficiency. An inverter converts DC power, such as that output by photovoltaic panels, to AC power, such as that distributed by the electrical grid and is available from standard electrical outlets. Inverter efficiency is defined as the inverter rated AC power output divided by its rated DC power output.",
10990
+ "default": 0.96,
10991
+ "exclusiveMinimum": 0,
10992
+ "maximum": 1,
10993
+ "type": "number",
10994
+ "format": "double"
10995
+ },
10996
+ "inverter_dc_to_ac_size_ratio": {
10997
+ "title": "Inverter Dc To Ac Size Ratio",
10998
+ "description": "A positive number (typically greater than 1) for the ratio of the inverter DC rated size to its AC rated size. Typically, inverters are not sized to convert the full DC output under standard test conditions (STC) as such conditions rarely occur in reality and therefore unnecessarily add to the size/cost of the inverter. For a system with a high DC to AC size ratio, during times when the DC power output exceeds the inverter rated DC input size, the inverter limits the power output by increasing the DC operating voltage, which moves the arrays operating point down its current-voltage (I-V) curve. In EnergyPlus, this is accomplished by simply limiting the system output to the AC size as dictated by the ratio. The default value of 1.1 is reasonable for most systems. A typical range is 1.1 to 1.25, although some large-scale systems have ratios of as high as 1.5. The optimal value depends on the system location, array orientation, and module cost.",
10999
+ "default": 1.1,
11000
+ "exclusiveMinimum": 0,
11001
+ "type": "number",
11002
+ "format": "double"
11003
+ }
11004
+ },
11005
+ "additionalProperties": false
11006
+ },
10844
11007
  "ModelEnergyProperties": {
10845
11008
  "title": "ModelEnergyProperties",
10846
11009
  "description": "Base class for all objects that are not extensible with additional keys.\n\nThis effectively includes all objects except for the Properties classes\nthat are assigned to geometry objects.",
@@ -11521,6 +11684,15 @@
11521
11684
  "$ref": "#/components/schemas/VentilationSimulationControl"
11522
11685
  }
11523
11686
  ]
11687
+ },
11688
+ "electric_load_center": {
11689
+ "title": "Electric Load Center",
11690
+ "description": "An optional parameter object that defines the properties of the model electric loads center that manages on site electricity generation and conversion.",
11691
+ "allOf": [
11692
+ {
11693
+ "$ref": "#/components/schemas/ElectricLoadCenter"
11694
+ }
11695
+ ]
11524
11696
  }
11525
11697
  },
11526
11698
  "additionalProperties": false
@@ -14623,7 +14795,7 @@
14623
14795
  "version": {
14624
14796
  "title": "Version",
14625
14797
  "description": "Text string for the current version of the schema.",
14626
- "default": "1.54.0",
14798
+ "default": "1.55.0",
14627
14799
  "pattern": "([0-9]+)\\.([0-9]+)\\.([0-9]+)",
14628
14800
  "type": "string",
14629
14801
  "readOnly": true
@@ -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 ElectricLoadCenter < ModelObject
36
+
37
+ def defaults
38
+ @@schema[:components][:schemas][:ElectricLoadCenter][:properties]
39
+ end
40
+
41
+ end #ElectricLoadCenter
42
+ end #Honeybee
@@ -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 PVProperties < ModelObject
36
+
37
+ def defaults
38
+ @@schema[:components][:schemas][:PVProperties][:properties]
39
+ end
40
+
41
+ end #PVProperties
42
+ end #Honeybee
data/lib/honeybee.rb CHANGED
@@ -96,6 +96,10 @@ require 'honeybee/ventcool/opening'
96
96
  require 'honeybee/ventcool/simulation'
97
97
  require 'honeybee/internalmass'
98
98
 
99
+ # import the generator objects
100
+ require 'honeybee/generator/loadcenter'
101
+ require 'honeybee/generator/pv'
102
+
99
103
  # import the simulation objects
100
104
  require 'honeybee/simulation/design_day'
101
105
  require 'honeybee/simulation/parameter_model'
@@ -0,0 +1,71 @@
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/generator/loadcenter'
33
+
34
+ require 'to_openstudio/model_object'
35
+
36
+ module Honeybee
37
+ class ElectricLoadCenter
38
+
39
+ def to_openstudio(openstudio_model, generator_objects)
40
+ # create the ElectricLoadCenter:Distribution specification
41
+ load_center = OpenStudio::Model::ElectricLoadCenterDistribution.new(openstudio_model)
42
+ load_center.setName('Model Load Center Distribution')
43
+
44
+ # add the generators to the specification
45
+ generator_objects.each do |gen_obj|
46
+ load_center.addGenerator(gen_obj)
47
+ end
48
+
49
+ # assign the major properties to the load center
50
+ load_center.setGeneratorOperationSchemeType('Baseload')
51
+ load_center.setElectricalBussType('DirectCurrentWithInverter')
52
+
53
+ # create the inverter and assign it
54
+ inverter = OpenStudio::Model::ElectricLoadCenterInverterPVWatts.new(openstudio_model)
55
+ if @hash[:inverter_dc_to_ac_size_ratio]
56
+ inverter.setDCToACSizeRatio(@hash[:inverter_dc_to_ac_size_ratio])
57
+ else
58
+ inverter.setDCToACSizeRatio(defaults[:inverter_dc_to_ac_size_ratio][:default])
59
+ end
60
+ if @hash[:inverter_efficiency]
61
+ inverter.setInverterEfficiency(@hash[:inverter_efficiency])
62
+ else
63
+ inverter.setInverterEfficiency(defaults[:inverter_efficiency][:default])
64
+ end
65
+ load_center.setInverter(inverter)
66
+
67
+ load_center
68
+ end
69
+
70
+ end #ElectricLoadCenter
71
+ end #Honeybee
@@ -0,0 +1,86 @@
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/generator/pv'
33
+
34
+ require 'to_openstudio/model_object'
35
+
36
+ module Honeybee
37
+ class PVProperties
38
+
39
+ def to_openstudio(openstudio_model, parent)
40
+ # calculate the DC system size from the efficiency and the parent area
41
+ rated_watts = defaults[:rated_efficiency][:default] * 1000
42
+ if @hash[:rated_efficiency]
43
+ rated_watts = @hash[:rated_efficiency] * 1000
44
+ end
45
+ active_fraction = defaults[:active_area_fraction][:default]
46
+ if @hash[:active_area_fraction]
47
+ active_fraction = @hash[:active_area_fraction]
48
+ end
49
+ sys_cap = parent.netArea * active_fraction * rated_watts
50
+ sys_cap = sys_cap.round
51
+
52
+ # create the PVWatts generator and set identifier
53
+ os_gen = OpenStudio::Model::GeneratorPVWatts.new(openstudio_model, parent, sys_cap)
54
+ os_gen.setName(@hash[:identifier] + '..' + parent.name.get)
55
+
56
+ # assign the module type
57
+ if @hash[:module_type]
58
+ os_gen.setModuleType(@hash[:module_type])
59
+ else
60
+ os_gen.setModuleType(defaults[:module_type][:default])
61
+ end
62
+
63
+ # assign the mounting type
64
+ if @hash[:mounting_type]
65
+ os_gen.setArrayType(@hash[:mounting_type])
66
+ else
67
+ os_gen.setArrayType(defaults[:mounting_type][:default])
68
+ end
69
+
70
+ # assign the system loss fraction
71
+ if @hash[:system_loss_fraction]
72
+ os_gen.setSystemLosses(@hash[:system_loss_fraction])
73
+ else
74
+ os_gen.setSystemLosses(defaults[:system_loss_fraction][:default])
75
+ end
76
+
77
+ # assign the tracking ground coverage ratio
78
+ if @hash[:tracking_ground_coverage_ratio]
79
+ os_gen.setGroundCoverageRatio(@hash[:tracking_ground_coverage_ratio])
80
+ end
81
+
82
+ os_gen
83
+ end
84
+
85
+ end #PVProperties
86
+ end #Honeybee
@@ -82,6 +82,13 @@ module Honeybee
82
82
  os_shading_surface.setTransmittanceSchedule(os_schedule)
83
83
  end
84
84
  end
85
+
86
+ # create PV objects if there are properties
87
+ if @hash[:properties][:energy][:pv_properties]
88
+ gen_obj = PVProperties.new(@hash[:properties][:energy][:pv_properties])
89
+ os_gen_obj = gen_obj.to_openstudio(openstudio_model, os_shading_surface)
90
+ $generators << os_gen_obj
91
+ end
85
92
  end
86
93
 
87
94
  os_shading_surface
@@ -55,178 +55,180 @@ module Honeybee
55
55
  def add_hot_water_plants(openstudio_model, shw_hashes)
56
56
  # add district hot water loops to supply all of the shw_connections
57
57
  shw_hashes.each do |shw_hash|
58
- # create the plant loop
59
- hot_water_plant = OpenStudio::Model::PlantLoop.new(openstudio_model)
60
- hot_water_plant.setName('SHW Loop ' + shw_hash[:identifier])
61
- hot_water_plant.setMaximumLoopTemperature(@@max_target_temp)
62
- hot_water_plant.setMinimumLoopTemperature(10) # default value in C from OpenStudio Application
58
+ unless @@shw_rates[shw_hash[:identifier]].nil?
59
+ # create the plant loop
60
+ hot_water_plant = OpenStudio::Model::PlantLoop.new(openstudio_model)
61
+ hot_water_plant.setName('SHW Loop ' + shw_hash[:identifier])
62
+ hot_water_plant.setMaximumLoopTemperature(@@max_target_temp)
63
+ hot_water_plant.setMinimumLoopTemperature(10) # default value in C from OpenStudio Application
63
64
 
64
- # edit the sizing information to be for a hot water loop
65
- loop_sizing = hot_water_plant.sizingPlant()
66
- loop_sizing.setLoopType('Heating')
67
- loop_sizing.setDesignLoopExitTemperature(@@max_target_temp)
68
- loop_sizing.setLoopDesignTemperatureDifference(5) # default value in C from OpenStudio Application
65
+ # edit the sizing information to be for a hot water loop
66
+ loop_sizing = hot_water_plant.sizingPlant()
67
+ loop_sizing.setLoopType('Heating')
68
+ loop_sizing.setDesignLoopExitTemperature(@@max_target_temp)
69
+ loop_sizing.setLoopDesignTemperatureDifference(5) # default value in C from OpenStudio Application
69
70
 
70
- # add a setpoint manager for the loop
71
- hot_sch = @@max_temp_schedule
72
- if @@max_temp_schedule.nil?
73
- hot_sch_name = @@max_target_temp.to_s + 'C Hot Water'
74
- hot_sch = create_constant_schedule(openstudio_model, hot_sch_name, @@max_target_temp)
75
- end
76
- sp_manager = OpenStudio::Model::SetpointManagerScheduled.new(openstudio_model, hot_sch)
77
- sp_manager.addToNode(hot_water_plant.supplyOutletNode())
71
+ # add a setpoint manager for the loop
72
+ hot_sch = @@max_temp_schedule
73
+ if @@max_temp_schedule.nil?
74
+ hot_sch_name = @@max_target_temp.to_s + 'C Hot Water'
75
+ hot_sch = create_constant_schedule(openstudio_model, hot_sch_name, @@max_target_temp)
76
+ end
77
+ sp_manager = OpenStudio::Model::SetpointManagerScheduled.new(openstudio_model, hot_sch)
78
+ sp_manager.addToNode(hot_water_plant.supplyOutletNode())
78
79
 
79
- # add a constant speed pump for the loop
80
- hot_water_pump = OpenStudio::Model::PumpConstantSpeed.new(openstudio_model)
81
- hot_water_pump.setName('SHW Pump' + @@sys_count.to_s)
82
- hot_water_pump.setRatedPumpHead(29891) # default value in Pa from OpenStudio Application
83
- hot_water_pump.setMotorEfficiency(0.9) # default value from OpenStudio Application
84
- hot_water_pump.addToNode(hot_water_plant.supplyInletNode())
80
+ # add a constant speed pump for the loop
81
+ hot_water_pump = OpenStudio::Model::PumpConstantSpeed.new(openstudio_model)
82
+ hot_water_pump.setName('SHW Pump' + @@sys_count.to_s)
83
+ hot_water_pump.setRatedPumpHead(29891) # default value in Pa from OpenStudio Application
84
+ hot_water_pump.setMotorEfficiency(0.9) # default value from OpenStudio Application
85
+ hot_water_pump.addToNode(hot_water_plant.supplyInletNode())
85
86
 
86
- eq_type = shw_hash[:equipment_type]
87
- if eq_type == 'Default_District_SHW'
88
- # add a district heating system to supply the heat for the loop
89
- district_hw = OpenStudio::Model::WaterHeaterMixed.new(openstudio_model)
90
- district_hw.setName('Ideal Service Hot Water Heater')
91
- district_hw.setHeaterFuelType('DistrictHeating')
92
- district_hw.setOffCycleParasiticFuelType('DistrictHeating')
93
- district_hw.setOnCycleParasiticFuelType('DistrictHeating')
94
- district_hw.setHeaterThermalEfficiency(1.0)
95
- district_hw.setHeaterMaximumCapacity(1000000)
96
- district_hw.setTankVolume(0)
97
- district_hw.setHeaterControlType('Modulate')
98
- target_sch_name = '22C Ambient Condition'
99
- target_sch = create_constant_schedule(openstudio_model, target_sch_name, 22)
100
- district_hw.setAmbientTemperatureSchedule(target_sch)
101
- district_hw.setOffCycleLossCoefficienttoAmbientTemperature(0)
102
- district_hw.setOnCycleLossCoefficienttoAmbientTemperature(0)
103
- hot_water_plant.addSupplyBranchForComponent(district_hw)
104
- # try to minimize the impact of the pump as much as possible
105
- hot_water_pump.setEndUseSubcategory('Water Systems')
106
- hot_water_pump.setMotorEfficiency(0.9)
107
- else
108
- # add a water heater to supply the heat for the loop
109
- heater = OpenStudio::Model::WaterHeaterMixed.new(openstudio_model)
110
- if eq_type == 'Electric_WaterHeater' || eq_type == 'HeatPump_WaterHeater' || eq_type == 'Electric_TanklessHeater'
111
- heater.setHeaterFuelType('Electricity')
112
- heater.setOffCycleParasiticFuelType('Electricity')
113
- heater.setOnCycleParasiticFuelType('Electricity')
114
- end
87
+ eq_type = shw_hash[:equipment_type]
88
+ if eq_type == 'Default_District_SHW'
89
+ # add a district heating system to supply the heat for the loop
90
+ district_hw = OpenStudio::Model::WaterHeaterMixed.new(openstudio_model)
91
+ district_hw.setName('Ideal Service Hot Water Heater')
92
+ district_hw.setHeaterFuelType('DistrictHeating')
93
+ district_hw.setOffCycleParasiticFuelType('DistrictHeating')
94
+ district_hw.setOnCycleParasiticFuelType('DistrictHeating')
95
+ district_hw.setHeaterThermalEfficiency(1.0)
96
+ district_hw.setHeaterMaximumCapacity(1000000)
97
+ district_hw.setTankVolume(0)
98
+ district_hw.setHeaterControlType('Modulate')
99
+ target_sch_name = '22C Ambient Condition'
100
+ target_sch = create_constant_schedule(openstudio_model, target_sch_name, 22)
101
+ district_hw.setAmbientTemperatureSchedule(target_sch)
102
+ district_hw.setOffCycleLossCoefficienttoAmbientTemperature(0)
103
+ district_hw.setOnCycleLossCoefficienttoAmbientTemperature(0)
104
+ hot_water_plant.addSupplyBranchForComponent(district_hw)
105
+ # try to minimize the impact of the pump as much as possible
106
+ hot_water_pump.setEndUseSubcategory('Water Systems')
107
+ hot_water_pump.setMotorEfficiency(0.9)
108
+ else
109
+ # add a water heater to supply the heat for the loop
110
+ heater = OpenStudio::Model::WaterHeaterMixed.new(openstudio_model)
111
+ if eq_type == 'Electric_WaterHeater' || eq_type == 'HeatPump_WaterHeater' || eq_type == 'Electric_TanklessHeater'
112
+ heater.setHeaterFuelType('Electricity')
113
+ heater.setOffCycleParasiticFuelType('Electricity')
114
+ heater.setOnCycleParasiticFuelType('Electricity')
115
+ end
115
116
 
116
- # set the water heater efficiency
117
- if eq_type == 'HeatPump_WaterHeater'
118
- heater.setHeaterThermalEfficiency(1.0)
119
- elsif shw_hash[:heater_efficiency].nil?
120
- if eq_type == 'Electric_WaterHeater' || eq_type == 'Electric_TanklessHeater'
117
+ # set the water heater efficiency
118
+ if eq_type == 'HeatPump_WaterHeater'
121
119
  heater.setHeaterThermalEfficiency(1.0)
120
+ elsif shw_hash[:heater_efficiency].nil?
121
+ if eq_type == 'Electric_WaterHeater' || eq_type == 'Electric_TanklessHeater'
122
+ heater.setHeaterThermalEfficiency(1.0)
123
+ else
124
+ heater.setHeaterThermalEfficiency(0.8)
125
+ end
122
126
  else
123
- heater.setHeaterThermalEfficiency(0.8)
127
+ heater.setHeaterThermalEfficiency(shw_hash[:heater_efficiency])
124
128
  end
125
- else
126
- heater.setHeaterThermalEfficiency(shw_hash[:heater_efficiency])
127
- end
128
129
 
129
- # set the ambient condition of the water tank
130
- to_thermal_zone = false
131
- unless shw_hash[:ambient_condition].nil?
132
- if shw_hash[:ambient_condition].is_a? Numeric
133
- target_sch_name = shw_hash[:ambient_condition].to_s + 'C Ambient Condition'
134
- target_sch = create_constant_schedule(
135
- openstudio_model, target_sch_name, shw_hash[:ambient_condition])
136
- heater.setAmbientTemperatureSchedule(target_sch)
137
- else
138
- source_zone_ref = openstudio_model.getThermalZoneByName(shw_hash[:ambient_condition])
139
- unless source_zone_ref.empty?
140
- source_zone = source_zone_ref.get
141
- heater.setAmbientTemperatureThermalZone(source_zone)
130
+ # set the ambient condition of the water tank
131
+ to_thermal_zone = false
132
+ unless shw_hash[:ambient_condition].nil?
133
+ if shw_hash[:ambient_condition].is_a? Numeric
134
+ target_sch_name = shw_hash[:ambient_condition].to_s + 'C Ambient Condition'
135
+ target_sch = create_constant_schedule(
136
+ openstudio_model, target_sch_name, shw_hash[:ambient_condition])
137
+ heater.setAmbientTemperatureSchedule(target_sch)
138
+ else
139
+ source_zone_ref = openstudio_model.getThermalZoneByName(shw_hash[:ambient_condition])
140
+ unless source_zone_ref.empty?
141
+ source_zone = source_zone_ref.get
142
+ heater.setAmbientTemperatureThermalZone(source_zone)
143
+ end
144
+ heater.setAmbientTemperatureIndicator('ThermalZone')
145
+ to_thermal_zone = true
142
146
  end
143
- heater.setAmbientTemperatureIndicator('ThermalZone')
144
- to_thermal_zone = true
145
- end
146
- else
147
- target_sch_name = '22C Ambient Condition'
148
- target_sch = create_constant_schedule(openstudio_model, target_sch_name, 22)
149
- heater.setAmbientTemperatureSchedule(target_sch)
150
- end
151
-
152
- # set the ambient loss coefficient
153
- if to_thermal_zone
154
- unless shw_hash[:ambient_loss_coefficient].nil?
155
- heater.setOffCycleLossFractiontoThermalZone(
156
- shw_hash[:ambient_loss_coefficient])
157
- heater.setOnCycleLossFractiontoThermalZone(
158
- shw_hash[:ambient_loss_coefficient])
159
147
  else
160
- heater.setOffCycleLossFractiontoThermalZone(6)
161
- heater.setOnCycleLossFractiontoThermalZone(6)
148
+ target_sch_name = '22C Ambient Condition'
149
+ target_sch = create_constant_schedule(openstudio_model, target_sch_name, 22)
150
+ heater.setAmbientTemperatureSchedule(target_sch)
162
151
  end
163
- else
164
- unless shw_hash[:ambient_loss_coefficient].nil?
165
- heater.setOffCycleLossCoefficienttoAmbientTemperature(
166
- shw_hash[:ambient_loss_coefficient])
167
- heater.setOnCycleLossCoefficienttoAmbientTemperature(
168
- shw_hash[:ambient_loss_coefficient])
152
+
153
+ # set the ambient loss coefficient
154
+ if to_thermal_zone
155
+ unless shw_hash[:ambient_loss_coefficient].nil?
156
+ heater.setOffCycleLossFractiontoThermalZone(
157
+ shw_hash[:ambient_loss_coefficient])
158
+ heater.setOnCycleLossFractiontoThermalZone(
159
+ shw_hash[:ambient_loss_coefficient])
160
+ else
161
+ heater.setOffCycleLossFractiontoThermalZone(6)
162
+ heater.setOnCycleLossFractiontoThermalZone(6)
163
+ end
169
164
  else
170
- heater.setOffCycleLossCoefficienttoAmbientTemperature(6)
171
- heater.setOnCycleLossCoefficienttoAmbientTemperature(6)
165
+ unless shw_hash[:ambient_loss_coefficient].nil?
166
+ heater.setOffCycleLossCoefficienttoAmbientTemperature(
167
+ shw_hash[:ambient_loss_coefficient])
168
+ heater.setOnCycleLossCoefficienttoAmbientTemperature(
169
+ shw_hash[:ambient_loss_coefficient])
170
+ else
171
+ heater.setOffCycleLossCoefficienttoAmbientTemperature(6)
172
+ heater.setOnCycleLossCoefficienttoAmbientTemperature(6)
173
+ end
172
174
  end
173
- end
174
175
 
175
- # set the capactiy and and controls of the water heater
176
- heater.setHeaterMaximumCapacity(1000000)
177
- if eq_type == 'Gas_TanklessHeater' || eq_type == 'Electric_TanklessHeater'
178
- heater.setName('SHW Tankless WaterHeater' + @@sys_count.to_s)
179
- heater.setTankVolume(0)
180
- heater.setHeaterControlType('Modulate')
181
- heater.setOffCycleLossCoefficienttoAmbientTemperature(0)
182
- heater.setOnCycleLossCoefficienttoAmbientTemperature(0)
183
- else
184
- heater.setName('SHW WaterHeater' + @@sys_count.to_s)
185
- heater.setTankVolume(@@shw_rates[shw_hash[:identifier]])
186
- end
187
-
188
- # add it to the loop
189
- hot_water_plant.addSupplyBranchForComponent(heater)
190
-
191
- # if it's a heat pump system, then add the pump
192
- if eq_type == 'HeatPump_WaterHeater'
193
- # create a coil for the heat pump
194
- heat_pump = OpenStudio::Model::CoilWaterHeatingAirToWaterHeatPump.new(openstudio_model)
195
- heat_pump.setName('SHW HPWH DX Coil' + @@sys_count.to_s)
196
- if shw_hash[:heater_efficiency].nil?
197
- heat_pump.setRatedCOP(3.5)
176
+ # set the capactiy and and controls of the water heater
177
+ heater.setHeaterMaximumCapacity(1000000)
178
+ if eq_type == 'Gas_TanklessHeater' || eq_type == 'Electric_TanklessHeater'
179
+ heater.setName('SHW Tankless WaterHeater' + @@sys_count.to_s)
180
+ heater.setTankVolume(0)
181
+ heater.setHeaterControlType('Modulate')
182
+ heater.setOffCycleLossCoefficienttoAmbientTemperature(0)
183
+ heater.setOnCycleLossCoefficienttoAmbientTemperature(0)
198
184
  else
199
- heat_pump.setRatedCOP(shw_hash[:heater_efficiency])
185
+ heater.setName('SHW WaterHeater' + @@sys_count.to_s)
186
+ heater.setTankVolume(@@shw_rates[shw_hash[:identifier]])
200
187
  end
201
188
 
202
- # add a fan for the heat pump system
203
- fan = OpenStudio::Model::FanOnOff.new(openstudio_model)
204
- fan.setName('HPWH Fan' + @@sys_count.to_s)
205
- fan.setEndUseSubcategory('Water Systems')
206
- setpt_sch = create_constant_schedule(
207
- openstudio_model, 'HPWH Setpoint' + @@sys_count.to_s, @@max_target_temp + (@@hp_deadband * 2))
208
- inlet_sch = create_constant_schedule(
209
- openstudio_model, 'Inlet Air Mixer Fraction' + @@sys_count.to_s, 0.2)
210
-
211
- # add a water heater to supply the heat for the loop
212
- heat_sys = OpenStudio::Model::WaterHeaterHeatPump.new(
213
- openstudio_model, heat_pump, heater, fan, setpt_sch, inlet_sch)
214
- heat_sys.setDeadBandTemperatureDifference(@@hp_deadband)
189
+ # add it to the loop
190
+ hot_water_plant.addSupplyBranchForComponent(heater)
215
191
 
216
- source_zone_ref = openstudio_model.getThermalZoneByName(shw_hash[:ambient_condition])
217
- unless source_zone_ref.empty?
218
- source_zone = source_zone_ref.get
219
- heat_sys.addToThermalZone(source_zone)
192
+ # if it's a heat pump system, then add the pump
193
+ if eq_type == 'HeatPump_WaterHeater'
194
+ # create a coil for the heat pump
195
+ heat_pump = OpenStudio::Model::CoilWaterHeatingAirToWaterHeatPump.new(openstudio_model)
196
+ heat_pump.setName('SHW HPWH DX Coil' + @@sys_count.to_s)
197
+ if shw_hash[:heater_efficiency].nil?
198
+ heat_pump.setRatedCOP(3.5)
199
+ else
200
+ heat_pump.setRatedCOP(shw_hash[:heater_efficiency])
201
+ end
202
+
203
+ # add a fan for the heat pump system
204
+ fan = OpenStudio::Model::FanOnOff.new(openstudio_model)
205
+ fan.setName('HPWH Fan' + @@sys_count.to_s)
206
+ fan.setEndUseSubcategory('Water Systems')
207
+ setpt_sch = create_constant_schedule(
208
+ openstudio_model, 'HPWH Setpoint' + @@sys_count.to_s, @@max_target_temp + (@@hp_deadband * 2))
209
+ inlet_sch = create_constant_schedule(
210
+ openstudio_model, 'Inlet Air Mixer Fraction' + @@sys_count.to_s, 0.2)
211
+
212
+ # add a water heater to supply the heat for the loop
213
+ heat_sys = OpenStudio::Model::WaterHeaterHeatPump.new(
214
+ openstudio_model, heat_pump, heater, fan, setpt_sch, inlet_sch)
215
+ heat_sys.setDeadBandTemperatureDifference(@@hp_deadband)
216
+
217
+ source_zone_ref = openstudio_model.getThermalZoneByName(shw_hash[:ambient_condition])
218
+ unless source_zone_ref.empty?
219
+ source_zone = source_zone_ref.get
220
+ heat_sys.addToThermalZone(source_zone)
221
+ end
222
+ heat_sys.setName('SHW WaterHeater HeatPump' + @@sys_count.to_s)
220
223
  end
221
- heat_sys.setName('SHW WaterHeater HeatPump' + @@sys_count.to_s)
222
224
  end
223
- end
224
225
 
225
- # add all of the water use connections to the loop and total the capacity
226
- @@shw_connections[shw_hash[:identifier]].each do |shw_conn|
227
- hot_water_plant.addDemandBranchForComponent(shw_conn)
226
+ # add all of the water use connections to the loop and total the capacity
227
+ @@shw_connections[shw_hash[:identifier]].each do |shw_conn|
228
+ hot_water_plant.addDemandBranchForComponent(shw_conn)
229
+ end
230
+ @@sys_count = @@sys_count + 1
228
231
  end
229
- @@sys_count = @@sys_count + 1
230
232
  end
231
233
  end
232
234
 
@@ -133,6 +133,7 @@ module Honeybee
133
133
  $shw_for_plant = nil # track whether a hot water plant is needed
134
134
  $detailed_hvac_hash = Hash.new # track the detailed HVAC systems that have been assigned
135
135
  $ironbug_exe = nil # ironbug executable; will be overwritten by any detailed HVACs
136
+ $generators = [] # track the generator objects in the model
136
137
 
137
138
  # create all of the non-geometric model elements
138
139
  if @hash[:properties].key?(:energy)
@@ -217,6 +218,20 @@ module Honeybee
217
218
  create_orphaned_apertures
218
219
  create_orphaned_doors
219
220
  create_shade_meshes
221
+
222
+ unless $generators.empty?
223
+ if log_report
224
+ puts 'Translating Electricity Generators'
225
+ end
226
+ if @hash[:properties][:energy][:electric_load_center]
227
+ load_center_object = ElectricLoadCenter.new(
228
+ @hash[:properties][:energy][:electric_load_center])
229
+ else
230
+ empty_hash = Hash.new
231
+ load_center_object = ElectricLoadCenter.new(empty_hash)
232
+ end
233
+ load_center_object.to_openstudio(@openstudio_model, $generators)
234
+ end
220
235
  end
221
236
 
222
237
  def create_materials(material_dicts, check_existing=false)
data/lib/to_openstudio.rb CHANGED
@@ -96,6 +96,10 @@ require 'to_openstudio/ventcool/opening'
96
96
  require 'to_openstudio/ventcool/simulation'
97
97
  require 'to_openstudio/internalmass'
98
98
 
99
+ # import the generator objects
100
+ require 'to_openstudio/generator/loadcenter'
101
+ require 'to_openstudio/generator/pv'
102
+
99
103
  # extend the simulation objects
100
104
  require 'to_openstudio/simulation/design_day'
101
105
  require 'to_openstudio/simulation/parameter_model'
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.37.0
4
+ version: 2.38.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: 2023-12-05 00:00:00.000000000 Z
14
+ date: 2024-01-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure
@@ -133,6 +133,8 @@ files:
133
133
  - lib/honeybee/construction/windowshade.rb
134
134
  - lib/honeybee/construction_set.rb
135
135
  - lib/honeybee/extension.rb
136
+ - lib/honeybee/generator/loadcenter.rb
137
+ - lib/honeybee/generator/pv.rb
136
138
  - lib/honeybee/geometry/aperture.rb
137
139
  - lib/honeybee/geometry/door.rb
138
140
  - lib/honeybee/geometry/face.rb
@@ -226,6 +228,8 @@ files:
226
228
  - lib/to_openstudio/construction/window.rb
227
229
  - lib/to_openstudio/construction/windowshade.rb
228
230
  - lib/to_openstudio/construction_set.rb
231
+ - lib/to_openstudio/generator/loadcenter.rb
232
+ - lib/to_openstudio/generator/pv.rb
229
233
  - lib/to_openstudio/geometry/aperture.rb
230
234
  - lib/to_openstudio/geometry/door.rb
231
235
  - lib/to_openstudio/geometry/face.rb