ENinitH: Initialize hydraulic engine

View source: R/hydraulics.r

ENinitHR Documentation

Initialize hydraulic engine

Description

ENinitH Initializes storage tank levels, link status and settings, and the simulation clock time prior to running a hydraulic analysis.

Usage

ENinitH(flag)

Arguments

flag

A two-digit flag indicating if hydraulic results will be saved to the hydraulics file (rightmost digit) and if link flows should be re-initialized.

Details

Call ENinitH prior to running a hydraulic analysis using ENrunH and ENnextH.ENopenH must have been called prior to calling ENinitH. Do not call ENinitH if a complete hydraulic analysis is being made with a call to ENsolveH. Values of flag have the following meanings:

00 do not re-initialize flows, do not save results to file
01 do not re-initialize flows, save results to file
10 re-initialize flows, do not save results to file
11 re-initialize flows, save results to file

Set flag to 1 (or 11) if you will be making a subsequent water quality run, using ENreport to generate a report, or using ENsavehydfile to save the binary hydraulics file.

Value

Returns NULL invisibly; called for side effect

See Also

ENopenH, ENrunH, ENnextH, ENcloseH

Examples

# path to Net1.inp example file included with this package
inp <- file.path( find.package("epanet2toolkit"), "extdata","Net1.inp")  
ENopen( inp, "Net1.rpt")
ENopenH()
ENinitH(0)
ENrunH()
ENcloseH()
ENclose()
# clean-up the created files
file.remove("Net1.rpt") 

epanet2toolkit documentation built on Nov. 6, 2023, 9:06 a.m.