openstudio-ee 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +7 -0
- data/Rakefile +0 -2
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.rb +1 -1
- data/lib/measures/GLHEProExportLoadsforGroundHeatExchangerSizing/measure.xml +3 -4
- data/lib/measures/nze_hvac/measure.rb +8 -6
- data/lib/measures/nze_hvac/measure.xml +9 -9
- data/lib/openstudio/ee_measures/version.rb +1 -1
- data/openstudio-ee.gemspec +6 -8
- metadata +11 -50
- data/lib/measures/ImproveFanTotalEfficiencybyPercentage/measure.rb +0 -333
- data/lib/measures/ImproveFanTotalEfficiencybyPercentage/measure.xml +0 -150
- data/lib/measures/ReplaceFanTotalEfficiency/measure.rb +0 -330
- data/lib/measures/ReplaceFanTotalEfficiency/measure.xml +0 -150
- data/lib/measures/add_apszhp_to_each_zone/measure.rb +0 -607
- data/lib/measures/add_apszhp_to_each_zone/measure.xml +0 -184
- data/lib/measures/add_energy_recovery_ventilator/measure.rb +0 -354
- data/lib/measures/add_energy_recovery_ventilator/measure.xml +0 -78
- data/lib/measures/improve_simple_glazing_by_percentage/measure.rb +0 -81
- data/lib/measures/improve_simple_glazing_by_percentage/measure.xml +0 -70
- data/lib/measures/reduce_water_use_by_percentage/measure.rb +0 -61
- data/lib/measures/reduce_water_use_by_percentage/measure.xml +0 -62
- data/lib/measures/replace_hvac_with_gshp_and_doas/measure.rb +0 -511
- data/lib/measures/replace_hvac_with_gshp_and_doas/measure.xml +0 -375
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_AedgMeasures.rb +0 -454
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_Constructions.rb +0 -221
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_Geometry.rb +0 -41
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_HVAC.rb +0 -1682
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_HelperMethods.rb +0 -114
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_LightingAndEquipment.rb +0 -99
- data/lib/measures/replace_hvac_with_gshp_and_doas/resources/OsLib_Schedules.rb +0 -142
- data/lib/measures/replace_simple_glazing/measure.rb +0 -86
- data/lib/measures/replace_simple_glazing/measure.xml +0 -78
- data/lib/measures/set_boiler_thermal_efficiency/measure.rb +0 -520
- data/lib/measures/set_boiler_thermal_efficiency/measure.xml +0 -78
- data/lib/measures/set_water_heater_efficiency_heat_lossand_peak_water_flow_rate/measure.rb +0 -207
- data/lib/measures/set_water_heater_efficiency_heat_lossand_peak_water_flow_rate/measure.xml +0 -78
- data/lib/measures/tenant_star_internal_loads/measure.rb +0 -134
- data/lib/measures/tenant_star_internal_loads/measure.xml +0 -67
- data/lib/measures/tenant_star_internal_loads/resources/os_lib_helper_methods.rb +0 -401
- data/lib/measures/vr_fwith_doas/measure.rb +0 -468
- data/lib/measures/vr_fwith_doas/measure.xml +0 -298
- data/lib/measures/vr_fwith_doas/resources/OsLib_AedgMeasures.rb +0 -454
- data/lib/measures/vr_fwith_doas/resources/OsLib_Constructions.rb +0 -221
- data/lib/measures/vr_fwith_doas/resources/OsLib_Geometry.rb +0 -41
- data/lib/measures/vr_fwith_doas/resources/OsLib_HVAC.rb +0 -1516
- data/lib/measures/vr_fwith_doas/resources/OsLib_HelperMethods.rb +0 -114
- data/lib/measures/vr_fwith_doas/resources/OsLib_LightingAndEquipment.rb +0 -99
- data/lib/measures/vr_fwith_doas/resources/OsLib_Schedules.rb +0 -142
@@ -1,78 +0,0 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>add_energy_recovery_ventilator</name>
|
4
|
-
<uid>ae413c5f-b035-4019-bdd0-4c69b85dad98</uid>
|
5
|
-
<version_id>e5715d12-8fbf-4381-a758-4b94cb9a0193</version_id>
|
6
|
-
<version_modified>20180213T001950Z</version_modified>
|
7
|
-
<xml_checksum>5E682A03</xml_checksum>
|
8
|
-
<class_name>AddEnergyRecoveryVentilator</class_name>
|
9
|
-
<display_name>AddEnergyRecoveryVentilator</display_name>
|
10
|
-
<description>Energy recovery ventilator transfers energy between the exhaust/relief and outdoor air streams and helps reduce building energy use. The measure adds an air-to-air heat exchanger to the air handler unit. Users can define the latent and sensible heat transfer effectiveness. </description>
|
11
|
-
<modeler_description>The measure loops through all air loops in the baseline model and identify the air loops that contain OS:AirLoopHVAC:OutdoorAirSystem objects. Users can choose one or all air loops from the drop down list to apply this measure. If an OS:HeatExchanger:AirToAir:SensibleAndLatent object is found in the selected air loop, the measure modifies the effectiveness, heat exchanger type, and electric power setting in the model based on user inputs. If no OS:HeatExchanger:AirToAir:SensibleAndLatent object is found in the selected air loop, the measure will attach a OS:HeatExchanger:AirToAir:SensibleAndLatent object to the air loop. The economizer lockout is always set to be Yes. The initial and final values of effectiveness, the heat exchanger type, and nominal electric power are reported during simulation</modeler_description>
|
12
|
-
<arguments>
|
13
|
-
<argument>
|
14
|
-
<name>info_widget</name>
|
15
|
-
<display_name>!!!!*** This Measure is not Applicable to loaded Model. Read the description and choose an appropriate baseline model. ***!!!!</display_name>
|
16
|
-
<type>Boolean</type>
|
17
|
-
<required>true</required>
|
18
|
-
<model_dependent>false</model_dependent>
|
19
|
-
<default_value>true</default_value>
|
20
|
-
<choices>
|
21
|
-
<choice>
|
22
|
-
<value>true</value>
|
23
|
-
<display_name>true</display_name>
|
24
|
-
</choice>
|
25
|
-
<choice>
|
26
|
-
<value>false</value>
|
27
|
-
<display_name>false</display_name>
|
28
|
-
</choice>
|
29
|
-
</choices>
|
30
|
-
</argument>
|
31
|
-
</arguments>
|
32
|
-
<outputs/>
|
33
|
-
<provenances/>
|
34
|
-
<tags>
|
35
|
-
<tag>HVAC.Energy Recovery</tag>
|
36
|
-
</tags>
|
37
|
-
<attributes>
|
38
|
-
<attribute>
|
39
|
-
<name>Measure Function</name>
|
40
|
-
<value>Measure</value>
|
41
|
-
<datatype>string</datatype>
|
42
|
-
</attribute>
|
43
|
-
<attribute>
|
44
|
-
<name>Requires EnergyPlus Results</name>
|
45
|
-
<value>false</value>
|
46
|
-
<datatype>boolean</datatype>
|
47
|
-
</attribute>
|
48
|
-
<attribute>
|
49
|
-
<name>Uses SketchUp API</name>
|
50
|
-
<value>false</value>
|
51
|
-
<datatype>boolean</datatype>
|
52
|
-
</attribute>
|
53
|
-
<attribute>
|
54
|
-
<name>Measure Type</name>
|
55
|
-
<value>ModelMeasure</value>
|
56
|
-
<datatype>string</datatype>
|
57
|
-
</attribute>
|
58
|
-
</attributes>
|
59
|
-
<files>
|
60
|
-
<file>
|
61
|
-
<version>
|
62
|
-
<software_program>OpenStudio</software_program>
|
63
|
-
<identifier>1.0.0</identifier>
|
64
|
-
<min_compatible>1.8.0</min_compatible>
|
65
|
-
</version>
|
66
|
-
<filename>measure.rb</filename>
|
67
|
-
<filetype>rb</filetype>
|
68
|
-
<usage_type>script</usage_type>
|
69
|
-
<checksum>80D26A09</checksum>
|
70
|
-
</file>
|
71
|
-
<file>
|
72
|
-
<filename>AddEnergyRecoveryVentilator_Test.rb</filename>
|
73
|
-
<filetype>rb</filetype>
|
74
|
-
<usage_type>test</usage_type>
|
75
|
-
<checksum>D733854D</checksum>
|
76
|
-
</file>
|
77
|
-
</files>
|
78
|
-
</measure>
|
@@ -1,81 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# see the URL below for information on how to write OpenStudio measures
|
4
|
-
# http://nrel.github.io/OpenStudio-user-documentation/reference/measure_writing_guide/
|
5
|
-
|
6
|
-
# start the measure
|
7
|
-
class ImproveSimpleGlazingByPercentage < OpenStudio::Ruleset::ModelUserScript
|
8
|
-
# human readable name
|
9
|
-
def name
|
10
|
-
return 'improve_simple_glazing_by_percentage'
|
11
|
-
end
|
12
|
-
|
13
|
-
# define the arguments that the user will input
|
14
|
-
def arguments(model)
|
15
|
-
args = OpenStudio::Ruleset::OSArgumentVector.new
|
16
|
-
|
17
|
-
# make an argument for glazing u_value improvement percentage
|
18
|
-
u_value_improvement_percent = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('u_value_improvement_percent', true)
|
19
|
-
u_value_improvement_percent.setDisplayName('U-value Improvement Percentage (%)')
|
20
|
-
u_value_improvement_percent.setDefaultValue(20)
|
21
|
-
args << u_value_improvement_percent
|
22
|
-
|
23
|
-
# make an argument for glazing shgc improvement percentage
|
24
|
-
shgc_improvement_percent = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('shgc_improvement_percent', true)
|
25
|
-
shgc_improvement_percent.setDisplayName('SHGC improvement Percentage (%)')
|
26
|
-
shgc_improvement_percent.setDefaultValue(20)
|
27
|
-
args << shgc_improvement_percent
|
28
|
-
|
29
|
-
return args
|
30
|
-
end
|
31
|
-
|
32
|
-
# define what happens when the measure is run
|
33
|
-
def run(model, runner, user_arguments)
|
34
|
-
super(model, runner, user_arguments)
|
35
|
-
|
36
|
-
# use the built-in error checking
|
37
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
38
|
-
return false
|
39
|
-
end
|
40
|
-
|
41
|
-
# assign the user inputs to variables
|
42
|
-
u_value_improvement_percent = runner.getDoubleArgumentValue('u_value_improvement_percent', user_arguments)
|
43
|
-
shgc_improvement_percent = runner.getDoubleArgumentValue('shgc_improvement_percent', user_arguments)
|
44
|
-
|
45
|
-
# replace simple glazing window parameters
|
46
|
-
materials = model.getMaterials
|
47
|
-
materials.each do |material|
|
48
|
-
if material.to_SimpleGlazing.is_initialized
|
49
|
-
material_type_glazingsimple = material.to_SimpleGlazing.get
|
50
|
-
|
51
|
-
# get the original value for reporting
|
52
|
-
u_value_old = nil
|
53
|
-
shgc_old = nil
|
54
|
-
u_value_old = material_type_glazingsimple.uFactor
|
55
|
-
shgc_old = material_type_glazingsimple.solarHeatGainCoefficient
|
56
|
-
|
57
|
-
# Update the values from user input
|
58
|
-
material_type_glazingsimple.setUFactor(material_type_glazingsimple.uFactor - material_type_glazingsimple.uFactor * u_value_improvement_percent * 0.01)
|
59
|
-
shgc_new = material_type_glazingsimple.setSolarHeatGainCoefficient(material_type_glazingsimple.solarHeatGainCoefficient - material_type_glazingsimple.solarHeatGainCoefficient * shgc_improvement_percent * 0.01)
|
60
|
-
|
61
|
-
# get the updated value for reporting
|
62
|
-
u_value_new = nil
|
63
|
-
shgc_new = nil
|
64
|
-
u_value_new = material_type_glazingsimple.uFactor
|
65
|
-
shgc_new = material_type_glazingsimple.solarHeatGainCoefficient
|
66
|
-
|
67
|
-
# report initial condition of model
|
68
|
-
runner.registerInitialCondition("The building started with #{u_value_old} U-value, #{shgc_old} SHGC.")
|
69
|
-
|
70
|
-
# report final condition of model
|
71
|
-
runner.registerFinalCondition("The building finished with #{u_value_new} U-value, #{shgc_new} SHGC.")
|
72
|
-
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
return true
|
77
|
-
end
|
78
|
-
end
|
79
|
-
|
80
|
-
# register the measure to be used by the application
|
81
|
-
ImproveSimpleGlazingByPercentage.new.registerWithApplication
|
@@ -1,70 +0,0 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>improve_simple_glazing_by_percentage</name>
|
4
|
-
<uid>3be83df0-8db1-47a8-8b26-aa12f9f17116</uid>
|
5
|
-
<version_id>b7ad923a-5993-42c4-9f79-b14d90838cc2</version_id>
|
6
|
-
<version_modified>20180717T215711Z</version_modified>
|
7
|
-
<xml_checksum>9C8A26EB</xml_checksum>
|
8
|
-
<class_name>ImproveSimpleGlazingByPercentage</class_name>
|
9
|
-
<display_name>improve_simple_glazing_by_percentage</display_name>
|
10
|
-
<description></description>
|
11
|
-
<modeler_description></modeler_description>
|
12
|
-
<arguments>
|
13
|
-
<argument>
|
14
|
-
<name>u_value_improvement_percent</name>
|
15
|
-
<display_name>U-value Improvement Percentage (%)</display_name>
|
16
|
-
<type>Double</type>
|
17
|
-
<required>true</required>
|
18
|
-
<model_dependent>false</model_dependent>
|
19
|
-
<default_value>20</default_value>
|
20
|
-
</argument>
|
21
|
-
<argument>
|
22
|
-
<name>shgc_improvement_percent</name>
|
23
|
-
<display_name>SHGC improvement Percentage (%)</display_name>
|
24
|
-
<type>Double</type>
|
25
|
-
<required>true</required>
|
26
|
-
<model_dependent>false</model_dependent>
|
27
|
-
<default_value>20</default_value>
|
28
|
-
</argument>
|
29
|
-
</arguments>
|
30
|
-
<outputs/>
|
31
|
-
<provenances/>
|
32
|
-
<tags>
|
33
|
-
<tag>Envelope.Fenestration</tag>
|
34
|
-
</tags>
|
35
|
-
<attributes>
|
36
|
-
<attribute>
|
37
|
-
<name>Measure Type</name>
|
38
|
-
<value>ModelMeasure</value>
|
39
|
-
<datatype>string</datatype>
|
40
|
-
</attribute>
|
41
|
-
<attribute>
|
42
|
-
<name>Intended Software Tool</name>
|
43
|
-
<value>Apply Measure Now</value>
|
44
|
-
<datatype>string</datatype>
|
45
|
-
</attribute>
|
46
|
-
<attribute>
|
47
|
-
<name>Intended Software Tool</name>
|
48
|
-
<value>OpenStudio Application</value>
|
49
|
-
<datatype>string</datatype>
|
50
|
-
</attribute>
|
51
|
-
<attribute>
|
52
|
-
<name>Intended Software Tool</name>
|
53
|
-
<value>Parametric Analysis Tool</value>
|
54
|
-
<datatype>string</datatype>
|
55
|
-
</attribute>
|
56
|
-
</attributes>
|
57
|
-
<files>
|
58
|
-
<file>
|
59
|
-
<version>
|
60
|
-
<software_program>OpenStudio</software_program>
|
61
|
-
<identifier>2.1.0</identifier>
|
62
|
-
<min_compatible>2.1.0</min_compatible>
|
63
|
-
</version>
|
64
|
-
<filename>measure.rb</filename>
|
65
|
-
<filetype>rb</filetype>
|
66
|
-
<usage_type>script</usage_type>
|
67
|
-
<checksum>8ED0C957</checksum>
|
68
|
-
</file>
|
69
|
-
</files>
|
70
|
-
</measure>
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# see the URL below for information on how to write OpenStudio measures
|
4
|
-
# http://nrel.github.io/OpenStudio-user-documentation/reference/measure_writing_guide/
|
5
|
-
|
6
|
-
# start the measure
|
7
|
-
class ReduceWaterUseByPercentage < OpenStudio::Ruleset::ModelUserScript
|
8
|
-
# human readable name
|
9
|
-
def name
|
10
|
-
return 'reduce_water_use_by_percentage'
|
11
|
-
end
|
12
|
-
|
13
|
-
# define the arguments that the user will input
|
14
|
-
def arguments(model)
|
15
|
-
args = OpenStudio::Ruleset::OSArgumentVector.new
|
16
|
-
|
17
|
-
# make an argument for water use reduction percentage
|
18
|
-
water_use_reduction_percent = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('water_use_reduction_percent', true)
|
19
|
-
water_use_reduction_percent.setDisplayName('Water Use Reduction Percentage (%)')
|
20
|
-
water_use_reduction_percent.setDefaultValue(20)
|
21
|
-
args << water_use_reduction_percent
|
22
|
-
|
23
|
-
return args
|
24
|
-
end
|
25
|
-
|
26
|
-
# define what happens when the measure is run
|
27
|
-
def run(model, runner, user_arguments)
|
28
|
-
super(model, runner, user_arguments)
|
29
|
-
|
30
|
-
# use the built-in error checking
|
31
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
32
|
-
return false
|
33
|
-
end
|
34
|
-
|
35
|
-
# assign the user inputs to variables
|
36
|
-
water_use_reduction_percent = runner.getDoubleArgumentValue('water_use_reduction_percent', user_arguments)
|
37
|
-
|
38
|
-
# replace water use parameters
|
39
|
-
model.getWaterUseEquipments.each do |water_use_equipment|
|
40
|
-
# get the original value for reporting
|
41
|
-
peak_flow_rate_si_old = water_use_equipment.waterUseEquipmentDefinition.peakFlowRate # m^3/s
|
42
|
-
|
43
|
-
# Update the values from user input
|
44
|
-
water_use_equipment.waterUseEquipmentDefinition.setPeakFlowRate(water_use_equipment.waterUseEquipmentDefinition.peakFlowRate - water_use_equipment.waterUseEquipmentDefinition.peakFlowRate * water_use_reduction_percent * 0.01)
|
45
|
-
|
46
|
-
# get the updated value for reporting
|
47
|
-
peak_flow_rate_si_new = water_use_equipment.waterUseEquipmentDefinition.peakFlowRate # m^3/s
|
48
|
-
|
49
|
-
# report initial condition of model
|
50
|
-
runner.registerInitialCondition("Peak flow rate is #{peak_flow_rate_si_old} m^3/s..")
|
51
|
-
|
52
|
-
# report final condition of model
|
53
|
-
runner.registerFinalCondition("Peak flow rate is #{peak_flow_rate_si_new} m^3/s.")
|
54
|
-
end
|
55
|
-
|
56
|
-
return true
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# register the measure to be used by the application
|
61
|
-
ReduceWaterUseByPercentage.new.registerWithApplication
|
@@ -1,62 +0,0 @@
|
|
1
|
-
<measure>
|
2
|
-
<schema_version>3.0</schema_version>
|
3
|
-
<name>reduce_water_use_by_percentage</name>
|
4
|
-
<uid>3be83df0-8db1-47a8-8b26-aa12f9f17116</uid>
|
5
|
-
<version_id>725f3c65-c760-44ad-bccd-919e682bf38a</version_id>
|
6
|
-
<version_modified>20180717T215712Z</version_modified>
|
7
|
-
<xml_checksum>759A1208</xml_checksum>
|
8
|
-
<class_name>ReduceWaterUseByPercentage</class_name>
|
9
|
-
<display_name>reduce_water_use_by_percentage</display_name>
|
10
|
-
<description></description>
|
11
|
-
<modeler_description></modeler_description>
|
12
|
-
<arguments>
|
13
|
-
<argument>
|
14
|
-
<name>water_use_reduction_percent</name>
|
15
|
-
<display_name>Water Use Reduction Percentage (%)</display_name>
|
16
|
-
<type>Double</type>
|
17
|
-
<required>true</required>
|
18
|
-
<model_dependent>false</model_dependent>
|
19
|
-
<default_value>20</default_value>
|
20
|
-
</argument>
|
21
|
-
</arguments>
|
22
|
-
<outputs/>
|
23
|
-
<provenances/>
|
24
|
-
<tags>
|
25
|
-
<tag>Service Water Heating.Water Use</tag>
|
26
|
-
</tags>
|
27
|
-
<attributes>
|
28
|
-
<attribute>
|
29
|
-
<name>Measure Type</name>
|
30
|
-
<value>ModelMeasure</value>
|
31
|
-
<datatype>string</datatype>
|
32
|
-
</attribute>
|
33
|
-
<attribute>
|
34
|
-
<name>Intended Software Tool</name>
|
35
|
-
<value>Apply Measure Now</value>
|
36
|
-
<datatype>string</datatype>
|
37
|
-
</attribute>
|
38
|
-
<attribute>
|
39
|
-
<name>Intended Software Tool</name>
|
40
|
-
<value>OpenStudio Application</value>
|
41
|
-
<datatype>string</datatype>
|
42
|
-
</attribute>
|
43
|
-
<attribute>
|
44
|
-
<name>Intended Software Tool</name>
|
45
|
-
<value>Parametric Analysis Tool</value>
|
46
|
-
<datatype>string</datatype>
|
47
|
-
</attribute>
|
48
|
-
</attributes>
|
49
|
-
<files>
|
50
|
-
<file>
|
51
|
-
<version>
|
52
|
-
<software_program>OpenStudio</software_program>
|
53
|
-
<identifier>2.1.0</identifier>
|
54
|
-
<min_compatible>2.1.0</min_compatible>
|
55
|
-
</version>
|
56
|
-
<filename>measure.rb</filename>
|
57
|
-
<filetype>rb</filetype>
|
58
|
-
<usage_type>script</usage_type>
|
59
|
-
<checksum>1642ADCF</checksum>
|
60
|
-
</file>
|
61
|
-
</files>
|
62
|
-
</measure>
|
@@ -1,511 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# see the URL below for information on how to write OpenStudio measures
|
4
|
-
# http://openstudio.nrel.gov/openstudio-measure-writing-guide
|
5
|
-
|
6
|
-
# see the URL below for information on using life cycle cost objects in OpenStudio
|
7
|
-
# http://openstudio.nrel.gov/openstudio-life-cycle-examples
|
8
|
-
|
9
|
-
# see the URL below for access to C++ documentation on model objects (click on "model" in the main window to view model objects)
|
10
|
-
# http://openstudio.nrel.gov/sites/openstudio.nrel.gov/files/nv_data/cpp_documentation_it/model/html/namespaces.html
|
11
|
-
|
12
|
-
# load OpenStudio measure libraries
|
13
|
-
# require "#{File.dirname(__FILE__)}/resources/OsLib_AedgMeasures"
|
14
|
-
require "#{File.dirname(__FILE__)}/resources/OsLib_HelperMethods"
|
15
|
-
require "#{File.dirname(__FILE__)}/resources/OsLib_HVAC"
|
16
|
-
require "#{File.dirname(__FILE__)}/resources/OsLib_Schedules"
|
17
|
-
|
18
|
-
# start the measure
|
19
|
-
class ReplaceHVACWithGSHPAndDOAS < OpenStudio::Ruleset::ModelUserScript
|
20
|
-
# define the name that a user will see, this method may be deprecated as
|
21
|
-
# the display name in PAT comes from the name field in measure.xml
|
22
|
-
def name
|
23
|
-
return 'Replace HVAC with GSHP and DOAS'
|
24
|
-
end
|
25
|
-
|
26
|
-
# define the arguments that the user will input
|
27
|
-
def arguments(model)
|
28
|
-
args = OpenStudio::Ruleset::OSArgumentVector.new
|
29
|
-
|
30
|
-
# Create a list of the names and handles of space types
|
31
|
-
# used in the building.
|
32
|
-
used_space_type_handles = OpenStudio::StringVector.new
|
33
|
-
used_space_type_names = OpenStudio::StringVector.new
|
34
|
-
model.getSpaceTypes.sort.each do |space_type|
|
35
|
-
if !space_type.spaces.empty? # only show space types used in the building
|
36
|
-
used_space_type_handles << space_type.handle.to_s
|
37
|
-
used_space_type_names << space_type.name.to_s
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
# Make an argument for plenum space type
|
42
|
-
ceiling_return_plenum_space_type = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('ceiling_return_plenum_space_type', used_space_type_handles, used_space_type_names, false)
|
43
|
-
ceiling_return_plenum_space_type.setDisplayName('This space type should be part of a ceiling return air plenum.')
|
44
|
-
args << ceiling_return_plenum_space_type
|
45
|
-
|
46
|
-
# Make a bool argument to edit/not edit each space type
|
47
|
-
model.getSpaceTypes.sort.each do |space_type|
|
48
|
-
if !space_type.spaces.empty? # only show space types used in the building
|
49
|
-
space_type_to_edit = OpenStudio::Ruleset::OSArgument.makeBoolArgument(space_type.name.get.to_s, false)
|
50
|
-
# Make a bool argument for this space type
|
51
|
-
space_type_to_edit.setDisplayName("Add #{space_type.name.get} space type to GSHP system?")
|
52
|
-
space_type_to_edit.setDefaultValue(false)
|
53
|
-
args << space_type_to_edit
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# Heating COP of GSHP
|
58
|
-
gshp_htg_cop = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('gshp_htg_cop', false)
|
59
|
-
gshp_htg_cop.setDisplayName('GSHP DX Heating Coil Heating COP')
|
60
|
-
gshp_htg_cop.setDefaultValue(4.0)
|
61
|
-
args << gshp_htg_cop
|
62
|
-
|
63
|
-
# Cooling EER of GSHP
|
64
|
-
gshp_clg_eer = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('gshp_clg_eer', false)
|
65
|
-
gshp_clg_eer.setDisplayName('GSHP DX Cooling Coil Cooling EER')
|
66
|
-
gshp_clg_eer.setDefaultValue(14)
|
67
|
-
args << gshp_clg_eer
|
68
|
-
|
69
|
-
# GSHP Fan Type PSC or ECM
|
70
|
-
fan_choices = OpenStudio::StringVector.new
|
71
|
-
fan_choices << 'PSC'
|
72
|
-
fan_choices << 'ECM'
|
73
|
-
gshp_fan_type = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('gshp_fan_type', fan_choices, true) # note ECM fan type may correspond to different set of heat pump performance curves
|
74
|
-
gshp_fan_type.setDisplayName('GSHP Fan Type: PSC or ECM?')
|
75
|
-
gshp_fan_type.setDefaultValue('PSC')
|
76
|
-
args << gshp_fan_type
|
77
|
-
|
78
|
-
# Condenser Loop Cooling Temperature
|
79
|
-
# condLoopCoolingTemp = OpenStudio::Ruleset::OSArgument::makeDoubleArgument("condLoopCoolingTemp",false)
|
80
|
-
# condLoopCoolingTemp.setDisplayName("Condenser Loop Cooling Temperature (F)")
|
81
|
-
# condLoopCoolingTemp.setDefaultValue(90)
|
82
|
-
# args << condLoopCoolingTemp
|
83
|
-
|
84
|
-
# Condenser Loop Heating Temperature
|
85
|
-
# condLoopHeatingTemp = OpenStudio::Ruleset::OSArgument::makeDoubleArgument("condLoopHeatingTemp",false)
|
86
|
-
# condLoopHeatingTemp.setDisplayName("Condenser Loop Heating Temperature (F)")
|
87
|
-
# condLoopHeatingTemp.setDefaultValue(60)
|
88
|
-
# args << condLoopHeatingTemp
|
89
|
-
|
90
|
-
# Vertical Bore HX
|
91
|
-
building_area = model.getBuilding.floorArea
|
92
|
-
building_cool_ton = building_area * 10.7639 / 500 # 500sf/ton estimated
|
93
|
-
bore_hole_no = OpenStudio::Ruleset::OSArgument.makeIntegerArgument('bore_hole_no', false)
|
94
|
-
bore_hole_no.setDisplayName('Number of Bore Holes')
|
95
|
-
bore_hole_no.setDefaultValue(building_cool_ton.to_i)
|
96
|
-
args << bore_hole_no
|
97
|
-
|
98
|
-
bore_hole_length = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('bore_hole_length', false)
|
99
|
-
bore_hole_length.setDisplayName('Bore Hole Length (ft)')
|
100
|
-
bore_hole_length.setDefaultValue(200)
|
101
|
-
args << bore_hole_length
|
102
|
-
|
103
|
-
bore_hole_radius = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('bore_hole_radius', false)
|
104
|
-
bore_hole_radius.setDisplayName('Bore Hole Radius (inch)')
|
105
|
-
bore_hole_radius.setDefaultValue(6.0)
|
106
|
-
args << bore_hole_radius
|
107
|
-
|
108
|
-
ground_k_value = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('ground_k_value', false)
|
109
|
-
ground_k_value.setDisplayName('Ground Conductivity (Btu/hr.F.R')
|
110
|
-
ground_k_value.setDefaultValue(0.75)
|
111
|
-
args << ground_k_value
|
112
|
-
|
113
|
-
grout_k_value = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('grout_k_value', false)
|
114
|
-
grout_k_value.setDisplayName('Grout Conductivity (Btu/hr.F.R')
|
115
|
-
grout_k_value.setDefaultValue(0.75)
|
116
|
-
args << grout_k_value
|
117
|
-
|
118
|
-
chs = OpenStudio::StringVector.new
|
119
|
-
chs << 'Yes'
|
120
|
-
chs << 'No'
|
121
|
-
supplemental_boiler = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('supplemental_boiler', chs, true)
|
122
|
-
supplemental_boiler.setDisplayName('Supplemental Heating Boiler?')
|
123
|
-
supplemental_boiler.setDefaultValue('No')
|
124
|
-
args << supplemental_boiler
|
125
|
-
|
126
|
-
# Boiler Capacity
|
127
|
-
boiler_cap = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('boiler_cap', false)
|
128
|
-
boiler_cap.setDisplayName('boiler normal capacity (MBtuh)')
|
129
|
-
boiler_cap.setDefaultValue(500.0)
|
130
|
-
args << boiler_cap
|
131
|
-
|
132
|
-
# Boiler Efficiency
|
133
|
-
boiler_eff = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('boiler_eff', false)
|
134
|
-
boiler_eff.setDisplayName('Boiler Thermal Efficiency')
|
135
|
-
boiler_eff.setDefaultValue(0.9)
|
136
|
-
args << boiler_eff
|
137
|
-
|
138
|
-
# Boiler fuel Type
|
139
|
-
fuel_choices = OpenStudio::StringVector.new
|
140
|
-
fuel_choices << 'NaturalGas'
|
141
|
-
fuel_choices << 'PropaneGas'
|
142
|
-
fuel_choices << 'FuelOil#1'
|
143
|
-
fuel_choices << 'FuelOil#2'
|
144
|
-
fuel_choices << 'Electricity'
|
145
|
-
boiler_fuel_type = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('boiler_fuel_type', fuel_choices, false)
|
146
|
-
boiler_fuel_type.setDisplayName('Boiler Fuel Type')
|
147
|
-
boiler_fuel_type.setDefaultValue('NaturalGas')
|
148
|
-
args << boiler_fuel_type
|
149
|
-
|
150
|
-
# boiler Hot water supply temperature
|
151
|
-
boiler_hw_st = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('boiler_hw_st', false)
|
152
|
-
boiler_hw_st.setDisplayName('Boiler Design Heating Water Outlet Temperature (F)')
|
153
|
-
boiler_hw_st.setDefaultValue(120)
|
154
|
-
args << boiler_hw_st
|
155
|
-
|
156
|
-
# DOAS Fan Type
|
157
|
-
doas_fan_choices = OpenStudio::StringVector.new
|
158
|
-
doas_fan_choices << 'Constant'
|
159
|
-
doas_fan_choices << 'Variable'
|
160
|
-
doas_fan_type = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('doas_fan_type', doas_fan_choices, true)
|
161
|
-
doas_fan_type.setDisplayName('DOAS Fan Flow Control - Variable means DCV controls')
|
162
|
-
doas_fan_type.setDefaultValue('Variable')
|
163
|
-
args << doas_fan_type
|
164
|
-
|
165
|
-
# DOAS Energy Recovery
|
166
|
-
erv_choices = OpenStudio::StringVector.new
|
167
|
-
erv_choices << 'plate w/o economizer lockout'
|
168
|
-
erv_choices << 'plate w/ economizer lockout'
|
169
|
-
erv_choices << 'rotary wheel w/o economizer lockout'
|
170
|
-
erv_choices << 'rotary wheel w/ economizer lockout'
|
171
|
-
erv_choices << 'none'
|
172
|
-
doas_erv = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('doas_erv', erv_choices, true)
|
173
|
-
doas_erv.setDisplayName('DOAS Energy Recovery?')
|
174
|
-
doas_erv.setDefaultValue('none')
|
175
|
-
args << doas_erv
|
176
|
-
|
177
|
-
# DOAS Evaporative Cooling
|
178
|
-
evap_choices = OpenStudio::StringVector.new
|
179
|
-
evap_choices << 'Direct Evaporative Cooler'
|
180
|
-
evap_choices << 'none'
|
181
|
-
doas_evap = OpenStudio::Ruleset::OSArgument.makeChoiceArgument('doas_evap', evap_choices, true)
|
182
|
-
doas_evap.setDisplayName('DOAS Direct Evaporative Cooling?')
|
183
|
-
doas_evap.setDefaultValue('none')
|
184
|
-
args << doas_evap
|
185
|
-
|
186
|
-
# DOAS DX Cooling
|
187
|
-
doas_dx_eer = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('doas_dx_eer', false)
|
188
|
-
doas_dx_eer.setDisplayName('DOAS DX Cooling EER')
|
189
|
-
doas_dx_eer.setDefaultValue(10.0)
|
190
|
-
args << doas_dx_eer
|
191
|
-
|
192
|
-
# make an argument for material and installation cost
|
193
|
-
# todo - I would like to split the costing out to the air loops weighted by area of building served vs. just sticking it on the building
|
194
|
-
cost_total_hvac_system = OpenStudio::Ruleset::OSArgument.makeDoubleArgument('cost_total_hvac_system', true)
|
195
|
-
cost_total_hvac_system.setDisplayName('Total Cost for HVAC System ($).')
|
196
|
-
cost_total_hvac_system.setDefaultValue(0.0)
|
197
|
-
args << cost_total_hvac_system
|
198
|
-
|
199
|
-
# make an argument to remove existing costs
|
200
|
-
remake_schedules = OpenStudio::Ruleset::OSArgument.makeBoolArgument('remake_schedules', true)
|
201
|
-
remake_schedules.setDisplayName('Apply recommended availability and ventilation schedules for air handlers?')
|
202
|
-
remake_schedules.setDefaultValue(true)
|
203
|
-
args << remake_schedules
|
204
|
-
|
205
|
-
return args
|
206
|
-
end # end the arguments method
|
207
|
-
|
208
|
-
# define what happens when the measure is run
|
209
|
-
def run(model, runner, user_arguments)
|
210
|
-
super(model, runner, user_arguments)
|
211
|
-
|
212
|
-
# Use the built-in error checking
|
213
|
-
if !runner.validateUserArguments(arguments(model), user_arguments)
|
214
|
-
return false
|
215
|
-
end
|
216
|
-
|
217
|
-
# Assign the user inputs to variables
|
218
|
-
space_type_to_edits_hash = {}
|
219
|
-
model.getSpaceTypes.each do |space_type|
|
220
|
-
if !space_type.spaces.empty?
|
221
|
-
space_type_to_edit = runner.getBoolArgumentValue(space_type.name.get.to_s, user_arguments)
|
222
|
-
space_type_to_edits_hash[space_type] = space_type_to_edit
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
bore_hole_no = runner.getIntegerArgumentValue('bore_hole_no', user_arguments)
|
227
|
-
bore_hole_length = runner.getDoubleArgumentValue('bore_hole_length', user_arguments)
|
228
|
-
bore_hole_radius = runner.getDoubleArgumentValue('bore_hole_radius', user_arguments)
|
229
|
-
ground_k_value = runner.getDoubleArgumentValue('ground_k_value', user_arguments)
|
230
|
-
grout_k_value = runner.getDoubleArgumentValue('grout_k_value', user_arguments)
|
231
|
-
supplemental_boiler = runner.getStringArgumentValue('supplemental_boiler', user_arguments)
|
232
|
-
|
233
|
-
gshp_htg_cop = runner.getDoubleArgumentValue('gshp_htg_cop', user_arguments)
|
234
|
-
gshp_clg_eer = runner.getDoubleArgumentValue('gshp_clg_eer', user_arguments)
|
235
|
-
gshp_fan_type = runner.getStringArgumentValue('gshp_fan_type', user_arguments)
|
236
|
-
# condLoopCoolingTemp = runner.getDoubleArgumentValue("condLoopCoolingTemp",user_arguments)
|
237
|
-
# condLoopHeatingTemp = runner.getDoubleArgumentValue("condLoopHeatingTemp",user_arguments)
|
238
|
-
# coolingTowerWB = runner.getDoubleArgumentValue("coolingTowerWB",user_arguments)
|
239
|
-
# coolingTowerApproach= runner.getDoubleArgumentValue("coolingTowerApproach",user_arguments)
|
240
|
-
# coolingTowerDeltaT= runner.getDoubleArgumentValue("coolingTowerDeltaT",user_arguments)
|
241
|
-
boiler_cap = runner.getDoubleArgumentValue('boiler_cap', user_arguments)
|
242
|
-
boiler_eff = runner.getDoubleArgumentValue('boiler_eff', user_arguments)
|
243
|
-
boiler_fuel_type = runner.getStringArgumentValue('boiler_fuel_type', user_arguments)
|
244
|
-
boiler_hw_st = runner.getDoubleArgumentValue('boiler_hw_st', user_arguments)
|
245
|
-
doas_fan_type = runner.getStringArgumentValue('doas_fan_type', user_arguments)
|
246
|
-
doas_erv = runner.getStringArgumentValue('doas_erv', user_arguments)
|
247
|
-
doas_evap = runner.getStringArgumentValue('doas_evap', user_arguments)
|
248
|
-
doas_dx_eer = runner.getDoubleArgumentValue('doas_dx_eer', user_arguments)
|
249
|
-
|
250
|
-
### START INPUTS
|
251
|
-
# assign the user inputs to variables
|
252
|
-
ceiling_return_plenum_space_type = runner.getOptionalWorkspaceObjectChoiceValue('ceiling_return_plenum_space_type', user_arguments, model)
|
253
|
-
cost_total_hvac_system = runner.getDoubleArgumentValue('cost_total_hvac_system', user_arguments)
|
254
|
-
remake_schedules = runner.getBoolArgumentValue('remake_schedules', user_arguments)
|
255
|
-
# check that space_type was chosen and exists in model
|
256
|
-
ceiling_return_plenum_space_typeCheck = OsLib_HelperMethods.checkOptionalChoiceArgFromModelObjects(ceiling_return_plenum_space_type, 'ceiling_return_plenum_space_type', 'to_SpaceType', runner, user_arguments)
|
257
|
-
ceiling_return_plenum_space_typeCheck == false ? (return false) : (ceiling_return_plenum_space_type = ceiling_return_plenum_space_typeCheck['modelObject'])
|
258
|
-
# default building/ secondary space types
|
259
|
-
standardBuildingTypeTest = [] # ML Not used yet
|
260
|
-
# secondarySpaceTypeTest = ["Cafeteria", "Kitchen", "Gym", "Auditorium"]
|
261
|
-
standardBuildingTypeTest = ['Office'] # ML Not used yet
|
262
|
-
secondarySpaceTypeTest = [] # empty for office
|
263
|
-
primarySpaceType = 'Office'
|
264
|
-
if doas_fan_type == 'Variable'
|
265
|
-
primaryHVAC = { 'doas' => true, 'fan' => 'Variable', 'heat' => 'Gas', 'cool' => 'SingleDX' }
|
266
|
-
else
|
267
|
-
primaryHVAC = { 'doas' => true, 'fan' => 'Constant', 'heat' => 'Gas', 'cool' => 'SingleDX' }
|
268
|
-
end
|
269
|
-
secondaryHVAC = { 'fan' => 'None', 'heat' => 'None', 'cool' => 'None' } # ML not used for office; leave or empty?
|
270
|
-
zoneHVAC = 'GSHP'
|
271
|
-
chillerType = 'None' # set to none if chiller not used
|
272
|
-
radiantChillerType = 'None' # set to none if not radiant system
|
273
|
-
allHVAC = { 'primary' => primaryHVAC, 'secondary' => secondaryHVAC, 'zone' => zoneHVAC }
|
274
|
-
|
275
|
-
### END INPUTS
|
276
|
-
|
277
|
-
# create a hash incorporating all user inputs on GSHP
|
278
|
-
parameters = { 'gshpCoolingEER' => gshp_clg_eer,
|
279
|
-
'gshpHeatingCOP' => gshp_htg_cop,
|
280
|
-
'gshpFanType' => gshp_fan_type,
|
281
|
-
'groundKValue' => ground_k_value,
|
282
|
-
'groutKValue' => grout_k_value,
|
283
|
-
'boreHoleNo' => bore_hole_no,
|
284
|
-
'boreHoleLength' => bore_hole_length,
|
285
|
-
'boreHoleRadius' => bore_hole_radius,
|
286
|
-
'supplementalBoiler' => supplemental_boiler,
|
287
|
-
'boilerCap' => boiler_cap,
|
288
|
-
'boilerEff' => boiler_eff,
|
289
|
-
'boilerFuelType' => boiler_fuel_type,
|
290
|
-
'boilerHWST' => boiler_hw_st,
|
291
|
-
'doasFanType' => doas_fan_type,
|
292
|
-
'doasDXEER' => doas_dx_eer,
|
293
|
-
'doasERV' => doas_erv,
|
294
|
-
'doasEvap' => doas_evap }
|
295
|
-
|
296
|
-
### START SORT ZONES
|
297
|
-
options = { 'standardBuildingTypeTest' => standardBuildingTypeTest, # ML Not used yet
|
298
|
-
'secondarySpaceTypeTest' => secondarySpaceTypeTest,
|
299
|
-
'ceiling_return_plenum_space_type' => ceiling_return_plenum_space_type }
|
300
|
-
zonesSorted = OsLib_HVAC.sortZones(model, runner, options, space_type_to_edits_hash)
|
301
|
-
zonesPrimary = zonesSorted['zonesPrimary']
|
302
|
-
zonesSecondary = zonesSorted['zonesSecondary']
|
303
|
-
zonesPlenum = zonesSorted['zonesPlenum']
|
304
|
-
zonesUnconditioned = zonesSorted['zonesUnconditioned']
|
305
|
-
### END SORT ZONES
|
306
|
-
|
307
|
-
### START REPORT INITIAL CONDITIONS
|
308
|
-
OsLib_HVAC.reportConditions(model, runner, 'initial')
|
309
|
-
### END REPORT INITIAL CONDITIONS
|
310
|
-
|
311
|
-
### START ASSIGN HVAC SCHEDULES
|
312
|
-
options = { 'primarySpaceType' => primarySpaceType,
|
313
|
-
'allHVAC' => allHVAC,
|
314
|
-
'remake_schedules' => remake_schedules }
|
315
|
-
schedulesHVAC = OsLib_HVAC.assignHVACSchedules(model, runner, options)
|
316
|
-
# assign schedules
|
317
|
-
primary_SAT_schedule = schedulesHVAC['primary_sat']
|
318
|
-
building_HVAC_schedule = schedulesHVAC['hvac']
|
319
|
-
building_ventilation_schedule = schedulesHVAC['ventilation']
|
320
|
-
make_hot_water_plant = false
|
321
|
-
unless schedulesHVAC['hot_water'].nil?
|
322
|
-
hot_water_setpoint_schedule = schedulesHVAC['hot_water']
|
323
|
-
make_hot_water_plant = true
|
324
|
-
end
|
325
|
-
make_chilled_water_plant = false
|
326
|
-
unless schedulesHVAC['chilled_water'].nil?
|
327
|
-
chilled_water_setpoint_schedule = schedulesHVAC['chilled_water']
|
328
|
-
make_chilled_water_plant = true
|
329
|
-
end
|
330
|
-
make_radiant_hot_water_plant = false
|
331
|
-
unless schedulesHVAC['radiant_hot_water'].nil?
|
332
|
-
radiant_hot_water_setpoint_schedule = schedulesHVAC['radiant_hot_water']
|
333
|
-
make_radiant_hot_water_plant = true
|
334
|
-
end
|
335
|
-
make_radiant_chilled_water_plant = false
|
336
|
-
unless schedulesHVAC['radiant_chilled_water'].nil?
|
337
|
-
radiant_chilled_water_setpoint_schedule = schedulesHVAC['radiant_chilled_water']
|
338
|
-
make_radiant_chilled_water_plant = true
|
339
|
-
end
|
340
|
-
unless schedulesHVAC['hp_loop'].nil?
|
341
|
-
heat_pump_loop_setpoint_schedule = schedulesHVAC['hp_loop']
|
342
|
-
end
|
343
|
-
unless schedulesHVAC['hp_loop_cooling'].nil?
|
344
|
-
heat_pump_loop_cooling_setpoint_schedule = schedulesHVAC['hp_loop_cooling']
|
345
|
-
end
|
346
|
-
unless schedulesHVAC['hp_loop_heating'].nil?
|
347
|
-
heat_pump_loop_heating_setpoint_schedule = schedulesHVAC['hp_loop_heating']
|
348
|
-
end
|
349
|
-
unless schedulesHVAC['mean_radiant_heating'].nil?
|
350
|
-
mean_radiant_heating_setpoint_schedule = schedulesHVAC['mean_radiant_heating']
|
351
|
-
end
|
352
|
-
unless schedulesHVAC['mean_radiant_cooling'].nil?
|
353
|
-
mean_radiant_cooling_setpoint_schedule = schedulesHVAC['mean_radiant_cooling']
|
354
|
-
end
|
355
|
-
### END ASSIGN HVAC SCHEDULES
|
356
|
-
runner.registerInfo("number of bore holes are #{model.getBuilding.floorArea} m2")
|
357
|
-
# START REMOVE EQUIPMENT
|
358
|
-
options = {}
|
359
|
-
options['zonesPrimary'] = zonesPrimary
|
360
|
-
if options['zonesPrimary'].empty?
|
361
|
-
runner.registerInfo('User did not pick any zones to be added to GSHP system, no changes to the model were made.')
|
362
|
-
else
|
363
|
-
OsLib_HVAC.removeEquipment(model, runner, options)
|
364
|
-
end
|
365
|
-
### END REMOVE EQUIPMENT
|
366
|
-
|
367
|
-
### START CREATE NEW PLANTS
|
368
|
-
# create new plants
|
369
|
-
# hot water plant
|
370
|
-
if make_hot_water_plant
|
371
|
-
hot_water_plant = OsLib_HVAC.createHotWaterPlant(model, runner, hot_water_setpoint_schedule, 'Hot Water', parameters)
|
372
|
-
end
|
373
|
-
# chilled water plant
|
374
|
-
if make_chilled_water_plant
|
375
|
-
chilled_water_plant = OsLib_HVAC.createChilledWaterPlant(model, runner, chilled_water_setpoint_schedule, 'Chilled Water', chillerType)
|
376
|
-
end
|
377
|
-
# radiant hot water plant
|
378
|
-
if make_radiant_hot_water_plant
|
379
|
-
radiant_hot_water_plant = OsLib_HVAC.createHotWaterPlant(model, runner, radiant_hot_water_setpoint_schedule, 'Radiant Hot Water')
|
380
|
-
end
|
381
|
-
# chilled water plant
|
382
|
-
if make_radiant_chilled_water_plant
|
383
|
-
radiant_chilled_water_plant = OsLib_HVAC.createChilledWaterPlant(model, runner, radiant_chilled_water_setpoint_schedule, 'Radiant Chilled Water', radiantChillerType)
|
384
|
-
end
|
385
|
-
# condenser loop
|
386
|
-
# need condenser loop if there is a water-cooled chiller or if there is a water source heat pump loop
|
387
|
-
options = {}
|
388
|
-
options['zonesPrimary'] = zonesPrimary
|
389
|
-
options['zoneHVAC'] = zoneHVAC
|
390
|
-
if zoneHVAC.include? 'SHP'
|
391
|
-
options['loop_setpoint_schedule'] = heat_pump_loop_setpoint_schedule
|
392
|
-
options['cooling_setpoint_schedule'] = heat_pump_loop_cooling_setpoint_schedule
|
393
|
-
options['heating_setpoint_schedule'] = heat_pump_loop_heating_setpoint_schedule
|
394
|
-
end
|
395
|
-
if options['zonesPrimary'].empty?
|
396
|
-
# runner.registerWarning("User did not pick any space types to be added to the WSHP system, no changes to the model were made")
|
397
|
-
condenserLoops = {}
|
398
|
-
# condenserLoops["condenser_loop"] ={}
|
399
|
-
else
|
400
|
-
condenserLoops = OsLib_HVAC.createCondenserLoop(model, runner, options, parameters)
|
401
|
-
end
|
402
|
-
unless condenserLoops['condenser_loop'].nil?
|
403
|
-
condenser_loop = condenserLoops['condenser_loop']
|
404
|
-
end
|
405
|
-
unless condenserLoops['heat_pump_loop'].nil?
|
406
|
-
heat_pump_loop = condenserLoops['heat_pump_loop']
|
407
|
-
end
|
408
|
-
### END CREATE NEW PLANTS
|
409
|
-
|
410
|
-
### START CREATE PRIMARY AIRLOOPS
|
411
|
-
# populate inputs hash for create primary airloops method
|
412
|
-
options = {}
|
413
|
-
options['zonesPrimary'] = zonesPrimary
|
414
|
-
options['primaryHVAC'] = primaryHVAC
|
415
|
-
options['zoneHVAC'] = zoneHVAC
|
416
|
-
if primaryHVAC['doas']
|
417
|
-
options['hvac_schedule'] = building_ventilation_schedule
|
418
|
-
options['ventilation_schedule'] = building_ventilation_schedule
|
419
|
-
else
|
420
|
-
# primary HVAC is multizone VAV
|
421
|
-
if zoneHVAC == 'DualDuct'
|
422
|
-
# primary system is a multizone VAV that cools only (primary system ventilation schedule is set to always off; hvac set to always on)
|
423
|
-
options['hvac_schedule'] = model.alwaysOnDiscreteSchedule
|
424
|
-
else
|
425
|
-
# primary system is multizone VAV that cools and ventilates
|
426
|
-
options['hvac_schedule'] = building_HVAC_schedule
|
427
|
-
options['ventilation_schedule'] = building_ventilation_schedule
|
428
|
-
end
|
429
|
-
end
|
430
|
-
options['primary_sat_schedule'] = primary_SAT_schedule
|
431
|
-
if make_hot_water_plant
|
432
|
-
options['hot_water_plant'] = hot_water_plant
|
433
|
-
end
|
434
|
-
if make_chilled_water_plant
|
435
|
-
options['chilled_water_plant'] = chilled_water_plant
|
436
|
-
end
|
437
|
-
primary_airloops = OsLib_HVAC.createPrimaryAirLoops(model, runner, options, parameters)
|
438
|
-
### END CREATE PRIMARY AIRLOOPS
|
439
|
-
|
440
|
-
### START CREATE SECONDARY AIRLOOPS
|
441
|
-
# populate inputs hash for create primary airloops method
|
442
|
-
options = {}
|
443
|
-
options['zonesSecondary'] = zonesSecondary
|
444
|
-
options['secondaryHVAC'] = secondaryHVAC
|
445
|
-
options['hvac_schedule'] = building_HVAC_schedule
|
446
|
-
options['ventilation_schedule'] = building_ventilation_schedule
|
447
|
-
if make_hot_water_plant
|
448
|
-
options['hot_water_plant'] = hot_water_plant
|
449
|
-
end
|
450
|
-
if make_chilled_water_plant
|
451
|
-
options['chilled_water_plant'] = chilled_water_plant
|
452
|
-
end
|
453
|
-
secondary_airloops = OsLib_HVAC.createSecondaryAirLoops(model, runner, options)
|
454
|
-
### END CREATE SECONDARY AIRLOOPS
|
455
|
-
|
456
|
-
### START ASSIGN PLENUMS
|
457
|
-
options = { 'zonesPrimary' => zonesPrimary, 'zonesPlenum' => zonesPlenum }
|
458
|
-
zone_plenum_hash = OsLib_HVAC.validateAndAddPlenumZonesToSystem(model, runner, options)
|
459
|
-
### END ASSIGN PLENUMS
|
460
|
-
|
461
|
-
### START CREATE PRIMARY ZONE EQUIPMENT
|
462
|
-
options = {}
|
463
|
-
options['zonesPrimary'] = zonesPrimary
|
464
|
-
options['zoneHVAC'] = zoneHVAC
|
465
|
-
if make_hot_water_plant
|
466
|
-
options['hot_water_plant'] = hot_water_plant
|
467
|
-
end
|
468
|
-
if make_chilled_water_plant
|
469
|
-
options['chilled_water_plant'] = chilled_water_plant
|
470
|
-
end
|
471
|
-
if zoneHVAC.include? 'SHP'
|
472
|
-
options['heat_pump_loop'] = heat_pump_loop
|
473
|
-
end
|
474
|
-
if zoneHVAC == 'DualDuct'
|
475
|
-
options['ventilation_schedule'] = building_ventilation_schedule
|
476
|
-
end
|
477
|
-
if zoneHVAC == 'Radiant'
|
478
|
-
options['radiant_hot_water_plant'] = radiant_hot_water_plant
|
479
|
-
options['radiant_chilled_water_plant'] = radiant_chilled_water_plant
|
480
|
-
options['mean_radiant_heating_setpoint_schedule'] = mean_radiant_heating_setpoint_schedule
|
481
|
-
options['mean_radiant_cooling_setpoint_schedule'] = mean_radiant_cooling_setpoint_schedule
|
482
|
-
end
|
483
|
-
OsLib_HVAC.createPrimaryZoneEquipment(model, runner, options, parameters)
|
484
|
-
### END CREATE PRIMARY ZONE EQUIPMENT
|
485
|
-
|
486
|
-
# START ADD DCV
|
487
|
-
options = {}
|
488
|
-
unless zoneHVAC == 'DualDuct'
|
489
|
-
options['primary_airloops'] = primary_airloops
|
490
|
-
end
|
491
|
-
options['secondary_airloops'] = secondary_airloops
|
492
|
-
options['allHVAC'] = allHVAC
|
493
|
-
OsLib_HVAC.addDCV(model, runner, options)
|
494
|
-
# END ADD DCV
|
495
|
-
|
496
|
-
# Add in lifecycle costs
|
497
|
-
expected_life = 25
|
498
|
-
years_until_costs_start = 0
|
499
|
-
costHVAC = cost_total_hvac_system
|
500
|
-
lcc_mat = OpenStudio::Model::LifeCycleCost.createLifeCycleCost('HVAC System', model.getBuilding, costHVAC, 'CostPerEach', 'Construction', expected_life, years_until_costs_start).get
|
501
|
-
|
502
|
-
### START REPORT FINAL CONDITIONS
|
503
|
-
OsLib_HVAC.reportConditions(model, runner, 'final')
|
504
|
-
### END REPORT FINAL CONDITIONS
|
505
|
-
|
506
|
-
return true
|
507
|
-
end # end the run method
|
508
|
-
end # end the measure
|
509
|
-
|
510
|
-
# this allows the measure to be used by the application
|
511
|
-
ReplaceHVACWithGSHPAndDOAS.new.registerWithApplication
|