FESTIM-NIUQ
FESTIM-NIUQ is a Python package for Non-Intrusive Uncertainty Quantification of tritium transport simulations using the FESTIM finite-element framework.
The package couples EasyVVUQ (from the SEAVEA Toolkit) with FESTIM to propagate parametric uncertainties through tritium transport models and compute Sobol sensitivity indices via Polynomial Chaos Expansion (PCE) and Quasi-Monte Carlo (QMC) methods.
Features
- Non-intrusive UQ: treats the FESTIM solver as a black box — no solver modifications needed
- Sensitivity analysis: first-order and total-order Sobol indices for spatially-resolved quantities
- Multiple UQ methods: Polynomial Chaos Expansion (PCE), Quasi-Monte Carlo (QMC), and Finite Differences
- Correlated parameters: supports non-diagonal covariance matrices via Cholesky decomposition
- Bayesian inverse UQ: PCE surrogate + MCMC inversion with
emcee - Flexible configuration: all model and UQ settings controlled via YAML files
- HPC-ready: QCG-PilotJob integration and SLURM scripts included
- Automated plotting: publication-quality uncertainty and sensitivity plots
Installation
Prerequisites
- Python >= 3.9
- FESTIM (requires FEniCSx / DOLFINx)
Quick install
The easiest way to set up the environment is with conda:
# Create and activate environment with FESTIM
conda create -n festim-env
conda activate festim-env
conda install -c conda-forge festim
# Install FESTIM-NIUQ and its dependencies
pip install -r requirements.txt
Alternatively, install directly:
pip install -e .
Development install
pip install -e ".[dev]"
Usage
Basic UQ campaign
Run the default UQ campaign with built-in test configuration:
cd uq
python3 easyvvuq_festim.py
This will compute statistical moments of the tritium inventory and generate Sobol sensitivity index plots.
Custom configuration
Provide your own YAML configuration file:
python3 easyvvuq_festim.py --config config/config.uq_test_cj1959.yaml
Correlated parameters
Run UQ with correlated input parameters:
python3 easyvvuq_festim_correlated.py --config config/config.uq_test_cj1959.yaml --uq-scheme pce --p-order 3
Parameter scanning
Perform a parameter scan over a single parameter:
python3 festim_model_scan.py
Bayesian inverse UQ
Run Bayesian inversion using a PCE surrogate and MCMC:
python3 bayesian_inverse_uq.py --config config/config_bayesian_ss.yaml --p-order 3
Configuration
All settings are centralised in a YAML configuration file that controls:
- Geometry: domain size, coordinate system (Cartesian/cylindrical/spherical), mesh resolution
- Materials: transport coefficients with mean values and uncertainties
- Boundary conditions: Dirichlet, Neumann, or convective flux
- Source terms: volumetric generation rates
- Simulation: steady-state or transient, time stepping, solver tolerances
- UQ settings: parameter distributions, polynomial order, number of samples
See example configurations in uq/config/.
Testing
Run the test suite:
pytest tests/
Project Structure
festim_niuq/
├── festim_model/ # FESTIM model wrapper
│ ├── Model.py # Main model class (FESTIM 2.0 API)
│ └── diagnostics/ # Post-processing diagnostics
├── uq/ # UQ orchestration layer
│ ├── easyvvuq_festim.py # Main UQ campaign script
│ ├── easyvvuq_festim_correlated.py # Correlated parameters UQ
│ ├── bayesian_inverse_uq.py # Bayesian inverse UQ
│ ├── festim_model_run.py # Single FESTIM run wrapper
│ ├── festim_model_scan.py # Parameter scanning
│ ├── config/ # Example YAML configurations
│ └── util/ # Encoders, decoders, plotting
├── tests/ # Unit and integration tests
├── docs/ # Documentation
└── paper/ # JOSS paper
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the MIT License — see LICENSE for details.
Citation
If you use FESTIM-NIUQ in your research, please cite it. See CITATION.cff for details.
Acknowledgements
FESTIM-NIUQ was developed at the Nuclear Futures Institute, Bangor University.
Release files for festim-niuq 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| festim_niuq-0.2.0.tar.gz | 105.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| festim_niuq-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 211.5 kB
Release files / festim_niuq-0.2.0.tar.gz
| Download URL | festim_niuq-0.2.0.tar.gz |
|---|---|
| Size | 105.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a153967c2f0e6937728ad86882a0b8960b027f8eaf1819f12bce0797af5e5ec4
|
|
BLAKE2b-256 checksum How to use checksums |
81ab892990704b14a64fc579c68e66ebbec6b981ef76f91fff21c16e2fbad65c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / festim_niuq-0.2.0-py3-none-any.whl
| Download URL | festim_niuq-0.2.0-py3-none-any.whl |
|---|---|
| Size | 106.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e534d2d48eb3fbc6159de21e8a3a1ae148f3e5fafb38f34fd8fa51bd95bc8a0d
|
|
BLAKE2b-256 checksum How to use checksums |
5d9e1b11c92b0d85dda16a6d7c34a204ddffa1779f7e017da4acaa8584f6533a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|