Skip to main content

Logo

Parallel Transient Simulation in Water Networks
Explore the docs »

View Demo · Report Bug · Request Feature

Downloads

Getting Started

To get a local copy up and running follow these simple steps. PTSNET can be downloaded via pip

Installation

We highly encourage using a conda environment for the installation, so that dependencies such as OpenMPI don't have to be manually installed.

  • Install conda

    # Linux
    https://docs.conda.io/projects/conda/en/latest/user-guide/install/linux.html
    
    # Windows
    https://conda.io/projects/conda/en/latest/user-guide/install/windows.html
    
  • Install the conda environment with all the necessary dependencies, by opening a terminal and running the following commands

    1. Download environment.yml
    2. Execute conda activate to start conda
    3. Execute conda env create -f environment.yml
    4. Execute conda activate ptsnet

Usage

Create a file called named simulation.py with the following contents:

import matplotlib.pyplot as plt
from ptsnet.simulation.sim import PTSNETSimulation
from ptsnet.utils.io import get_example_path

sim = PTSNETSimulation(
  workspace_name = 'TNET3_VALVE',
  inpfile = get_example_path('TNET3'))
sim.define_valve_operation('VALVE-179', initial_setting=1, final_setting=0, start_time=1, end_time=2)
sim.run(); print(sim)

plt.plot(sim['time'], sim['node'].head['JUNCTION-73'])
plt.show()

After creating the file, you can execute the code from the command line.

To execute the parallel version of PTSNET it is necessary to have Linux/Mac.

If you have Linux/Mac execute the following command on the terminal:

mpiexec -n 4 python simulation.py

The number of processors is defined by the parameter -n in the command, in this case 4.

If you have Windows you can still run the simulation as shown below, but you will not have access to PTSNET's parallel capabilities:

python simulation.py

For more examples, please refer to the jupyter notebooks.

Cite Us

If the PTSNET package has been useful for your research, please cite the paper below:

PTSNet: A Parallel Transient Simulator for Water Transport Networks based on vectorization and distributed computing

@article{riano2022ptsnet,
  title={PTSNet: A Parallel Transient Simulator for Water Transport Networks based on vectorization and distributed computing},
  author={Ria{\~n}o-Brice{\~n}o, Gerardo and Hodges, Ben R and Sela, Lina},
  journal={Environmental Modelling \& Software},
  volume={158},
  pages={105554},
  year={2022},
  publisher={Elsevier}
}

If the PTSNET algorithm was useful for you, please cite the paper below:

Distributed and Vectorized Method of Characteristics for Fast Transient Simulations in Water Distribution Systems

@article{riano2022distributed,
  title={Distributed and vectorized method of characteristics for fast transient simulations in water distribution systems},
  author={Ria{\~n}o-Brice{\~n}o, Gerardo and Sela, Lina and Hodges, Ben R},
  journal={Computer-Aided Civil and Infrastructure Engineering},
  year={2022},
  publisher={Wiley Online Library}
}

License

Distributed under the Unlicense License. See LICENSE for more information.

Contact

Gerardo Riano - griano@utexas.edu

Lina Sela - linasela@utexas.edu

Project Link: https://github.com/gandresr/PTSNET

Acknowledgements

The authors acknowledge the Texas Advanced Computing Center (TACC) at The University of Texas at Austin for providing HPC resources that have contributed to the research results reported within this publication. This work was supported in part by NSF under award 2015658 and Cooperative Agreement No. 83595001 awarded by the U.S. Environmental Protection Agency to The University of Texas at Austin. It has not been formally reviewed by EPA. The views expressed in this presentation are solely those of the authors, and do not necessarily reflect those of the Agency. EPA does not endorse any products or commercial services mentioned in this publication.

Metadata

Release files for ptsnet 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ptsnet 0.1.10
File Size Uploaded
ptsnet-0.1.10.tar.gz 571.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ptsnet 0.1.10
File Interpreter ABI Platform
ptsnet-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / ptsnet-0.1.10.tar.gz

Download URL ptsnet-0.1.10.tar.gz
Size 571.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8fee5f89c4e26b78b4bcb55f309b97a1f7ecfb3c87478c96c6a74aa30321f281
BLAKE2b-256 checksum
How to use checksums
fbda6497e903cec2d5160237d19e049df07c33279ed83f3f6e0ee208bd9f8c83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / ptsnet-0.1.10-py3-none-any.whl

Download URL ptsnet-0.1.10-py3-none-any.whl
Size 608.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdc55d7e2cae77f56f0c84316b9a5568c9329a3dbf7acb22020eca22ca16d047
BLAKE2b-256 checksum
How to use checksums
9188f76649e8a479f9d9cbc8ed345d5f41c05707a302b3987edb7ecf94e2a9f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.24

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.21

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.18

2 release files

0.0.17

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page