Workflow for Age, Constituent, and Trace analyses using WaterGEMS and WaterCAD

Product(s): WaterGEMS, WaterCAD
Version(s): CONNECT Edition, V8i
Area: Modeling

This articles will walk through the steps to run water age, constituent, and trace analyses using WaterGEMS and WaterCAD


To run these, you would need to set the Calculation Type field in the Calculation Options to the analysis type you will compute.

By selecting Age, Constituent, or Trace, when you compute a model WaterGEMS and WaterCAD will compute an extended period simulation as well as the type of analysis you have picked. Starting with the CONNECT Edition Update 3, you can calculate all three of the analysis types in a single scenario by choosing the Calculation Type “Age, Constituent, and Trace.”

Note that these types of calculations are always extended period simulations, and not available for a steady state run. Details on the different types of runs can be found below.

In addition to the setting the calculation options, there are also settings in the alternatives for types of calculations. The entries for the alternatives can be found on in the topics below.

Water Age

An age analysis determines how long the water has been in the system. This type of analysis is more of a general water quality indicator than a measurement of any specific constituent.

The Age alternative includes the initial water age for nodes in the model. The calculated water age will change for all elements in the model with the exception of reservoirs. The reservoir element is considered a new source of water. The calculated water age at the reservoir will be equal to the initial water age for all time steps.

For tanks, you will select a mixing model. There are four different types of mixing models: Completely Mixed, 2-Compartment, LIFO, and FIFO.

The Completely Mixed model assumes that all water that enters a tank is instantaneously and completely mixed with the water already in the tank. The 2-Compartment model divides the available storage volume in a tank into two compartments, both of which are assumed completely mixed. The LIFO model stands for “last in, first out.” This means the oldest water in the tank is the first water out of the tank when the tank is draining. The FIFO model stand for “first in, first out.” This means the youngest water is the first water out of the tank when the tank is draining.

More information on the tank mixing models can be found here: Which "Tank Mixing Model" attribute should I use?

For pipes, water age will depend on the travel time in the pipe. The travel time will also impact the water age for other elements. For instance, for a node adjacent to a reservoir, the water age at that node will be equal to the initial age of the reservoir plus the travel time in the pipe between the reservoir and the node.

To see the water age results, graphing the results will be the best option. You can also use the Time Browser to view the water age results at a given time step in either the Properties grid or element FlexTables.

In general, the further from a reservoir a node is, the older the water will be. However, you can see results where demands are being satisfied by a tank if a pump has a status of “Off,” such as from a control. In such cases, the water age may increase as a result. An example of this is in the following graph of select nodes in the WaterGEMS sample file Example1.wtg:

Junction J-170 is near a reservoir, adjacent to a pump. Junction J-210 is near the farthest point from the reservoir. While the pump is on, the water age at J-170 is nearly zero and the water age at J-210 is around 6.25 hours. While the pump is on, water is also filling a tank in the system. When the pump turns off, the demands in the system is satisfied from the tank, so the water age is based on the age in the tank, and is higher as a result.

A typical water age analysis will be for longer than 24 hours. This is because it will often take longer than 24 hours to reach an equilibrium between flow from a reservoir and flow from tanks. Note that you can see this in the graph above as well.


A constituent analysis determines the concentration of a constituent at all nodes and links in the system. A constituent is any substance, such as chlorine and fluoride, for which the growth or decay can be adequately described through the use of a bulk reaction coefficient and a wall reaction coefficient. Constituent analyses can be used to determine chlorine residuals throughout the system under present chlorination schedules, or can be used to determine probable behavior of the system under proposed chlorination schedules.

The constituent is defined in the Constituent manager. This is accessed from the Components tab (Components > Other > Water Quality > Constituent).

This is where you define the properties of the constituent, like diffusivity, bulk reaction properties, and wall reaction rate. This information can be added to the engineering library and used in other models.

Once the constituent data is added, you would select the constituent in the Constituent alternative. In the Constituent System Data tab, there is a pulldown menu. You can also access the Constituents manager from there by clicking the ellipsis (…) button.

With the constituent created and assigned in the alternative, you can choose a constituent source. If you do this, you have options to enter a constituent pattern and a constituent source type. You can use a constituent source type of Concentration, Flow Paced Booster, Mass Booster, and Setpoint Booster. You can find information on these types here: Understanding Constituent Source Types and Constituent patterns.

It is not required to include a constituent source. If you do not set a source, the constituent concentration will still be calculated in the system based on the properties included in the Constituent properties. In addition, you can also select the constituent source, the constituent source types, and constituent patterns in the Constituent alternative.

The last thing needed to run a constituent analysis is to set the Calculation Type in the calculation options.

After computing, you can view the constituent results in the properties and FlexTables. Constituent results can vary with time, so you can use the Time Browser to see results at other time steps. You can also view the results in a graph.


A trace analysis determines the percentage of the water at all nodes and links in the system in relation to a source node. The source is a specific node in the system assigned in the Trace alternative. Only one trace node can be assigned at a given time. If there is more than one trace node, you can computer multiple trace analyses to calculate the percentage. The Water Quality Batch Run tool could also be used. See the section below for more information.

To begin, set the trace node you want to use in the Trace alternative:

When you compute the trace analysis, the percentage calculated with be the percentage of flow at that time step to the give element that came from the trace node. The Trace alternative can also be used to define an initial percentage. This initial percentage represents the percentage of water attributable to the trace node at the start of the simulation. This value is also used for the initial percentage for downstream pipes. The default for this is 0%. The initial trace percentage can also be entered in the element properties grid.

Once the Trace alternative is setup, set the Calculation Type in the calculation options to “Trace.” When you compute the model, WaterGEMS will calculate the hydraulic solution and then run a trace analysis. Since the trace results will vary with time, you can create a graph to see the trace results or use the Time Browser to move forward to a later time in the simulation.


Water Quality Batch Run

There is a separate tool called Water Quality Batch Run, which can calculate trace or constituent runs from multiple sources. The following link has more information on this: Using Water Quality Batch run for multi-point trace and multiple constituents.


See Also

  • Created by Bentley Colleague
  • When:
  • Revisions: 1
  • Comments: 0