Parallel Transient Simulation in Water Networks
Project description
Parallel Transient Simulation in Water Networks
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
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
- Download environment.yml
- Execute
conda activateto start conda - Execute
conda env create -f environment.yml - 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:
@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:
@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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ptsnet-0.1.9.tar.gz.
File metadata
- Download URL: ptsnet-0.1.9.tar.gz
- Upload date:
- Size: 571.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfc7a5775ac47250d2d48d95911f059bd46d953d526b0aa2434f8fba266fb5ba
|
|
| MD5 |
fdde73ea030f17368cabff4cba5b281e
|
|
| BLAKE2b-256 |
ad3538e0fe8885cdf7b1230051e37d4714f4f7966250b579c5491d4fa12a7912
|
File details
Details for the file ptsnet-0.1.9-py3-none-any.whl.
File metadata
- Download URL: ptsnet-0.1.9-py3-none-any.whl
- Upload date:
- Size: 608.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68b0108e26050e3ba00f971fdbd9596dc891c0b5738c85d141937130840d3883
|
|
| MD5 |
bfb64d57cfb7e57ee02a16e2178d3951
|
|
| BLAKE2b-256 |
4f76f84973b2044c5f7cf8463a616d31cc4b4ab3363997929d12af1d9e7cf6dc
|