EPANET  3.0
EPANET Development Project
qualbalance.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 QUALBALANCE_H_
12 #define QUALBALANCE_H_
13 
14 #include <ostream>
15 
22 
23 class Network;
24 
26 {
27  double initMass;
28  double inflowMass;
29  double outflowMass;
30  double reactedMass;
31  double storedMass;
32 
33  void init(const double initMassStored);
34  void updateInflow(const double massIn);
35  void updateOutflow(const double massOut);
36  void updateReacted(const double massReacted);
37  void updateStored(const double massStored);
38  void writeBalance(std::ostream& msgLog);
39 };
40 
41 //-----------------------------------------------------------------------------
42 // Inline Functions
43 //-----------------------------------------------------------------------------
44 inline void QualBalance::updateInflow(const double massIn)
45  { inflowMass += massIn; }
46 
47 inline void QualBalance::updateOutflow(const double massOut)
48  { outflowMass += massOut; }
49 
50 inline void QualBalance::updateReacted(const double massReacted)
51  { reactedMass += massReacted; }
52 
53 inline void QualBalance::updateStored(const double massStored)
54  { storedMass = massStored; }
55 
56 #endif // QUALBALANCE_H_
Computes a water quality mass balance across the pipe network.
Definition: qualbalance.h:25
Contains the data elements that describe a pipe network.
Definition: network.h:41