Class: SystemFuels
- Inherits:
-
Object
- Object
- SystemFuels
- Defined in:
- lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb
Instance Attribute Summary collapse
-
#backup_boiler_fueltype ⇒ Object
Returns the value of attribute backup_boiler_fueltype.
-
#baseboard_type ⇒ Object
Returns the value of attribute baseboard_type.
-
#boiler_fueltype ⇒ Object
Returns the value of attribute boiler_fueltype.
-
#chiller_type ⇒ Object
Returns the value of attribute chiller_type.
-
#ecm_fueltype ⇒ Object
Returns the value of attribute ecm_fueltype.
-
#fan_type ⇒ Object
Returns the value of attribute fan_type.
-
#force_airloop_hot_water ⇒ Object
Returns the value of attribute force_airloop_hot_water.
-
#force_boiler ⇒ Object
Returns the value of attribute force_boiler.
-
#heating_coil_type_sys2 ⇒ Object
Returns the value of attribute heating_coil_type_sys2.
-
#heating_coil_type_sys3 ⇒ Object
Returns the value of attribute heating_coil_type_sys3.
-
#heating_coil_type_sys4 ⇒ Object
Returns the value of attribute heating_coil_type_sys4.
-
#heating_coil_type_sys6 ⇒ Object
Returns the value of attribute heating_coil_type_sys6.
-
#mau_cooling_type ⇒ Object
Returns the value of attribute mau_cooling_type.
-
#mau_heating_coil_type ⇒ Object
Returns the value of attribute mau_heating_coil_type.
-
#mau_type ⇒ Object
Returns the value of attribute mau_type.
-
#name ⇒ Object
Returns the value of attribute name.
-
#necb_reference_hp ⇒ Object
Returns the value of attribute necb_reference_hp.
-
#necb_reference_hp_supp_fuel ⇒ Object
Returns the value of attribute necb_reference_hp_supp_fuel.
-
#primary_boiler_cap_frac ⇒ Object
Returns the value of attribute primary_boiler_cap_frac.
-
#secondary_boiler_cap_frac ⇒ Object
Returns the value of attribute secondary_boiler_cap_frac.
-
#swh_fueltype ⇒ Object
Returns the value of attribute swh_fueltype.
Instance Method Summary collapse
-
#reset_default_fuel_info(init_fuel_type:) ⇒ Object
Reset to default fuel info.
-
#set_airloop_fancoils_heating ⇒ Object
Forces heating_coils to be ‘Hot Water’ except when using HPs.
-
#set_boiler_fuel(standards_data:, boiler_fuel:, boiler_cap_ratios:) ⇒ Object
Forces a boiler to be generated.
- #set_defaults(standards_data:, primary_heating_fuel:) ⇒ Object
-
#set_fuel_to_hvac_system_primary(hvac_system_primary:, standards_data:) ⇒ Object
Reset system fuels to match parameters defined by hvac_system_primary.
-
#set_swh_fuel(swh_fuel:) ⇒ Object
Reset the Service Hot Water fuel.
Instance Attribute Details
#backup_boiler_fueltype ⇒ Object
Returns the value of attribute backup_boiler_fueltype.
4 5 6 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 4 def backup_boiler_fueltype @backup_boiler_fueltype end |
#baseboard_type ⇒ Object
Returns the value of attribute baseboard_type.
7 8 9 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 7 def baseboard_type @baseboard_type end |
#boiler_fueltype ⇒ Object
Returns the value of attribute boiler_fueltype.
3 4 5 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 3 def boiler_fueltype @boiler_fueltype end |
#chiller_type ⇒ Object
Returns the value of attribute chiller_type.
11 12 13 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 11 def chiller_type @chiller_type end |
#ecm_fueltype ⇒ Object
Returns the value of attribute ecm_fueltype.
19 20 21 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 19 def ecm_fueltype @ecm_fueltype end |
#fan_type ⇒ Object
Returns the value of attribute fan_type.
18 19 20 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 18 def fan_type @fan_type end |
#force_airloop_hot_water ⇒ Object
Returns the value of attribute force_airloop_hot_water.
22 23 24 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 22 def force_airloop_hot_water @force_airloop_hot_water end |
#force_boiler ⇒ Object
Returns the value of attribute force_boiler.
21 22 23 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 21 def force_boiler @force_boiler end |
#heating_coil_type_sys2 ⇒ Object
Returns the value of attribute heating_coil_type_sys2.
12 13 14 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 12 def heating_coil_type_sys2 @heating_coil_type_sys2 end |
#heating_coil_type_sys3 ⇒ Object
Returns the value of attribute heating_coil_type_sys3.
13 14 15 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 13 def heating_coil_type_sys3 @heating_coil_type_sys3 end |
#heating_coil_type_sys4 ⇒ Object
Returns the value of attribute heating_coil_type_sys4.
14 15 16 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 14 def heating_coil_type_sys4 @heating_coil_type_sys4 end |
#heating_coil_type_sys6 ⇒ Object
Returns the value of attribute heating_coil_type_sys6.
15 16 17 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 15 def heating_coil_type_sys6 @heating_coil_type_sys6 end |
#mau_cooling_type ⇒ Object
Returns the value of attribute mau_cooling_type.
10 11 12 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 10 def mau_cooling_type @mau_cooling_type end |
#mau_heating_coil_type ⇒ Object
Returns the value of attribute mau_heating_coil_type.
9 10 11 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 9 def mau_heating_coil_type @mau_heating_coil_type end |
#mau_type ⇒ Object
Returns the value of attribute mau_type.
8 9 10 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 8 def mau_type @mau_type end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 2 def name @name end |
#necb_reference_hp ⇒ Object
Returns the value of attribute necb_reference_hp.
16 17 18 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 16 def necb_reference_hp @necb_reference_hp end |
#necb_reference_hp_supp_fuel ⇒ Object
Returns the value of attribute necb_reference_hp_supp_fuel.
17 18 19 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 17 def necb_reference_hp_supp_fuel @necb_reference_hp_supp_fuel end |
#primary_boiler_cap_frac ⇒ Object
Returns the value of attribute primary_boiler_cap_frac.
5 6 7 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 5 def primary_boiler_cap_frac @primary_boiler_cap_frac end |
#secondary_boiler_cap_frac ⇒ Object
Returns the value of attribute secondary_boiler_cap_frac.
6 7 8 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 6 def secondary_boiler_cap_frac @secondary_boiler_cap_frac end |
#swh_fueltype ⇒ Object
Returns the value of attribute swh_fueltype.
20 21 22 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 20 def swh_fueltype @swh_fueltype end |
Instance Method Details
#reset_default_fuel_info(init_fuel_type:) ⇒ Object
Reset to default fuel info
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 100 def reset_default_fuel_info(init_fuel_type:) @name = init_fuel_type[:name] @boiler_fueltype = init_fuel_type[:boiler_fueltype] @backup_boiler_fueltype = init_fuel_type[:backup_boiler_fueltype] @primary_boiler_cap_frac = init_fuel_type[:primary_boiler_cap_frac] @secondary_boiler_cap_frac = init_fuel_type[:secondary_boiler_cap_frac] @baseboard_type = init_fuel_type[:baseboard_type] @mau_type = init_fuel_type[:mau_type] @mau_heating_coil_type = init_fuel_type[:mau_heating_coil_type] @mau_cooling_type = init_fuel_type[:mau_cooling_type] @chiller_type = init_fuel_type[:chiller_type] @heating_coil_type_sys2 = init_fuel_type[:heating_coil_type_sys2] @heating_coil_type_sys3 = init_fuel_type[:heating_coil_type_sys3] @heating_coil_type_sys4 = init_fuel_type[:heating_coil_type_sys4] @heating_coil_type_sys6 = init_fuel_type[:heating_coil_type_sys6] @necb_reference_hp = init_fuel_type[:necb_reference_hp] @necb_reference_hp_supp_fuel = init_fuel_type[:necb_reference_hp_supp_fuel] @fan_type = init_fuel_type[:fan_type] @ecm_fueltype = init_fuel_type[:ecm_fueltype] @swh_fueltype = init_fuel_type[:swh_fueltype] @force_boiler = init_fuel_type[:force_boiler] @force_airloop_hot_water = init_fuel_type[:force_airloop_hot_water] end |
#set_airloop_fancoils_heating ⇒ Object
Forces heating_coils to be ‘Hot Water’ except when using HPs
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 71 def set_airloop_fancoils_heating() @force_airloop_hot_water = true @mau_heating_coil_type = "Hot Water" unless @mau_heating_coil_type == 'DX' @heating_coil_type_sys2 = "Hot Water" unless @heating_coil_type_sys2 == 'DX' @heating_coil_type_sys3 = "Hot Water" unless @heating_coil_type_sys3 == 'DX' @heating_coil_type_sys4 = "Hot Water" unless @heating_coil_type_sys4 == 'DX' @heating_coil_type_sys6 = "Hot Water" unless @heating_coil_type_sys6 == 'DX' if @mau_heating_coil_type == 'DX' || @heating_coil_type_sys3 == 'DX' || @heating_coil_type_sys4 == 'DX' || @heating_coil_type_sys6 == 'DX' || @heating_coil_type_sys2 == 'DX' @necb_reference_hp_supp_fuel = 'Hot Water' end end |
#set_boiler_fuel(standards_data:, boiler_fuel:, boiler_cap_ratios:) ⇒ Object
Forces a boiler to be generated. It searches boiler_fuel_type_sets.json for the boiler_fuel string and sets the primary and backup boiler fuels to be whatever is boiler fuel type set.
54 55 56 57 58 59 60 61 62 63 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 54 def set_boiler_fuel(standards_data:, boiler_fuel:, boiler_cap_ratios:) boiler_fuel_defaults = standards_data['boiler_fuel_type_sets'].detect { |fuel_type_set| fuel_type_set['name'] == boiler_fuel } @boiler_fueltype = boiler_fuel_defaults['boiler_fueltype'] @primary_boiler_cap_frac = boiler_cap_ratios[:primary_ratio] @backup_boiler_fueltype = boiler_fuel_defaults['backup_boiler_fueltype'] @secondary_boiler_cap_frac = boiler_cap_ratios[:secondary_ratio] @baseboard_type = boiler_fuel_defaults['baseboard_type'] @heating_coil_type_sys6 = boiler_fuel_defaults['heating_coil_type_sys6'] @force_boiler = true end |
#set_defaults(standards_data:, primary_heating_fuel:) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 24 def set_defaults(standards_data:, primary_heating_fuel:) # Get fuelset. system_fuel_defaults = standards_data['fuel_type_sets'].detect { |fuel_type_set| fuel_type_set['name'] == primary_heating_fuel } raise("fuel_type_sets named #{primary_heating_fuel} not found in fuel_type_sets table.") if system_fuel_defaults.nil? # Assign fuel sources. @name = system_fuel_defaults['name'] @boiler_fueltype = system_fuel_defaults['boiler_fueltype'] @backup_boiler_fueltype = system_fuel_defaults['boiler_fueltype'] @primary_boiler_cap_frac = nil @secondary_boiler_cap_frac = nil @baseboard_type = system_fuel_defaults['baseboard_type'] @mau_type = system_fuel_defaults['mau_type'] @mau_cooling_type = system_fuel_defaults['mau_cooling_type'] @chiller_type = system_fuel_defaults['chiller_type'] @mau_heating_coil_type = system_fuel_defaults['mau_heating_coil_type'] @heating_coil_type_sys2 = system_fuel_defaults['heating_coil_type_sys2'] @heating_coil_type_sys3 = system_fuel_defaults['heating_coil_type_sys3'] @heating_coil_type_sys4 = system_fuel_defaults['heating_coil_type_sys4'] @heating_coil_type_sys6 = system_fuel_defaults['heating_coil_type_sys6'] @necb_reference_hp = system_fuel_defaults['necb_reference_hp'] @necb_reference_hp_supp_fuel = system_fuel_defaults['necb_reference_hp_supp_fuel'] @fan_type = system_fuel_defaults['fan_type'] @swh_fueltype = system_fuel_defaults['swh_fueltype'] @ecm_fueltype = system_fuel_defaults['ecm_fueltype'] @force_boiler = false @force_airloop_hot_water = false end |
#set_fuel_to_hvac_system_primary(hvac_system_primary:, standards_data:) ⇒ Object
Reset system fuels to match parameters defined by hvac_system_primary
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 84 def set_fuel_to_hvac_system_primary(hvac_system_primary:, standards_data:) hvac_system_data = standards_data['hvac_types'].find { |system| system['description'].to_s.downcase == hvac_system_primary.to_s.downcase } return if hvac_system_data.nil? || hvac_system_data.empty? @baseboard_type = hvac_system_data["baseboard_type"].to_s unless hvac_system_data["baseboard_type"].nil? || @force_boiler == true @mau_heating_coil_type = hvac_system_data["mau_heating_type"].to_s unless hvac_system_data["mau_heating_type"].nil? || @force_airloop_hot_water == true @mau_type = hvac_system_data["mau_type"].to_bool unless hvac_system_data["mau_type"].nil? @necb_reference_hp = hvac_system_data["necb_reference_hp"].to_bool unless hvac_system_data["necb_reference_hp"].nil? @necb_reference_hp_supp_fuel = hvac_system_data["necb_reference_hp_supp_fuel"] unless hvac_system_data["necb_reference_hp_supp_fuel"].nil? || @force_airloop_hot_water == true # If applying a hvac_system_primary with an NECB reference HP, make sure that the system 4 systems (if left at # NECB_Default) work with the NECB reference HP. if hvac_system_data["necb_reference_hp"].to_bool @heating_coil_type_sys4 = "DX" end end |
#set_swh_fuel(swh_fuel:) ⇒ Object
Reset the Service Hot Water fuel.
66 67 68 |
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 66 def set_swh_fuel(swh_fuel:) @swh_fueltype = swh_fuel end |