pyforce: Python Framework for data-driven model Order Reduction of multi-physiCs problEms

pyforce: Python Framework for data-driven model Order Reduction of multi-physiCs problEms - Published in JOSS (2026)

https://github.com/ermete-lab/rose-pyforce

Science Score: 87.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 20 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: arxiv.org, sciencedirect.com, zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

data-driven multi-physics nuclear-engineering reduced-order-models
Last synced: about 1 month ago · JSON representation

Repository

Python Framework for data-driven model Order Reduction of multi-physiCs problEms

Basic Info
Statistics
  • Stars: 15
  • Watchers: 1
  • Forks: 6
  • Open Issues: 0
  • Releases: 4
Topics
data-driven multi-physics nuclear-engineering reduced-order-models
Created over 2 years ago · Last pushed about 1 month ago
Metadata Files
Readme License

README.md

pyforce

Reference Paper 1 Reference Paper 2

Docs Tutorials Zenodo

Testing pyforce JOSS draft paper

pyforce: Python Framework data-driven model Order Reduction for multi-physiCs problEms

Description

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.

DDROMstructure

At the moment, the following techniques have been implemented:

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.

How to cite pyforce

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:

  1. 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.
  2. 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:

```bibtex

@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}, }

```

Selected works with pyforce

  • 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.

Installation

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 bash git clone https://github.com/ERMETE-Lab/ROSE-pyforce.git create a conda environment using environment.yml bash cd ROSE-pyforce conda env create -f pyforce/environment.yml activate the environment and then install the package using pip (be aware than on PyPI there exists another package named pyforce, so be sure to install it from the cloned repository) bash conda activate pyforce-env cd pyforce/ python -m pip install .

Package Structure

The package pyforce comprises 3 subpackages: offline, online and tools. The first two collect the main functionalities, in particular the different DDROM techniques; whereas, the last includes importing and storing functions (from dolfinx directly or mapping from OpenFOAM), some backend classes for the snapshots and the calculation of integrals/norms. In the following, some figures are sketching how the different classes are connected to each other during the offline and online phases.

More details on how the classes are connected to each other (both during the offline and online phases) can be found in the docs.

Tutorials

The pyforce package is tested on some tutorials available in the docs, including fluid dynamics and neutronics problems.

  1. Laminar Flow over Cylinder (DFG2 benchmark): solved with dolfinx;
  2. Multi-Group Neutron Diffusion (ANL11-A2 benchmark): solved in dolfinx.
  3. 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 DOI

Demo results

Two demo results are reported here for a quick overview of the package capabilities, for the POD with Interpolation and for the GEIM with Tikhonov Regularisation. More details can be found in the docs.

  • POD with Interpolation on the Laminar Flow over Cylinder tutorial: in the following block, a code-block will be reported to show how to generate the POD basis from a set of train snapshots (offline phase) and how to perform the online phase and the state reconstruction ```python # Offline Phase from pyforce.offline.pod import POD podoff = POD(trainsnaps : FunctionsList, varname, verbose = True) podoff.computebasis(trainsnaps : FunctionsList, rank)

...

Online Phase

from pyforce.online.podinterpolation import PODI podi = PODI(podmodes: FunctionsList, coefficientsmaps: list, varname) reconstruction = podi.reconstruct(testsnaps: FunctionsList, testparams: list, basistouse: int) ```

PODI

  • GEIM with Tikhonov Regularisation on the Multi-Group Neutron Diffusion tutorial: in the following block, a code-block will be reported to show how to generate the GEIM basis and sensors from a set of train snapshots (offline phase) and how to perform the online phase and the state reconstruction ```python # Offline Phase from pyforce.offline.geim import GEIM geimoff = GEIM(mesh: dolfinx.mesh.Mesh, V: FunctionSpace, varname, sensorpointspread) geimoff.offline(trainsnaps : FunctionsList, Max_Sensors: int, verbose = True)

Online Phase

from pyforce.online.trgeim import TRGEIM trgeim = TRGEIM(magicfunctions: FunctionsList, magicsensors: FunctionsList, meanofflinebetacoeffs: np.ndarray, stdofflinebetacoeffs: np.ndarray, varname) trgeim.reconstruct(testsnaps: FunctionsList, Mtouse, noisevalue, regparam = noisevalue**2) ```

TR-GEIM

Authors and contributions

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

Community Guidelines

We welcome contributions and feedback from the community! Below are the guidelines on how to get involved:

Contribute to the Software

If you would like to contribute, please follow these steps:

  1. Fork the repository.
  2. Implement your changes. If you're adding new features, we kindly ask that you include an example demonstrating how to use them.
  3. Submit a pull request for review.

Reporting Issues or Problems

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.

Seeking Support

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!

Owner

  • Name: ERMETE-Lab
  • Login: ERMETE-Lab
  • Kind: organization
  • Location: Italy

Engineering for nuclear Reactors probleMs with advancEd simulaTions and modElling (Prof. Antonio Cammi)

JOSS Publication

pyforce: Python Framework for data-driven model Order Reduction of multi-physiCs problEms
Published
January 16, 2026
Volume 11, Issue 117, Page 6950
Authors
Stefano Riva ORCID
Energy Department - Nuclear Engineering Division, Nuclear Reactors Group - ERMETE Lab, Politecnico di Milano, Milan, Italy
Carolina Introini ORCID
Energy Department - Nuclear Engineering Division, Nuclear Reactors Group - ERMETE Lab, Politecnico di Milano, Milan, Italy
Antonio Cammi ORCID
Energy Department - Nuclear Engineering Division, Nuclear Reactors Group - ERMETE Lab, Politecnico di Milano, Milan, Italy, Department of Mechanical and Nuclear Engineering and Emirates Nuclear Technology Center, Khalifa University, Abu Dhabi (127788), United Arab Emirates
Editor
Fei Tao ORCID
Tags
reduced order modelling nuclear reactors data-driven multi physics

GitHub Events

Total
  • Release event: 1
  • Issues event: 5
  • Watch event: 2
  • Issue comment event: 13
  • Push event: 8
  • Pull request event: 9
  • Fork event: 1
Last Year
  • Release event: 1
  • Issues event: 2
  • Issue comment event: 5
  • Push event: 7
  • Pull request event: 7

Issues and Pull Requests

Last synced: about 1 month ago

All Time
  • Total issues: 7
  • Total pull requests: 13
  • Average time to close issues: 22 days
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 3
  • Total pull request authors: 3
  • Average comments per issue: 4.29
  • Average comments per pull request: 0.08
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 2
  • Average time to close issues: 3 days
  • Average time to close pull requests: 8 minutes
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • damar-wicaksono (4)
  • ShimingYIN (2)
  • DHOPQ (1)
Pull Request Authors
  • Steriva (11)
  • Neko-tan (1)
  • alberto743 (1)
Top Labels
Issue Labels
Pull Request Labels