NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_HydraulicNetwork.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_HydraulicNetworkH
23 #define NANDRAD_HydraulicNetworkH
24 
25 #include <vector>
26 
27 #include <IBK_Parameter.h>
28 
29 #include "NANDRAD_CodeGenMacros.h"
30 #include "NANDRAD_Constants.h"
31 #include "NANDRAD_HydraulicNetworkElement.h"
32 #include "NANDRAD_HydraulicFluid.h"
33 #include "NANDRAD_HydraulicNetworkPipeProperties.h"
34 #include "NANDRAD_HydraulicNetworkComponent.h"
35 #include "NANDRAD_HydraulicNetworkControlElement.h"
36 
37 
38 namespace NANDRAD {
39 
40 class Project;
41 
42 /*! Contains all data for a hydraulic network. */
44  NANDRAD_READWRITE_PRIVATE
45 public:
46 
47  /*! The various types (equations) of the hydraulic component. */
48  enum ModelType {
49  MT_HydraulicNetwork, // Keyword: HydraulicNetwork 'Only Hydraulic calculation with constant temperature'
50  MT_ThermalHydraulicNetwork, // Keyword: ThermalHydraulicNetwork 'Thermo-hydraulic calculation'
51  NUM_MT
52  };
53 
54  /*! Parameters for the element . */
55  enum para_t {
56  P_DefaultFluidTemperature, // Keyword: DefaultFluidTemperature [C] 'Default temperature for HydraulicNetwork models'
57  P_InitialFluidTemperature, // Keyword: InitialFluidTemperature [C] 'Initial temperature of the fluid'
58  P_ReferencePressure, // Keyword: ReferencePressure [Pa] 'Reference pressure of network'
59  NUM_P
60  };
61 
62  // *** PUBLIC MEMBER FUNCTIONS ***
63 
64  NANDRAD_READWRITE_IFNOT_INVALID_ID
65  NANDRAD_COMPARE_WITH_ID
66 
67  /*! Checks for valid and required parameters (value ranges). */
68  void checkParameters(const Project & prj) ;
69 
70  // *** PUBLIC MEMBER VARIABLES ***
71 
72  /*! Unique ID for this network. */
73  unsigned int m_id = INVALID_ID; // XML:A:required
74  /*! Descriptive name. */
75  std::string m_displayName; // XML:A
76 
77  ModelType m_modelType = MT_ThermalHydraulicNetwork; // XML:A:required
78 
79  /*! At the inlet node of the reference element the reference pressure will be applied
80  (usually, this should be a pump model).
81  */
82  unsigned int m_referenceElementId = INVALID_ID; // XML:A:required
83 
84  /*! Fluid properties. */
85  HydraulicFluid m_fluid; // XML:E:required
86 
87  /*! Global network parameters. */
88  IBK::Parameter m_para[NUM_P]; // XML:E
89 
90  /*! Pipes used in this network. */
91  std::vector<HydraulicNetworkPipeProperties> m_pipeProperties; // XML:E
92  /*! Hydraulic components used in this network. */
93  std::vector<HydraulicNetworkComponent> m_components; // XML:E
94 
95  /*! List of flow elements that make up this network. */
96  std::vector<HydraulicNetworkElement> m_elements; // XML:E
97 
98  /*! List of mass flow controller elements. */
99  std::vector<HydraulicNetworkControlElement> m_controlElements; // XML:E
100 
101 };
102 
103 } // namespace NANDRAD
104 
105 #endif // NANDRAD_HydraulicNetworkH
std::vector< HydraulicNetworkControlElement > m_controlElements
List of mass flow controller elements.
Contains all input data that describes a room with walls, floor, ceiling, usage, HVAC etc...
std::string m_displayName
Descriptive name.
ModelType
The various types (equations) of the hydraulic component.
Contains global constants for the Nandrad data model.
std::vector< HydraulicNetworkComponent > m_components
Hydraulic components used in this network.
IBK::Parameter m_para[NUM_P]
Global network parameters.
unsigned int m_referenceElementId
At the inlet node of the reference element the reference pressure will be applied (usually...
unsigned int INVALID_ID
defines an invalid id
para_t
Parameters for the element .
unsigned int m_id
Unique ID for this network.
NANDRAD_READWRITE_IFNOT_INVALID_ID NANDRAD_COMPARE_WITH_ID void checkParameters(const Project &prj)
Checks for valid and required parameters (value ranges).
std::vector< HydraulicNetworkElement > m_elements
List of flow elements that make up this network.
std::vector< HydraulicNetworkPipeProperties > m_pipeProperties
Pipes used in this network.
Properties of a fluid within a network.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
Contains all data for a hydraulic network.
HydraulicFluid m_fluid
Fluid properties.