EPANET++ is a free web application for modeling water distribution networks, an extension of EPANET.

Find and replace

Finds the assets that meet a condition, such as every pipe smaller than 8 in. or every junction below 40 psi, and can change one property on all of them in one operation. Use it to check a model before it is solved (a missing elevation, a diameter entered in the wrong unit), to list problem locations after it is solved (low pressure, high velocity), and to make one correction on many assets.

The What to search, Property, Condition, and Value lists build one condition and write it as a line of text in the Query box. The line can also be edited directly, and the lists follow it. A query that the lists cannot express, such as two conditions joined by OR, hides the lists until the Use the controls instead button is pressed. To search, press Enter in the Query box or press the Find button.

The query language
Scope.Property condition valueOne condition. The scope is Everything, Junction, Reservoir, Tank, Pipe, Pump, Valve, Text, Customer, or Source. The property is any entry in the Property list for that scope.
Conditionsequal to, above, below, contains, n highest, n lowest, and empty. Contains applies to text only. In n highest and n lowest, n is a count, as in 5 highest. If the Value box is empty or n is the letter n itself, as in Pipe.Velocity n highest, 10 assets are listed. Empty finds the assets that have no value for the property. Connectivity has four conditions and takes no value.
ValuesA number is entered without its unit, in the unit shown in Properties and on the Tables pane: 40, not 40 psi. Text, including an ID, is enclosed in single or double quotes: '60'.
AND, OR, and parenthesesAND is evaluated before OR, and parentheses group conditions. NOT is not available.
SpellingWords are not case sensitive. The English words are accepted in every language, so a query copied from this user manual runs on a page in any language.
Examples on Net3

Open the Net3 example to follow these. Pressure is in psi and velocity in ft/s.

Everything.ID equal to '60'Junction 60 and Pipe 60. A junction and a pipe can have the same ID, so an ID search under Everything can return more than one asset.
Junction.Pressure below 40Junctions 10, 40, 50, 20, and 153, lowest pressure first. Junction 10 is at -0.6 psi, a negative pressure that requires review.
Pipe.Velocity 5 highestPipes 60, 125, 329, 123, and 149, highest velocity first. Pipe 60 carries 9.3 ft/s.
Junction.Pressure below 20 OR Pipe.Velocity above 5Junctions 10, 20, 40, and 50, and Pipes 60, 125, and 329: low pressures and high velocities in one list.
Junction.Pressure below 40 AND Junction.Elevation above 100Junctions 10, 20, 40, and 50, the low pressures on high ground. Both conditions must name the same kind of asset: Junction.Pressure below 40 AND Pipe.Velocity above 3 matches nothing, because no asset is both a junction and a pipe.
Pipe.Closed equal to 'closed'Pipe 330, the one pipe that is closed in the Net3 file.
Junction.Connectivity no open path to a sourceNothing, as the file is distributed. With Pipe 247 closed (see Replace and Undo), Junctions 215, 217, 219, and 225: the junctions that a break on Pipe 247 would leave without supply. Repeating this for each pipe is a criticality analysis.
Results, the selection, and Tables

The matching assets are listed below the Find button. Above and n highest list the highest value first, below and n lowest the lowest value first, and other conditions list by the value found, then by ID. A query with AND or OR lists nodes, then links, each by ID. A single match is shown on the map immediately. Select a row to center the map on that asset. If nothing is selected, the asset is also selected; if something is, the asset is highlighted and the selection is not changed. Shift+click or Ctrl+click a row to add it to the selection or remove it. Find does not select all matches by itself.

The Filter in table button applies the same query to the Tables pane. Each table that the query applies to shows only the matching rows, with the query and the row count above them. To select all matches on the map, select those rows and choose Select on map from the right-click menu. A table filter is not saved with the project and ends when the page is reloaded. A row edited so that it no longer matches stays in the table, dimmed and marked with a warning sign, until the Filter in table button is pressed again.

Replace and Undo

The Change what was found part of the box writes one property on every asset the query found. Choose the property in the Property to change list, enter the new value in the New value box in the displayed unit, and press the Replace button. The box then states how many assets would change, not counting those that already have the new value. Press the Change them button to apply the change, or Cancel. One Undo reverses the whole replacement.

Example on Net1: Pipe.Diameter below 10 finds Pipes 31, 122, 113, and 121. Choose Diameter, enter 10, and press Replace; the box shows "Change 4 assets?". Press Change them to set all four pipes to 10 in. One Undo returns them to 6 and 8 in.

Example on Net3: Pipe.ID equal to '247' finds Pipe 247. Choose Closed, choose Closed again in the New value list, and press Replace, then Change them, to close the pipe for the connectivity example above. Undo opens it again.

Replace requires one kind of asset, so under Everything, first choose a kind of asset in the What to search list. In a scenario other than Base, a replacement is stored in that scenario, as the same edit in Properties would be. Where Mapbox elevations are available, Elevation can be replaced from the Mapbox DEM instead of a typed value.

Points to note
  • Values are compared at full precision and listed to four decimal places. Equal to rarely matches a calculated result; use above and below.
  • Pressure, head, flow, velocity, and the other results are those of the last calculation. With the Recalculate automatically setting cleared, they describe the network as it was at the last Calculate.
  • Above and below on text use dictionary order, with numbers in numeric order: on Net1, Junction.ID above '20' finds Junctions 21, 22, 23, 31, and 32.
  • Under Everything, only ID, Description, Tag, and Connectivity are offered. Choose a kind of asset in the What to search list to see its full list of properties.
  • A Text item has no ID. Search it by its words, as in Text.Text contains 'pump'.
  • The four Connectivity conditions for a node are no links at node, no open links at node, no link path to a source, and no open path to a source. A source is a reservoir or a tank.
Home | AutoCAD Tools | FreeSoftware | Engineering Services | Engineering Calculators | Technical Documents | Blog | Personal essays | Collaborative Family Trees | Contact