EPANET  3.0
EPANET Development Project
pumpcurve.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 PUMPCURVE_H_
12 #define PUMPCURVE_H_
13 
14 class Network;
15 class Curve;
16 
19 
20 class PumpCurve
21 {
22  public:
23 
29  };
30 
31  // Constructor/Destructor
32  PumpCurve();
33  ~PumpCurve();
34 
35  // Methods
36  void setCurve(Curve* c);
37  int setupCurve(Network* network);
38  void findHeadLoss(
39  double speed, double flow, double& headLoss, double& gradient);
40  bool isConstHP() {return curveType == CONST_HP;}
41 
42  // Properties
43  int curveType;
45  double horsepower;
46  double qInit;
47  double qMax;
48  double hMax;
49 
50  private:
51 
52  double h0;
53  double r;
54  double n;
55  double qUcf;
56  double hUcf;
57 
58  void setupConstHpCurve();
59  int setupPowerFuncCurve();
60  int setupCustomCurve();
61  void constHpHeadLoss(
62  double speed, double flow, double& headLoss, double& gradient);
63  void powerFuncHeadLoss(
64  double speed, double flow, double& headLoss, double& gradient);
65  void customCurveHeadLoss(
66  double speed, double flow, double& headLoss, double& gradient);
67 };
68 
69 #endif
constant horsepower curve
Definition: pumpcurve.h:26
PumpCurveType
Definition: pumpcurve.h:24
power function curve
Definition: pumpcurve.h:27
Curve * curve
curve with head v. flow data
Definition: pumpcurve.h:44
no curve assigned
Definition: pumpcurve.h:25
Describes how head varies with flow for a Pump link.
Definition: pumpcurve.h:20
double hMax
maximum head (ft)
Definition: pumpcurve.h:48
double qMax
maximum flow (cfs)
Definition: pumpcurve.h:47
int curveType
type of pump curve
Definition: pumpcurve.h:43
user-defined custom curve
Definition: pumpcurve.h:28
double horsepower
pump's horsepower
Definition: pumpcurve.h:45
double qInit
initial flow (cfs)
Definition: pumpcurve.h:46
Contains the data elements that describe a pipe network.
Definition: network.h:41
An ordered collection of x,y data pairs.
Definition: curve.h:30