EPANET  3.0
EPANET Development Project
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Valve Class Reference

A Link that controls flow or pressure. More...

#include <valve.h>

Inheritance diagram for Valve:
Link Element

Public Types

enum  ValveType {
  PRV, PSV, FCV, TCV,
  PBV, GPV
}
 
- Public Types inherited from Element
enum  ElementType {
  NODE, LINK, PATTERN, CURVE,
  CONTROL
}
 

Public Member Functions

 Valve (std::string name_)
 
int type ()
 
std::string typeStr ()
 
void convertUnits (Network *nw)
 
double convertSetting (Network *nw, double s)
 
void setInitFlow ()
 
void setInitStatus (int s)
 
void setInitSetting (double s)
 
void initialize (bool initFlow)
 
bool isPRV ()
 
bool isPSV ()
 
void findHeadLoss (Network *nw, double q)
 
void updateStatus (double q, double h1, double h2)
 
bool changeStatus (int newStatus, bool makeChange, const std::string reason, std::ostream &msgLog)
 
bool changeSetting (double newSetting, bool makeChange, const std::string reason, std::ostream &msgLog)
 
void validateStatus (Network *nw, double qTol)
 
double getVelocity ()
 
double getRe (const double q, const double viscos)
 
double getSetting (Network *nw)
 
- Public Member Functions inherited from Element
 Element (std::string name_)
 

Public Attributes

ValveType valveType
 valve type
 
double lossFactor
 minor loss factor
 
- Public Attributes inherited from Element
std::string name
 element's ID name
 
int index
 index in array of elements
 

Static Public Attributes

static const char * ValveTypeWords [] = {"PRV", "PSV", "FCV", "TCV", "PBV", "GPV"}
 

Protected Member Functions

void findOpenHeadLoss (double q)
 
void findPbvHeadLoss (double q)
 
void findTcvHeadLoss (double q)
 
void findGpvHeadLoss (Network *nw, double q)
 
void findFcvHeadLoss (double q)
 
int updatePrvStatus (double q, double h1, double h2)
 
int updatePsvStatus (double q, double h1, double h2)
 

Protected Attributes

bool hasFixedStatus
 true if Open/Closed status is fixed
 
double elev
 elevation of PRV/PSV valve
 

Additional Inherited Members

Detailed Description

A Link that controls flow or pressure.

Note
Isolation (or shutoff) valves can be modeled by setting a pipe's Status property to OPEN or CLOSED.

Member Enumeration Documentation

Enumerator
PRV 

pressure reducing valve

PSV 

pressure sustaining valve

FCV 

flow control valve

TCV 

throttle control valve

PBV 

pressure breaker valve

GPV 

general purpose valve


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