pyforce: Python Framework data-driven model Order Reduction for multi-physiCs problEms
- Description
- How to cite pyforce
- Installation
- Tutorials
- Authors and contributions
- Community Guidelines
pyforce is a Python package implementing Data-Driven Reduced Order Modelling (DDROM) techniques for applications to multi-physics problems, mainly set in the Nuclear Engineering world. These techniques have been implemented upon the dolfinx package (currently v0.6.0), part of the FEniCSx project, to handle mesh generation, integral calculation and functions storage. The package is part of the ROSE (Reduced Order modelling with data-driven techniques for multi-phySics problEms): mathematical algorithms aimed at reducing the complexity of multi-physics models (for nuclear reactors applications), at searching for optimal sensor positions and at integrating real measures to improve the knowledge on the physical systems.
The techniques implemented here follow the same underlying idea expressed in the following figure: in the offline (training) phase, a dimensionality reduction process retrieves a reduced coordinate system onto which encodes the information of the mathematical model; the sensor positioning algorithm then uses this set to select the optimal location of sensors according to some optimality criterion, which depends on the adopted algorithm. In the online phase, the DA process begins, retrieving a novel set of reduced variables and then computing the reconstructed state through a decoding step.
At the moment, the following techniques have been implemented:
- Proper Orthogonal Decomposition with Projection and Interpolation for the Online Phase
- Generalised Empirical Interpolation Method, either regularised with Tikhonov or not
- Parameterised-Background Data-Weak formulation
- an Indirect Reconstruction algorithm to reconstruct non-observable fields
This package is aimed to be a valuable tool for other researchers, engineers, and data scientists working in various fields, not only restricted in the Nuclear Engineering world.
If you are going to use pyforce in your research work, please cite the following articles. The authors would be pleased if you could cite the relevant papers:
- Stefano Riva, Carolina Introini, and Antonio Cammi, “Multi-physics model bias correction with data-driven reduced order techniques: Application to nuclear case studies,” Applied Mathematical Modelling, vol. 135, pp. 243–268, 2024. https://doi.org/10.1016/j.apm.2024.06.040.
- Antonio Cammi, Stefano Riva, Carolina Introini, Lorenzo Loi, and Enrico Padovani. Data-driven model order reduction for sensor positioning and indirect reconstruction with noisy data: Application to a circulating fuel reactor. Nuclear Engineering and Design, 421:113105, 2024. doi:https://doi.org/10.1016/j.nucengdes.2024.113105.
For LaTeX users:
@article{RIVA2024_AMM,
title = {Multi-physics model bias correction with data-driven reduced order techniques: Application to nuclear case studies},
journal = {Applied Mathematical Modelling},
volume = {135},
pages = {243-268},
year = {2024},
issn = {0307-904X},
doi = {https://doi.org/10.1016/j.apm.2024.06.040},
url = {https://www.sciencedirect.com/science/article/pii/S0307904X24003196},
author = {Stefano Riva and Carolina Introini and Antonio Cammi},
keywords = {Reduced order modelling, Data driven, Nuclear reactors, Multi-physics, Model correction},
}
@article{CAMMI2024_NED,
title = {Data-driven model order reduction for sensor positioning and indirect reconstruction with noisy data: Application to a Circulating Fuel Reactor},
journal = {Nuclear Engineering and Design},
volume = {421},
pages = {113105},
year = {2024},
issn = {0029-5493},
doi = {https://doi.org/10.1016/j.nucengdes.2024.113105},
url = {https://www.sciencedirect.com/science/article/pii/S002954932400205X},
author = {Antonio Cammi and Stefano Riva and Carolina Introini and Lorenzo Loi and Enrico Padovani},
keywords = {Hybrid Data-Assimilation, Generalized Empirical Interpolation Method, Indirect Reconstruction, Sensors positioning, Molten Salt Fast Reactor, Noisy data},
}
- Stefano Riva, Sophie Deanesi, Carolina Introini, Stefano Lorenzi, and Antonio Cammi. Neutron Flux Reconstruction from Out-Core Sparse Measurements using Data-Driven Reduced Order Modelling. In International Conference on Physics of Reactors (PHYSOR24), San Francisco, USA, April 2024.
- Matteo Lo Verso, Stefano Riva, Carolina Introini, Eric Cervi, Francesca Giacobbo, Laura Savoldi, Marcello Di Prinzio, Marco Caramello, Luciana Barucca, and Antonio Cammi, “Application of a non-intrusive Reduced Order Modelling approach to Magneto-HydroDynamics,” accepted for publication in Physics of Fluids, 2024.
- Stefano Riva, Carolina Introini, Antonio Cammi, and J. Nathan Kutz, “Robust state estimation from partial out-core measurements with shallow recurrent decoder for nuclear reactors,” 2024. preprint available at https://arxiv.org/abs/2409.12550.
- Stefano Riva, Carolina Introini, Enrico Zio, and Antonio Cammi, “Impact of Malfunctioning Sensors on Data-Driven Reduced Order Modelling: Application to Molten Salt Reactors,” EPJ Web Conf., vol. 302, p. 17003, 2024.
The package can be installed using pip
, make sure all the dependencies are installed (following these steps). The requirements are listed here.
It is suggested to create a conda environment: at first, clone the repository
git clone https://github.com/ERMETE-Lab/ROSE-pyforce.git
create a conda environment using environment.yml
cd ROSE-pyforce
conda env create -f pyforce/environment.yml
activate the environment and then install the package using pip
conda activate pyforce-env
python -m pip install pyforce/
The pyforce package is tested on some tutorials available in the docs, including fluid dynamics and neutronics problems.
- Laminar Flow over Cylinder (DFG2 benchmark): solved with dolfinx;
- Multi-Group Neutron Diffusion (ANL11-A2 benchmark): solved in dolfinx.
- Differentially Heated Cavity (buoyant Navier-Stokes): solved with OpenFOAM-6, as in ROM4FOAM tutorial.
Coming Soon: multiphysics (neutronics+thermal-hydraulics) with dolfinx and OpenFOAM.
The snapshots can be either generated by the user or be downloaded at the following link
pyforce is currently developed and mantained at Nuclear Reactors Group - ERMETE Lab by
- Stefano Riva
- Carolina Introini
under the supervision of Prof. Antonio Cammi.
If interested, please contact stefano.riva@polimi.it, carolina.introini@polimi.it, antonio.cammi@polimi.it
We welcome contributions and feedback from the community! Below are the guidelines on how to get involved:
If you would like to contribute, please follow these steps:
- Fork the repository.
- Implement your changes. If you're adding new features, we kindly ask that you include an example demonstrating how to use them.
- Submit a pull request for review.
If you encounter any issues or bugs with pyforce, please report them through the GitHub Issues page. Be sure to include detailed information to help us resolve the problem efficiently.
For support, you can either:
- Open a discussion on the GitHub Discussions page.
- Send an email directly to: stefano.riva@polimi.it or carolina.introini@polimi.it
Thank you for helping improve pyforce!