Class: EnergyPlus::StatFile

Inherits:
Object
  • Object
show all
Defined in:
lib/energyplus/StatFile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#cdd10Object

Returns the value of attribute cdd10.



35
36
37
# File 'lib/energyplus/StatFile.rb', line 35

def cdd10
  @cdd10
end

#cdd18Object

Returns the value of attribute cdd18.



33
34
35
# File 'lib/energyplus/StatFile.rb', line 33

def cdd18
  @cdd18
end

#elevationObject

Returns the value of attribute elevation.



29
30
31
# File 'lib/energyplus/StatFile.rb', line 29

def elevation
  @elevation
end

#gmtObject

Returns the value of attribute gmt.



30
31
32
# File 'lib/energyplus/StatFile.rb', line 30

def gmt
  @gmt
end

#hdd10Object

Returns the value of attribute hdd10.



34
35
36
# File 'lib/energyplus/StatFile.rb', line 34

def hdd10
  @hdd10
end

#hdd18Object

Returns the value of attribute hdd18.



32
33
34
# File 'lib/energyplus/StatFile.rb', line 32

def hdd18
  @hdd18
end

#latObject

Returns the value of attribute lat.



27
28
29
# File 'lib/energyplus/StatFile.rb', line 27

def lat
  @lat
end

#lonObject

Returns the value of attribute lon.



28
29
30
# File 'lib/energyplus/StatFile.rb', line 28

def lon
  @lon
end

#monthlyDBObject

Returns the value of attribute monthlyDB.



31
32
33
# File 'lib/energyplus/StatFile.rb', line 31

def monthlyDB
  @monthlyDB
end

#pathObject

Returns the value of attribute path.



25
26
27
# File 'lib/energyplus/StatFile.rb', line 25

def path
  @path
end

#validObject

Returns the value of attribute valid.



26
27
28
# File 'lib/energyplus/StatFile.rb', line 26

def valid
  @valid
end

Instance Method Details

#deltaDBObject

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

#meanDBObject

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

Returns:

  • (Boolean)


53
54
55
# File 'lib/energyplus/StatFile.rb', line 53

def valid?
  return @valid
end