VICUS Library
Documentation of Vicus library
|
#include <VICUS_NetworkEdge.h>
Public Member Functions | |
const char * | typeinfo () const override |
VICUS_READWRITE | NetworkEdge ()=default |
NetworkEdge (const unsigned id, const unsigned nodeId1, const unsigned nodeId2, const bool supply, const double &length, const unsigned pipeId) | |
void | collectConnectedNodes (std::set< const NetworkNode * > &connectedNodes, std::set< const NetworkEdge * > &connectedEdge) const |
void | setInletOutletNode (std::set< const NetworkNode * > &visitedNodes, std::vector< const NetworkEdge * > &orderedEdges) |
NetworkNode * | neighbourNode (const NetworkNode *node) const |
unsigned | neighbourNode (unsigned nodeId) const |
double | length () const |
void | setLengthFromCoordinates () |
unsigned int | nodeId1 () const |
unsigned int | nodeId2 () const |
void | changeNode1 (NetworkNode *node) |
void | changeNode2 (NetworkNode *node) |
Public Member Functions inherited from VICUS::Object | |
Object ()=default | |
Object (Object const &)=default | |
virtual | ~Object () |
Object * | findChild (unsigned int ID) |
const Object * | findChild (unsigned int ID) const |
void | collectChildIDs (std::set< unsigned int > &nodeContainer) const |
QString | info () const |
Public Attributes | |
bool | m_supply |
IDType | m_idPipe = INVALID_ID |
NANDRAD::HydraulicNetworkHeatExchange | m_heatExchange |
double | m_visualizationRadius |
QColor | m_color |
double | m_nominalHeatingDemand = 0 |
double | m_nominalMassFlow = 0 |
double | m_tempChangeIndicator = -1 |
double | m_cumulativeTempChangeIndicator = -1 |
NetworkNode * | m_node1 = nullptr |
NetworkNode * | m_node2 = nullptr |
unsigned int | m_idNodeInlet = INVALID_ID |
unsigned int | m_idNodeOutlet = INVALID_ID |
unsigned int | m_idNandradSupplyPipe = INVALID_ID |
unsigned int | m_idNandradReturnPipe = INVALID_ID |
unsigned int | m_idSoil = INVALID_ID |
Public Attributes inherited from VICUS::Object | |
Object * | m_parent = nullptr |
unsigned int | m_id = INVALID_ID |
bool | m_selected = false |
bool | m_visible = true |
QString | m_displayName |
std::string | m_ifcGUID |
Additional Inherited Members | |
Protected Attributes inherited from VICUS::Object | |
std::vector< Object * > | m_children |
A network edge defines all parameters needed to generate pipe hydraulic network elements. The pipe-specific hydraulic parameters are stored in the pipe database (NetworkPipe). The type of pipe model is defined in m_modelType and the kind of heat exchange to be considered is defined in m_heatExchangeType. Parameters for generation of the hydraulic element are stored in m_para. Also, the double-parameters needed for the heat exchange models are stored in m_para.
NOTE: NetworkEdge also uses the unique m_id to identify object and respective navigation tree items and scene objects. However, the ID is nowhere else used (referenced) in the data model and thus not persistently saved in the project file. It is generated on first use within VICUS::Project::updatePointers().
TODO Hauke, Dokumentation der Memberfunktionen!
|
default |
Deafult constructor.
|
inline |
Initializing constructor.
id | id of this edge |
nodeId1 | id of node 1 |
nodeId2 | id of node 2 |
supply | specifies wether this is a 'supply' pipe, meaning that SubStation nodes can connect to this edge |
length | length of edge |
pipeId | id of pipe properties in database |
void VICUS::NetworkEdge::changeNode1 | ( | NetworkNode * | node | ) |
Swaps current nodeId1 with given node id, sets pointer and calculates the new length of this edge
void VICUS::NetworkEdge::changeNode2 | ( | NetworkNode * | node | ) |
Swaps current nodeId2 with given node id, sets pointer and calculates the new length of this edge
void VICUS::NetworkEdge::collectConnectedNodes | ( | std::set< const NetworkNode * > & | connectedNodes, |
std::set< const NetworkEdge * > & | connectedEdge | ||
) | const |
Check connectivity of graph trhough recursive search
|
inline |
Returns the edge length
NetworkNode * VICUS::NetworkEdge::neighbourNode | ( | const NetworkNode * | node | ) | const |
Returns opposite node of the given one
unsigned VICUS::NetworkEdge::neighbourNode | ( | unsigned | nodeId | ) | const |
Returns opposite node id of the given one
|
inline |
|
inline |
void VICUS::NetworkEdge::setInletOutletNode | ( | std::set< const NetworkNode * > & | visitedNodes, |
std::vector< const NetworkEdge * > & | orderedEdges | ||
) |
Used in recursive search, starting from one node (should be the soruce node), and trying to collect all edges in an ordered vector. Thereby for each edge, one node is set as inlet and the other node is set as outlet. This should anticipate the expected flow direction.
void VICUS::NetworkEdge::setLengthFromCoordinates | ( | ) |
Re-set length, calculating it from coordinates of connected nodes
|
inlineoverridevirtual |
Type-info string.
Implements VICUS::Object.
|
mutable |
Color to be used for displaying (visible) nodes.
double VICUS::NetworkEdge::m_cumulativeTempChangeIndicator = -1 |
The cumulative temperature change along a flow path
NANDRAD::HydraulicNetworkHeatExchange VICUS::NetworkEdge::m_heatExchange |
Whether the node is visible or not.
Defines the heat exchange properties for this edge (ambient temperature, heat flux etc.)
unsigned int VICUS::NetworkEdge::m_idNandradReturnPipe = INVALID_ID |
unsigned int VICUS::NetworkEdge::m_idNandradSupplyPipe = INVALID_ID |
Used to map the edge to the according Nandrad supply / return pipe.
unsigned int VICUS::NetworkEdge::m_idNodeInlet = INVALID_ID |
Specifiy which node is the 'inlet' and which is the 'outlet' node. This anticipates the nominal flow direction during simulation.
unsigned int VICUS::NetworkEdge::m_idNodeOutlet = INVALID_ID |
IDType VICUS::NetworkEdge::m_idPipe = INVALID_ID |
ID of pipe in database
unsigned int VICUS::NetworkEdge::m_idSoil = INVALID_ID |
Used to map the edge to a soil model.
NetworkNode* VICUS::NetworkEdge::m_node1 = nullptr |
Pointers to connected nodes
NetworkNode* VICUS::NetworkEdge::m_node2 = nullptr |
double VICUS::NetworkEdge::m_nominalHeatingDemand = 0 |
Sum of maximum heating demand of all connected buildings [W], will be determined in sizePipeDimensions()
double VICUS::NetworkEdge::m_nominalMassFlow = 0 |
Mass flow [kg/s] at nominal temperature difference, will be determined in sizePipeDimensions()
bool VICUS::NetworkEdge::m_supply |
If true, nodes of type SubStation can connect to this edge. This is used for the automatic algorithm that connects buildings with the network
double VICUS::NetworkEdge::m_tempChangeIndicator = -1 |
Describes the fluid temperature change along this pipe with nominal mass flow, when there is a temperature difference of 1 K between fluid and sourrunding soil. This information can be used to create according soil models. Is dimensionless, but for interpretation, unit [K/K] can be used
double VICUS::NetworkEdge::m_visualizationRadius |
The radius [m] used for the visualization of this edge in the 3D scene Updated whenever the scale factor Network::m_scaleEdges changes, or the pipe ID.