EPANET  3.0
EPANET Development Project
ltdsolver.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 LTDSOLVER_H_
12 #define LTDSOLVER_H_
13 
14 #include "Solvers/qualsolver.h"
15 #include "Utilities/segpool.h"
16 #include <vector>
17 
18 class Network;
19 
22 
23 class LTDSolver : public QualSolver
24 {
25  public:
26 
27  LTDSolver(Network* nw);
28  ~LTDSolver();
29 
30  void init();
31  void reverseFlow(int k);
32  int solve(int* sortedLinks, int tstep);
33 
34  private:
35  int nodeCount; // number of nodes
36  int linkCount; // number of links
37  double cTol; // quality tolerance (mass/ft3)
38  double tstep; // time step (sec)
39 
40  std::vector<double> volIn; // volume inflow to each node
41  std::vector<double> massIn; // mass inflow to each node
42  std::vector<Segment *> firstSegment; // ptr. to first segment in each link
43  std::vector<Segment *> lastSegment; // ptr. to last segment in each link
44  SegPool segPool; // pool of pipe segment objects
45 
46  void react();
47  void release(int k);
48  void transport(int k);
49  void updateNodeQuality();
50  void updateLinkQuality();
51  double findStoredMass();
52  void updateMassBalance(double dt);
53  void addSegment(int k, double v, double c);
54 
55 };
56 
57 #endif
Definition: segpool.h:23
A water quality solver based on the Lagrangian Time Driven method.
Definition: ltdsolver.h:23
Abstract class from which a specific water quality solver is derived.
Definition: qualsolver.h:23
Describes the SegPool class used for water quality transport.
Describes the QualSolver class.
Contains the data elements that describe a pipe network.
Definition: network.h:41