NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_Zone.h
1 /* The NANDRAD data model library.
2 
3  Copyright (c) 2012-today, Institut für Bauklimatik, TU Dresden, Germany
4 
5  Primary authors:
6  Andreas Nicolai <andreas.nicolai -[at]- tu-dresden.de>
7  Anne Paepcke <anne.paepcke -[at]- tu-dresden.de>
8 
9  This library is part of SIM-VICUS (https://github.com/ghorwin/SIM-VICUS)
10 
11  This library is free software: you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  This library is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 */
21 
22 #ifndef NANDRAD_ZoneH
23 #define NANDRAD_ZoneH
24 
25 #include <string>
26 
27 #include <IBK_Parameter.h>
28 #include <IBK_IntPara.h>
29 #include <IBK_Path.h>
30 
31 #include "NANDRAD_CodeGenMacros.h"
32 #include "NANDRAD_Constants.h"
33 
34 namespace NANDRAD {
35 
36 /*! A zone defines a thermal zone/room with a single air temperature.
37 
38  The class Zone stores all properties needed to compute zone temperature from energy density (the conserved quantity).
39 
40  Zones can be either Constant or Active. For constant zones, the temperature is assumed to
41  be fixed/predefined (given via parameter P_Temperature) whereas in Active zones the temperature
42  is computed (i.e. included in the model's unknowns).
43 */
44 class Zone {
45 public:
46 
47  /*! Type of zone. Defines whether zone is balanced and included in equation system. */
48  enum type_t {
49  /*! Constant model requires P_Temperature parameter. Optionally, a schedule with name 'TemperatureSchedule' can be used to
50  identify temperature of the zone (or soil, if this is a ground zone).
51  */
52  ZT_Constant, // Keyword: Constant 'Zone with constant temperature'
53  ZT_Scheduled, // Keyword: Scheduled 'Zone with schedule defined temperature'
54  ZT_Active, // Keyword: Active 'Zone with energy balance equation'
55  ZT_Ground, // Keyword: Ground 'Ground zone (calculates temperature based on heat loss to ground model)'
56  NUM_ZT
57  };
58 
59  /*! Parameters of a zone. */
60  enum para_t {
61  P_Temperature, // Keyword: Temperature [C] 'Temperature of the zone if set constant'
62  P_RelativeHumidity, // Keyword: RelativeHumidity [%] 'Relative humidity of the zone if set constant'
63  P_CO2Concentration, // Keyword: CO2Concentration [g/m3] 'CO2 concentration of the zone if set constant'
64  P_Area, // Keyword: Area [m2] 'Net usage area of the ground floor (for area-related outputs and loads)'
65  P_Volume, // Keyword: Volume [m3] 'Zone air volume'
66  P_HeatCapacity, // Keyword: HeatCapacity [J/K] 'Extra heat capacity'
67  NUM_P
68  };
69 
70  // *** PUBLIC MEMBER FUNCTIONS ***
71 
72  NANDRAD_READWRITE
73  NANDRAD_COMPARE_WITH_ID
74 
75  /*! Checks for valid and required parameters (value ranges). */
76  void checkParameters() const;
77 
78  // *** PUBLIC MEMBER VARIABLES ***
79 
80  /*! Unique ID of the zone. */
81  unsigned int m_id = INVALID_ID; // XML:A:required
82 
83  /*! Descriptive name of zone. */
84  std::string m_displayName; // XML:A
85 
86  /*! Zone type (Constant, Active).
87  \sa type_t
88  */
89  type_t m_type = NUM_ZT; // XML:A:required
90 
91  /*! Physical parameters describing the zone. */
92  IBK::Parameter m_para[NUM_P]; // XML:E
93 
94  /*! Data type used in view factor definition. */
95  typedef std::pair<unsigned int, unsigned int> viewFactorPair;
96  /*! Optional: view factors for all inside interfaces of the current zone. */
97  std::vector<std::pair<viewFactorPair, double> > m_viewFactors;
98 
99 }; // Zone
100 
101 
102 } // namespace NANDRAD
103 
104 #endif // NANDRAD_ZoneH
unsigned int m_id
Unique ID of the zone.
Definition: NANDRAD_Zone.h:81
para_t
Parameters of a zone.
Definition: NANDRAD_Zone.h:60
type_t m_type
Zone type (Constant, Active).
Definition: NANDRAD_Zone.h:89
Contains global constants for the Nandrad data model.
std::string m_displayName
Descriptive name of zone.
Definition: NANDRAD_Zone.h:84
A zone defines a thermal zone/room with a single air temperature.
Definition: NANDRAD_Zone.h:44
unsigned int INVALID_ID
defines an invalid id
std::pair< unsigned int, unsigned int > viewFactorPair
Data type used in view factor definition.
Definition: NANDRAD_Zone.h:95
IBK::Parameter m_para[NUM_P]
Physical parameters describing the zone.
Definition: NANDRAD_Zone.h:92
type_t
Type of zone.
Definition: NANDRAD_Zone.h:48
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
std::vector< std::pair< viewFactorPair, double > > m_viewFactors
Optional: view factors for all inside interfaces of the current zone.
Definition: NANDRAD_Zone.h:97
Constant model requires P_Temperature parameter.
Definition: NANDRAD_Zone.h:52
NANDRAD_READWRITE NANDRAD_COMPARE_WITH_ID void checkParameters() const
Checks for valid and required parameters (value ranges).