Missing pipes when exporting to EPANET

Product(s): WaterGEMS, WaterCAD
Version(s): CONNECT Edition, V8i
Area: Layout and Data Input


When exporting a model to the EPANET format, there are missing pipes near pumps and valves when the model is opened in EPANET


This is related to how the EPANET import and export feature operates. EPANET handles pumps and valves as link elements, while WaterGEMS considers them nodes. This difference in connectivity means that additional pipes and nodes are included during import/export process. (The pipes generated are 1 foot in length and 99 inches in diameter, in order to minimize the import of headloss by these additional elements). The link in the See Also section below has additional information on this, as well as other information on importing or exporting to EPANET.

In the database file for WaterGEMS, these additional pipes are flagged with a special "AddedForINPConversion" tag. This is done so that if the model is exported back out the EPANET, the model conversion process will remove these additional pipes.

However, if the elements around pumps and valves are changed a lot, it is possible that these flagged elements might have a slightly different orientation. For instance, additional pipes or nodes may be added while the lengths and diameters of the pipes added by the conversion process are adjusted to more reasonable values. If this occurs, it will appear as though the pipes were incorrectly removed from the model by the export into the EPANET format.

The following steps can be followed in order to remove the "AddedForINPConversion" tag from the database file, to prevent the issue in question from occurring. Note that this is not required if no changes were made to the connectivity around pumps or valves in the WaterGEMS model before exporting back out to EPANET. In addition, if there are any doubts about doing this process yourself, please contact the Technical Support Group for assistance and reference this article.

1) Back up the model. This is recommended so the original data is not lost or corrupted if something goes wrong during the process below.
2) Ensure that the model is closed, then download and install SQLITE Expert Personal (Note: this is freeware not associated with Bentley Systems).
3) Open SQLITE Expert Personal and open the .WTG.SQLITE file associated with the model
4) On the right side of the dialog, click the SQL tab and clear out anything that may already be in there
5) Type the following statement:

UPDATE IdahoPipe
SET AddedForINPConversion = 0

6) Click “Execute SQL” button at the bottom. Make sure that an error message is not generated
7) Close SQLITE Expert Personal, reopen the mode,l and re-export to EPANET

Once this is completed, the issue should no longer occur.

See Also

What are the limitations of importing/exporting EPANET files?

Troubleshooting problems with importing EPANET or EPASWMM files