Hydraulic Analysis Functions¶
These functions are used to perform a hydraulic analysis.
| ||Runs a complete hydraulic simulation with results for all time periods written to a temporary hydraulics file.|
| ||Uses a previously saved binary hydraulics file to supply a project's hydraulics.|
| ||Opens a project's hydraulic solver.|
| ||Initializes a network prior to running a hydraulic analysis.|
| ||Computes a hydraulic solution for the current point in time.|
| ||Determines the length of time until the next hydraulic event occurs in an extended period simulation.|
| ||Transfers a project's hydraulics results from its temporary hydraulics file to its binary output file, where results are only reported at uniform reporting intervals.|
| ||Saves a project's temporary hydraulics file to disk.|
| ||Closes the hydraulic solver freeing all of its allocated memory.|
Runs a complete hydraulic simulation with results for all time periods written to a temporary hydraulics file.
solveH to generate a complete hydraulic solution which can stand alone or be used as input to a water quality analysis. This function will not allow one to examine intermediate hydraulic results as they are generated. It can also be followed by calls to
report to write hydraulic results to the report file.
closeH can be used instead to gain access to results at intermediate time periods and directly adjust link status and control settings as a simulation proceeds.
Uses a previously saved binary hydraulics file to supply a project's hydraulics.
useHydFile(filename: string): void
|filename|| ||the name of the binary file containing hydraulic results.|
Call this function to re-use a set of hydraulic analysis results saved previously. This can save computational time if water quality analyses are being made under the same set of hydraulic conditions.
Do not call this function while the hydraulics solver is open.
Opens a project's hydraulic solver.
Initializes a network prior to running a hydraulic analysis.
initH(initFlag: InitHydOption): void
|initFlag|| ||a 2-digit initialization flag (see |
This function initializes storage tank levels, link status and settings, and the simulation time clock prior to running a hydraulic analysis.
The initialization flag is a two digit number where the 1st (left) digit indicates if link flows should be re-initialized (1) or not (0), and the 2nd digit indicates if hydraulic results should be saved to a temporary binary hydraulics file (1) or not (0).
Choose to save hydraulics results if you will be:
- making a subsequent water quality run,
reportto generate a report
saveHydFileto save the binary hydraulics file.
Computes a hydraulic solution for the current point in time.
Number The current simulation time in seconds.
This function is used in a loop with
nextH to run an extended period hydraulic simulation.
Determines the length of time until the next hydraulic event occurs in an extended period simulation.
Number The time (in seconds) until the next hydraulic event or 0 if at the end of the full simulation duration.
This function is used in a loop with
runH to run an extended period hydraulic simulation.
The return value is automatically computed as the smaller of:
- the time interval until the next hydraulic time step begins
- the time interval until the next reporting time step begins
- the time interval until the next change in demands occurs
- the time interval until a tank becomes full or empty
- the time interval until a control or rule fires.
Transfers a project's hydraulics results from its temporary hydraulics file to its binary output file, where results are only reported at uniform reporting intervals.
saveH is used when only a hydraulic analysis is run and results at uniform reporting intervals need to be transferred to a project's binary output file. Such would be the case when results are to be written in formatted fashion to the project's report file using
Saves a project's temporary hydraulics file to disk.
saveHydFile( filename: String): void
|filename|| ||the name of the file to be created.|
Use this function to save the current set of hydraulics results to a file, either for post-processing or to be used at a later time by calling the
The hydraulics file contains nodal demands and heads and link flows, status, and settings for all hydraulic time steps, even intermediate ones.
Before calling this function hydraulic results must have been generated and saved by having called
solveH or the
nextH sequence with the
initflag argument of
initH set to
Closes the hydraulic solver freeing all of its allocated memory.