openstudio-standards 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/data/standards/OpenStudio_Standards.xlsx +0 -0
- data/data/standards/OpenStudio_Standards_boilers.json +62 -4
- data/data/standards/OpenStudio_Standards_chillers.json +778 -68
- data/data/standards/OpenStudio_Standards_construction_sets.json +52 -93
- data/data/standards/OpenStudio_Standards_curve_biquadratics.json +36 -36
- data/data/standards/OpenStudio_Standards_curve_quadratics.json +3 -3
- data/data/standards/OpenStudio_Standards_heat_pumps.json +840 -0
- data/data/standards/OpenStudio_Standards_heat_pumps_heating.json +352 -0
- data/data/standards/OpenStudio_Standards_heat_rejection.json +48 -0
- data/data/standards/OpenStudio_Standards_motors.json +270 -0
- data/data/standards/OpenStudio_Standards_space_types.json +10390 -2824
- data/data/standards/OpenStudio_Standards_unitary_acs.json +794 -18
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.ddy +538 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Boulder-Broomfield-Jefferson.County.AP.724699_TMY3.stat +493 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.ddy +536 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.epw +8768 -0
- data/data/weather/USA_CO_Fort.Collins.AWOS.724769_TMY3.stat +554 -0
- data/data/weather/envelope_info.csv +6 -0
- data/lib/openstudio-standards.rb +10 -11
- data/lib/openstudio-standards/btap/compliance.rb +251 -969
- data/lib/openstudio-standards/btap/envelope.rb +1 -1
- data/lib/openstudio-standards/btap/fileio.rb +37 -5
- data/lib/openstudio-standards/btap/geometry.rb +27 -17
- data/lib/openstudio-standards/btap/hvac.rb +80 -27
- data/lib/openstudio-standards/hvac_sizing/{HVACSizing.CoilHeatingDXMultiSpeed.rb → Siz.CoilHeatingDXMultiSpeed.rb} +0 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +30 -4
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +61 -5
- data/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +37 -7
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +27 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +55 -0
- data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +51 -9
- data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +99 -17
- data/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +1 -1
- data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +29 -6
- data/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +16 -0
- data/lib/openstudio-standards/prototypes/Prototype.AirTerminalSingleDuctVAVReheat.rb +43 -48
- data/lib/openstudio-standards/prototypes/Prototype.ControllerWaterCoil.rb +5 -9
- data/lib/openstudio-standards/prototypes/Prototype.Fan.rb +68 -0
- data/lib/openstudio-standards/prototypes/Prototype.FanConstantVolume.rb +39 -43
- data/lib/openstudio-standards/prototypes/Prototype.FanOnOff.rb +49 -51
- data/lib/openstudio-standards/prototypes/Prototype.FanVariableVolume.rb +55 -61
- data/lib/openstudio-standards/prototypes/Prototype.FanZoneExhaust.rb +8 -10
- data/lib/openstudio-standards/prototypes/Prototype.HeatExchangerAirToAirSensibleAndLatent.rb +15 -20
- data/lib/openstudio-standards/prototypes/Prototype.Model.hvac.rb +330 -322
- data/lib/openstudio-standards/prototypes/Prototype.Model.rb +501 -446
- data/lib/openstudio-standards/prototypes/Prototype.Model.swh.rb +221 -230
- data/lib/openstudio-standards/prototypes/Prototype.add_objects.rb +0 -2
- data/lib/openstudio-standards/prototypes/Prototype.full_service_restaurant.rb +130 -137
- data/lib/openstudio-standards/prototypes/Prototype.high_rise_apartment.rb +374 -291
- data/lib/openstudio-standards/prototypes/Prototype.hospital.rb +146 -193
- data/lib/openstudio-standards/prototypes/Prototype.hvac_systems.rb +1315 -1113
- data/lib/openstudio-standards/prototypes/Prototype.large_hotel.rb +65 -88
- data/lib/openstudio-standards/prototypes/Prototype.large_office.rb +101 -156
- data/lib/openstudio-standards/prototypes/Prototype.medium_office.rb +46 -96
- data/lib/openstudio-standards/prototypes/Prototype.mid_rise_apartment.rb +113 -123
- data/lib/openstudio-standards/prototypes/Prototype.outpatient.rb +356 -345
- data/lib/openstudio-standards/prototypes/Prototype.primary_school.rb +48 -103
- data/lib/openstudio-standards/prototypes/Prototype.quick_service_restaurant.rb +115 -123
- data/lib/openstudio-standards/prototypes/Prototype.retail_standalone.rb +30 -39
- data/lib/openstudio-standards/prototypes/Prototype.retail_stripmall.rb +32 -45
- data/lib/openstudio-standards/prototypes/Prototype.secondary_school.rb +98 -258
- data/lib/openstudio-standards/prototypes/Prototype.small_hotel.rb +429 -474
- data/lib/openstudio-standards/prototypes/Prototype.small_office.rb +28 -36
- data/lib/openstudio-standards/prototypes/Prototype.strip_model.rb +7 -7
- data/lib/openstudio-standards/prototypes/Prototype.utilities.rb +172 -146
- data/lib/openstudio-standards/prototypes/Prototype.warehouse.rb +46 -53
- data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +885 -707
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +48 -57
- data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +24 -31
- data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +80 -93
- data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +69 -0
- data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +60 -72
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +104 -108
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +190 -198
- data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +134 -146
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +56 -60
- data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +151 -161
- data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +30 -34
- data/lib/openstudio-standards/standards/Standards.Construction.rb +116 -132
- data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +138 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +11 -0
- data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +16 -0
- data/lib/openstudio-standards/standards/Standards.Fan.rb +190 -236
- data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +168 -14
- data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +33 -0
- data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +83 -0
- data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +22 -0
- data/lib/openstudio-standards/standards/Standards.Model.rb +2385 -1622
- data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +83 -35
- data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +805 -395
- data/lib/openstudio-standards/standards/Standards.Pump.rb +139 -119
- data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -2
- data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +16 -15
- data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +35 -0
- data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +7 -13
- data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +144 -59
- data/lib/openstudio-standards/standards/Standards.Space.rb +1509 -1326
- data/lib/openstudio-standards/standards/Standards.SpaceType.rb +254 -262
- data/lib/openstudio-standards/standards/Standards.SubSurface.rb +105 -105
- data/lib/openstudio-standards/standards/Standards.Surface.rb +27 -31
- data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +882 -157
- data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +179 -69
- data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +75 -0
- data/lib/openstudio-standards/utilities/logging.rb +31 -38
- data/lib/openstudio-standards/utilities/simulation.rb +118 -82
- data/lib/openstudio-standards/version.rb +1 -1
- data/lib/openstudio-standards/weather/Weather.Model.rb +382 -390
- data/lib/openstudio-standards/weather/Weather.stat_file.rb +159 -78
- metadata +59 -6
@@ -13,15 +13,71 @@ class OpenStudio::Model::CoolingTowerTwoSpeed
|
|
13
13
|
def applySizingValues
|
14
14
|
|
15
15
|
OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoolingTowerTwoSpeed", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.")
|
16
|
-
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
# returns the autosized design water flow rate as an optional double
|
20
|
+
def autosizedDesignWaterFlowRate
|
21
|
+
|
22
|
+
return self.model.getAutosizedValue(self, 'Design Water Flow Rate', 'm3/s')
|
23
|
+
|
17
24
|
end
|
25
|
+
|
26
|
+
# returns the autosized fan power at high speed as an optional double
|
27
|
+
def autosizedHighFanSpeedFanPower
|
18
28
|
|
19
|
-
|
20
|
-
|
29
|
+
return self.model.getAutosizedValue(self, 'Fan Power at High Fan Speed', 'W')
|
30
|
+
|
31
|
+
end
|
32
|
+
|
33
|
+
# returns the autosized reference design air flow rate as an optional double
|
34
|
+
def autosizedHighFanSpeedAirFlowRate
|
21
35
|
|
22
|
-
|
36
|
+
return self.model.getAutosizedValue(self, 'Air Flow Rate at High Fan Speed', 'm3/s')
|
23
37
|
|
24
|
-
|
38
|
+
end
|
39
|
+
|
40
|
+
# returns the autosized u-factor times area value at high speed as an optional double
|
41
|
+
def autosizedHighFanSpeedUFactorTimesAreaValue
|
42
|
+
|
43
|
+
return self.model.getAutosizedValue(self, 'U-Factor Times Area Value at High Fan Speed', 'W/C')
|
44
|
+
|
45
|
+
end
|
25
46
|
|
47
|
+
# returns the autosized reference low speed air flow rate as an optional double
|
48
|
+
def autosizedLowFanSpeedAirFlowRate
|
49
|
+
|
50
|
+
return self.model.getAutosizedValue(self, 'Low Fan Speed Air Flow Rate', 'm3/s')
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
# returns the autosized fan power at low speed as an optional double
|
55
|
+
def autosizedLowFanSpeedFanPower
|
56
|
+
|
57
|
+
return self.model.getAutosizedValue(self, 'Fan Power at Low Fan Speed', 'W')
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
# returns the autosized u-factor times area value at design air flow rate as an optional double
|
62
|
+
def autosizedLowFanSpeedUFactorTimesAreaValue
|
63
|
+
|
64
|
+
return self.model.getAutosizedValue(self, 'U-Factor Times Area Value at Low Fan Speed', 'W/K')
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
# returns the autosized air flow rate in free convection regime as an optional double
|
69
|
+
def autosizedFreeConvectionRegimeAirFlowRate
|
70
|
+
|
71
|
+
return self.model.getAutosizedValue(self, 'Free Convection Regime Air Flow Rate', 'm3/s')
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
# returns the autosized u-factor times area value in free convection as an optional double
|
76
|
+
def autosizedFreeConvectionRegimeUFactorTimesAreaValue
|
77
|
+
|
78
|
+
return self.model.getAutosizedValue(self, 'Free Convection U-Factor Times Area Value', 'W/K')
|
79
|
+
|
80
|
+
end
|
81
|
+
|
26
82
|
|
27
83
|
end
|
@@ -4,7 +4,11 @@ class OpenStudio::Model::CoolingTowerVariableSpeed
|
|
4
4
|
|
5
5
|
# Sets all auto-sizeable fields to autosize
|
6
6
|
def autosize
|
7
|
-
|
7
|
+
|
8
|
+
self.autosizeDesignWaterFlowRate
|
9
|
+
self.autosizeDesignAirFlowRate
|
10
|
+
self.autosizeDesignFanPower
|
11
|
+
|
8
12
|
end
|
9
13
|
|
10
14
|
# Takes the values calculated by the EnergyPlus sizing routines
|
@@ -12,16 +16,42 @@ class OpenStudio::Model::CoolingTowerVariableSpeed
|
|
12
16
|
# Must have previously completed a run with sql output for this to work.
|
13
17
|
def applySizingValues
|
14
18
|
|
15
|
-
|
16
|
-
|
19
|
+
rated_water_flow_rate = self.autosizedDesignWaterFlowRate
|
20
|
+
if rated_water_flow_rate.is_initialized
|
21
|
+
self.setDesignWaterFlowRate(rated_water_flow_rate.get)
|
22
|
+
end
|
23
|
+
|
24
|
+
rated_air_flow_rate = self.autosizedDesignAirFlowRate
|
25
|
+
if rated_air_flow_rate.is_initialized
|
26
|
+
self.setDesignAirFlowRate(rated_air_flow_rate.get)
|
27
|
+
end
|
28
|
+
|
29
|
+
rated_fan_power = self.autosizedDesignFanPower
|
30
|
+
if rated_fan_power.is_initialized
|
31
|
+
self.setDesignFanPower(rated_fan_power.get)
|
32
|
+
end
|
33
|
+
|
17
34
|
end
|
18
35
|
|
19
|
-
# returns the autosized design
|
20
|
-
|
36
|
+
# returns the autosized design water flow rate as an optional double
|
37
|
+
def autosizedDesignWaterFlowRate
|
21
38
|
|
22
|
-
|
39
|
+
return self.model.getAutosizedValue(self, 'Design Water Flow Rate', 'm3/s')
|
23
40
|
|
24
|
-
|
41
|
+
end
|
42
|
+
|
43
|
+
# returns the autosized air flow rate as an optional double
|
44
|
+
def autosizedDesignAirFlowRate
|
45
|
+
|
46
|
+
return self.model.getAutosizedValue(self, 'Design Air Flow Rate', 'm3/s')
|
47
|
+
|
48
|
+
end
|
25
49
|
|
50
|
+
# returns the autosized design fan power as an optional double
|
51
|
+
def autosizedDesignFanPower
|
52
|
+
|
53
|
+
return self.model.getAutosizedValue(self, 'Fan Power at Design Air Flow Rate', 'W')
|
54
|
+
|
55
|
+
end
|
26
56
|
|
27
57
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
# open the class to add methods to return sizing values
|
3
|
+
class OpenStudio::Model::DistrictCooling
|
4
|
+
|
5
|
+
# Sets all auto-sizeable fields to autosize
|
6
|
+
def autosize
|
7
|
+
self.autosizeNominalCapacity
|
8
|
+
end
|
9
|
+
|
10
|
+
# Takes the values calculated by the EnergyPlus sizing routines
|
11
|
+
# and puts them into this object model in place of the autosized fields.
|
12
|
+
# Must have previously completed a run with sql output for this to work.
|
13
|
+
def applySizingValues
|
14
|
+
|
15
|
+
nominal_capacity = self.autosizedMaximumFlowRate
|
16
|
+
if nominal_capacity.is_initialized
|
17
|
+
self.setMaximumFlowRate(nominal_capacity.get)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
# returns the autosized maximum flow rate as an optional double
|
23
|
+
def autosizedNominalCapacity
|
24
|
+
return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W')
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
# open the class to add methods to return sizing values
|
3
|
+
class OpenStudio::Model::DistrictHeating
|
4
|
+
|
5
|
+
# Sets all auto-sizeable fields to autosize
|
6
|
+
def autosize
|
7
|
+
self.autosizeNominalCapacity
|
8
|
+
end
|
9
|
+
|
10
|
+
# Takes the values calculated by the EnergyPlus sizing routines
|
11
|
+
# and puts them into this object model in place of the autosized fields.
|
12
|
+
# Must have previously completed a run with sql output for this to work.
|
13
|
+
def applySizingValues
|
14
|
+
|
15
|
+
nominal_capacity = self.autosizedMaximumFlowRate
|
16
|
+
if nominal_capacity.is_initialized
|
17
|
+
self.setMaximumFlowRate(nominal_capacity.get)
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
# returns the autosized maximum flow rate as an optional double
|
23
|
+
def autosizedNominalCapacity
|
24
|
+
return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W')
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
# open the class to add methods to return sizing values
|
3
|
+
class OpenStudio::Model::HeaderedPumpsConstantSpeed
|
4
|
+
|
5
|
+
# Sets all auto-sizeable fields to autosize
|
6
|
+
def autosize
|
7
|
+
self.autosizeTotalRatedFlowRate
|
8
|
+
self.autosizeRatedPowerConsumption
|
9
|
+
end
|
10
|
+
|
11
|
+
# Takes the values calculated by the EnergyPlus sizing routines
|
12
|
+
# and puts them into this object model in place of the autosized fields.
|
13
|
+
# Must have previously completed a run with sql output for this to work.
|
14
|
+
def applySizingValues
|
15
|
+
|
16
|
+
rated_flow_rate = self.autosizedTotalRatedFlowRate
|
17
|
+
if rated_flow_rate.is_initialized
|
18
|
+
self.setTotalRatedFlowRate(rated_flow_rate.get)
|
19
|
+
end
|
20
|
+
|
21
|
+
rated_power_consumption = self.autosizedRatedPowerConsumption
|
22
|
+
if rated_power_consumption.is_initialized
|
23
|
+
self.setRatedPowerConsumption(rated_power_consumption.get)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
# returns the autosized rated flow rate as an optional double
|
29
|
+
def autosizedTotalRatedFlowRate
|
30
|
+
|
31
|
+
# In E+ 8.5, (OS 1.10.5 onward) the column name changed
|
32
|
+
col_name = nil
|
33
|
+
if self.model.version < OpenStudio::VersionString.new('1.10.5')
|
34
|
+
col_name = 'Rated Flow Rate'
|
35
|
+
else
|
36
|
+
col_name = 'Design Flow Rate'
|
37
|
+
end
|
38
|
+
|
39
|
+
return self.model.getAutosizedValue(self, col_name, 'm3/s')
|
40
|
+
end
|
41
|
+
|
42
|
+
# returns the autosized rated power consumption as an optional double
|
43
|
+
def autosizedRatedPowerConsumption
|
44
|
+
|
45
|
+
# In E+ 8.5, (OS 1.10.5 onward) the column name changed
|
46
|
+
col_name = nil
|
47
|
+
if self.model.version < OpenStudio::VersionString.new('1.10.5')
|
48
|
+
col_name = 'Rated Power Consumption'
|
49
|
+
else
|
50
|
+
col_name = 'Design Power Consumption'
|
51
|
+
end
|
52
|
+
|
53
|
+
return self.model.getAutosizedValue(self, col_name, 'W')
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
# open the class to add methods to return sizing values
|
3
|
+
class OpenStudio::Model::HeaderedPumpsVariableSpeed
|
4
|
+
|
5
|
+
# Sets all auto-sizeable fields to autosize
|
6
|
+
def autosize
|
7
|
+
self.autosizeTotalRatedFlowRate
|
8
|
+
self.autosizeRatedPowerConsumption
|
9
|
+
end
|
10
|
+
|
11
|
+
# Takes the values calculated by the EnergyPlus sizing routines
|
12
|
+
# and puts them into this object model in place of the autosized fields.
|
13
|
+
# Must have previously completed a run with sql output for this to work.
|
14
|
+
def applySizingValues
|
15
|
+
|
16
|
+
rated_flow_rate = self.autosizedTotalRatedFlowRate
|
17
|
+
if rated_flow_rate.is_initialized
|
18
|
+
self.setTotalRatedFlowRate(rated_flow_rate.get)
|
19
|
+
end
|
20
|
+
|
21
|
+
rated_power_consumption = self.autosizedRatedPowerConsumption
|
22
|
+
if rated_power_consumption.is_initialized
|
23
|
+
self.setRatedPowerConsumption(rated_power_consumption.get)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
# returns the autosized rated flow rate as an optional double
|
29
|
+
def autosizedTotalRatedFlowRate
|
30
|
+
|
31
|
+
# In E+ 8.5, (OS 1.10.5 onward) the column name changed
|
32
|
+
col_name = nil
|
33
|
+
if self.model.version < OpenStudio::VersionString.new('1.10.5')
|
34
|
+
col_name = 'Rated Flow Rate'
|
35
|
+
else
|
36
|
+
col_name = 'Design Flow Rate'
|
37
|
+
end
|
38
|
+
|
39
|
+
return self.model.getAutosizedValue(self, col_name, 'm3/s')
|
40
|
+
end
|
41
|
+
|
42
|
+
# returns the autosized rated power consumption as an optional double
|
43
|
+
def autosizedRatedPowerConsumption
|
44
|
+
|
45
|
+
# In E+ 8.5, (OS 1.10.5 onward) the column name changed
|
46
|
+
col_name = nil
|
47
|
+
if self.model.version < OpenStudio::VersionString.new('1.10.5')
|
48
|
+
col_name = 'Rated Power Consumption'
|
49
|
+
else
|
50
|
+
col_name = 'Design Power Consumption'
|
51
|
+
end
|
52
|
+
|
53
|
+
return self.model.getAutosizedValue(self, col_name, 'W')
|
54
|
+
end
|
55
|
+
end
|
@@ -11,6 +11,8 @@
|
|
11
11
|
class OpenStudio::Model::Model
|
12
12
|
|
13
13
|
# Get the heating fuel type of a plant loop
|
14
|
+
# @Todo: If no heating equipment is found, check if there's a heat exchanger,
|
15
|
+
# or a WaterHeater:Mixed or stratified that is connected to a heating source on the demand side
|
14
16
|
def plant_loop_heating_fuels(plant_loop)
|
15
17
|
fuels = []
|
16
18
|
# Get the heating fuels for all supply components
|
@@ -25,7 +27,7 @@ class OpenStudio::Model::Model
|
|
25
27
|
when 'OS_Boiler_Steam'
|
26
28
|
component = component.to_BoilerHotWater.get
|
27
29
|
fuels << component.fuelType
|
28
|
-
when '
|
30
|
+
when 'OS_DistrictHeating'
|
29
31
|
fuels << 'DistrictHeating'
|
30
32
|
when 'OS_HeatPump_WaterToWater_EquationFit_Heating'
|
31
33
|
fuels << 'Electricity'
|
@@ -38,9 +40,37 @@ class OpenStudio::Model::Model
|
|
38
40
|
when 'OS_WaterHeater_HeatPump'
|
39
41
|
fuels << 'Electricity'
|
40
42
|
when 'OS_WaterHeater_Mixed'
|
41
|
-
|
43
|
+
component = component.to_WaterHeaterMixed.get
|
44
|
+
|
45
|
+
# Check if the heater actually has a capacity (otherwise it's simply a Storage Tank)
|
46
|
+
if component.heaterMaximumCapacity.empty? || component.heaterMaximumCapacity.get != 0
|
47
|
+
# If it does, we add the heater Fuel Type
|
48
|
+
fuels << component.heaterFuelType
|
49
|
+
end # @Todo: not sure about whether it should be an elsif or not
|
50
|
+
# Check the plant loop connection on the source side
|
51
|
+
if component.secondaryPlantLoop.is_initialized
|
52
|
+
fuels += self.plant_loop_heating_fuels(component.secondaryPlantLoop.get)
|
53
|
+
end
|
42
54
|
when 'OS_WaterHeater_Stratified'
|
43
|
-
|
55
|
+
component = component.to_WaterHeaterStratified.get
|
56
|
+
|
57
|
+
# Check if the heater actually has a capacity (otherwise it's simply a Storage Tank)
|
58
|
+
if component.heaterMaximumCapacity.empty? || component.heaterMaximumCapacity.get != 0
|
59
|
+
# If it does, we add the heater Fuel Type
|
60
|
+
fuels << component.heaterFuelType
|
61
|
+
end # @Todo: not sure about whether it should be an elsif or not
|
62
|
+
# Check the plant loop connection on the source side
|
63
|
+
if component.secondaryPlantLoop.is_initialized
|
64
|
+
fuels += self.plant_loop_heating_fuels(component.secondaryPlantLoop.get)
|
65
|
+
end
|
66
|
+
|
67
|
+
when 'OS_HeatExchanger_FluidToFluid'
|
68
|
+
hx = component.to_HeatExchangerFluidToFluid.get
|
69
|
+
cooling_hx_control_types = ["CoolingSetpointModulated", "CoolingSetpointOnOff", "CoolingDifferentialOnOff", "CoolingSetpointOnOffWithComponentOverride"]
|
70
|
+
cooling_hx_control_types.each {|x| x.downcase!}
|
71
|
+
if !cooling_hx_control_types.include?(hx.controlType.downcase) && hx.secondaryPlantLoop.is_initialized
|
72
|
+
fuels += self.plant_loop_heating_fuels(hx.secondaryPlantLoop.get)
|
73
|
+
end
|
44
74
|
when 'OS_Node', 'OS_Pump_ConstantSpeed', 'OS_Pump_VariableSpeed', 'OS_Connector_Splitter', 'OS_Connector_Mixer', 'OS_Pipe_Adiabatic'
|
45
75
|
# To avoid extraneous debug messages
|
46
76
|
else
|
@@ -127,13 +157,21 @@ class OpenStudio::Model::Model
|
|
127
157
|
end
|
128
158
|
when 'OS_Coil_Heating_Water_BaseboardRadiant'
|
129
159
|
heating_coil = heating_coil.to_CoilHeatingWaterBaseboardRadiant.get
|
130
|
-
|
160
|
+
if heating_coil.plantLoop.is_initialized
|
131
161
|
fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
|
132
162
|
end
|
133
163
|
when 'OS_Coil_Heating_WaterToAirHeatPump_EquationFit'
|
134
164
|
fuels << 'Electricity'
|
165
|
+
heating_coil = heating_coil.to_CoilHeatingWaterToAirHeatPumpEquationFit.get
|
166
|
+
if heating_coil.plantLoop.is_initialized
|
167
|
+
fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
|
168
|
+
end
|
135
169
|
when 'OS_Coil_Heating_WaterToAirHeatPump_VariableSpeedEquationFit'
|
136
170
|
fuels << 'Electricity'
|
171
|
+
heating_coil = heating_coil.to_CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.get
|
172
|
+
if heating_coil.plantLoop.is_initialized
|
173
|
+
fuels += self.plant_loop_heating_fuels(heating_coil.plantLoop.get)
|
174
|
+
end
|
137
175
|
when 'OS_Coil_WaterHeating_AirToWaterHeatPump'
|
138
176
|
fuels << 'Electricity'
|
139
177
|
when 'OS_Coil_WaterHeating_Desuperheater'
|
@@ -269,14 +307,15 @@ class OpenStudio::Model::Model
|
|
269
307
|
fuels << 'Electricity'
|
270
308
|
when 'OS_ZoneHVAC_PackagedTerminalAirConditioner'
|
271
309
|
equipment = equipment.to_ZoneHVACPackagedTerminalAirConditioner.get
|
272
|
-
fuel_coil = self.coil_heating_fuels(equipment.heatingCoil)
|
273
310
|
fuels += self.coil_heating_fuels(equipment.heatingCoil)
|
274
311
|
when 'OS_ZoneHVAC_PackagedTerminalHeatPump'
|
275
312
|
fuels << 'Electricity'
|
276
313
|
when 'OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlow'
|
277
314
|
fuels << 'Electricity'
|
278
315
|
when 'OS_ZoneHVAC_WaterToAirHeatPump'
|
279
|
-
|
316
|
+
# We also go check what fuel serves the loop on which the WSHP heating coil is
|
317
|
+
equipment = equipment.to_ZoneHVACWaterToAirHeatPump.get
|
318
|
+
fuels += self.coil_heating_fuels(equipment.heatingCoil)
|
280
319
|
else
|
281
320
|
#OpenStudio::logFree(OpenStudio::Debug, 'openstudio.sizing.Model', "No heating fuel types found for #{obj_type}")
|
282
321
|
end
|
@@ -294,14 +333,17 @@ class OpenStudio::Model::Model
|
|
294
333
|
# Get the object type
|
295
334
|
obj_type = equipment.iddObjectType.valueName.to_s
|
296
335
|
case obj_type
|
297
|
-
when '
|
336
|
+
when 'OS_AirTerminal_SingleDuct_ConstantVolume_CooledBeam'
|
298
337
|
equipment = equipment.to_AirTerminalSingleDuctConstantVolumeCooledBeam.get
|
299
338
|
fuels += self.coil_cooling_fuels(equipment.coilCoolingCooledBeam)
|
300
|
-
when '
|
339
|
+
when 'OS_AirTerminal_SingleDuct_ConstantVolume_FourPipeInduction'
|
301
340
|
equipment = equipment.to_AirTerminalSingleDuctConstantVolumeFourPipeInduction.get
|
302
341
|
if equipment.coolingCoil.is_initialized
|
303
|
-
fuels += self.
|
342
|
+
fuels += self.coil_cooling_fuels(equipment.coolingCoil.get)
|
304
343
|
end
|
344
|
+
when 'OS_ZoneHVAC_FourPipeFanCoil'
|
345
|
+
equipment = equipment.to_ZoneHVACFourPipeFanCoil.get
|
346
|
+
fuels += self.coil_cooling_fuels(equipment.coolingCoil)
|
305
347
|
when 'OS_Refrigeration_AirChiller'
|
306
348
|
fuels << 'Electricity'
|
307
349
|
when 'OS_ZoneHVAC_IdealLoadsAirSystem'
|
@@ -24,12 +24,15 @@ class OpenStudio::Model::Model
|
|
24
24
|
require_relative 'Siz.CoilHeatingGas'
|
25
25
|
require_relative 'Siz.CoilHeatingWater'
|
26
26
|
require_relative 'Siz.CoilHeatingDXSingleSpeed'
|
27
|
+
require_relative 'Siz.CoilHeatingDXMultiSpeed'
|
27
28
|
require_relative 'Siz.CoilHeatingWaterToAirHeatPumpEquationFit'
|
28
29
|
require_relative 'Siz.CoilCoolingWaterToAirHeatPumpEquationFit'
|
29
30
|
require_relative 'Siz.CoilCoolingDXSingleSpeed'
|
30
31
|
require_relative 'Siz.CoilCoolingDXTwoSpeed'
|
31
32
|
require_relative 'Siz.CoilCoolingWater'
|
32
33
|
require_relative 'Siz.ControllerOutdoorAir'
|
34
|
+
require_relative 'Siz.DistrictHeating'
|
35
|
+
require_relative 'Siz.DistrictCooling'
|
33
36
|
require_relative 'Siz.HeatExchangerAirToAirSensibleAndLatent'
|
34
37
|
require_relative 'Siz.PlantLoop'
|
35
38
|
require_relative 'Siz.PumpConstantSpeed'
|
@@ -37,26 +40,19 @@ class OpenStudio::Model::Model
|
|
37
40
|
require_relative 'Siz.BoilerHotWater'
|
38
41
|
require_relative 'Siz.ChillerElectricEIR'
|
39
42
|
require_relative 'Siz.CoolingTowerSingleSpeed'
|
43
|
+
require_relative 'Siz.CoolingTowerTwoSpeed'
|
44
|
+
require_relative 'Siz.CoolingTowerVariableSpeed'
|
40
45
|
require_relative 'Siz.ControllerWaterCoil'
|
41
46
|
require_relative 'Siz.SizingSystem'
|
42
47
|
require_relative 'Siz.ThermalZone'
|
43
|
-
|
44
|
-
# Recently added and not fully tested
|
45
48
|
require_relative 'Siz.ZoneHVACPackagedTerminalAirConditioner'
|
46
49
|
require_relative 'Siz.ZoneHVACPackagedTerminalHeatPump'
|
47
50
|
require_relative 'Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow'
|
48
51
|
require_relative 'Siz.AirConditionerVariableRefrigerantFlow'
|
49
52
|
require_relative 'Siz.CoilCoolingDXVariableRefrigerantFlow'
|
50
53
|
require_relative 'Siz.CoilHeatingDXVariableRefrigerantFlow'
|
51
|
-
|
52
|
-
|
53
|
-
require_relative 'Siz.AirTermSnglDuctVAVReheat'
|
54
|
-
require_relative 'Siz.AirTermSnglDuctUncontrolled'
|
55
|
-
require_relative 'Siz.AirLoopHVAC'
|
56
|
-
require_relative 'Siz.AirLoopHVACUnitaryHeatPumpAirToAir'
|
57
|
-
require_relative 'Siz.FanConstantVolume'
|
58
|
-
require_relative 'Siz.FanVariableVolume'
|
59
|
-
require_relative 'Siz.FanOnOff'
|
54
|
+
require_relative 'Siz.HeaderedPumpsConstantSpeed'
|
55
|
+
require_relative 'Siz.HeaderedPumpsVariableSpeed'
|
60
56
|
|
61
57
|
# Heating and cooling fuel methods
|
62
58
|
require_relative 'Siz.HeatingCoolingFuels'
|
@@ -65,21 +61,107 @@ class OpenStudio::Model::Model
|
|
65
61
|
# autosizing back into the self.
|
66
62
|
def runSizingRun(sizing_run_dir = "#{Dir.pwd}/SizingRun")
|
67
63
|
|
64
|
+
|
68
65
|
# Change the simulation to only run the sizing days
|
69
66
|
sim_control = self.getSimulationControl
|
70
67
|
sim_control.setRunSimulationforSizingPeriods(true)
|
71
68
|
sim_control.setRunSimulationforWeatherFileRunPeriods(false)
|
72
|
-
|
69
|
+
|
70
|
+
#check that all zones have surfaces.
|
71
|
+
raise ("Error: Sizing Run Failed. Thermal Zones with no surfaces exist.") unless self.do_all_zones_have_surfaces?
|
73
72
|
# Run the sizing run
|
74
|
-
self.run_simulation_and_log_errors(sizing_run_dir)
|
73
|
+
success = self.run_simulation_and_log_errors(sizing_run_dir)
|
75
74
|
|
76
75
|
# Change the model back to running the weather file
|
77
76
|
sim_control.setRunSimulationforSizingPeriods(false)
|
78
77
|
sim_control.setRunSimulationforWeatherFileRunPeriods(true)
|
79
78
|
|
80
|
-
return
|
79
|
+
return success
|
81
80
|
|
82
81
|
end
|
82
|
+
|
83
|
+
#Method to check if all zones have surfaces. This is required to run a simulation.
|
84
|
+
def do_all_zones_have_surfaces?()
|
85
|
+
error_string = ""
|
86
|
+
error = false
|
87
|
+
#Check to see if all zones have surfaces.
|
88
|
+
self.getThermalZones.each do |zone|
|
89
|
+
if 0 == BTAP::Geometry::Surfaces::get_surfaces_from_thermal_zones([zone]).size
|
90
|
+
error_string << "Error: Thermal zone #{zone.name} does not contain surfaces.\n"
|
91
|
+
error = true
|
92
|
+
end
|
93
|
+
if error == true
|
94
|
+
puts error_string
|
95
|
+
OpenStudio::logFree(OpenStudio::Error, 'openstudio.Siz.Model', error_string)
|
96
|
+
return false
|
97
|
+
else
|
98
|
+
return true
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# A helper method to run a sizing run and pull any values calculated during
|
104
|
+
# autosizing back into the self.
|
105
|
+
def runSpaceSizingRun(sizing_run_dir = "#{Dir.pwd}/SpaceSizingRun")
|
106
|
+
puts "*************Runing sizing space Run ***************************"
|
107
|
+
#Make copy of model
|
108
|
+
model = BTAP::FileIO::deep_copy(self, true)
|
109
|
+
space_load_array = []
|
110
|
+
|
111
|
+
#Make sure the model is good to run.
|
112
|
+
#1. Ensure External surfaces are set to a construction
|
113
|
+
ext_surfaces = BTAP::Geometry::Surfaces::filter_by_boundary_condition(model.getSurfaces, ["Outdoors",
|
114
|
+
"Ground",
|
115
|
+
"GroundFCfactorMethod",
|
116
|
+
"GroundSlabPreprocessorAverage",
|
117
|
+
"GroundSlabPreprocessorCore",
|
118
|
+
"GroundSlabPreprocessorPerimeter",
|
119
|
+
"GroundBasementPreprocessorAverageWall",
|
120
|
+
"GroundBasementPreprocessorAverageFloor",
|
121
|
+
"GroundBasementPreprocessorUpperWall",
|
122
|
+
"GroundBasementPreprocessorLowerWall"])
|
123
|
+
fail = false
|
124
|
+
ext_surfaces.each do |surface|
|
125
|
+
if surface.construction.nil?
|
126
|
+
OpenStudio::logFree(OpenStudio::Error,'openstudio.model.Model', "Ext Surface #{surface.name} does not have a construction.Cannot perform sizing.")
|
127
|
+
fail = true
|
128
|
+
end
|
129
|
+
end
|
130
|
+
puts "#{ext_surfaces.size} External Surfaces counted."
|
131
|
+
raise ("Can't run sizing since envelope is not set.") if fail == true
|
132
|
+
|
133
|
+
#remove any thermal zones.
|
134
|
+
model.getThermalZones.each {|zone| zone.remove}
|
135
|
+
|
136
|
+
#assign a zone to each space.
|
137
|
+
# Create a thermal zone for each space in the self
|
138
|
+
model.getSpaces.each do |space|
|
139
|
+
zone = OpenStudio::Model::ThermalZone.new(self)
|
140
|
+
zone.setName("#{space.name} ZN")
|
141
|
+
space.setThermalZone(zone)
|
142
|
+
end
|
143
|
+
# Add a thermostat
|
144
|
+
BTAP::Compliance::NECB2011::set_zones_thermostat_schedule_based_on_space_type_schedules(model)
|
145
|
+
OpenStudio::logFree(OpenStudio::Info, 'openstudio.model.Model', 'Finished creating thermal zones')
|
146
|
+
# Add ideal loads to every zone/space and run
|
147
|
+
# a sizing run to determine heating/cooling loads,
|
148
|
+
# which will impact HVAC systems.
|
149
|
+
model.getThermalZones.each do |zone|
|
150
|
+
ideal_loads = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(model)
|
151
|
+
ideal_loads.addToThermalZone(zone)
|
152
|
+
end
|
153
|
+
self.runSizingRun(sizing_run_dir)
|
154
|
+
model.getSpaces.each do |space|
|
155
|
+
if not space.thermalZone.empty?
|
156
|
+
space_load_array << {"space_name"=> space.name, "CoolingDesignLoad" => space.thermalZone.get.coolingDesignLoad, "HeatingDesignLoad" => space.thermalZone.get.heatingDesignLoad }
|
157
|
+
end
|
158
|
+
end
|
159
|
+
puts space_load_array
|
160
|
+
puts "*************Done Runing sizing space Run ***************************"
|
161
|
+
return model
|
162
|
+
end
|
163
|
+
|
164
|
+
|
83
165
|
|
84
166
|
# Takes the values calculated by the EnergyPlus sizing routines
|
85
167
|
# and puts them into all objects model in place of the autosized fields.
|
@@ -302,13 +384,13 @@ class OpenStudio::Model::Model
|
|
302
384
|
name = object.name.get.upcase
|
303
385
|
|
304
386
|
object_type = object.iddObject.type.valueDescription.gsub('OS:','')
|
305
|
-
if(object_type == 'Coil:Heating:Gas:MultiStage') then object_type = 'Coil:Heating:GasMultiStage' end
|
306
387
|
|
307
388
|
# Special logic for two coil types which are inconsistently
|
308
389
|
# uppercase in the sqlfile:
|
309
390
|
object_type = object_type.upcase if object_type == 'Coil:Cooling:WaterToAirHeatPump:EquationFit'
|
310
391
|
object_type = object_type.upcase if object_type == 'Coil:Heating:WaterToAirHeatPump:EquationFit'
|
311
|
-
|
392
|
+
object_type = 'Coil:Heating:GasMultiStage' if object_type == 'Coil:Heating:Gas:MultiStage'
|
393
|
+
|
312
394
|
sql = self.sqlFile
|
313
395
|
|
314
396
|
if sql.is_initialized
|
@@ -426,7 +508,7 @@ class OpenStudio::Model::Model
|
|
426
508
|
end
|
427
509
|
|
428
510
|
# If a csv path is given, output
|
429
|
-
if !csv_path.nil?
|
511
|
+
if !csv_path.nil? && !table.first.nil?
|
430
512
|
CSV.open(csv_path, "wb") do |csv|
|
431
513
|
csv << table.first.keys # adds the attributes name on the first line
|
432
514
|
table.each do |hash|
|