EPANET
3.0
EPANET Development Project
|
A conveyance element that connects two nodes together. More...
#include <link.h>
Public Types | |
enum | LinkType { PIPE, PUMP, VALVE } |
enum | LinkStatus { LINK_CLOSED, LINK_OPEN, VALVE_ACTIVE, TEMP_CLOSED } |
enum | LinkReaction { BULK, WALL } |
![]() | |
enum | ElementType { NODE, LINK, PATTERN, CURVE, CONTROL } |
Public Member Functions | |
Link (std::string name_) | |
Constructor. | |
virtual | ~Link () |
Destructor. | |
virtual int | type ()=0 |
virtual std::string | typeStr ()=0 |
virtual void | convertUnits (Network *nw)=0 |
virtual double | convertSetting (Network *nw, double s) |
virtual void | validate (Network *nw) |
virtual bool | isReactive () |
virtual void | initialize (bool initFlow) |
virtual void | setInitFlow () |
virtual void | setInitStatus (int s) |
virtual void | setInitSetting (double s) |
virtual void | setResistance (Network *nw) |
virtual void | setFlowThreshold (const double viscos) |
virtual bool | reduceFlowThreshold () |
virtual double | getVelocity () |
virtual double | getRe (const double q, const double viscos) |
virtual double | getResistance () |
virtual double | getUnitHeadLoss () |
virtual double | getSetting (Network *nw) |
virtual void | findHeadLoss (Network *nw, double q)=0 |
virtual double | updateEnergyUsage (Network *nw, int dt) |
virtual bool | canLeak () |
virtual double | findLeakage (Network *nw, double h, double &dqdh) |
virtual bool | isPRV () |
virtual bool | isPSV () |
virtual bool | isHpPump () |
virtual void | updateStatus (double q, double h1, double h2) |
virtual bool | changeStatus (int newStatus, bool makeChange, const std::string reason, std::ostream &msgLog) |
virtual bool | changeSetting (double newSetting, bool makeChange, const std::string reason, std::ostream &msgLog) |
virtual void | validateStatus (Network *nw, double qTol) |
virtual void | applyControlPattern (std::ostream &msgLog) |
std::string | writeStatusChange (int oldStatus) |
virtual double | getVolume () |
![]() | |
Element (std::string name_) | |
Static Public Member Functions | |
static Link * | factory (int type_, std::string name_, MemPool *memPool) |
Factory Method. | |
Public Attributes | |
bool | rptFlag |
true if results are reported | |
Node * | fromNode |
pointer to the link's start node | |
Node * | toNode |
pointer to the link's end node | |
int | initStatus |
initial Open/Closed status | |
double | diameter |
link diameter (ft) | |
double | lossCoeff |
minor head loss coefficient | |
double | initSetting |
initial pump speed or valve setting | |
int | status |
current status | |
double | flowThresh0 |
initial flow threshold (cfs) | |
double | flowThresh |
current flow threshold (cfs) | |
double | flow |
flow rate (cfs) | |
double | leakage |
leakage rate (cfs) | |
double | hLoss |
head loss (ft) | |
double | hGrad |
head loss gradient (ft/cfs) | |
double | setting |
current setting | |
double | quality |
avg. quality concen. (mass/ft3) | |
![]() | |
std::string | name |
element's ID name | |
int | index |
index in array of elements | |
A conveyance element that connects two nodes together.
The Link class is an abstract class that represents a conveyance element between two nodes of a pipe network. Specific concrete sub-classes of Link include Pipe, Pump, and Valve.