Class: EnergyPlus::StatFile

Inherits:
Object
  • Object
show all
Defined in:
lib/openstudio-standards/weather/Weather.stat_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ StatFile



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 50

def initialize(path)
  @path = Pathname.new(path)
  @valid = false
  @lat = []
  @lon = []
  @gmt = []
  @elevation = []
  @hdd18 = []
  @cdd18 = []
  @hdd10 = []
  @cdd10 = []
  @monthly_dry_bulb = []
  @delta_dry_bulb = []
  @heating_design_info = []
  @cooling_design_info  = []
  @extremes_design_info = []
  @climate_zone = []
  @standard = []
  @summer_wet_months = []
  @winter_dry_months = []
  @autumn_months = []
  @spring_months = []
  @typical_summer_wet_week = []
  @typical_winter_dry_week = []
  @typical_autumn_week = []
  @typical_spring_week = []
  @data = []
  init
end

Instance Attribute Details

#autumn_monthsObject

Returns the value of attribute autumn_months.



43
44
45
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 43

def autumn_months
  @autumn_months
end

#cdd10Object

Returns the value of attribute cdd10.



35
36
37
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 35

def cdd10
  @cdd10
end

#cdd18Object

Returns the value of attribute cdd18.



33
34
35
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 33

def cdd18
  @cdd18
end

#climate_zoneObject

Returns the value of attribute climate_zone.



39
40
41
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 39

def climate_zone
  @climate_zone
end

#cooling_design_infoObject

Returns the value of attribute cooling_design_info.



37
38
39
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 37

def cooling_design_info
  @cooling_design_info
end

#delta_dry_bulbObject

max - min of the mean monthly dry bulbs



120
121
122
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 120

def delta_dry_bulb
  @delta_dry_bulb
end

#elevationObject

Returns the value of attribute elevation.



28
29
30
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 28

def elevation
  @elevation
end

#extremes_design_infoObject

Returns the value of attribute extremes_design_info.



38
39
40
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 38

def extremes_design_info
  @extremes_design_info
end

#gmtObject

Returns the value of attribute gmt.



29
30
31
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 29

def gmt
  @gmt
end

#hdd10Object

Returns the value of attribute hdd10.



34
35
36
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 34

def hdd10
  @hdd10
end

#hdd18Object

Returns the value of attribute hdd18.



32
33
34
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 32

def hdd18
  @hdd18
end

#heating_design_infoObject

Returns the value of attribute heating_design_info.



36
37
38
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 36

def heating_design_info
  @heating_design_info
end

#latObject

Returns the value of attribute lat.



26
27
28
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 26

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



27
28
29
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 27

def lon
  @lon
end

#monthly_dry_bulbObject

Returns the value of attribute monthly_dry_bulb.



30
31
32
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 30

def monthly_dry_bulb
  @monthly_dry_bulb
end

#pathObject

Returns the value of attribute path.



24
25
26
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 24

def path
  @path
end

#spring_monthsObject

Returns the value of attribute spring_months.



44
45
46
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 44

def spring_months
  @spring_months
end

#standardObject

Returns the value of attribute standard.



40
41
42
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 40

def standard
  @standard
end

#summer_wet_monthsObject

Returns the value of attribute summer_wet_months.



41
42
43
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 41

def summer_wet_months
  @summer_wet_months
end

#typical_autumn_weekObject

Returns the value of attribute typical_autumn_week.



47
48
49
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 47

def typical_autumn_week
  @typical_autumn_week
end

#typical_spring_weekObject

Returns the value of attribute typical_spring_week.



48
49
50
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 48

def typical_spring_week
  @typical_spring_week
end

#typical_summer_wet_weekObject

Returns the value of attribute typical_summer_wet_week.



45
46
47
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 45

def typical_summer_wet_week
  @typical_summer_wet_week
end

#typical_winter_dry_weekObject

Returns the value of attribute typical_winter_dry_week.



46
47
48
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 46

def typical_winter_dry_week
  @typical_winter_dry_week
end

#validObject

Returns the value of attribute valid.



25
26
27
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 25

def valid
  @valid
end

#winter_dry_monthsObject

Returns the value of attribute winter_dry_months.



42
43
44
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 42

def winter_dry_months
  @winter_dry_months
end

Instance Method Details

#mean_dry_bulbObject

the mean of the mean monthly dry bulbs



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 107

def mean_dry_bulb
  if !@monthly_dry_bulb.empty?
    sum = 0
    @monthly_dry_bulb.each { |db| sum += db }
    mean = sum / @monthly_dry_bulb.size
  else
    mean = ''
  end

  mean
end

#outputObject

Output for debugging stat routines.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 81

def output
  line = ''
  line << "#{@path} , "
  line << "#{@lat} ,"
  line << "#{@lon} ,"
  line << "#{@gmt} ,"
  line << "#{@elevation} ,"
  line << "#{@hdd18} ,"
  line << "#{@cdd18} ,"
  line << "#{@hdd10} ,"
  line << "#{@cdd10} ,"
  line << "#{mean_dry_bulb} ,"
  line << "#{delta_dry_bulb} ,"
  line << "#{@heating_design_info} ,"
  line << "#{@cooling_design_info}  ,"
  line << "#{@extremes_design_info} ,"
  line << "#{@climate_zone} ,"
  line << "#{@standard} ,"
  line << "#{@valid} ,"
end

#valid?Boolean



102
103
104
# File 'lib/openstudio-standards/weather/Weather.stat_file.rb', line 102

def valid?
  return @valid
end