WEC-Grid is an open-source Python library crafted to simulate the integration of Wave Energy Converters (WECs) with power grid simulators like PSS®E & PyPSA.
Documentation: acep-uaf.github.io/WEC-Grid
We recommend Python 3.9 to match pinned dependencies.
- Clone the repo
git clone https://github.com/acep-uaf/WEC-Grid
cd WEC-Grid- Create and activate a virtual environment
Using Python venv
- macOS (bash/zsh):
python3 -m venv wecgrid_env source wecgrid_env/bin/activate
- Upgrade pip
python -m pip install --upgrade pip- Install WEC‑Grid
pip install -e .- Optional (dev tools + tests)
pip install -e .[dev]
pytest -qNeed Windows, Linux, or conda instructions? See the full guide: docs/install.md.
You can configure paths via code or environment variables.
-
Database path
- Quick (env var): set
WECGRID_DB_PATHto your SQLite database- Windows (PowerShell):
$env:WECGRID_DB_PATH = "C:\\path\\to\\WECGrid.db" - macOS/Linux (bash/zsh):
export WECGRID_DB_PATH=~/path/to/WECGrid.db
- Windows (PowerShell):
- Persistent (code):
engine.database.set_database_path("/path/to/WECGrid.db")- This writes a JSON config into your user config directory (e.g.,
~/.wecgrid/database_config.json).
- This writes a JSON config into your user config directory (e.g.,
- Quick (env var): set
-
WEC‑Sim path (MATLAB install)
- Quick (env var): set
WECGRID_WECSIM_PATHto the WEC‑Sim folder - Persistent (code):
engine.wecsim.set_wec_sim_path("/path/to/WEC-Sim")- Stored in your user config directory (e.g.,
~/.wecgrid/wecsim_config.json).
- Stored in your user config directory (e.g.,
- Quick (env var): set
- Miniconda: Recommended for managing Python versions and binary packages. Download: https://docs.conda.io/en/latest/miniconda.html
- MATLAB + WEC‑Sim: For WEC simulations. Install MATLAB R2021b and WEC‑Sim, then add the MATLAB Engine API for Python to your active environment: https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html
- PSS®E API (Windows): Commercial license required. See: https://new.siemens.com/global/en/products/energy/services/transmission-distribution-smart-grid/consulting-and-planning/pss-software/pss-e.html