Initial Commit
[HECS.git] / HeatLosses.h
blobe20992fa16b9a211eac1d6f72782348c70c8009f
1 /***************************************************************************
2 * *
3 * HeatLosses.h Copyright (C) 2008 by Jon Rumble *
4 * j.w.rumble@reading.ac.uk *
5 * *
6 * This file is part of HECS, *
7 * *
8 * HECS is free software: you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation, either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * HECS is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
20 ***************************************************************************/
23 #ifndef HEATLOSSES_H
24 #define HEATLOSSES_H
26 #include "HeatLossElement.h"
27 #include "DwellingDimensions.h"
28 #include "Ventilation.h"
29 #include "ConfigParser.h"
30 #include <QString>
31 #include <QStringList>
32 #include <QMap>
33 #include <QList>
34 #include <QMapIterator>
35 #include "TableReader.h"
37 class HeatLosses
40 public:
42 // Constructors/Destructors
46 /**
47 * CONSTRUCTORS
49 HeatLosses(const ConfigParser& config,
50 DwellingDimensions *dims,
51 Ventilation *ventilation);
53 ~HeatLosses();
56 /**
57 * METHODS
61 void setTotalAreaElems ( double val_in );
62 double getTotalAreaElems ( );
63 void setFabricHeatLoss ( double val_in );
64 double getFabricHeatLoss ( );
65 void setThermalBridges ( double val_in );
66 double getThermalBridges ( );
67 void setTotalFabricHeatLoss ( double val_in );
68 double getTotalFabricHeatLoss ( ) const ;
69 void setVentilationHeatLoss ( double val_in );
70 double getVentilationHeatLoss ( );
71 void setHeatLossCoeff ( double val_in );
72 double getHeatLossCoeff ( );
73 void setHeatLossParam ( double val_in );
74 double getHeatLossParam ( );
75 void addHeatLoss(const QString& name, double area, double uValue);
76 void createHeatLossElement(const QString& elemName);
78 void addHeatLoss(const QString& elemName,
79 const QString& lossName,
80 double area,
81 double uValue);
83 void calcAll();
85 private:
87 // Private attributes
90 double m_totalAreaElems;
91 double m_fabricHeatLoss;
92 double m_thermalBridges;
93 double m_totalFabricHeatLoss;
94 double m_ventilationHeatLoss;
95 double m_heatLossCoeff;
96 double m_heatLossParam;
98 QMap <QString,HeatLossElement> elementMap;
99 QMap <int, QList <double> > uValuesMap;
100 DwellingDimensions *ptrDims;
101 Ventilation *ptrVentilation;
102 ConfigParser cf;
104 double calcUValueWindow (double uW);
105 void createHeatLossElement (const QString elemName,
106 double area,
107 double uValue);
108 void initVars();
109 void buildLT();
110 void calcHeatLossParam();
111 void calcTotalAreaElems();
112 void fetchHeatLosses();
115 #endif // HEATLOSSES_H