EPANET  3.0
EPANET Development Project
tank.h
Go to the documentation of this file.
1 /* EPANET 3
2  *
3  * Copyright (c) 2016 Open Water Analytics
4  * Licensed under the terms of the MIT License (see the LICENSE file for details).
5  *
6  */
7 
10 
11 #ifndef TANK_H_
12 #define TANK_H_
13 
14 #include "Elements/node.h"
15 #include "Models/tankmixmodel.h"
16 
17 #include <string>
18 
19 class Curve;
20 
26 
27 class Tank: public Node
28 {
29  public:
30 
31  // Constructor/Destructor
32  Tank(std::string name);
33  //~Tank() {}
34 
35  // Overridden virtual methods
36  int type() { return Node::TANK; }
37  void validate();
38  void convertUnits(Network* nw);
39  void initialize(Network* nw);
40  bool isReactive() { return bulkCoeff != 0.0; }
41  bool isFull() { return head >= maxHead; }
42  bool isEmpty() { return head <= minHead; }
43  bool isClosed(double flow);
44 
45  // Tank-specific methods
46  double getVolume() { return volume; }
47  double findVolume(double aHead);
48  double findHead(double aVolume);
49  void setFixedGrade();
50  void updateVolume(int tstep);
51  void updateArea();
52  int timeToVolume(double aVolume);
53 
54  // Properties
55  double initHead;
56  double minHead;
57  double maxHead;
58  double diameter;
59  double minVolume;
60  double bulkCoeff;
63 
64  double maxVolume;
65  double volume;
66  double area;
67  double ucfLength;
68  double pastHead;
69  double pastVolume;
70  double pastOutflow;
71 };
72 
73 #endif
Curve * volCurve
volume v. water depth curve
Definition: tank.h:61
std::string name
element&#39;s ID name
Definition: element.h:28
Describes the Node class.
double maxVolume
maximum volume (ft3)
Definition: tank.h:64
A connection point between links in a network.
Definition: node.h:30
double volume
current volume in tank (ft3)
Definition: tank.h:65
double pastOutflow
outflow in previous time period (cfs)
Definition: tank.h:70
Describes the TankMixModel class.
double minVolume
minimum volume (ft3)
Definition: tank.h:59
double minHead
minimum water elevation (ft)
Definition: tank.h:56
double pastVolume
volume in previous time period (ft3)
Definition: tank.h:69
double maxHead
maximum water elevation (ft)
Definition: tank.h:57
double initHead
initial water elevation (ft)
Definition: tank.h:55
double bulkCoeff
water quality reaction coeff. (per day)
Definition: tank.h:60
The model used to compute mixing behavior within a storage tank.
Definition: tankmixmodel.h:22
double pastHead
water elev. in previous time period (ft)
Definition: tank.h:68
A fixed head Node with storage volume.
Definition: tank.h:27
double diameter
nominal diameter (ft)
Definition: tank.h:58
double area
current surface area of tank (ft2)
Definition: tank.h:66
TankMixModel mixingModel
mixing model used
Definition: tank.h:62
Contains the data elements that describe a pipe network.
Definition: network.h:41
double ucfLength
units conversion factor for length
Definition: tank.h:67
double head
hydraulic head (ft)
Definition: node.h:71
An ordered collection of x,y data pairs.
Definition: curve.h:30