NANDRAD Data Model Library  Version 2.0
NANDRAD
NANDRAD_HydraulicNetworkControlElement.h
1 #ifndef CONTROLELEMENT_H
2 #define CONTROLELEMENT_H
3 
4 #include "NANDRAD_LinearSplineParameter.h"
5 #include "NANDRAD_Constants.h"
6 #include "NANDRAD_Zone.h"
7 #include "NANDRAD_HydraulicNetworkComponent.h"
8 
9 #include <IBK_Parameter.h>
10 
11 namespace NANDRAD {
12 
13 
14 /*! This class contains parameters for a controller that is used for network elements.
15  A controller is actually a flow controller that impacts the way the flow elements-system function
16  is evaluated, usually adding a flow resistance (e.g. value) to the element. The additional flow resistance
17  can be controlled in different ways, as defined by ControlledProperty.
18 */
20 public:
21 
22  NANDRAD_READWRITE
23  NANDRAD_COMPARE_WITH_ID
24  NANDRAD_COMP(HydraulicNetworkControlElement)
25 
26  /*! Checks for valid and required parameters (value ranges). */
27  void checkParameters(const std::vector<NANDRAD::Zone> &zones) const;
28 
29  /*! Defines variability options for set point values. */
30  enum ModelType {
31  MT_Constant, // Keyword: Constant 'Set points are given as constant parameters'
32  /*! Generates 'TemperatureDifferenceSetpointSchedule' or 'MassFluxSetpointSchedule' depending on
33  controlled property for each network element that uses this controller.
34  InputRef-Typ: NetworkElement, id = id of network element that uses the component with this controller
35  */
36  MT_Scheduled, // Keyword: Scheduled 'Scheduled set point values'
37  NUM_MT
38  };
39 
40  /*! Controlled property used as signal input for the controller. */
42  /*! Temperature difference is computed from pre-defined heat loss and compared against target temperature difference. */
43  CP_TemperatureDifference, // Keyword: TemperatureDifference 'Control temperature difference of this element '
44  /*! Temperature difference of the following flow element is computed from outlet temperature of this element and outlet temperature of the following element.
45  This temperature difference is compared against target temperature difference. */
46  CP_TemperatureDifferenceOfFollowingElement, // Keyword: TemperatureDifferenceOfFollowingElement 'Control temperature difference of the following element'
47  /*! Thermostat heating/cooling control values determine whether valve is open or closed. */
48  CP_ThermostatValue, // Keyword: ThermostatValue 'Control zone thermostat values'
49  /*! Try to achieve target mass flow in current element. */
50  CP_MassFlux, // Keyword: MassFlux 'Control mass flux'
51  NUM_CP
52  };
53 
54  /*! Different model variants. */
56  CT_PController, // Keyword: PController 'PController'
57  CT_PIController, // Keyword: PIController 'PIController'
58  NUM_CT
59  };
60 
61  /*! Model parameters. */
62  enum para_t {
63  P_Kp, // Keyword: Kp [---] 'Kp-parameter'
64  P_Ki, // Keyword: Ki [---] 'Ki-parameter'
65  P_Kd, // Keyword: Kd [---] 'Kd-parameter'
66  P_TemperatureDifferenceSetpoint, // Keyword: TemperatureDifferenceSetpoint [K] 'Target temperature difference'
67  P_MassFluxSetpoint, // Keyword: MassFluxSetpoint [kg/s] 'Target mass flux'
68  NUM_P
69  };
70 
71  /*! Integer/whole number parameters. */
72  enum References {
73  /*! Id of zone whose thermostat is used for control: only for controlled property 'ThermostatValue'. */
74  ID_ThermostatZoneId, // Keyword: ThermostatZoneId [-] 'ID of zone containing thermostat'
75  NUM_ID
76  };
77 
78  IDType m_id = NANDRAD::INVALID_ID; // XML:A:required
79 
80  /*! Determines variability of setpoint parameters. */
81  ModelType m_modelType = NUM_MT; // XML:A:required
82 
83  /*! Controller type (P, PI, ...) */
84  ControllerType m_controllerType = NUM_CT; // XML:A
85 
86  /*! property which shall be controlled (temperature difference, ...) */
87  ControlledProperty m_controlledProperty = NUM_CP; // XML:A:required
88 
89  /*! Integer/ID reference parameters. */
90  IDType m_idReferences[NUM_ID]; // XML:E
91 
92  /*! Used to cut the system input, if this is zero, it will not be considered */
93  double m_maximumControllerResultValue = 0; // XML:E
94 
95  /*! Controller parameters. */
96  IBK::Parameter m_para[NUM_P]; // XML:E
97 
98  static std::vector<ControlledProperty> availableControlledProperties(const HydraulicNetworkComponent::ModelType modelType);
99 };
100 
101 } // namespace NANDRAD
102 
103 #endif // CONTROLELEMENT_H
Temperature difference of the following flow element is computed from outlet temperature of this elem...
Temperature difference is computed from pre-defined heat loss and compared against target temperature...
Thermostat heating/cooling control values determine whether valve is open or closed.
Contains global constants for the Nandrad data model.
ModelType m_modelType
Determines variability of setpoint parameters.
ControlledProperty m_controlledProperty
property which shall be controlled (temperature difference, ...)
Try to achieve target mass flow in current element.
ControllerType m_controllerType
Controller type (P, PI, ...)
Id of zone whose thermostat is used for control: only for controlled property &#39;ThermostatValue&#39;.
NANDRAD_READWRITE NANDRAD_COMPARE_WITH_ID void checkParameters(const std::vector< NANDRAD::Zone > &zones) const
Checks for valid and required parameters (value ranges).
ModelType
The various types (equations) of the hydraulic component.
unsigned int INVALID_ID
defines an invalid id
This class contains parameters for a controller that is used for network elements.
Generates &#39;TemperatureDifferenceSetpointSchedule&#39; or &#39;MassFluxSetpointSchedule&#39; depending on controll...
IBK::Parameter m_para[NUM_P]
Controller parameters.
ModelType
Defines variability options for set point values.
ControlledProperty
Controlled property used as signal input for the controller.
IDType m_idReferences[NUM_ID]
Integer/ID reference parameters.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
double m_maximumControllerResultValue
Used to cut the system input, if this is zero, it will not be considered.