summaryrefslogtreecommitdiffstats
path: root/House.h
blob: aab0883349e325a6c2a020612826e59b91f97cd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _HOUSE_H_
#define _HOUSE_H_

#include "Temparray.h"
#include "Sun.h"
#include "Triangle.h"
#include <list>
#include <math.h>

#define TRANSVERSAL 0
#define LONGITUDINAL 1
#define FLAT 2

class House
{
  public:
    House(float inittemp0, int earthx0, int earthy0, int earthz0, float collectortemp0,
          float radiation0, float latitude0, float eta00, float k10, float k20, float collectorarea0,
          float roofangle0, float watthoursperhuman, int humans, int heaterenergy0);
          
    std::list<Triangle> getTriangles(){
      std::list<Triangle> triangles;
      triangles = temp.getTriangles();
      return triangles;
    }

    void calcefficiency();
    void calctemp();
    void calcdiff();
    void calcneededenergy();
    void calccollectoroutput(int day, int time, int month);
    void calcprobeinput(int day, int time, int months);
    void controller();
    
  private:
    Temparray temp;
    Sun sun;
    float collectortemp, latitude, radiation, eta0, k1, k2, watthoursperhuman, collectorarea,
          heaterenergy, roofangle, collectoroutput, probeinput;
    float tempinside[24], tempoutside[12][24], efficiencyflat[100], efficiencyvacuum[100],
          anglecorrectionflat[91], anglecorrectiontransversal[91],
          anglecorrectionlongitudinal[91], tempdifference[12][24], neededenergy[12][24];
    int humans, collectorstatus;
};

#endif /* _HOUSE_H_ */