VICUS Library
Documentation of Vicus library
Loading...
Searching...
No Matches
VICUS::NetworkEdge Class Reference

#include <VICUS_NetworkEdge.h>

Inheritance diagram for VICUS::NetworkEdge:
[legend]

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)
 
NetworkNodeneighbourNode (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 ()
 
ObjectfindChild (unsigned int ID)
 
const ObjectfindChild (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
 
NetworkNodem_node1 = nullptr
 
NetworkNodem_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
Objectm_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
 

Detailed Description

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!

Constructor & Destructor Documentation

◆ NetworkEdge() [1/2]

VICUS_READWRITE VICUS::NetworkEdge::NetworkEdge ( )
default

Deafult constructor.

◆ NetworkEdge() [2/2]

VICUS::NetworkEdge::NetworkEdge ( const unsigned  id,
const unsigned  nodeId1,
const unsigned  nodeId2,
const bool  supply,
const double &  length,
const unsigned  pipeId 
)
inline

Initializing constructor.

Parameters
idid of this edge
nodeId1id of node 1
nodeId2id of node 2
supplyspecifies wether this is a 'supply' pipe, meaning that SubStation nodes can connect to this edge
lengthlength of edge
pipeIdid of pipe properties in database

Member Function Documentation

◆ changeNode1()

void VICUS::NetworkEdge::changeNode1 ( NetworkNode node)

Swaps current nodeId1 with given node id, sets pointer and calculates the new length of this edge

◆ changeNode2()

void VICUS::NetworkEdge::changeNode2 ( NetworkNode node)

Swaps current nodeId2 with given node id, sets pointer and calculates the new length of this edge

◆ collectConnectedNodes()

void VICUS::NetworkEdge::collectConnectedNodes ( std::set< const NetworkNode * > &  connectedNodes,
std::set< const NetworkEdge * > &  connectedEdge 
) const

Check connectivity of graph trhough recursive search

◆ length()

double VICUS::NetworkEdge::length ( ) const
inline

Returns the edge length

◆ neighbourNode() [1/2]

NetworkNode * VICUS::NetworkEdge::neighbourNode ( const NetworkNode node) const

Returns opposite node of the given one

◆ neighbourNode() [2/2]

unsigned VICUS::NetworkEdge::neighbourNode ( unsigned  nodeId) const

Returns opposite node id of the given one

◆ nodeId1()

unsigned int VICUS::NetworkEdge::nodeId1 ( ) const
inline

◆ nodeId2()

unsigned int VICUS::NetworkEdge::nodeId2 ( ) const
inline

◆ setInletOutletNode()

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.

◆ setLengthFromCoordinates()

void VICUS::NetworkEdge::setLengthFromCoordinates ( )

Re-set length, calculating it from coordinates of connected nodes

◆ typeinfo()

const char * VICUS::NetworkEdge::typeinfo ( ) const
inlineoverridevirtual

Type-info string.

Implements VICUS::Object.

Member Data Documentation

◆ m_color

QColor VICUS::NetworkEdge::m_color
mutable

Color to be used for displaying (visible) nodes.

◆ m_cumulativeTempChangeIndicator

double VICUS::NetworkEdge::m_cumulativeTempChangeIndicator = -1

The cumulative temperature change along a flow path

◆ m_heatExchange

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.)

◆ m_idNandradReturnPipe

unsigned int VICUS::NetworkEdge::m_idNandradReturnPipe = INVALID_ID

◆ m_idNandradSupplyPipe

unsigned int VICUS::NetworkEdge::m_idNandradSupplyPipe = INVALID_ID

Used to map the edge to the according Nandrad supply / return pipe.

◆ m_idNodeInlet

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.

◆ m_idNodeOutlet

unsigned int VICUS::NetworkEdge::m_idNodeOutlet = INVALID_ID

◆ m_idPipe

IDType VICUS::NetworkEdge::m_idPipe = INVALID_ID

ID of pipe in database

◆ m_idSoil

unsigned int VICUS::NetworkEdge::m_idSoil = INVALID_ID

Used to map the edge to a soil model.

◆ m_node1

NetworkNode* VICUS::NetworkEdge::m_node1 = nullptr

Pointers to connected nodes

◆ m_node2

NetworkNode* VICUS::NetworkEdge::m_node2 = nullptr

◆ m_nominalHeatingDemand

double VICUS::NetworkEdge::m_nominalHeatingDemand = 0

Sum of maximum heating demand of all connected buildings [W], will be determined in sizePipeDimensions()

◆ m_nominalMassFlow

double VICUS::NetworkEdge::m_nominalMassFlow = 0

Mass flow [kg/s] at nominal temperature difference, will be determined in sizePipeDimensions()

◆ m_supply

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

◆ m_tempChangeIndicator

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

◆ m_visualizationRadius

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.


The documentation for this class was generated from the following files: