EPANET
2.1

Functions  
int  ENsolveQ () 
Solves for network water quality in all time periods. More...  
int  ENopenQ () 
Sets up data structures for WQ analysis. More...  
int  ENinitQ (int saveFlag) 
Initializes water quality analysis. More...  
int  ENrunQ (long *currentTime) 
Retrieves hydraulic & WQ results at time t. More...  
int  ENnextQ (long *tStep) 
Advances WQ simulation to next hydraulic event. More...  
int  ENstepQ (long *timeLeft) 
Advances WQ simulation by a single WQ time step. More...  
int  ENcloseQ () 
Frees data allocated by water quality solver. More...  
int ENcloseQ  (  ) 
Frees data allocated by water quality solver.
int ENinitQ  (  int  saveFlag  ) 
Initializes water quality analysis.
saveFlag  EN_SAVE (1) if results saved to file, EN_NOSAVE (0) if not 
int ENnextQ  (  long *  tStep  ) 
Advances WQ simulation to next hydraulic event.
[out]  tStep  Time in seconds until next hydraulic event. 0 marks end of simulation period. 
This function is used in a loop with ENrunQ() to run an extended period WQ simulation. See ENsolveQ() for an example.
int ENopenQ  (  ) 
Sets up data structures for WQ analysis.
int ENrunQ  (  long *  currentTime  ) 
Retrieves hydraulic & WQ results at time t.
[out]  currentTime  Current simulation time, in seconds. 
This function is used in a loop with ENnextQ() to run an extended period WQ simulation. See ENsolveQ() for an example.
int ENsolveQ  (  ) 
Solves for network water quality in all time periods.
int ENstepQ  (  long *  timeLeft  ) 
Advances WQ simulation by a single WQ time step.
[out]  timeLeft  Time left in overall simulation (in seconds) 
This function is used in a loop with ENrunQ() to run an extended period WQ simulation.