The Neo-Panamax lock simulator (NPXsim) is a model to simulate saltwater intrusion through the Neo-Panamax (NPX) locks of the Panama Canal. It consists of a mass balance that represents the exchanges of water and salt that take place between lock chambers and water saving basins (WSBs) as a result of vessel transit.
In its current implementation, NPXsim is tailor-made to simulate the operations of the NPX locks. However, it is possible to adapt it for the simulation of lock operations in any three-steps lock system with or without the use of WSBs.
The documentation for this repository is currently being developed. Please check back soon for detailed usage guides, API references, and more comprehensive examples.
This project uses uv for environment and package management.
-
Ensure you have
uvinstalled. If not, you can install it by following the official documentation. -
Clone this repository to a local directory:
git clone https://github.com/mgcastre/NPXsim.git
cd NPXsim- Use the following command to create a virtual environment and install all dependencies exactly as defined in the
uv.lockfile:
uv sync- Activate the isolated environment to start working:
macOS/Linux:
source .venv/bin/activateWindows:
.venv\Scripts\activateA minimal code example demonstrating how to initialize and run the NPXsim model is provided in the examples folder.
If you use this software in your research, please cite the Zenodo DOI:
Castrellón, M. G. (2026). NPXsim: A tool to simulate saltwater intrusion through the Neo-Panamax locks. Zenodo. https://doi.org/10.5281/zenodo.18362372
This project is licensed under the MIT License.
Created as part of PhD Research at IHE Delft Institute for Water Education and TU Delft.