Simulation results

WNTR uses Pandas data objects to store simulation results. The use of Pandas facilitates a comprehensive set of time series analysis options that can be used to evaluate results. For more information on Pandas, see

Results are stored in Pandas Panels. A Panel is a 3-dimensional database. One Panel is used to store nodes results and one Panel is used to store link results. The Panels are indexed by:

  • Node or link attribute
  • Time in seconds from the start of the simulation
  • Node or link name

Conceptually, Panels can be visualized as blocks of data with 3 axis, as shown in Figure 8.

Pandas Panels

Figure 8 Conceptual representation of Panels used to store simulation results.

Node attributes include:

  • Demand
  • Expected demand
  • Leak demand (only when the WNTRSimulator is used)
  • Pressure
  • Head
  • Quality (only when the EpanetSimulator is used for a water quality simulation. Water age, tracer percent, or chemical concentration is stored, depending on the type of water quality analysis)
  • Type (junction, tank, or reservoir)

Link attributes include:

  • Velocity
  • Flowrate
  • Status (0 indicates closed, 1 indicates open)
  • Type (pipe, pump, or valve)

The example demonstrates use cases of simulation results. Node and link results are accessed using:


The indices can be used extract specific information from Panels. For example, to access the pressure and demand at node ‘123’ at 1 hour:

print(results.node.loc[['pressure', 'demand'], 3600, '123'])

To access the pressure for all nodes and times (the “:” notation returns all variables along the specified axis):

print(results.node.loc['pressure', :, :])

Attributes can be plotted as a time-series, as shown in Figure 9:

pressure_at_node123 = results.node.loc['pressure', :, '123']
Time-series graph.

Figure 9 Example time-series graphic.

Attributes can be plotted on the water network model, as shown in Figure 10. In this figure, a colorbar is included for both node and link attributes. Network and time-series graphics can be customized to add titles, labels, etc:

pressure_at_1hr = results.node.loc['pressure', 3600, :]
flowrate_at_1hr =['flowrate', 3600, :], node_attribute=pressure_at_1hr, 
Network graphic

Figure 10 Example network graphic.

Panels can be saved to Excel files using: