Getting Started
This guide walks you through installing UQGrid, preparing input data, and running your first dynamic simulation.
Prerequisites
- Python 3.8 or newer (Python 3.10 recommended).
- A working C compiler toolchain (for PETSc builds).
Optional components:
Installation
Clone the repository and install UQGrid in editable mode:
git clone https://github.com/dmaldona/uqgrid.git
cd uqgrid
python -m pip install --upgrade pip
pip install -e .
Development extras
Install additional tooling for linting, tests, and profiling:
pip install -e ".[dev]"
PETSc optional support
Enable the PETSc-backed integrators and adjoint solvers:
pip install -e ".[petsc]"
PETSc must be compiled with complex-number support and shared libraries. Refer to the PETSc installation guide for platform-specific instructions.
Documentation toolchain
Install the documentation extras to build this site locally:
pip install -e ".[docs]"
Quick start example
The bin/dynamics_driver.py
script demonstrates a typical workflow. Supply a
RAW/DYR pair (sample files are included under data/
) and optional PETSc flags:
python bin/dynamics_driver.py \
--raw data/IEEE39_v33.raw \
--dyr data/IEEE39.dyr \
--ton 0.05 --toff 0.10 --tend 0.5 --dt 0.01 \
--petsc \
-- -ts_monitor -snes_monitor
Key steps embedded in the script:
- Load the static network with
load_psse
and enrich it with dynamics viaadd_dyr
. - Register a bus fault using
psys.add_busfault(bus_id, rfault)
. - Configure integration parameters with
IntegrationConfig
. - Run
integrate_system
to obtain the state history and sensitivities.
Next steps
- Learn more about configuration options in the Dynamics Simulation guide.
- For contributing or extending UQGrid, see the Developer Guide.