Class: SystemFuels

Inherits:
Object
  • Object
show all
Defined in:
lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backup_boiler_fueltypeObject

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_typeObject

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_fueltypeObject

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_typeObject

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_fueltypeObject

Returns the value of attribute ecm_fueltype.



18
19
20
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 18

def ecm_fueltype
  @ecm_fueltype
end

#fan_typeObject

Returns the value of attribute fan_type.



17
18
19
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 17

def fan_type
  @fan_type
end

#heating_coil_type_sys3Object

Returns the value of attribute heating_coil_type_sys3.



12
13
14
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 12

def heating_coil_type_sys3
  @heating_coil_type_sys3
end

#heating_coil_type_sys4Object

Returns the value of attribute heating_coil_type_sys4.



13
14
15
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 13

def heating_coil_type_sys4
  @heating_coil_type_sys4
end

#heating_coil_type_sys6Object

Returns the value of attribute heating_coil_type_sys6.



14
15
16
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 14

def heating_coil_type_sys6
  @heating_coil_type_sys6
end

#mau_cooling_typeObject

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_typeObject

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_typeObject

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

#nameObject

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_hpObject

Returns the value of attribute necb_reference_hp.



15
16
17
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 15

def necb_reference_hp
  @necb_reference_hp
end

#necb_reference_hp_supp_fuelObject

Returns the value of attribute necb_reference_hp_supp_fuel.



16
17
18
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 16

def necb_reference_hp_supp_fuel
  @necb_reference_hp_supp_fuel
end

#primary_boiler_cap_fracObject

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_fracObject

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_fuelObject

Returns the value of attribute swh_fuel.



19
20
21
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 19

def swh_fuel
  @swh_fuel
end

#swh_fueltypeObject

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

#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.



49
50
51
52
53
54
55
56
57
58
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 49

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']
  @mau_heating_coil_type = boiler_fuel_defaults['mau_heating_coil_type'] unless @mau_heating_coil_type == 'DX'
  @heating_coil_type_sys6 = boiler_fuel_defaults['heating_coil_type_sys6']
end

#set_defaults(standards_data:, primary_heating_fuel:, swh_fuel:) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/openstudio-standards/standards/necb/NECB2011/system_fuels.rb', line 22

def set_defaults(standards_data:, primary_heating_fuel:, swh_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_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']
end