EPANET
Functions
Water Quality Functions

Functions

int DLLEXPORT ENsolveQ ()
 Solves for network water quality in all time periods. More...
 
int DLLEXPORT ENopenQ ()
 Sets up data structures for WQ analysis. More...
 
int DLLEXPORT ENinitQ (int saveFlag)
 Initializes water quality analysis. More...
 
int DLLEXPORT ENrunQ (long *currentTime)
 Retrieves hydraulic & WQ results at time t. More...
 
int DLLEXPORT ENnextQ (long *tStep)
 Advances WQ simulation to next hydraulic event. More...
 
int DLLEXPORT ENstepQ (long *timeLeft)
 Advances WQ simulation by a single WQ time step. More...
 
int DLLEXPORT ENcloseQ ()
 Frees data allocated by water quality solver. More...
 

Detailed Description

Function Documentation

§ ENcloseQ()

int ENcloseQ ( )

Frees data allocated by water quality solver.

Returns
Error code.

§ ENinitQ()

int ENinitQ ( int  saveFlag)

Initializes water quality analysis.

Parameters
saveFlagEN_SAVE (1) if results saved to file, EN_NOSAVE (0) if not
Returns
Error code

§ ENnextQ()

int ENnextQ ( long *  tStep)

Advances WQ simulation to next hydraulic event.

Parameters
[out]tStepTime in seconds until next hydraulic event. 0 marks end of simulation period.
Returns
Error code

This function is used in a loop with ENrunQ() to run an extended period WQ simulation. See ENsolveQ() for an example.

§ ENopenQ()

int ENopenQ ( )

Sets up data structures for WQ analysis.

Returns
Error code

§ ENrunQ()

int ENrunQ ( long *  currentTime)

Retrieves hydraulic & WQ results at time t.

Parameters
[out]currentTimeCurrent simulation time, in seconds.
Returns
Error code

This function is used in a loop with ENnextQ() to run an extended period WQ simulation. See ENsolveQ() for an example.

§ ENsolveQ()

int ENsolveQ ( )

Solves for network water quality in all time periods.

Returns
Error code

§ ENstepQ()

int ENstepQ ( long *  timeLeft)

Advances WQ simulation by a single WQ time step.

Parameters
[out]timeLeftTime left in overall simulation (in seconds)
Returns
Error code

This function is used in a loop with ENrunQ() to run an extended period WQ simulation.