Class: BTAP::Environment::StatFile

Inherits:
Object
  • Object
show all
Defined in:
lib/openstudio-standards/btap/environment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ StatFile

This method initializes.

Parameters:

Author:



155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/openstudio-standards/btap/environment.rb', line 155

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 = []
  init
end

Instance Attribute Details

#cdd10Object

Returns the value of attribute cdd10.



147
148
149
# File 'lib/openstudio-standards/btap/environment.rb', line 147

def cdd10
  @cdd10
end

#cdd18Object

Returns the value of attribute cdd18.



145
146
147
# File 'lib/openstudio-standards/btap/environment.rb', line 145

def cdd18
  @cdd18
end

#cooling_design_infoObject

Returns the value of attribute cooling_design_info.



149
150
151
# File 'lib/openstudio-standards/btap/environment.rb', line 149

def cooling_design_info
  @cooling_design_info
end

#elevationObject

Returns the value of attribute elevation.



141
142
143
# File 'lib/openstudio-standards/btap/environment.rb', line 141

def elevation
  @elevation
end

#extremes_design_infoObject

Returns the value of attribute extremes_design_info.



150
151
152
# File 'lib/openstudio-standards/btap/environment.rb', line 150

def extremes_design_info
  @extremes_design_info
end

#gmtObject

Returns the value of attribute gmt.



142
143
144
# File 'lib/openstudio-standards/btap/environment.rb', line 142

def gmt
  @gmt
end

#hdd10Object

Returns the value of attribute hdd10.



146
147
148
# File 'lib/openstudio-standards/btap/environment.rb', line 146

def hdd10
  @hdd10
end

#hdd18Object

Returns the value of attribute hdd18.



144
145
146
# File 'lib/openstudio-standards/btap/environment.rb', line 144

def hdd18
  @hdd18
end

#heating_design_infoObject

Returns the value of attribute heating_design_info.



148
149
150
# File 'lib/openstudio-standards/btap/environment.rb', line 148

def heating_design_info
  @heating_design_info
end

#latObject

Returns the value of attribute lat.



139
140
141
# File 'lib/openstudio-standards/btap/environment.rb', line 139

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



140
141
142
# File 'lib/openstudio-standards/btap/environment.rb', line 140

def lon
  @lon
end

#monthly_dry_bulbObject

Returns the value of attribute monthly_dry_bulb.



143
144
145
# File 'lib/openstudio-standards/btap/environment.rb', line 143

def monthly_dry_bulb
  @monthly_dry_bulb
end

#pathObject

Returns the value of attribute path.



137
138
139
# File 'lib/openstudio-standards/btap/environment.rb', line 137

def path
  @path
end

#validObject

Returns the value of attribute valid.



138
139
140
# File 'lib/openstudio-standards/btap/environment.rb', line 138

def valid
  @valid
end

Instance Method Details

#delta_dry_bulbObject

max - min of the mean monthly dry bulbs



191
192
193
194
195
196
197
198
199
# File 'lib/openstudio-standards/btap/environment.rb', line 191

def delta_dry_bulb
  if not @monthly_dry_bulb.empty? then
    delta_t = @monthly_dry_bulb.max-@monthly_dry_bulb.min
  else
    delta_t = ""
  end

  delta_t
end

#mean_dry_bulbObject

the mean of the mean monthly dry bulbs



179
180
181
182
183
184
185
186
187
188
# File 'lib/openstudio-standards/btap/environment.rb', line 179

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

#valid?Boolean

Returns:

  • (Boolean)


174
175
176
# File 'lib/openstudio-standards/btap/environment.rb', line 174

def valid?
  return @valid
end