EPANET Basic Hydraulics 03 – Gradient Method Solution

By | Hydraulics | 2 Comments

EPANET uses a streamlined version of the “Gradient Method” proposed by Todini and Pilati et. al.

The EPANET Manual suggests that the Gradient Method is used to solve a system of partially linear (conservation of mass) and partially non-linear (conservation of energy) equations in the form of AH = F. Since the method relies on the Newton-Raphson method to iterate to a solution, derivatives of the conservation of mass and energy must be taken.

EPANET Basic Hydraulics 02b – Solving a Looped System

By | Hydraulics | No Comments

In this video we show how to solve a looped pressure pipe system.

Some of the key concepts are:

  • First calculate the ‘resistance factor’ for each pipe in the system
  • Guess a direction of flow for each pipe
  • Pick a direction (clockwise or counter-clockwise) around each loop to sum the headloss
  • Write the headloss equation for each pipe
  • Write the continuity equation for each node
  • Guess the flow in each pipe
  • Compute the headloss for each pipe
  • Check the errors
  • Adjust the flow guess
  • Repeat the last two steps until the errors are below your chosen threshold

This type of network solution can be easily done for a very small and simple system.  However, once you get more than a few loops, the solution becomes unmanageable and we need a better way which is typically a matrix solution like the one EPANET uses.

In the next post and video we will show exactly how EPANET uses matrices to solve network hydraulics.

EPANET Basic Hydraulics 02a – Solving Headloss For Non-looped System

By | Hydraulics | No Comments

In this video we show a system with four pipes, three junctions and one reservoir.  We find all nodal heads by calculating headloss across each pipe using the Hazen-Williams headloss equation.

For diameter in feet, flow in cubic feet per second and length in feet, the Hazen-Williams headloss equation is:

Hl = (4.727 * L * Q ^ 1.852) / (Ch ^ 1.852 * d ^ 4.871)

Where:

Hl = Headloss across the pipe (in feet)

L = Length of the pipe (in feet)

Q = Flow through the pipe (in cubic feet per second)

Ch = The Hazen-Williams roughness coefficient (unitless)

d = diameter of the pipe (in feet)

EPANET uses what is called a ‘resistance factor’ which is calculated only once at the beginning of the simulation.  This factor is composed of the non-changing parts of the above equation:

R = (4.727 * L) / (Ch ^ 1.852 * d ^ 4.871)

Where:

R = The resistance factor for the pipe

This leads to a simplification of the first equation to:

Hl = R * Q ^ 1.852

Where R is calculated individually for each pipe segment at the beginning of the simulation

EPANET Basic Hydraulics 01

By | Hydraulics | One Comment

 

Link to Khan Academy potential and kinetic energy lesson:

https://www.khanacademy.org/science/physics/work-and-energy/work-and-energy-tutorial/v/work-and-energy-part-2

In this video I briefly look at potential and kinetic energy using a ‘high school physics’ type of example of a ball on a hill.  Then I relate that to hydraulics and present the Bernoulli energy equation and also introduce the Hazen-Williams empirical equation for estimating energy loss in a closed conduit.  The concept of head is explained and Energy Grade Line (HGL) and piezometric head or Hydraulic Grade Line (HGL) are also included.

EPANET Editing Elements

By | Tutorial | No Comments

To insert a node into a link:

  1. Click the appropriate node creation button.
  2. Click in the map where you want it to be located.
  3. Edit the link you want to be split in the Data Browser.
  4. Change the link start/end node ID to the new node ID.
  5. Edit vertices if necessary by first, clicking on the Select Vertex button on the Edit toolbar, and then moving vertices as needed.  If you need to delete a vertex, right-click while hovering over it.
  6. Draw a new link to fill the gap.
  7. Select the original link and right-click.  Select “Copy”.
  8. Select the new link and right-click.  Select “Paste”, to paste the properties of the original link into the new link.

Reverse the direction of a link:

  1. Select the link.
  2. Right-click.  Select “Reverse”.

Select multiple features in the map:

  1. Click the “Select Region” button from the Edit toolbar.
  2. Click in the map to draw a polygon (region) to surround all of the features you want to select.
  3. Right-click to complete the polygon.  Note – only features that are completely contained within the polygon will be selected.
  4. Before you attempt to click in the map area again, select “Group Edit” from the Edit menu.
  5. Select the element type that you want to change properties.
  6. If you desire a query/filter to limit the graphical selection even further, select the “With” option and set the query parameters.
  7. Finally, set the parameter you want to edit and the value to use.

Delete a feature:

  1. Select a feature in the map or in the Data Browser.
  2. Right-click and select “Delete” or click the X button on the Data Browser.

Edit demand categories:

  1. Double-click the Junction you want to edit.
  2. Click the ellipsis button to the far right of the Demand Categories attribute.
  3. Add as many demands (and Patterns if you are running an extended period analysis).  Note – the Category column is just for your reference and is not hydraulically significant.
  4. Try not to use more than 10 rows so that your model will be more compatible with other commercial software.

EPANET Running a Water Quality Analysis

By | Tutorial | No Comments

Steps to running a water quality analysis in EPANET:

  1. Set Quality Options in the Data Browser to Chemical, Trace or Age.  To analyze chemical breakdown such as chlorine, type the chemical directly into the box and it will be saved.
  2. If you are analyzing a chemical such as chlorine, you need to enter the decay coefficients into the Reactions Options.  You will also need to set some Initial Quality values at key locations in your network such as at a reservoir representing a water treatment plant clearwell.  The initial quality will be the constant level of concentration that the constituent leaves the clearwell.

Tips:

  • The length of the simulation must be long enough for periodic results to appear.
  • For water quality models to give good results, they often require a higher level of calibration than a planning level model.

EPANET Running an Extended Period Analysis

By | Tutorial | No Comments

Steps to set up an Extended Period Analysis in EPANET:

  1. Set the Total Duration to be longer than zero hours.  You can find the time settings in the Data Browser under Options.  You also need to make sure the Pattern time step matches the pattern you will use.
  2. Create a pattern of demand multipliers that will be used to factor the Demand up and down throughout the duration of the simulation.  The video shows how to do this, but the basics are that you choose Patterns from the Data Browser and then click on the Add button to make a new Pattern.  Type in the multipliers for each time step.
  3. Now edit each Junction data to specify the Pattern you have created.  This will cause EPANET to factor up and down the demand throughout each day.

Tips:

  • Avoid using a Pattern ID of “1” since it can have unintended consequences.
  • Make sure the multipliers in the Pattern average to 1.0 for most cases.

EPANET – Running Single Period Analysis

By | Tutorial | No Comments

This post and video correspond to the EPANET Users Manual section 2.7

To run a simulation, click on the run button (lightning bolt).  If there are no errors, you will see a message appear that the run was successful.  After that you can view output.  You can view output in the following ways:

  • Show output on the map by clicking on the Map tab in the Browser.  Change the selection under Nodes and/or Links to color the map based on output.
  • Toggle Node and Link legends by changing the setting in View menu -> Legends
  • Show output in a grid by clicking on the Table button.  Select Links or Nodes.  Add input data by selecting the Columns tab and check input data you want to display next to output data.  Limit the number of rows in the grid by setting up a query on the Filters tab.

 

EPANET Saving and Opening Projects

By | Tutorial | No Comments

 

This video and post corresponds with EPANET 2 Users Manual section 2.6.

Tips:

  • There are essentially three types of input & output for EPANET
    • Binary (.net file extension) – main EPANET project file
    • Text (.inp, .scn, .map) – full and partial text representations of the network
    • DXF (.dxf) – CAD Drawing eXchange Format.  e.g. AutoCAD
  • There is also a fourth type for export only which is an Enhanced Metafile or .emf file which is just an image format

EPANET Setting Object Properties

By | Tutorial | No Comments

Tips:

  • To toggle labels on and off, change the setting in View menu -> Options -> Labels
  • Double-click on a node or a link to launch the property editor.  You can change any attribute, including the element ID.  If you change a node ID, any link that is connected to the node will auto-update its connected node IDs
  • Reservoir head is a boundary condition that remains constant unless a pattern is applied.
  • Tank initial, minimum and maximum levels are measured as a distance above the Tank base elevation e.g. Tank floor
  • Hydropnuematic tanks can be modeled as very tall tanks with a small diameter.  We will cover them in an advanced video.
  • Elevated storage tanks have some interesting issues.  We will cover them in an advanced video.
  • Pump curves with a single head vs. flow point use a default equation to interpolate head at different flow rates.  Pump curves with multiple head vs. flow points will do straight line interpolation between points