EPANET  3.0
EPANET Development Project
leakagemodel.h
Go to the documentation of this file.
1 /* EPANET 3
2  *
3  * Copyright (c) 2016 Open Water Analytics
4  * Distributed under the MIT License (see the LICENSE file for details).
5  *
6  */
7 
10 
11 #ifndef LEAKAGEMODEL_H_
12 #define LEAKAGEMODEL_H_
13 
14 #include <string>
15 
23 
25 {
26  public:
27  LeakageModel();
28  virtual ~LeakageModel();
29  static LeakageModel* factory(
30  const std::string model,
31  const double ucfLength_,
32  const double ucfFlow_);
33  virtual double findFlow(const double c1,
34  const double c2,
35  const double length,
36  double h,
37  double& dqdh) = 0;
38 
39  protected:
40  double lengthUcf;
41  double flowUcf;
42 };
43 
44 //-----------------------------------------------------------------------------
47 //-----------------------------------------------------------------------------
48 
50 {
51  public:
52  PowerLeakageModel(const double ucfLength_, const double ucfFlow_);
53  double findFlow(double flowCoeff,
54  double expon,
55  double length,
56  double h,
57  double& dqdh);
58 };
59 
60 //-----------------------------------------------------------------------------
64 //-----------------------------------------------------------------------------
65 
67 {
68  public:
69  FavadLeakageModel(const double ucfLength_);
70  double findFlow(double area,
71  double m,
72  double length,
73  double h,
74  double& dqdh);
75 };
76 
77 #endif /* LEAKAGEMODEL_H_ */
Pipe leakage rate varies as a power function of pipe pressure.
Definition: leakagemodel.h:49
The interface for a pipe leakage model.
Definition: leakagemodel.h:24
Pipe leakage is computed using an orifice equation where the leak area is a function of pipe pressure...
Definition: leakagemodel.h:66