NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_SimulationParameter.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_SimulationParameterH
23 #define NANDRAD_SimulationParameterH
24 
25 #include <string>
26 #include <IBK_Parameter.h>
27 #include <IBK_IntPara.h>
28 #include <IBK_Flag.h>
29 
30 #include "NANDRAD_Interval.h"
31 #include "NANDRAD_CodeGenMacros.h"
32 #include "NANDRAD_SolarLoadsDistributionModel.h"
33 
34 namespace NANDRAD {
35 
36 class LinearSplineParameter;
37 
38 /*! Simulation parameters define global model settings. */
40 public:
41 
42  /*! Parameter values. */
43  enum para_t {
44  P_InitialTemperature, // Keyword: InitialTemperature [C] 'Global initial temperature [C].'
45  P_InitialRelativeHumidity, // Keyword: InitialRelativeHumidity [%] 'Global initial relative humidity [%].'
46  P_DomesticWaterSensitiveHeatGainFraction, // Keyword: DomesticWaterSensitiveHeatGainFraction [---] 'Percentage of sensitive heat from domestic water istributed towrads the room.'
47  P_AirExchangeRateN50, // Keyword: AirExchangeRateN50 [1/h] 'Air exchange rate resulting from a pressure difference of 50 Pa between inside and outside.'
48  P_ShieldingCoefficient, // Keyword: ShieldingCoefficient [---] 'Shielding coefficient for a given location and envelope type.'
49  P_HeatingDesignAmbientTemperature, // Keyword: HeatingDesignAmbientTemperature [C] 'Ambient temperature for a design day. Parameter that is needed for FMU export.'
50  NUM_P
51  };
52 
53  /*! Integer parameters. */
54  enum intPara_t {
55  IP_StartYear, // Keyword: StartYear 'Start year of the simulation.'
56  NUM_IP
57  };
58 
59  /*! Global model flags. */
60  enum flag_t {
61  F_EnableMoistureBalance, // Keyword: EnableMoistureBalance 'Flag activating moisture balance calculation if enabled.'
62  F_EnableCO2Balance, // Keyword: EnableCO2Balance 'Flag activating CO2 balance calculation if enabled.'
63  F_EnableJointVentilation, // Keyword: EnableJointVentilation 'Flag activating ventilation through joints and openings.'
64  F_ExportClimateDataFMU, // Keyword: ExportClimateDataFMU 'Flag activating FMU export of climate data.'
65  NUM_F
66  };
67 
68  // *** PUBLIC MEMBER FUNCTIONS ***
69 
70  /*! Init default values (called before readXML()).
71  \note These values will be overwritten in readXML() when the respective property is set
72  in the project file.
73  */
74  void initDefaults();
75 
76  NANDRAD_READWRITE
77  NANDRAD_COMP(SimulationParameter)
78 
79  /*! To be called after readXML() and mainly used to check whether user-provided parameters are in the valid ranges. */
80  void checkParameters() const;
81 
82  /*! Takes the linear spline parameter and evalutes the data using potential time shift defined due to
83  simulation start and also considers continuous/cyclic usage of the spline.
84  \param t Time point in simulation time (i.e. simulation always starts with 0)
85  \param spl The spline data.
86  */
87  double evaluateTimeSeries(double t, const NANDRAD::LinearSplineParameter & spl) const;
88 
89  // *** PUBLIC MEMBER VARIABLES ***
90 
91  /*! List of parameters. */
92  IBK::Parameter m_para[NUM_P]; // XML:E
93  /*! Integer parameters. */
94  IBK::IntPara m_intPara[NUM_IP]; // XML:E
95  /*! List of flags. */
96  IBK::Flag m_flags[NUM_F]; // XML:E
97 
98  /*! The time interval of simulation beginning, offset
99  and duration from January 1, 0:00 of the start year. */
101 
102  SolarLoadsDistributionModel m_solarLoadsDistributionModel; // XML:E
103 };
104 
105 } // namespace NANDRAD
106 
107 #endif // NANDRAD_SimulationParameterH
double evaluateTimeSeries(double t, const NANDRAD::LinearSplineParameter &spl) const
Takes the linear spline parameter and evalutes the data using potential time shift defined due to sim...
Simulation parameters define global model settings.
Interval m_interval
The time interval of simulation beginning, offset and duration from January 1, 0:00 of the start year...
NANDRAD_READWRITE void checkParameters() const
To be called after readXML() and mainly used to check whether user-provided parameters are in the val...
IBK::Parameter m_para[NUM_P]
List of parameters.
Class LinearSplineParameter stores a linear spline curve, the corresponding parameter name and a unit...
The class Interval defines intervals of simulation time.
IBK::IntPara m_intPara[NUM_IP]
Integer parameters.
void initDefaults()
Init default values (called before readXML()).
IBK::Flag m_flags[NUM_F]
List of flags.
This model stores global parameters related to solar loads distribution in zones. ...
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...