Class: EnergyPlus::StatFile
- Inherits:
-
Object
- Object
- EnergyPlus::StatFile
- Defined in:
- lib/energyplus/StatFile.rb
Instance Attribute Summary collapse
-
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
-
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#gmt ⇒ Object
Returns the value of attribute gmt.
-
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
-
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
-
#path ⇒ Object
Returns the value of attribute path.
-
#valid ⇒ Object
Returns the value of attribute valid.
Instance Method Summary collapse
-
#deltaDB ⇒ Object
max - min of the mean monthly dry bulbs.
-
#initialize(path) ⇒ StatFile
constructor
A new instance of StatFile.
-
#meanDB ⇒ Object
the mean of the mean monthly dry bulbs.
- #valid? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ StatFile
Returns a new instance of StatFile.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/energyplus/StatFile.rb', line 37 def initialize(path) @path = Pathname.new(path) @valid = false @lat = [] @lon = [] @gmt = [] @elevation = [] @hdd18 = [] @cdd18 = [] @hdd10 = [] @cdd10 = [] @monthlyDB = [] @deltaDB = [] init end |
Instance Attribute Details
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
35 36 37 |
# File 'lib/energyplus/StatFile.rb', line 35 def cdd10 @cdd10 end |
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
33 34 35 |
# File 'lib/energyplus/StatFile.rb', line 33 def cdd18 @cdd18 end |
#elevation ⇒ Object
Returns the value of attribute elevation.
29 30 31 |
# File 'lib/energyplus/StatFile.rb', line 29 def elevation @elevation end |
#gmt ⇒ Object
Returns the value of attribute gmt.
30 31 32 |
# File 'lib/energyplus/StatFile.rb', line 30 def gmt @gmt end |
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
34 35 36 |
# File 'lib/energyplus/StatFile.rb', line 34 def hdd10 @hdd10 end |
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
32 33 34 |
# File 'lib/energyplus/StatFile.rb', line 32 def hdd18 @hdd18 end |
#lat ⇒ Object
Returns the value of attribute lat.
27 28 29 |
# File 'lib/energyplus/StatFile.rb', line 27 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
28 29 30 |
# File 'lib/energyplus/StatFile.rb', line 28 def lon @lon end |
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
31 32 33 |
# File 'lib/energyplus/StatFile.rb', line 31 def monthlyDB @monthlyDB end |
#path ⇒ Object
Returns the value of attribute path.
25 26 27 |
# File 'lib/energyplus/StatFile.rb', line 25 def path @path end |
#valid ⇒ Object
Returns the value of attribute valid.
26 27 28 |
# File 'lib/energyplus/StatFile.rb', line 26 def valid @valid end |
Instance Method Details
#deltaDB ⇒ Object
max - min of the mean monthly dry bulbs
70 71 72 73 74 75 76 77 78 |
# File 'lib/energyplus/StatFile.rb', line 70 def deltaDB if not @monthlyDB.empty? then deltaT = @monthlyDB.max-@monthlyDB.min else deltaT = "" end return deltaT end |
#meanDB ⇒ Object
the mean of the mean monthly dry bulbs
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/energyplus/StatFile.rb', line 58 def meanDB if not @monthlyDB.empty? then thisSum = 0 @monthlyDB.each { |db| thisSum += db } thisMean = thisSum/@monthlyDB.size else thisMean = "" end return thisMean end |
#valid? ⇒ Boolean
53 54 55 |
# File 'lib/energyplus/StatFile.rb', line 53 def valid? return @valid end |