EPANET water quality modelling

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view

EPANET water quality modelling

The Community Engineer
This is an e-mail query which we received from Vijay;

Respected sir,
I have two input files of Epanet i.e. two network.
 In those files
1] for nodes -node ID, demand , pattern, elevation, X co ordinates
2] for reservoir - ID, head, pattern
3] for tank - ID, elevation, min level,max level, initial level, diameter,min vol and volume curve
4] for pipes -ID, node1,node2, length, diameter,length,roughness,minor loss, and status
5] for pumps-ID,node1,node2,parameters
6] for valves -ID,node1,node2,diameter,type,setting,minor loss
etc information is provided.

In my project EPANET is used to calculate the data needed in optimization such as the contaminated water volume, the time of detection and contaminant concentration at each junction for all scenarios.
I am hereby attaching the algorithm of my project.
My doubt is that how to generate contaminant scenario?
Kindly help me sir.

Thank You
Reply | Threaded
Open this post in threaded view

Re: EPANET water quality modelling

The Community Engineer
Hoping that you have build the model, with all nodes, pipes, pumps and reservoirs; you will need to now set analysis options.

There are five categories of options that control how EPANET analyzes a network:
Hydraulics, Quality, Reactions, Times, and Energy. To set any of these options:

1. Select the Options category from the Data Browser or select Project
>> Analysis Options from the menu bar.
2. Select Hydraulics, Quality, Reactions, Times, or Energy from the
3. If the Property Editor is not already visible, click the Browser’s Edit
button (or hit the Enter key).
4. Edit your option choices in the Property Editor.

Water quality options define how the water quality analysis is carried out.

1. Parameter

Type of water quality parameter being modeled. Choices include:
·  NONE (no quality analysis),
·  CHEMICAL (compute chemical concentration),
·  AGE (compute water age),
·  TRACE (trace the percent of flow originating from a specific

2. Mass Units

Mass units used to express concentration. Choices are mg/L or mg/L.
Units for Age and Trace analyses are fixed at hours and percent,

3. Relative Diffusivity

Ratio of the molecular diffusivity of the chemical being modeled to
that of chlorine at 20 deg. C (0.00112 sq ft/day). Use 2 if the
chemical diffuses twice as fast as chlorine, 0.5 if half as fast, etc.
Applies only when modeling mass transfer for pipe wall reactions.
Set to zero to ignore mass transfer effects.

4.Trace Node

ID label of the node whose flow is being traced. Applies only to flow
tracing analyses.

5. Quality Tolerance

Smallest change in quality that will cause a new parcel of water to be
created in a pipe. A typical setting might be 0.01 for chemicals
measured in mg/L as well as water age and source tracing.

If you are using a reactive contaminant, then u will need to set the Reaction options as well. You will also need to set the Time options to set the time step for the analysis.

EPANET's water quality analyzer can:

model the movement of a non-reactive tracer material through the network over time
model the movement and fate of a reactive material as it grows (e.g., a disinfection by-product) or decays (e.g., chlorine residual) with time
model the age of water throughout a network
track the percent of flow from a given node reaching all other nodes over time
model reactions both in the bulk flow and at the pipe wall
allow growth or decay reactions to proceed up to a limiting concentration
employ global reaction rate coefficients that can be modified on a pipe-by-pipe basis
allow for time-varying concentration or mass inputs at any location in the network
model storage tanks as being either complete mix, plug flow, or two-compartment reactors

You will need to set the parameters accordingly.

If you are using measured value for initial quality parameters, you will need to use this to calibrate your model first.

It is better to understand the water quality simulation model.

Basic Transport

EPANET’s water quality simulator uses a Lagrangian time-based approach to track
the fate of discrete parcels of water as they move along pipes and mix together at
junctions between fixed-length time steps. These water quality time steps are
typically much shorter than the hydraulic time step (e.g., minutes rather than hours)
to accommodate the short times of travel that can occur within pipes.
The method tracks the concentration and size of a series of non-overlapping segments
of water that fills each link of the network. As time progresses, the size of the most
upstream segment in a link increases as water enters the link while an equal loss in
size of the most downstream segment occurs as water leaves the link. The size of the
segments in between these remains unchanged.

For each water quality time step, the contents of each segment are subjected to
reaction, a cumulative account is kept of the total mass and flow volume entering
each node, and the positions of the segments are updated. New node concentrations
are then calculated, which include the contributions from any external sources.
Storage tank concentrations are updated depending on the type of mixing model that
is used (see below). Finally, a new segment will be created at the end of each link
that receives inflow from a node if the new node quality differs by a user-specified
tolerance from that of the link’s last segment.

Initially each pipe in the network consists of a single segment whose quality equals
the initial quality assigned to the upstream node. Whenever there is a flow reversal in
a pipe, the pipe’s parcels are re-ordered from front to back.

Mixing in Storage Tanks

EPANET can use four different types of models to characterize mixing within
storage tanks as illustrated in Figure 3.5:
·  Complete Mixing
·  Two-Compartment Mixing
·  FIFO Plug Flow
·  LIFO Plug Flow

Different models can be used with different tanks within a network.
(A) Complete Mixing
(B) Two-Compartment Mixing
(C) Plug Flow - FIFO
(D) Plug Flow - LIFO

The Complete Mixing model assumes that all water that enters a tank
is instantaneously and completely mixed with the water already in the tank. It is the
simplest form of mixing behavior to assume, requires no extra parameters to describe
it, and seems to apply quite well to a large number of facilities that operate in filland-
draw fashion.
The Two-Compartment Mixing model  divides the available storage
volume in a tank into two compartments, both of which are assumed completely
mixed. The inlet/outlet pipes of the tank are assumed to be located in the first
compartment. New water that enters the tank mixes with the water in the first
compartment. If this compartment is full, then it sends its overflow to the second
compartment where it completely mixes with the water already stored there. When
water leaves the tank, it exits from the first compartment, which if full, receives an
equivalent amount of water from the second compartment to make up the difference.
The first compartment is capable of simulating short-circuiting between inflow and
outflow while the second compartment can represent dead zones. The user must
supply a single parameter, which is the fraction of the total tank volume devoted to
the first compartment.

The FIFO Plug Flow model assumes that there is no mixing of water
at all during its residence time in a tank. Water parcels move through the tank in a
segregated fashion where the first parcel to enter is also the first to leave. Physically
speaking, this model is most appropriate for baffled tanks that operate with
simultaneous inflow and outflow. There are no additional parameters needed to
describe this mixing model.

The LIFO Plug Flow model also assumes that there is no mixing
between parcels of water that enter a tank. However in contrast to FIFO Plug Flow,
the water parcels stack up one on top of another, where water enters and leaves the
tank on the bottom. This type of model might apply to a tall, narrow standpipe with
an inlet/outlet pipe at the bottom and a low momentum inflow. It requires no
additional parameters be provided.

Water Quality Reactions

EPANET can track the growth or decay of a substance by reaction as it travels
through a distribution system. In order to do this it needs to know the rate at which
the substance reacts and how this rate might depend on substance concentration.
Reactions can occur both within the bulk flow and with material along the pipe wall.

 For example free chlorine (HOCl) reacting with natural organic matter (NOM) in the bulk phase and is also transported
through a boundary layer at the pipe wall to oxidize iron (Fe) released from pipe wall
corrosion. Bulk fluid reactions can also occur within tanks. EPANET allows a
modeler to treat these two reaction zones separately.

Bulk Reactions

EPANET models reactions occurring in the bulk flow with n-th order kinetics, where
the instantaneous rate of reaction (R in mass/volume/time) is assumed to be
EPANET can also consider reactions where a limiting concentration exists on the
ultimate growth or loss of the substance

Model                                    Parameters                                     Examples
First-Order Decay                   CL = 0, Kb < 0, n = 1                       Chlorine
First-Order Saturation Growth  CL > 0, Kb > 0, n = 1                       Trihalomethanes
Zero-Order Kinetics                 CL = 0, Kb <> 0, n = 0                     Water Age
No Reaction                           CL = 0, Kb = 0                                 Fluoride Tracer

Bulk reaction coefficients usually increase with increasing temperature. Running
multiple bottle tests at different temperatures will provide more accurate assessment
of how the rate coefficient varies with temperature.

Wall Reactions

The rate of water quality reactions occurring at or near the pipe wall can be
considered to be dependent on the concentration in the bulk flow.

The wall reaction coefficient can depend on temperature and can also be correlated to
pipe age and material. It is well known that as metal pipes age their roughness tends
to increase due to encrustation and tuburculation of corrosion products on the pipe
walls. This increase in roughness produces a lower Hazen-Williams C-factor or a
higher Darcy-Weisbach roughness coefficient, resulting in greater frictional head loss
in flow through the pipe.
There is some evidence to suggest that the same processes that increase a pipe's
roughness with age also tend to increase the reactivity of its wall with some chemical
species, particularly chlorine and other disinfectants. EPANET can make each pipe's
Kw be a function of the coefficient used to describe its roughness.

Water Age and Source Tracing
In addition to chemical transport, EPANET can also model the changes in the age of
water throughout a distribution system. Water age is the time spent by a parcel of
water in the network. New water entering the network from reservoirs or source
nodes enters with age of zero. Water age provides a simple, non-specific measure of
the overall quality of delivered drinking water. Internally, EPANET treats age as a
reactive constituent whose growth follows zero-order kinetics with a rate constant
equal to 1 (i.e., each second the water becomes a second older).
EPANET can also perform source tracing. Source tracing tracks over time what
percent of water reaching any node in the network had its origin at a particular node.
The source node can be any node in the network, including tanks or reservoirs.
Internally, EPANET treats this node as a constant source of a non-reacting
constituent that enters the network with a concentration of 100. Source tracing is a
useful tool for analyzing distribution systems drawing water from two or more
different raw water supplies. It can show to what degree water from a given source
blends with that from other sources, and how the spatial pattern of this blending
changes over time.

You will also need to know about,

Source Quality Editor

The Source Quality Editor is a pop-up dialog used to describe the quality of source
flow entering the network at a specific node. This source might represent the main
treatment works, a well head or satellite treatment facility, or an unwanted
contaminant intrusion.

Field                                        Description                        
Source Type                            Select either:
                                               - Concentration
                                               - Mass Booster
                                               - Flow Paced Booster
                                               - Setpoint Booster

Source Quality                         Baseline or average concentration (or mass flow rate per
                                               minute) of source – leave blank to remove the source

Quality Pattern                         ID label of time pattern used to make source quality vary
                                               with time – leave blank if not applicable

A water quality source can be designated as a concentration or booster source.

·  A concentration source fixes the concentration of any external
inflow entering the network, such as flow from a reservoir or from a
negative demand placed at a junction.

·  A mass booster source adds a fixed mass flow to that entering the
node from other points in the network.

·  A flow paced booster source adds a fixed concentration to that
resulting from the mixing of all inflow to the node from other points
in the network.

·  A setpoint booster source fixes the concentration of any flow
leaving the node (as long as the concentration resulting from all
inflow to the node is below the setpoint).

The concentration-type source is best used for nodes that represent source water
supplies or treatment works (e.g., reservoirs or nodes assigned a negative demand).
The booster-type source is best used to model direct injection of a tracer or additional
disinfectant into the network or to model a contaminant intrusion.

You will not get a complete solution from these entries. You will need to start working out on your own with various options. It is difficult to train a software through online forum, but keep posting your doubts, and we will do as much as we can. Since we have resources who are more of a modelling expert than academicians, you may find this difficult.

Reply | Threaded
Open this post in threaded view

Re: EPANET water quality modelling

The Community Engineer
In reply to this post by The Community Engineer
This may help you.

Importance of demand modelling in network water quality models: a review